Add samples

[+] samples/LibTest/cvExtractSURF/cv_ExtractSURF.dpr
[*] some changes in demos
[+] adding files in "include"

Signed-off-by: Laex <laex@bk.ru>
This commit is contained in:
Laex 2013-04-14 21:17:55 +04:00
parent 701acd02b0
commit e57c5b5d82
18 changed files with 5640 additions and 142 deletions

3
.gitignore vendored
View File

@ -19,4 +19,5 @@ __history
/bin/Result/*.png
*.drc
*.jdbg
/samples/Work
/samples/Work
*.map

View File

@ -122,74 +122,75 @@ Uses Core.types_c;
// int model_points, int max_iters );
//
// CVAPI(void) cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst );
//
/// * Calculates fundamental matrix given a set of corresponding points */
// #define CV_FM_7POINT 1
// #define CV_FM_8POINT 2
//
// #define CV_LMEDS 4
// #define CV_RANSAC 8
//
// #define CV_FM_LMEDS_ONLY CV_LMEDS
// #define CV_FM_RANSAC_ONLY CV_RANSAC
// #define CV_FM_LMEDS CV_LMEDS
// #define CV_FM_RANSAC CV_RANSAC
//
// enum
// {
// CV_ITERATIVE = 0,
// CV_EPNP = 1, // F.Moreno-Noguer, V.Lepetit and P.Fua "EPnP: Efficient Perspective-n-Point Camera Pose Estimation"
// CV_P3P = 2 // X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; "Complete Solution Classification for the Perspective-Three-Point Problem"
// };
//
// CVAPI(int) cvFindFundamentalMat( const CvMat* points1, const CvMat* points2,
// CvMat* fundamental_matrix,
// int method CV_DEFAULT(CV_FM_RANSAC),
// double param1 CV_DEFAULT(3.), double param2 CV_DEFAULT(0.99),
// CvMat* status CV_DEFAULT(NULL) );
//
/// * For each input point on one of images
// computes parameters of the corresponding
// epipolar line on the other image */
// CVAPI(void) cvComputeCorrespondEpilines( const CvMat* points,
// int which_image,
// const CvMat* fundamental_matrix,
// CvMat* correspondent_lines );
//
/// * Triangulation functions */
//
// CVAPI(void) cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2,
// CvMat* projPoints1, CvMat* projPoints2,
// CvMat* points4D);
//
// CVAPI(void) cvCorrectMatches(CvMat* F, CvMat* points1, CvMat* points2,
// CvMat* new_points1, CvMat* new_points2);
//
//
/// * Computes the optimal new camera matrix according to the free scaling parameter alpha:
// alpha=0 - only valid pixels will be retained in the undistorted image
// alpha=1 - all the source image pixels will be retained in the undistorted image
// */
// CVAPI(void) cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix,
// const CvMat* dist_coeffs,
// CvSize image_size, double alpha,
// CvMat* new_camera_matrix,
// CvSize new_imag_size CV_DEFAULT(cvSize(0,0)),
// CvRect* valid_pixel_ROI CV_DEFAULT(0),
// int center_principal_point CV_DEFAULT(0));
//
/// * Converts rotation vector to rotation matrix or vice versa */
// CVAPI(int) cvRodrigues2( const CvMat* src, CvMat* dst,
// CvMat* jacobian CV_DEFAULT(0) );
//
/// * Finds perspective transformation between the object plane and image (view) plane */
// CVAPI(int) cvFindHomography( const CvMat* src_points,
// const CvMat* dst_points,
// CvMat* homography,
// int method CV_DEFAULT(0),
// double ransacReprojThreshold CV_DEFAULT(3),
// CvMat* mask CV_DEFAULT(0));
//
const
/// * Calculates fundamental matrix given a set of corresponding points */
CV_FM_7POINT = 1;
CV_FM_8POINT = 2;
CV_LMEDS = 4;
CV_RANSAC = 8;
CV_FM_LMEDS_ONLY = CV_LMEDS;
CV_FM_RANSAC_ONLY = CV_RANSAC;
CV_FM_LMEDS = CV_LMEDS;
CV_FM_RANSAC = CV_RANSAC;
CV_ITERATIVE = 0;
CV_EPNP = 1; // F.Moreno-Noguer, V.Lepetit and P.Fua "EPnP: Efficient Perspective-n-Point Camera Pose Estimation"
CV_P3P = 2;
// X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; "Complete Solution Classification for the Perspective-Three-Point Problem"
// CVAPI(int) cvFindFundamentalMat( const CvMat* points1, const CvMat* points2,
// CvMat* fundamental_matrix,
// int method CV_DEFAULT(CV_FM_RANSAC),
// double param1 CV_DEFAULT(3.), double param2 CV_DEFAULT(0.99),
// CvMat* status CV_DEFAULT(NULL) );
//
/// * For each input point on one of images
// computes parameters of the corresponding
// epipolar line on the other image */
// CVAPI(void) cvComputeCorrespondEpilines( const CvMat* points,
// int which_image,
// const CvMat* fundamental_matrix,
// CvMat* correspondent_lines );
//
/// * Triangulation functions */
//
// CVAPI(void) cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2,
// CvMat* projPoints1, CvMat* projPoints2,
// CvMat* points4D);
//
// CVAPI(void) cvCorrectMatches(CvMat* F, CvMat* points1, CvMat* points2,
// CvMat* new_points1, CvMat* new_points2);
//
//
/// * Computes the optimal new camera matrix according to the free scaling parameter alpha:
// alpha=0 - only valid pixels will be retained in the undistorted image
// alpha=1 - all the source image pixels will be retained in the undistorted image
// */
// CVAPI(void) cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix,
// const CvMat* dist_coeffs,
// CvSize image_size, double alpha,
// CvMat* new_camera_matrix,
// CvSize new_imag_size CV_DEFAULT(cvSize(0,0)),
// CvRect* valid_pixel_ROI CV_DEFAULT(0),
// int center_principal_point CV_DEFAULT(0));
//
/// * Converts rotation vector to rotation matrix or vice versa */
// CVAPI(int) cvRodrigues2( const CvMat* src, CvMat* dst,
// CvMat* jacobian CV_DEFAULT(0) );
/// * Finds perspective transformation between the object plane and image (view) plane */
// CVAPI(int) cvFindHomography( const CvMat* src_points,
// const CvMat* dst_points,
// CvMat* homography,
// int method CV_DEFAULT(0),
// double ransacReprojThreshold CV_DEFAULT(3),
// CvMat* mask CV_DEFAULT(0));
function cvFindHomography(const src_points: pCvMat; const dst_points: pCvMat; homography: pCvMat; method: Integer = 0;
ransacReprojThreshold: double = 3; mask: pCvMat = nil): Integer; cdecl;
/// * Computes RQ decomposition for 3x3 matrices */
// CVAPI(void) cvRQDecomp3x3( const CvMat *matrixM, CvMat *matrixR, CvMat *matrixQ,
// CvMat *matrixQx CV_DEFAULT(NULL),
@ -485,5 +486,6 @@ procedure cvDrawChessboardCorners; external calib3d_dll;
function cvCalibrateCamera2; external calib3d_dll;
procedure cvProjectPoints2; external calib3d_dll;
procedure cvFindExtrinsicCameraParams2; external calib3d_dll;
function cvFindHomography; external calib3d_dll;
end.

View File

@ -376,10 +376,9 @@ procedure cvReleaseStructuringElement(Var element: pIplConvKernel); cdecl;
procedure cvMorphologyEx(const src: pIplImage; dst: pIplImage; temp: pIplImage; element: pIplConvKernel;
operation: Integer; iterations: Integer = 1); cdecl;
// CVAPI(procedure) cvMoments( CvArr* arr: Integer iterations CV_DEFAULT(v1: 1)): Integer;(;
// var moments: CvMoments;
// binary CV_DEFAULT(0): Integer);
// * Calculates all spatial and central moments up to the 3rd order */
// CVAPI(void) cvMoments( const CvArr* arr, CvMoments* moments, int binary CV_DEFAULT(0));
procedure cvMoments(const arr: pCvArr; moments: pCvMoments; binary: Integer = 0); cdecl;
{ erodes input image (applies minimum filter) one or more times.
If element pointer is NULL, 3x3 rectangular element is used }
@ -395,13 +394,12 @@ procedure cvErode(const src: pIplImage; dst: pIplImage; element: pIplConvKernel
// int iterations CV_DEFAULT(1) );
procedure cvDilate(const src: pIplImage; dst: pIplImage; element: pIplConvKernel = nil; iterations: Integer = 1); cdecl;
//
// (* Retrieve particular spatial, central or normalized central moments *)
// CVAPI(Double) cvGetSpatialMoment( CvMoments* moments, Integer x_order, Integer y_order );
// CVAPI(Double) cvGetCentralMoment( CvMoments* moments, Integer x_order, Integer y_order );
// CVAPI(Double) cvGetNormalizedCentralMoment( CvMoments* moments,
// Integer x_order, Integer y_order );
//
// * Retrieve particular spatial, central or normalized central moments */
// CVAPI(double) cvGetSpatialMoment( CvMoments* moments, int x_order, int y_order );
function cvGetSpatialMoment(moments: pCvMoments; x_order, y_order: Integer): double; cdecl;
// CVAPI(double) cvGetCentralMoment( CvMoments* moments, int x_order, int y_order );
// CVAPI(double) cvGetNormalizedCentralMoment( CvMoments* moments, int x_order, int y_order );
// (* Calculates 7 Hu's invariants from precalculated spatial and central moments */
// CVAPI(procedure) cvGetHuMoments(var moments: CvMoments; var hu_moments: CvHuMoments);
//
@ -1061,5 +1059,7 @@ procedure cvLogPolar; external imgproc_Dll;
procedure cvLinearPolar; external imgproc_Dll;
procedure cvReleaseHist; external imgproc_Dll;
procedure cvClearHist; external imgproc_Dll;
procedure cvMoments; external imgproc_Dll;
function cvGetSpatialMoment; external imgproc_Dll;
end.

View File

@ -0,0 +1,301 @@
// --------------------------------- OpenCV license.txt ---------------------------
(* // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage. *)
(* / **************************************************************************************************
// Project Delphi-OpenCV
// **************************************************************************************************
// Contributor:
// laentir Valetov
// email:laex@bk.ru
// **************************************************************************************************
// You may retrieve the latest version of this file at the GitHub,
// located at git://github.com/Laex/Delphi-OpenCV.git
// **************************************************************************************************
// License:
// The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
// you may not use this file except in compliance with the License. You may obtain a copy of the
// License at http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
// ANY KIND, either express or implied. See the License for the specific language governing rights
// and limitations under the License.
//
// Alternatively, the contents of this file may be used under the terms of the
// GNU Lesser General Public License (the "LGPL License"), in which case the
// provisions of the LGPL License are applicable instead of those above.
// If you wish to allow use of your version of this file only under the terms
// of the LGPL License and not to allow others to use your version of this file
// under the MPL, indicate your decision by deleting the provisions above and
// replace them with the notice and other provisions required by the LGPL
// License. If you do not delete the provisions above, a recipient may use
// your version of this file under either the MPL or the LGPL License.
//
// For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
// **************************************************************************************************
// Warning: Using Delphi XE3 syntax!
// **************************************************************************************************
// The Initial Developer of the Original Code:
// OpenCV: open source computer vision library
// Homepage: http://opencv.org
// Online docs: http://docs.opencv.org
// Q&A forum: http://answers.opencv.org
// Dev zone: http://code.opencv.org
// **************************************************************************************************
// Original file:
// opencv\modules\legacy\src\bgfg_estimation.cpp
// ************************************************************************************************* *)
{$IFDEF DEBUG}
{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q+,R+,S-,T-,U-,V+,W+,X+,Y+,Z1}
{$ELSE}
{$A8,B-,C-,D-,E-,F-,G+,H+,I+,J-,K-,L-,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y-,Z1}
{$ENDIF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN SYMBOL_PLATFORM OFF}
{$WARN UNIT_PLATFORM OFF}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$TYPEDADDRESS ON}
unit bgfg_estimation;
interface
Uses blobtrack, legacy, Core.types_c;
// Function cvCreateBGStatModel creates and returns initialized BG model.
// Parameters:
// first_frame - frame from video sequence
// model_type ñ type of BG model (CV_BG_MODEL_MOG, CV_BG_MODEL_FGD,Ö)
// parameters - (optional) if NULL the default parameters of the algorithm will be used
function cvCreateBGStatModel(first_frame: pIplImage; model_type: Integer; params: Pointer): pCvBGStatModel;
type
// * FOREGROUND DETECTOR INTERFACE */
TCvFGDetectorBase = class(TCvFGDetector)
protected
m_pFG: pCvBGStatModel;
m_FGType: Integer;
m_pFGParam: Pointer; // * Foreground parameters.
m_ParamFGD: TCvFGDStatModelParams;
m_ParamMOG: TCvGaussBGStatModelParams;
m_SaveName: pCvChar;
m_LoadName: pCvChar;
public
procedure SaveState(FileStorage: pCvFileStorage); override;
procedure LoadState(FileStorage: pCvFileStorage; FileNode: pCvFileNode); override;
constructor Create(_type: Integer; param: Pointer);
destructor Destroy; override;
procedure ParamUpdate; override;
function GetMask(): pIplImage; override;
// * Process current image: */
procedure Process(pImg: pIplImage); override;
// * Release foreground detector: */
procedure Release(); override;
end;
// CV_EXPORTS void cvReleaseFGDetector(CvFGDetector** ppT );
procedure cvReleaseFGDetector(var ppT: TCvFGDetector);
// CV_EXPORTS CvFGDetector* cvCreateFGDetectorBase(int type, void *param);
function cvCreateFGDetectorBase(_type: Integer; param: Pointer): TCvFGDetector;
implementation
Uses System.SysUtils;
function cvCreateBGStatModel(first_frame: pIplImage; model_type: Integer; params: Pointer): pCvBGStatModel;
Var
bg_model: pCvBGStatModel;
begin
bg_model := nil;
if (model_type = CV_BG_MODEL_FGD) or (model_type = CV_BG_MODEL_FGD_SIMPLE) then
bg_model := cvCreateFGDStatModel(first_frame, { (CvFGDStatModelParams*) } params)
else if (model_type = CV_BG_MODEL_MOG) then
bg_model := cvCreateGaussianBGModel(first_frame, { (CvGaussBGStatModelParams*) } params);
Result := bg_model;
end;
procedure cvReleaseFGDetector(var ppT: TCvFGDetector);
begin
ppT.Release();
FreeAndNil(ppT);
end;
function cvCreateFGDetectorBase(_type: Integer; param: Pointer): TCvFGDetector;
begin
Result := TCvFGDetectorBase.Create(_type, param);
end;
{ TCvFGDetectorBase }
constructor TCvFGDetectorBase.Create(_type: Integer; param: Pointer);
Var
P: PSingle;
begin
m_pFG := nil;
m_FGType := _type;
m_pFGParam := param;
if (m_FGType = CV_BG_MODEL_FGD) or (m_FGType = CV_BG_MODEL_FGD_SIMPLE) then
begin
if Assigned(m_pFGParam) then
begin
m_ParamFGD := pCvFGDStatModelParams(m_pFGParam)^;
end
else
begin
m_ParamFGD.Lc := CV_BGFG_FGD_LC;
m_ParamFGD.N1c := CV_BGFG_FGD_N1C;
m_ParamFGD.N2c := CV_BGFG_FGD_N2C;
m_ParamFGD.Lcc := CV_BGFG_FGD_LCC;
m_ParamFGD.N1cc := CV_BGFG_FGD_N1CC;
m_ParamFGD.N2cc := CV_BGFG_FGD_N2CC;
m_ParamFGD.delta := CV_BGFG_FGD_DELTA;
m_ParamFGD.alpha1 := CV_BGFG_FGD_ALPHA_1;
m_ParamFGD.alpha2 := CV_BGFG_FGD_ALPHA_2;
m_ParamFGD.alpha3 := CV_BGFG_FGD_ALPHA_3;
m_ParamFGD.T := CV_BGFG_FGD_T;
m_ParamFGD.minArea := CV_BGFG_FGD_MINAREA;
m_ParamFGD.is_obj_without_holes := 1;
m_ParamFGD.perform_morphing := 1;
end;
AddParam('LC', @m_ParamFGD.Lc);
AddParam('alpha1', @m_ParamFGD.alpha1);
AddParam('alpha2', @m_ParamFGD.alpha2);
AddParam('alpha3', @m_ParamFGD.alpha3);
AddParam('N1c', @m_ParamFGD.N1c);
AddParam('N2c', @m_ParamFGD.N2c);
AddParam('N1cc', @m_ParamFGD.N1cc);
AddParam('N2cc', @m_ParamFGD.N2cc);
m_SaveName := nil;
m_LoadName := nil;
AddParam('SaveName', m_SaveName);
AddParam('LoadName', m_LoadName);
AddParam('ObjWithoutHoles', @m_ParamFGD.is_obj_without_holes);
AddParam('Morphology', @m_ParamFGD.perform_morphing);
SetModuleName('FGD');
end
else if (m_FGType = CV_BG_MODEL_MOG) then // 'MOG'=='Mixture Of Gaussians'
begin
if Assigned(m_pFGParam) then
begin
m_ParamMOG := pCvGaussBGStatModelParams(m_pFGParam)^;
end
else
begin // These constants are all from cvaux/include/cvaux.h
m_ParamMOG.win_size := CV_BGFG_MOG_WINDOW_SIZE;
m_ParamMOG.bg_threshold := CV_BGFG_MOG_BACKGROUND_THRESHOLD;
m_ParamMOG.std_threshold := CV_BGFG_MOG_STD_THRESHOLD;
m_ParamMOG.weight_init := CV_BGFG_MOG_WEIGHT_INIT;
m_ParamMOG.variance_init := CV_BGFG_MOG_SIGMA_INIT * CV_BGFG_MOG_SIGMA_INIT;
m_ParamMOG.minArea := CV_BGFG_MOG_MINAREA;
m_ParamMOG.n_gauss := CV_BGFG_MOG_NGAUSSIANS;
end;
AddParam('NG', @m_ParamMOG.n_gauss);
SetModuleName('MOG');
end;
end;
destructor TCvFGDetectorBase.Destroy;
begin
if Assigned(m_pFG) then
cvReleaseBGStatModel(m_pFG);
inherited;
end;
function TCvFGDetectorBase.GetMask: pIplImage;
begin
Result := iif(Assigned(m_pFG), m_pFG^.foreground, nil);
end;
procedure TCvFGDetectorBase.LoadState(FileStorage: pCvFileStorage; FileNode: pCvFileNode);
begin
if (m_FGType = CV_BG_MODEL_FGD) or (m_FGType = CV_BG_MODEL_FGD_SIMPLE) then
if Length(m_LoadName) > 0 then // * File name is not empty */
// cvRestoreStatModel(m_LoadName, (CvFGDStatModel*)m_pFG);
end;
procedure TCvFGDetectorBase.ParamUpdate;
begin
if Assigned(m_pFG) then
cvReleaseBGStatModel(m_pFG);
end;
procedure TCvFGDetectorBase.Process(pImg: pIplImage);
Var
param: Pointer;
begin
if (m_pFG = nil) then
begin
param := m_pFGParam;
if (m_FGType = CV_BG_MODEL_FGD) or (m_FGType = CV_BG_MODEL_FGD_SIMPLE) then
begin
param := @m_ParamFGD;
end
else if (m_FGType = CV_BG_MODEL_MOG) then
begin
param := @m_ParamMOG;
end;
m_pFG := cvCreateBGStatModel(pImg, m_FGType, param);
LoadState(0, 0);
end
else
begin
cvUpdateBGStatModel(pImg, m_pFG);
end;
end;
procedure TCvFGDetectorBase.Release;
begin
SaveState(0);
if Assigned(m_pFG) then
cvReleaseBGStatModel(m_pFG);
end;
procedure TCvFGDetectorBase.SaveState(FileStorage: pCvFileStorage);
begin
if (m_FGType = CV_BG_MODEL_FGD) or (m_FGType = CV_BG_MODEL_FGD_SIMPLE) then
if Length(m_SaveName) > 0 then // * File name is not empty */
// cvSaveStatModel(m_SaveName, (CvFGDStatModel*)m_pFG);
end;
end.

1529
include/legacy/blobtrack.pas Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,113 @@
// --------------------------------- OpenCV license.txt ---------------------------
(* // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage. *)
(* / **************************************************************************************************
// Project Delphi-OpenCV
// **************************************************************************************************
// Contributor:
// laentir Valetov
// email:laex@bk.ru
// **************************************************************************************************
// You may retrieve the latest version of this file at the GitHub,
// located at git://github.com/Laex/Delphi-OpenCV.git
// **************************************************************************************************
// License:
// The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
// you may not use this file except in compliance with the License. You may obtain a copy of the
// License at http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
// ANY KIND, either express or implied. See the License for the specific language governing rights
// and limitations under the License.
//
// Alternatively, the contents of this file may be used under the terms of the
// GNU Lesser General Public License (the "LGPL License"), in which case the
// provisions of the LGPL License are applicable instead of those above.
// If you wish to allow use of your version of this file only under the terms
// of the LGPL License and not to allow others to use your version of this file
// under the MPL, indicate your decision by deleting the provisions above and
// replace them with the notice and other provisions required by the LGPL
// License. If you do not delete the provisions above, a recipient may use
// your version of this file under either the MPL or the LGPL License.
//
// For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
// **************************************************************************************************
// Warning: Using Delphi XE3 syntax!
// **************************************************************************************************
// The Initial Developer of the Original Code:
// OpenCV: open source computer vision library
// Homepage: http://opencv.org
// Online docs: http://docs.opencv.org
// Q&A forum: http://answers.opencv.org
// Dev zone: http://code.opencv.org
// **************************************************************************************************
// Original file:
// opencv\modules\legacy\src\blobtrackingccwithcr.cpp
// ************************************************************************************************* *)
{$IFDEF DEBUG}
{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q+,R+,S-,T-,U-,V+,W+,X+,Y+,Z1}
{$ELSE}
{$A8,B-,C-,D-,E-,F-,G+,H+,I+,J-,K-,L-,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y-,Z1}
{$ENDIF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN SYMBOL_PLATFORM OFF}
{$WARN UNIT_PLATFORM OFF}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$POINTERMATH ON}
unit blobtrackingccwithcr;
interface
Uses blobtrack;
function cvCreateBlobTrackerCCMSPF():TCvBlobTracker;
implementation
function cvCreateBlobTrackerCCMSPF():TCvBlobTracker;
begin
Result := TCvBlobTracker.Create;
end;
end.

793
include/legacy/compat.pas Normal file
View File

@ -0,0 +1,793 @@
// --------------------------------- OpenCV license.txt ---------------------------
(* // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage. *)
(* / **************************************************************************************************
// Project Delphi-OpenCV
// **************************************************************************************************
// Contributor:
// laentir Valetov
// email:laex@bk.ru
// **************************************************************************************************
// You may retrieve the latest version of this file at the GitHub,
// located at git://github.com/Laex/Delphi-OpenCV.git
// **************************************************************************************************
// License:
// The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
// you may not use this file except in compliance with the License. You may obtain a copy of the
// License at http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
// ANY KIND, either express or implied. See the License for the specific language governing rights
// and limitations under the License.
//
// Alternatively, the contents of this file may be used under the terms of the
// GNU Lesser General Public License (the "LGPL License"), in which case the
// provisions of the LGPL License are applicable instead of those above.
// If you wish to allow use of your version of this file only under the terms
// of the LGPL License and not to allow others to use your version of this file
// under the MPL, indicate your decision by deleting the provisions above and
// replace them with the notice and other provisions required by the LGPL
// License. If you do not delete the provisions above, a recipient may use
// your version of this file under either the MPL or the LGPL License.
//
// For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
// **************************************************************************************************
// Warning: Using Delphi XE3 syntax!
// **************************************************************************************************
// The Initial Developer of the Original Code:
// OpenCV: open source computer vision library
// Homepage: http://opencv.org
// Online docs: http://docs.opencv.org
// Q&A forum: http://answers.opencv.org
// Dev zone: http://code.opencv.org
// **************************************************************************************************
// Original file:
// opencv\modules\legacy\include\opencv2\legacy\compat.hpp
// ************************************************************************************************* *)
{$IFDEF DEBUG}
{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q+,R+,S-,T-,U-,V+,W+,X+,Y+,Z1}
{$ELSE}
{$A8,B-,C-,D-,E-,F-,G+,H+,I+,J-,K-,L-,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y-,Z1}
{$ENDIF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN SYMBOL_PLATFORM OFF}
{$WARN UNIT_PLATFORM OFF}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$POINTERMATH ON}
unit compat;
interface
Uses Core.types_c;
// typedef int CvMatType;
// typedef int CvDisMaskType;
// typedef CvMat CvMatArray;
//
// typedef int CvThreshType;
// typedef int CvAdaptiveThreshMethod;
// typedef int CvCompareMethod;
// typedef int CvFontFace;
// typedef int CvPolyApproxMethod;
// typedef int CvContoursMatchMethod;
// typedef int CvContourTreesMatchMethod;
// typedef int CvCoeffType;
// typedef int CvRodriguesType;
// typedef int CvElementShape;
// typedef int CvMorphOp;
// typedef int CvTemplMatchMethod;
//
// typedef CvPoint2D64f CvPoint2D64d;
// typedef CvPoint3D64f CvPoint3D64d;
//
// enum
// {
// CV_MAT32F = CV_32FC1,
// CV_MAT3x1_32F = CV_32FC1,
// CV_MAT4x1_32F = CV_32FC1,
// CV_MAT3x3_32F = CV_32FC1,
// CV_MAT4x4_32F = CV_32FC1,
//
// CV_MAT64D = CV_64FC1,
// CV_MAT3x1_64D = CV_64FC1,
// CV_MAT4x1_64D = CV_64FC1,
// CV_MAT3x3_64D = CV_64FC1,
// CV_MAT4x4_64D = CV_64FC1
// };
//
// enum
// {
// IPL_GAUSSIAN_5x5 = 7
// };
//
// typedef CvBox2D CvBox2D32f;
//
/// * allocation/deallocation macros */
// #define cvCreateImageData cvCreateData
// #define cvReleaseImageData cvReleaseData
// #define cvSetImageData cvSetData
// #define cvGetImageRawData cvGetRawData
//
// #define cvmAlloc cvCreateData
// #define cvmFree cvReleaseData
// #define cvmAllocArray cvCreateData
// #define cvmFreeArray cvReleaseData
//
// #define cvIntegralImage cvIntegral
// #define cvMatchContours cvMatchShapes
//
// CV_EXPORTS CvMat cvMatArray( int rows, int cols, int type,
// int count, void* data CV_DEFAULT(0));
//
// #define cvUpdateMHIByTime cvUpdateMotionHistory
//
// #define cvAccMask cvAcc
// #define cvSquareAccMask cvSquareAcc
// #define cvMultiplyAccMask cvMultiplyAcc
// #define cvRunningAvgMask(imgY, imgU, mask, alpha) cvRunningAvg(imgY, imgU, alpha, mask)
//
// #define cvSetHistThresh cvSetHistBinRanges
// #define cvCalcHistMask(img, mask, hist, doNotClear) cvCalcHist(img, hist, doNotClear, mask)
//
// CV_EXPORTS double cvMean( const CvArr* image, const CvArr* mask CV_DEFAULT(0));
// CV_EXPORTS double cvSumPixels( const CvArr* image );
// CV_EXPORTS void cvMean_StdDev( const CvArr* image, double* mean, double* sdv,
// const CvArr* mask CV_DEFAULT(0));
//
// CV_EXPORTS void cvmPerspectiveProject( const CvMat* mat, const CvArr* src, CvArr* dst );
// CV_EXPORTS void cvFillImage( CvArr* mat, double color );
//
// #define cvCvtPixToPlane cvSplit
// #define cvCvtPlaneToPix cvMerge
//
// typedef struct CvRandState
// {
// CvRNG state; /* RNG state (the current seed and carry)*/
// int disttype; /* distribution type */
// CvScalar param[2]; /* parameters of RNG */
// } CvRandState;
//
/// * Changes RNG range while preserving RNG state */
// CV_EXPORTS void cvRandSetRange( CvRandState* state, double param1,
// double param2, int index CV_DEFAULT(-1));
//
// CV_EXPORTS void cvRandInit( CvRandState* state, double param1,
// double param2, int seed,
// int disttype CV_DEFAULT(CV_RAND_UNI));
//
/// * Fills array with random numbers */
// CV_EXPORTS void cvRand( CvRandState* state, CvArr* arr );
//
// #define cvRandNext( _state ) cvRandInt( &(_state)->state )
//
// CV_EXPORTS void cvbRand( CvRandState* state, float* dst, int len );
//
// CV_EXPORTS void cvbCartToPolar( const float* y, const float* x,
// float* magnitude, float* angle, int len );
// CV_EXPORTS void cvbFastArctan( const float* y, const float* x, float* angle, int len );
// CV_EXPORTS void cvbSqrt( const float* x, float* y, int len );
// CV_EXPORTS void cvbInvSqrt( const float* x, float* y, int len );
// CV_EXPORTS void cvbReciprocal( const float* x, float* y, int len );
// CV_EXPORTS void cvbFastExp( const float* x, double* y, int len );
// CV_EXPORTS void cvbFastLog( const double* x, float* y, int len );
//
// CV_EXPORTS CvRect cvContourBoundingRect( void* point_set, int update CV_DEFAULT(0));
//
// CV_EXPORTS double cvPseudoInverse( const CvArr* src, CvArr* dst );
// #define cvPseudoInv cvPseudoInverse
//
// #define cvContourMoments( contour, moments ) cvMoments( contour, moments, 0 )
//
// #define cvGetPtrAt cvPtr2D
// #define cvGetAt cvGet2D
// #define cvSetAt(arr,val,y,x) cvSet2D((arr),(y),(x),(val))
//
// #define cvMeanMask cvMean
// #define cvMean_StdDevMask(img,mask,mean,sdv) cvMean_StdDev(img,mean,sdv,mask)
//
// #define cvNormMask(imgA,imgB,mask,normType) cvNorm(imgA,imgB,normType,mask)
//
// #define cvMinMaxLocMask(img, mask, min_val, max_val, min_loc, max_loc) \
// cvMinMaxLoc(img, min_val, max_val, min_loc, max_loc, mask)
//
// #define cvRemoveMemoryManager CV_NOOP
// #define cvSetMemoryManager CV_NOOP
//
// #define cvmSetZero( mat ) cvSetZero( mat )
// #define cvmSetIdentity( mat ) cvSetIdentity( mat )
// #define cvmAdd( src1, src2, dst ) cvAdd( src1, src2, dst, 0 )
// #define cvmSub( src1, src2, dst ) cvSub( src1, src2, dst, 0 )
// #define cvmCopy( src, dst ) cvCopy( src, dst, 0 )
// #define cvmMul( src1, src2, dst ) cvMatMulAdd( src1, src2, 0, dst )
// #define cvmTranspose( src, dst ) cvT( src, dst )
// #define cvmInvert( src, dst ) cvInv( src, dst )
// #define cvmMahalanobis(vec1, vec2, mat) cvMahalanobis( vec1, vec2, mat )
// #define cvmDotProduct( vec1, vec2 ) cvDotProduct( vec1, vec2 )
// #define cvmCrossProduct(vec1, vec2,dst) cvCrossProduct( vec1, vec2, dst )
// #define cvmTrace( mat ) (cvTrace( mat )).val[0]
// #define cvmMulTransposed( src, dst, order ) cvMulTransposed( src, dst, order )
// #define cvmEigenVV( mat, evec, eval, eps) cvEigenVV( mat, evec, eval, eps )
// #define cvmDet( mat ) cvDet( mat )
// #define cvmScale( src, dst, scale ) cvScale( src, dst, scale )
//
// #define cvCopyImage( src, dst ) cvCopy( src, dst, 0 )
// #define cvReleaseMatHeader cvReleaseMat
//
/// * Calculates exact convex hull of 2d point set */
// CV_EXPORTS void cvConvexHull( CvPoint* points, int num_points,
// CvRect* bound_rect,
// int orientation, int* hull, int* hullsize );
//
//
// CV_EXPORTS void cvMinAreaRect( CvPoint* points, int n,
// int left, int bottom,
// int right, int top,
// CvPoint2D32f* anchor,
// CvPoint2D32f* vect1,
// CvPoint2D32f* vect2 );
//
// typedef int CvDisType;
// typedef int CvChainApproxMethod;
// typedef int CvContourRetrievalMode;
//
// CV_EXPORTS void cvFitLine3D( CvPoint3D32f* points, int count, int dist,
// void *param, float reps, float aeps, float* line );
//
/// * Fits a line into set of 2d points in a robust way (M-estimator technique) */
// CV_EXPORTS void cvFitLine2D( CvPoint2D32f* points, int count, int dist,
// void *param, float reps, float aeps, float* line );
//
// CV_EXPORTS void cvFitEllipse( const CvPoint2D32f* points, int count, CvBox2D* box );
//
/// * Projects 2d points to one of standard coordinate planes
// (i.e. removes one of coordinates) */
// CV_EXPORTS void cvProject3D( CvPoint3D32f* points3D, int count,
// CvPoint2D32f* points2D,
// int xIndx CV_DEFAULT(0),
// int yIndx CV_DEFAULT(1));
//
/// * Retrieves value of the particular bin
// of x-dimensional (x=1,2,3,...) histogram */
// #define cvQueryHistValue_1D( hist, idx0 ) \
// ((float)cvGetReal1D( (hist)->bins, (idx0)))
// #define cvQueryHistValue_2D( hist, idx0, idx1 ) \
// ((float)cvGetReal2D( (hist)->bins, (idx0), (idx1)))
// #define cvQueryHistValue_3D( hist, idx0, idx1, idx2 ) \
// ((float)cvGetReal3D( (hist)->bins, (idx0), (idx1), (idx2)))
// #define cvQueryHistValue_nD( hist, idx ) \
// ((float)cvGetRealND( (hist)->bins, (idx)))
//
/// * Returns pointer to the particular bin of x-dimesional histogram.
// For sparse histogram the bin is created if it didn't exist before */
// #define cvGetHistValue_1D( hist, idx0 ) \
// ((float*)cvPtr1D( (hist)->bins, (idx0), 0))
// #define cvGetHistValue_2D( hist, idx0, idx1 ) \
// ((float*)cvPtr2D( (hist)->bins, (idx0), (idx1), 0))
// #define cvGetHistValue_3D( hist, idx0, idx1, idx2 ) \
// ((float*)cvPtr3D( (hist)->bins, (idx0), (idx1), (idx2), 0))
// #define cvGetHistValue_nD( hist, idx ) \
// ((float*)cvPtrND( (hist)->bins, (idx), 0))
//
//
// #define CV_IS_SET_ELEM_EXISTS CV_IS_SET_ELEM
//
//
// CV_EXPORTS int cvHoughLines( CvArr* image, double rho,
// double theta, int threshold,
// float* lines, int linesNumber );
//
// CV_EXPORTS int cvHoughLinesP( CvArr* image, double rho,
// double theta, int threshold,
// int lineLength, int lineGap,
// int* lines, int linesNumber );
//
//
// CV_EXPORTS int cvHoughLinesSDiv( CvArr* image, double rho, int srn,
// double theta, int stn, int threshold,
// float* lines, int linesNumber );
//
// CV_EXPORTS float cvCalcEMD( const float* signature1, int size1,
// const float* signature2, int size2,
// int dims, int dist_type CV_DEFAULT(CV_DIST_L2),
// CvDistanceFunction dist_func CV_DEFAULT(0),
// float* lower_bound CV_DEFAULT(0),
// void* user_param CV_DEFAULT(0));
//
// CV_EXPORTS void cvKMeans( int num_clusters, float** samples,
// int num_samples, int vec_size,
// CvTermCriteria termcrit, int* cluster_idx );
//
// CV_EXPORTS void cvStartScanGraph( CvGraph* graph, CvGraphScanner* scanner,
// CvGraphVtx* vtx CV_DEFAULT(NULL),
// int mask CV_DEFAULT(CV_GRAPH_ALL_ITEMS));
//
// CV_EXPORTS void cvEndScanGraph( CvGraphScanner* scanner );
//
//
/// * old drawing functions */
// CV_EXPORTS void cvLineAA( CvArr* img, CvPoint pt1, CvPoint pt2,
// double color, int scale CV_DEFAULT(0));
//
// CV_EXPORTS void cvCircleAA( CvArr* img, CvPoint center, int radius,
// double color, int scale CV_DEFAULT(0) );
//
// CV_EXPORTS void cvEllipseAA( CvArr* img, CvPoint center, CvSize axes,
// double angle, double start_angle,
// double end_angle, double color,
// int scale CV_DEFAULT(0) );
//
// CV_EXPORTS void cvPolyLineAA( CvArr* img, CvPoint** pts, int* npts, int contours,
// int is_closed, double color, int scale CV_DEFAULT(0) );
//
/// ****************************************************************************************\
// * Pixel Access Macros *
// \****************************************************************************************/
//
// typedef struct _CvPixelPosition8u
// {
// uchar* currline; /* pointer to the start of the current pixel line */
// uchar* topline; /* pointer to the start of the top pixel line */
// uchar* bottomline; /* pointer to the start of the first line */
// /* which is below the image */
// int x; /* current x coordinate ( in pixels ) */
// int width; /* width of the image ( in pixels ) */
// int height; /* height of the image ( in pixels ) */
// int step; /* distance between lines ( in elements of single */
// /* plane ) */
// int step_arr[3]; /* array: ( 0, -step, step ). It is used for */
// /* vertical moving */
// } CvPixelPosition8u;
//
/// * this structure differs from the above only in data type */
// typedef struct _CvPixelPosition8s
// {
// schar* currline;
// schar* topline;
// schar* bottomline;
// int x;
// int width;
// int height;
// int step;
// int step_arr[3];
// } CvPixelPosition8s;
//
/// * this structure differs from the CvPixelPosition8u only in data type */
// typedef struct _CvPixelPosition32f
// {
// float* currline;
// float* topline;
// float* bottomline;
// int x;
// int width;
// int height;
// int step;
// int step_arr[3];
// } CvPixelPosition32f;
//
//
/// * Initialize one of the CvPixelPosition structures. */
/// * pos - initialized structure */
/// * origin - pointer to the left-top corner of the ROI */
/// * step - width of the whole image in bytes */
/// * roi - width & height of the ROI */
/// * x, y - initial position */
// #define CV_INIT_PIXEL_POS(pos, origin, _step, roi, _x, _y, orientation) \
// ( \
// (pos).step = (_step)/sizeof((pos).currline[0]) * (orientation ? -1 : 1), \
// (pos).width = (roi).width, \
// (pos).height = (roi).height, \
// (pos).bottomline = (origin) + (pos).step*(pos).height, \
// (pos).topline = (origin) - (pos).step, \
// (pos).step_arr[0] = 0, \
// (pos).step_arr[1] = -(pos).step, \
// (pos).step_arr[2] = (pos).step, \
// (pos).x = (_x), \
// (pos).currline = (origin) + (pos).step*(_y) )
//
//
/// * Move to specified point ( absolute shift ) */
/// * pos - position structure */
/// * x, y - coordinates of the new position */
/// * cs - number of the image channels */
// #define CV_MOVE_TO( pos, _x, _y, cs ) \
// ((pos).currline = (_y) >= 0 && (_y) < (pos).height ? (pos).topline + ((_y)+1)*(pos).step : 0, \
// (pos).x = (_x) >= 0 && (_x) < (pos).width ? (_x) : 0, (pos).currline + (_x) * (cs) )
//
/// * Get current coordinates */
/// * pos - position structure */
/// * x, y - coordinates of the new position */
/// * cs - number of the image channels */
// #define CV_GET_CURRENT( pos, cs ) ((pos).currline + (pos).x * (cs))
//
/// * Move by one pixel relatively to current position */
/// * pos - position structure */
/// * cs - number of the image channels */
//
/// * left */
// #define CV_MOVE_LEFT( pos, cs ) \
// ( --(pos).x >= 0 ? (pos).currline + (pos).x*(cs) : 0 )
//
/// * right */
// #define CV_MOVE_RIGHT( pos, cs ) \
// ( ++(pos).x < (pos).width ? (pos).currline + (pos).x*(cs) : 0 )
//
/// * up */
// #define CV_MOVE_UP( pos, cs ) \
// (((pos).currline -= (pos).step) != (pos).topline ? (pos).currline + (pos).x*(cs) : 0 )
//
/// * down */
// #define CV_MOVE_DOWN( pos, cs ) \
// (((pos).currline += (pos).step) != (pos).bottomline ? (pos).currline + (pos).x*(cs) : 0 )
//
/// * left up */
// #define CV_MOVE_LU( pos, cs ) ( CV_MOVE_LEFT(pos, cs), CV_MOVE_UP(pos, cs))
//
/// * right up */
// #define CV_MOVE_RU( pos, cs ) ( CV_MOVE_RIGHT(pos, cs), CV_MOVE_UP(pos, cs))
//
/// * left down */
// #define CV_MOVE_LD( pos, cs ) ( CV_MOVE_LEFT(pos, cs), CV_MOVE_DOWN(pos, cs))
//
/// * right down */
// #define CV_MOVE_RD( pos, cs ) ( CV_MOVE_RIGHT(pos, cs), CV_MOVE_DOWN(pos, cs))
//
//
//
/// * Move by one pixel relatively to current position with wrapping when the position */
/// * achieves image boundary */
/// * pos - position structure */
/// * cs - number of the image channels */
//
/// * left */
// #define CV_MOVE_LEFT_WRAP( pos, cs ) \
// ((pos).currline + ( --(pos).x >= 0 ? (pos).x : ((pos).x = (pos).width-1))*(cs))
//
/// * right */
// #define CV_MOVE_RIGHT_WRAP( pos, cs ) \
// ((pos).currline + ( ++(pos).x < (pos).width ? (pos).x : ((pos).x = 0))*(cs) )
//
/// * up */
// #define CV_MOVE_UP_WRAP( pos, cs ) \
// ((((pos).currline -= (pos).step) != (pos).topline ? \
// (pos).currline : ((pos).currline = (pos).bottomline - (pos).step)) + (pos).x*(cs) )
//
/// * down */
// #define CV_MOVE_DOWN_WRAP( pos, cs ) \
// ((((pos).currline += (pos).step) != (pos).bottomline ? \
// (pos).currline : ((pos).currline = (pos).topline + (pos).step)) + (pos).x*(cs) )
//
/// * left up */
// #define CV_MOVE_LU_WRAP( pos, cs ) ( CV_MOVE_LEFT_WRAP(pos, cs), CV_MOVE_UP_WRAP(pos, cs))
/// * right up */
// #define CV_MOVE_RU_WRAP( pos, cs ) ( CV_MOVE_RIGHT_WRAP(pos, cs), CV_MOVE_UP_WRAP(pos, cs))
/// * left down */
// #define CV_MOVE_LD_WRAP( pos, cs ) ( CV_MOVE_LEFT_WRAP(pos, cs), CV_MOVE_DOWN_WRAP(pos, cs))
/// * right down */
// #define CV_MOVE_RD_WRAP( pos, cs ) ( CV_MOVE_RIGHT_WRAP(pos, cs), CV_MOVE_DOWN_WRAP(pos, cs))
//
/// * Numeric constants which used for moving in arbitrary direction */
// enum
// {
// CV_SHIFT_NONE = 2,
// CV_SHIFT_LEFT = 1,
// CV_SHIFT_RIGHT = 3,
// CV_SHIFT_UP = 6,
// CV_SHIFT_DOWN = 10,
// CV_SHIFT_LU = 5,
// CV_SHIFT_RU = 7,
// CV_SHIFT_LD = 9,
// CV_SHIFT_RD = 11
// };
//
/// * Move by one pixel in specified direction */
/// * pos - position structure */
/// * shift - direction ( it's value must be one of the CV_SHIFT_Ö constants ) */
/// * cs - number of the image channels */
// #define CV_MOVE_PARAM( pos, shift, cs ) \
// ( (pos).currline += (pos).step_arr[(shift)>>2], (pos).x += ((shift)&3)-2, \
// ((pos).currline != (pos).topline && (pos).currline != (pos).bottomline && \
// (pos).x >= 0 && (pos).x < (pos).width) ? (pos).currline + (pos).x*(cs) : 0 )
//
/// * Move by one pixel in specified direction with wrapping when the */
/// * position achieves image boundary */
/// * pos - position structure */
/// * shift - direction ( it's value must be one of the CV_SHIFT_Ö constants ) */
/// * cs - number of the image channels */
// #define CV_MOVE_PARAM_WRAP( pos, shift, cs ) \
// ( (pos).currline += (pos).step_arr[(shift)>>2], \
// (pos).currline = ((pos).currline == (pos).topline ? \
// (pos).bottomline - (pos).step : \
// (pos).currline == (pos).bottomline ? \
// (pos).topline + (pos).step : (pos).currline), \
// \
// (pos).x += ((shift)&3)-2, \
// (pos).x = ((pos).x < 0 ? (pos).width-1 : (pos).x >= (pos).width ? 0 : (pos).x), \
// \
// (pos).currline + (pos).x*(cs) )
//
//
// typedef float* CvVect32f;
// typedef float* CvMatr32f;
// typedef double* CvVect64d;
// typedef double* CvMatr64d;
//
// CV_EXPORTS void cvUnDistortOnce( const CvArr* src, CvArr* dst,
// const float* intrinsic_matrix,
// const float* distortion_coeffs,
// int interpolate );
//
/// * the two functions below have quite hackerish implementations, use with care
// (or, which is better, switch to cvUndistortInitMap and cvRemap instead */
// CV_EXPORTS void cvUnDistortInit( const CvArr* src,
// CvArr* undistortion_map,
// const float* A, const float* k,
// int interpolate );
//
// CV_EXPORTS void cvUnDistort( const CvArr* src, CvArr* dst,
// const CvArr* undistortion_map,
// int interpolate );
//
/// * Find fundamental matrix */
// CV_EXPORTS void cvFindFundamentalMatrix( int* points1, int* points2,
// int numpoints, int method, float* matrix );
//
//
// CV_EXPORTS int cvFindChessBoardCornerGuesses( const void* arr, void* thresharr,
// CvMemStorage* storage,
// CvSize pattern_size, CvPoint2D32f * corners,
// int *corner_count );
//
/// * Calibrates camera using multiple views of calibration pattern */
// CV_EXPORTS void cvCalibrateCamera( int image_count, int* _point_counts,
// CvSize image_size, CvPoint2D32f* _image_points, CvPoint3D32f* _object_points,
// float* _distortion_coeffs, float* _camera_matrix, float* _translation_vectors,
// float* _rotation_matrices, int flags );
//
//
// CV_EXPORTS void cvCalibrateCamera_64d( int image_count, int* _point_counts,
// CvSize image_size, CvPoint2D64f* _image_points, CvPoint3D64f* _object_points,
// double* _distortion_coeffs, double* _camera_matrix, double* _translation_vectors,
// double* _rotation_matrices, int flags );
//
//
/// * Find 3d position of object given intrinsic camera parameters,
// 3d model of the object and projection of the object into view plane */
// CV_EXPORTS void cvFindExtrinsicCameraParams( int point_count,
// CvSize image_size, CvPoint2D32f* _image_points,
// CvPoint3D32f* _object_points, float* focal_length,
// CvPoint2D32f principal_point, float* _distortion_coeffs,
// float* _rotation_vector, float* _translation_vector );
//
/// * Variant of the previous function that takes double-precision parameters */
// CV_EXPORTS void cvFindExtrinsicCameraParams_64d( int point_count,
// CvSize image_size, CvPoint2D64f* _image_points,
// CvPoint3D64f* _object_points, double* focal_length,
// CvPoint2D64f principal_point, double* _distortion_coeffs,
// double* _rotation_vector, double* _translation_vector );
//
/// * Rodrigues transform */
// enum
// {
// CV_RODRIGUES_M2V = 0,
// CV_RODRIGUES_V2M = 1
// };
//
/// * Converts rotation_matrix matrix to rotation_matrix vector or vice versa */
// CV_EXPORTS void cvRodrigues( CvMat* rotation_matrix, CvMat* rotation_vector,
// CvMat* jacobian, int conv_type );
//
/// * Does reprojection of 3d object points to the view plane */
// CV_EXPORTS void cvProjectPoints( int point_count, CvPoint3D64f* _object_points,
// double* _rotation_vector, double* _translation_vector,
// double* focal_length, CvPoint2D64f principal_point,
// double* _distortion, CvPoint2D64f* _image_points,
// double* _deriv_points_rotation_matrix,
// double* _deriv_points_translation_vect,
// double* _deriv_points_focal,
// double* _deriv_points_principal_point,
// double* _deriv_points_distortion_coeffs );
//
//
/// * Simpler version of the previous function */
// CV_EXPORTS void cvProjectPointsSimple( int point_count, CvPoint3D64f* _object_points,
// double* _rotation_matrix, double* _translation_vector,
// double* _camera_matrix, double* _distortion, CvPoint2D64f* _image_points );
//
//
// #define cvMake2DPoints cvConvertPointsHomogeneous
// #define cvMake3DPoints cvConvertPointsHomogeneous
//
// #define cvWarpPerspectiveQMatrix cvGetPerspectiveTransform
//
// #define cvConvertPointsHomogenious cvConvertPointsHomogeneous
//
//
/// /////////////////////////////////// feature extractors: obsolete API //////////////////////////////////
type
pCvSURFPoint = ^TCvSURFPoint;
TCvSURFPoint = packed record
pt: TCvPoint2D32f;
laplacian: Integer;
size: Integer;
dir: Single;
hessian: Single;
end;
//
// CV_INLINE CvSURFPoint cvSURFPoint( CvPoint2D32f pt, int laplacian,
// int size, float dir CV_DEFAULT(0),
// float hessian CV_DEFAULT(0))
// {
// CvSURFPoint kp;
//
// kp.pt = pt;
// kp.laplacian = laplacian;
// kp.size = size;
// kp.dir = dir;
// kp.hessian = hessian;
//
// return kp;
// }
type
pCvSURFParams = ^TCvSURFParams;
TCvSURFParams = packed record
extended: Integer;
upright: Integer;
hessianThreshold: double;
nOctaves: Integer;
nOctaveLayers: Integer;
end;
// CVAPI(CvSURFParams) cvSURFParams( double hessianThreshold, int extended CV_DEFAULT(0) );
function cvSURFParams(hessianThreshold: double; _extended: Integer = 0): TCvSURFParams; cdecl;
/// / If useProvidedKeyPts!=0, keypoints are not detected, but descriptors are computed
/// / at the locations provided in keypoints (a CvSeq of CvSURFPoint).
// CVAPI(void) cvExtractSURF( const CvArr* img, const CvArr* mask,
// CvSeq** keypoints, CvSeq** descriptors,
// CvMemStorage* storage, CvSURFParams params,
// int useProvidedKeyPts CV_DEFAULT(0) );
procedure cvExtractSURF(const img: pCvArr; const mask: pCvArr; keypoints: ppCvSeq; descriptors: ppCvSeq;
storage: pCvMemStorage; params: TCvSURFParams; useProvidedKeyPts: Integer = 0); cdecl;
/// *!
// Maximal Stable Regions Parameters
// */
// typedef struct CvMSERParams
// {
// //! delta, in the code, it compares (size_{i}-size_{i-delta})/size_{i-delta}
// int delta;
// //! prune the area which bigger than maxArea
// int maxArea;
// //! prune the area which smaller than minArea
// int minArea;
// //! prune the area have simliar size to its children
// float maxVariation;
// //! trace back to cut off mser with diversity < min_diversity
// float minDiversity;
//
// /////// the next few params for MSER of color image
//
// //! for color image, the evolution steps
// int maxEvolution;
// //! the area threshold to cause re-initialize
// double areaThreshold;
// //! ignore too small margin
// double minMargin;
// //! the aperture size for edge blur
// int edgeBlurSize;
// } CvMSERParams;
//
// CVAPI(CvMSERParams) cvMSERParams( int delta CV_DEFAULT(5), int min_area CV_DEFAULT(60),
// int max_area CV_DEFAULT(14400), float max_variation CV_DEFAULT(.25f),
// float min_diversity CV_DEFAULT(.2f), int max_evolution CV_DEFAULT(200),
// double area_threshold CV_DEFAULT(1.01),
// double min_margin CV_DEFAULT(.003),
// int edge_blur_size CV_DEFAULT(5) );
//
/// / Extracts the contours of Maximally Stable Extremal Regions
// CVAPI(void) cvExtractMSER( CvArr* _img, CvArr* _mask, CvSeq** contours, CvMemStorage* storage, CvMSERParams params );
//
//
// typedef struct CvStarKeypoint
// {
// CvPoint pt;
// int size;
// float response;
// } CvStarKeypoint;
//
// CV_INLINE CvStarKeypoint cvStarKeypoint(CvPoint pt, int size, float response)
// {
// CvStarKeypoint kpt;
// kpt.pt = pt;
// kpt.size = size;
// kpt.response = response;
// return kpt;
// }
//
// typedef struct CvStarDetectorParams
// {
// int maxSize;
// int responseThreshold;
// int lineThresholdProjected;
// int lineThresholdBinarized;
// int suppressNonmaxSize;
// } CvStarDetectorParams;
//
// CV_INLINE CvStarDetectorParams cvStarDetectorParams(
// int maxSize CV_DEFAULT(45),
// int responseThreshold CV_DEFAULT(30),
// int lineThresholdProjected CV_DEFAULT(10),
// int lineThresholdBinarized CV_DEFAULT(8),
// int suppressNonmaxSize CV_DEFAULT(5))
// {
// CvStarDetectorParams params;
// params.maxSize = maxSize;
// params.responseThreshold = responseThreshold;
// params.lineThresholdProjected = lineThresholdProjected;
// params.lineThresholdBinarized = lineThresholdBinarized;
// params.suppressNonmaxSize = suppressNonmaxSize;
//
// return params;
// }
//
// CVAPI(CvSeq*) cvGetStarKeypoints( const CvArr* img, CvMemStorage* storage,
// CvStarDetectorParams params CV_DEFAULT(cvStarDetectorParams()));
//
// #ifdef __cplusplus
// }
// #endif
//
// #endif
implementation
Uses uLibName;
function cvSURFParams; external legacy_dll;
procedure cvExtractSURF; external legacy_dll;
end.

File diff suppressed because it is too large Load Diff

110
include/nonfree/nonfree.pas Normal file
View File

@ -0,0 +1,110 @@
// --------------------------------- OpenCV license.txt ---------------------------
(* // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage. *)
(* / **************************************************************************************************
// Project Delphi-OpenCV
// **************************************************************************************************
// Contributor:
// laentir Valetov
// email:laex@bk.ru
// **************************************************************************************************
// You may retrieve the latest version of this file at the GitHub,
// located at git://github.com/Laex/Delphi-OpenCV.git
// **************************************************************************************************
// License:
// The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
// you may not use this file except in compliance with the License. You may obtain a copy of the
// License at http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
// ANY KIND, either express or implied. See the License for the specific language governing rights
// and limitations under the License.
//
// Alternatively, the contents of this file may be used under the terms of the
// GNU Lesser General Public License (the "LGPL License"), in which case the
// provisions of the LGPL License are applicable instead of those above.
// If you wish to allow use of your version of this file only under the terms
// of the LGPL License and not to allow others to use your version of this file
// under the MPL, indicate your decision by deleting the provisions above and
// replace them with the notice and other provisions required by the LGPL
// License. If you do not delete the provisions above, a recipient may use
// your version of this file under either the MPL or the LGPL License.
//
// For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
// **************************************************************************************************
// Warning: Using Delphi XE3 syntax!
// **************************************************************************************************
// The Initial Developer of the Original Code:
// OpenCV: open source computer vision library
// Homepage: http://opencv.org
// Online docs: http://docs.opencv.org
// Q&A forum: http://answers.opencv.org
// Dev zone: http://code.opencv.org
// **************************************************************************************************
// Original file:
// opencv\modules\nonfree\include\opencv2\nonfree.hpp
// ************************************************************************************************* *)
{$IFDEF DEBUG}
{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q+,R+,S-,T-,U-,V+,W+,X+,Y+,Z1}
{$ELSE}
{$A8,B-,C-,D-,E-,F-,G+,H+,I+,J-,K-,L-,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y-,Z1}
{$ENDIF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN SYMBOL_PLATFORM OFF}
{$WARN UNIT_PLATFORM OFF}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$POINTERMATH ON}
unit nonfree;
interface
Uses Windows;
function initModule_nonfree(): bool; cdecl;
implementation
Uses uLibName;
function initModule_nonfree; external Nonfree_DLL index 979;
end.

View File

@ -46,6 +46,7 @@ const
legacy_dll = 'opencv_legacy' + CV_Version + 'd.dll';
calib3d_dll = 'opencv_calib3d' + CV_Version + 'd.dll';
tracking_DLL = 'opencv_video' + CV_Version + 'd.dll';
Nonfree_DLL = 'opencv_nonfree' + CV_Version + 'd.dll';
{$ELSE}
Core_Dll = 'opencv_core' + CV_Version + '.dll';
highgui_Dll = 'opencv_highgui' + CV_Version + '.dll';
@ -54,6 +55,7 @@ const
legacy_dll = 'opencv_legacy' + CV_Version + '.dll';
calib3d_dll = 'opencv_calib3d' + CV_Version + '.dll';
tracking_DLL = 'opencv_video' + CV_Version + '.dll';
Nonfree_DLL = 'opencv_nonfree' + CV_Version + '.dll';
{$ENDIF}
implementation

View File

@ -113,6 +113,12 @@ Type
ppCVChar = ^TpCVCharArray;
CVChar = AnsiChar;
function strdup(const str: pCVChar): pCVChar;
function cv_stricmp(const str1, str2: pCVChar): Integer;
procedure strcpy(var str1: pCVChar; const str2: pCVChar);
procedure strcat(var str1: pCVChar; const str2: pCVChar);
type
uchar = Byte;
{$EXTERNALSYM uchar}
ushort = Word;
@ -304,7 +310,7 @@ const
type
pIplImage = ^TIplImage;
TpIplImageArray = array[0..1] of pIplImage;
TpIplImageArray = array [0 .. 1] of pIplImage;
ppIplImage = ^TpIplImageArray;
pIplROI = ^TIplROI;
pIplTileInfo = ^TIplTileInfo;
@ -899,6 +905,8 @@ type
end;
pCvSeq = ^TCvSeq;
pCvSeqArray = array [0 .. 1] of pCvSeq;
ppCvSeq = ^pCvSeqArray;
TCvSeq = packed record
flags: Integer; (* Miscellaneous flags. *)
@ -1298,7 +1306,7 @@ function CV_CAST_8U(t: Integer): uchar; inline;
} \
}
*)
procedure CV_NEXT_SEQ_ELEM(const elem_size: Integer; const Reader: TCvSeqReader); // inline;
procedure CV_NEXT_SEQ_ELEM(const elem_size: Integer; const Reader: TCvSeqReader); //inline;
// (* Move reader position backward: *)
// // >> Following declaration is a macro definition!
@ -1315,7 +1323,7 @@ procedure CV_NEXT_SEQ_ELEM(const elem_size: Integer; const Reader: TCvSeqReader)
CV_NEXT_SEQ_ELEM( sizeof(elem), reader ) \
}
*)
procedure CV_READ_SEQ_ELEM(Var Elem; const Reader: TCvSeqReader; const SizeOfElem: Integer); inline;
procedure CV_READ_SEQ_ELEM(const Elem:Pointer; const Reader: TCvSeqReader; const SizeOfElem: Integer); //inline;
// (* Read element and move read position backward: *)
@ -2104,11 +2112,37 @@ function CV_MAT_ELEM(const mat: TCvMat; const elemsize: Integer; const row, col:
// (mat).data.ptr + (size_t)(mat).step*(row) + (pix_size)*(col))
function CV_MAT_ELEM_PTR_FAST(const mat: TCvMat; const row, col, pix_size: Integer): Pointer;
function iif(const Conditional: Boolean; const ifTrue, ifFalse: Variant): Variant; inline;
function iif(const Conditional: Boolean; const ifTrue, ifFalse: Variant): Variant; inline; overload;
function iif(const Conditional: Boolean; const ifTrue, ifFalse: Pointer): Pointer; inline; overload;
implementation
Uses core_c;
Uses core_c, Windows, System.SysUtils;
function strdup(const str: pCVChar): pCVChar;
begin
Result := Allocmem(Length(str) * SizeOf(CVChar));
CopyMemory(Result, str, Length(str) * SizeOf(CVChar));
end;
function cv_stricmp(const str1, str2: pCVChar): Integer;
begin
Result := AnsiCompareStr(str1^, str2^);
end;
procedure strcpy(var str1: pCVChar; const str2: pCVChar);
begin
str1 := Allocmem(Length(str2) * SizeOf(CVChar));
end;
procedure strcat(var str1: pCVChar; const str2: pCVChar);
Var
N: Integer;
begin
N := Length(str1) * SizeOf(CVChar);
ReallocMem(str1, (Length(str1) + Length(str2)) * SizeOf(CVChar));
CopyMemory(str1 + N, str2, Length(str2) * SizeOf(CVChar));
end;
function CV_MAT_ELEM_PTR_FAST(const mat: TCvMat; const row, col, pix_size: Integer): Pointer;
begin
@ -2226,7 +2260,15 @@ begin
Result := Round(value);
end;
function iif;
function iif(const Conditional: Boolean; const ifTrue, ifFalse: Variant): Variant; inline; overload;
begin
if Conditional then
Result := ifTrue
else
Result := ifFalse;
end;
function iif(const Conditional: Boolean; const ifTrue, ifFalse: Pointer): Pointer; inline; overload;
begin
if Conditional then
Result := ifTrue
@ -2252,21 +2294,25 @@ begin
Result := CV_NODE_TYPE(flags) = CV_NODE_REAL;
end;
procedure CV_READ_SEQ_ELEM;
procedure CV_READ_SEQ_ELEM(const Elem:Pointer; const Reader: TCvSeqReader; const SizeOfElem: Integer); //inline;
begin
// assert( (reader).seq->elem_size == sizeof(elem));
Assert(Reader.seq^.elem_size = SizeOfElem);
// memcpy( &(elem), (reader).ptr, sizeof((elem)));
Move(Reader.ptr, Elem, SizeOfElem);
CopyMemory(Elem, Reader.ptr, SizeOfElem);
// CV_NEXT_SEQ_ELEM( sizeof(elem), reader )
CV_NEXT_SEQ_ELEM(SizeOfElem, Reader);
end;
procedure CV_NEXT_SEQ_ELEM(const elem_size: Integer; const Reader: TCvSeqReader); // inline;
procedure CV_NEXT_SEQ_ELEM(const elem_size: Integer; const Reader: TCvSeqReader); //inline;
Var
ptr: PInteger;
begin
// if( ((reader).ptr += (elem_size)) >= (reader).block_max )
// cvChangeSeqBlock( &(reader), 1 );
if (Integer(Reader.ptr) + elem_size) >= Integer(Reader.block_max) then
ptr := @Reader.ptr;
ptr^ := ptr^ + elem_size;
if Integer(Reader.ptr) >= Integer(Reader.block_max) then
cvChangeSeqBlock(@Reader, 1);
end;
@ -2352,7 +2398,7 @@ end;
function CV_SEQ_ELEM(seq: pCvSeq; const size_of_elem: Integer; index: Integer): Pointer; inline;
begin
// assert(sizeof((seq)->first[0]) == sizeof(CvSeqBlock) && (seq)->elem_size == sizeof(elem_type))
Assert(Assigned(seq^.first) and (SizeOf(seq^.first^) = SizeOf(TCvSeqBlock)) and (seq^.elem_size = size_of_elem));
Assert(Assigned(seq^.first) and (SizeOf(seq^.first[0]) = SizeOf(TCvSeqBlock)) and (seq^.elem_size = size_of_elem));
// (elem_type*)((seq)->first && (unsigned)index <(unsigned)((seq)->first->count) ?
if Assigned(seq^.first) and (Cardinal(index) < Cardinal(seq^.first^.count)) then
// (seq)->first->data + (index) * sizeof(elem_type) :
@ -2380,7 +2426,7 @@ end;
function CV_IS_SET_ELEM(ptr: Pointer): Boolean; // inline;
begin
// #define CV_IS_SET_ELEM( ptr ) (((CvSetElem*)(ptr))->flags >= 0)
Result := pCvSetElem(ptr)^.flags >= 0;
Result := Assigned(ptr) and (pCvSetElem(ptr)^.flags >= 0);
end;
function CV_IMAGE_ELEM(image: pIplImage; size_elemtype, row, col: Integer): Pointer; inline;
@ -2400,7 +2446,7 @@ end;
function cvRNG(seed: int64 = -1): TCvRNG; inline;
begin
// CvRNG rng = seed ? (uint64)seed : (uint64)(int64)-1;
Result := iif(seed>0,seed,uint64(int64(-1)));
Result := iif(seed > 0, seed, uint64(int64(-1)));
end;
end.

View File

@ -104,11 +104,12 @@ uses
* cArray allocation, deallocation, initialization and access to elements *
************************************************************************************** *)
(* <malloc> wrapper.
If there is no enough memory, the cFunction
(as well as other OpenCV functions that call cvAlloc)
raises an error. *)
procedure cvAlloc(size: size_t); cdecl;
// * <malloc> wrapper.
// If there is no enough memory, the function
// (as well as other OpenCV functions that call cvAlloc)
// raises an error. */
// CVAPI(void*) cvAlloc( size_t size );
function cvAlloc(size: size_t): Pointer; cdecl;
(* <free> wrapper.
Here and further all the memory releasing functions
@ -240,7 +241,7 @@ function cvCloneMat(const mat: pCvMat): pCvMat; cdecl;
// (* Makes a new matrix from <rect> subrectangle of input array.
// No data is copied *)
// CVAPI(CvMat)cvGetSubRect(CvArr * arr, CvMat * submat, CvRect rect);
function cvGetSubRect(arr: pIplImage; submat: pIplImage; rect: TCvRect): pIplImage; cdecl;
function cvGetSubRect(arr: pCvArr; submat: pCvArr; rect: TCvRect): pIplImage; cdecl;
// const cvGetSubArr = cvGetSubRect;
@ -361,11 +362,11 @@ const
// * ptr = &arr(idx0,idx1,...). All indexes are zero-based,
// the major dimensions go first (e.g. (y,x) for 2D, (z,y,x) for 3D */
// CVAPI(uchar*) cvPtr1D( const CvArr* arr, int idx0, int* type CV_DEFAULT(NULL));
function cvPtr1D(const arr: pCvArr; idx0: Integer; _type: PInteger = nil): pointer; cdecl;
function cvPtr1D(const arr: pCvArr; idx0: Integer; _type: PInteger = nil): Pointer; cdecl;
// CVAPI(uchar*) cvPtr2D( const CvArr* arr, int idx0, int idx1, int* type CV_DEFAULT(NULL) );
function cvPtr2D(const arr: pCvArr; idx0, idx1: Integer; _type: PInteger = nil): pointer; cdecl;
function cvPtr2D(const arr: pCvArr; idx0, idx1: Integer; _type: PInteger = nil): Pointer; cdecl;
// CVAPI(uchar*) cvPtr3D( const CvArr* arr, int idx0, int idx1, int idx2,int* type CV_DEFAULT(NULL));
function cvPtr3D(const arr: pCvArr; idx0, idx1, idx2: Integer; _type: PInteger = nil): pointer; cdecl;
function cvPtr3D(const arr: pCvArr; idx0, idx1, idx2: Integer; _type: PInteger = nil): Pointer; cdecl;
// (* For CvMat or IplImage number of indices should be 2
// (row index (y) goes first, column index (x) goes next).
@ -1168,13 +1169,17 @@ function cvSeqPush(seq: pCvSeq; const element: Pointer = nil): Pointer; cdecl;
// function; var Inserts A new element in the middle of sequence.cvSeqInsert(seq
// : Integer in_front CV_DEFAULT(v1: 0)): Integer; (; :; = cvSeqPushFront(seq: lem);
// var)CVAPI(schar)cvSeqInsert(CvSeq * seq: lem); before_index: Integer;
// var Removes specified sequence element * )
// procedure cvSeqRemove(CvSeq * seq: unction element CV_DEFAULT(v1: 0)): Pointer; (; index: Integer);
//
// (* Removes all the elements from the sequence. The freed memory
// var Removes
// * Removes specified sequence element */
// CVAPI(void) cvSeqRemove( CvSeq* seq, int index );
procedure cvSeqRemove(seq: pCvSeq; index: Integer); cdecl;
// * Removes all the elements from the sequence. The freed memory
// can be reused later only by the same sequence unless cvClearMemStorage
// or cvRestoreMemStoragePos is called *)
// procedure cvClearSeq(var seq: CvSeq);
// or cvRestoreMemStoragePos is called */
// CVAPI(void) cvClearSeq( CvSeq* seq );
procedure cvClearSeq(seq: pCvSeq); cdecl;
{
/* Retrieves pointer to specified sequence element.
@ -1243,25 +1248,28 @@ function cvCvtSeqToArray(const seq: pCvSeq; elements: Pointer; slice: TCvSlice {
//
// (* Inserts a sequence or array into another sequence *)
// procedure cvSeqInsertSlice(var seq: CvSeq; before_index: Integer; var from_arr: CvArr);
//
// (* a < b ? -1 : a > b ? 1 : 0 *)
// type CvCmpFunc =
// function(A: Pointer; B: Pointer; userdata: Pointer): Integer; CV_CDECL *;
//
// (* Sorts sequence in-place given element comparison function *)
// procedure cvSeqSort(v1: 0));
//
// (* Finds element in a [sorted] sequence *)
// CVAPI(schar)cvSeqSearch(CvSeq * seq, Pointer elem, CvCmpFunc func, Integer is_sorted,
// Integer * elem_idx,
// function userdata CV_DEFAULT(v1: 0)): Pointer;
//
// (* Reverses order of sequence elements in-place *)
// procedure cvSeqInvert(var seq: CvSeq);
//
// (* Splits sequence into one or more equivalence classes using the specified criteria *)
// CVAPI(Integer)cvSeqPartition(CvSeq * seq, CvMemStorage * storage, CvSeq * * labels,
// CvCmpFunc is_equal, Pointer userdata);
// * a < b ? -1 : a > b ? 1 : 0 */
// typedef int (CV_CDECL* CvCmpFunc)(const void* a, const void* b, void* userdata );
Type
TCvCmpFunc = function(const a: Pointer; const b: Pointer; userdata: Pointer): Integer; cdecl;
// (* Sorts sequence in-place given element comparison function *)
// procedure cvSeqSort(v1: 0));
//
// (* Finds element in a [sorted] sequence *)
// CVAPI(schar)cvSeqSearch(CvSeq * seq, Pointer elem, CvCmpFunc func, Integer is_sorted,
// Integer * elem_idx,
// function userdata CV_DEFAULT(v1: 0)): Pointer;
//
// (* Reverses order of sequence elements in-place *)
// procedure cvSeqInvert(var seq: CvSeq);
// * Splits sequence into one or more equivalence classes using the specified criteria */
// CVAPI(int) cvSeqPartition( const CvSeq* seq, CvMemStorage* storage,
// CvSeq** labels, CvCmpFunc is_equal, void* userdata );
function cvSeqPartition(const seq: pCvSeq; storage: pCvMemStorage; labels: pCvSeq; is_equal: TCvCmpFunc;
userdata: Pointer): Integer; cdecl;
// ************ Internal sequence functions ************/
// CVAPI(void) cvChangeSeqBlock( void* reader, int direction );
@ -1430,7 +1438,7 @@ procedure cvCreateSeqBlock(writer: pCvSeqWriter); cdecl;
// *************************************************************************************** *)
//
/// / >> Following declaration is a macro definition!
function CV_RGB(const r, g, B: Double): TCvScalar; inline;
function CV_RGB(const r, g, b: Double): TCvScalar; inline;
// CvScalar((B), (g), (r), 0);
const
@ -1789,9 +1797,14 @@ procedure cvReleaseFileStorage(Var fs: pCvFileStorage); cdecl;
// procedure cvWriteComment(CvFileStorage * fs: v1: 0)): Integer; (; comment: PCVChar;
// var writes instance of A standard type (Matrix: Integer eol_comment): PCVChar; (; v4: image;
// v5: sequence; var)
// procedure cvWrite(CvFileStorage * fs: graph etc.) or user - defined cType; name: Pointer;
// var ptr: void; attributes CV_DEFAULT(CvAttrList()): CvAttrList);
//
// * writes instance of a standard type (matrix, image, sequence, graph etc.)
// or user-defined type */
// CVAPI(void) cvWrite( CvFileStorage* fs, const char* name, const void* ptr,
// CvAttrList attributes CV_DEFAULT(cvAttrList()));
procedure cvWrite(fs: pCvFileStorage; const name: pCVChar; const ptr: Pointer;
attributes: TCvAttrList { = cvAttrList() } ); cdecl;
// (* starts the next stream *)
// procedure cvStartNextStream(var fs: CvFileStorage);
//
@ -2052,7 +2065,7 @@ implementation
uses
uLibName;
procedure cvAlloc(size: size_t); external Core_Dll; cdecl;
function cvAlloc(size: size_t): Pointer; external Core_Dll; cdecl;
procedure cvFree_(ptr: Pointer); external Core_Dll; cdecl;
function cvCreateImageHeader; external Core_Dll; cdecl;
function cvCreateImage; external Core_Dll; cdecl;
@ -2127,7 +2140,7 @@ procedure cvZero; external Core_Dll name 'cvSetZero';
function CV_RGB;
begin
Result := CvScalar(B, g, r, 0);
Result := CvScalar(b, g, r, 0);
end;
procedure cvSave(const filename: pCVChar; const struct_ptr: Pointer; const name: pCVChar; const comment: pCVChar;
@ -2318,5 +2331,9 @@ function cvNorm; external Core_Dll;
function cvPtr1D; external Core_Dll;
function cvPtr2D; external Core_Dll;
function cvPtr3D; external Core_Dll;
procedure cvSeqRemove; external Core_Dll;
procedure cvClearSeq; external Core_Dll;
procedure cvWrite; external Core_Dll;
function cvSeqPartition; external Core_Dll;
end.

View File

@ -0,0 +1,411 @@
(* /*****************************************************************
// Delphi-OpenCV Demo
// Copyright (C) 2013 Project Delphi-OpenCV
// ****************************************************************
// Contributor:
// laentir Valetov
// email:laex@bk.ru
// ****************************************************************
// You may retrieve the latest version of this file at the GitHub,
// located at git://github.com/Laex/Delphi-OpenCV.git
// ****************************************************************
// The contents of this file are used with permission, subject to
// the Mozilla Public License Version 1.1 (the "License"); you may
// not use this file except in compliance with the License. You may
// obtain a copy of the License at
// http://www.mozilla.org/MPL/MPL-1_1Final.html
//
// Software distributed under the License is distributed on an
// "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
// implied. See the License for the specific language governing
// rights and limitations under the License.
// ***************************************************************
// Original file:
// http://blog.vidikon.com/?p=213
// *************************************************************** *)
// JCL_DEBUG_EXPERT_GENERATEJDBG OFF
// JCL_DEBUG_EXPERT_INSERTJDBG OFF
// JCL_DEBUG_EXPERT_DELETEMAPFILE OFF
program cv_ExtractSURF;
{$APPTYPE CONSOLE}
{$POINTERMATH ON}
{$R *.res}
uses
System.SysUtils,
Windows,
System.Generics.Collections,
uLibName in '..\..\..\include\uLibName.pas',
highgui_c in '..\..\..\include\highgui\highgui_c.pas',
core_c in '..\..\..\include\ñore\core_c.pas',
Core.types_c in '..\..\..\include\ñore\Core.types_c.pas',
imgproc.types_c in '..\..\..\include\imgproc\imgproc.types_c.pas',
imgproc_c in '..\..\..\include\imgproc\imgproc_c.pas',
legacy in '..\..\..\include\legacy\legacy.pas',
calib3d in '..\..\..\include\calib3d\calib3d.pas',
imgproc in '..\..\..\include\imgproc\imgproc.pas',
haar in '..\..\..\include\objdetect\haar.pas',
objdetect in '..\..\..\include\objdetect\objdetect.pas',
tracking in '..\..\..\include\video\tracking.pas',
Core in '..\..\..\include\ñore\core.pas',
compat in '..\..\..\include\legacy\compat.pas',
nonfree in '..\..\..\include\nonfree\nonfree.pas';
// Ñðàâíåíèå äâóõ îñîáåííîñòåé
function compareSURFDescriptors(const d1: PSingle; const d2: PSingle; best: Double; length: Integer): Double;
Var
total_cost: Double;
i: Integer;
t0, t1, t2, t3: Double;
begin
total_cost := 0;
assert(length mod 4 = 0);
i := 0;
While i < length - 1 do
begin
t0 := d1[i] - d2[i];
t1 := d1[i + 1] - d2[i + 1];
t2 := d1[i + 2] - d2[i + 2];
t3 := d1[i + 3] - d2[i + 3];
total_cost := total_cost + t0 * t0 + t1 * t1 + t2 * t2 + t3 * t3;
if (total_cost > best) then
break;
i := i + 4;
end;
result := total_cost;
end;
// Ñðàâíèâàåò îäíó îñîáåííîñòü îáúåêòà ñî âñåìè îñîáåííîñòÿìè ñöåíû
function naiveNearestNeighbor(const vec: PSingle; laplacian: Integer; const model_keypoints: pCvSeq;
const model_descriptors: pCvSeq): Integer;
Var
length, i, neighbor: Integer;
d, dist1, dist2: Double;
reader, kreader: TCvSeqReader;
kp: pCvSURFPoint;
mvec: PSingle;
begin
length := model_descriptors.elem_size div sizeof(single);
neighbor := -1;
dist1 := 1E6;
dist2 := 1E6;;
// Íà÷àëüíàÿ îñîáåííîñòü ñöåíû
cvStartReadSeq(model_keypoints, @kreader, 0);
cvStartReadSeq(model_descriptors, @reader, 0);
// Ïåðåáîð âñåõ îñîáåííîñòåé ñöåíû
for i := 0 to model_descriptors.total - 1 do
begin
kp := pCvSURFPoint(kreader.ptr);
mvec := PSingle(reader.ptr);
CV_NEXT_SEQ_ELEM(kreader.seq.elem_size, kreader);
CV_NEXT_SEQ_ELEM(reader.seq.elem_size, reader);
// Äëÿ óñêîðåíèÿ ñíà÷àëà ñðàâíèâàåòñÿ ëàïëàñèàí îñîáåííîñòåé
if (laplacian <> kp.laplacian) then
continue;
// Ñðàâíåíèå îñîáåííîñòåé
d := compareSURFDescriptors(vec, mvec, dist2, length);
if (d < dist1) then
begin
// Íàéäåíà ëó÷øåå ñîâïàäåíèå îñîáåííîñòåé
dist2 := dist1;
dist1 := d;
neighbor := i;
end
else if (d < dist2) then
dist2 := d;
end;
if (dist1 < 0.6 * dist2) then
Exit(neighbor);
result := -1;
end;
// Ôóíêöèÿ èùåò ñîâïàäàþùèå ïàðû
procedure findPairs(const objectKeypoints: pCvSeq; const objectDescriptors: pCvSeq; const imageKeypoints: pCvSeq;
const imageDescriptors: pCvSeq; Var ptpairs: TArray<Integer>);
var
i: Integer;
reader, kreader: TCvSeqReader;
kp: pCvSURFPoint;
descriptor: PSingle;
nearest_neighbor: Integer;
begin
// Óñòàíîâêà íà÷àëüíîé îñîáåííîñòè îáúåêòà ðàñïîçíàâàíèÿ
cvStartReadSeq(objectKeypoints, @kreader);
cvStartReadSeq(objectDescriptors, @reader);
SetLength(ptpairs, 0);
// Ïåðåáîð âñåõ îñîáåííîñòåòåé îáúåêòà
for i := 0 to objectDescriptors.total - 1 do
begin
kp := pCvSURFPoint(kreader.ptr);
descriptor := PSingle(reader.ptr);
CV_NEXT_SEQ_ELEM(kreader.seq.elem_size, kreader);
CV_NEXT_SEQ_ELEM(reader.seq.elem_size, reader);
// Ñðàâíåíèå òåêóùåé îñîáåííîñòè ñî âñåìè îñîáåííîñòÿìè èç ñöåíû
nearest_neighbor := naiveNearestNeighbor(descriptor, kp.laplacian, imageKeypoints, imageDescriptors);
if (nearest_neighbor >= 0) then
begin
// Íàøëîñü ñîâïàäåíèå îñîáåííîñòåé
SetLength(ptpairs, length(ptpairs) + 2);
ptpairs[High(ptpairs) - 1] := i;
ptpairs[High(ptpairs)] := nearest_neighbor;
end;
end;
end;
// * Ãðóáîå íàõîæäåíèå ìåñòîïîëîæåíèÿ îáúåêòà * /
function locatePlanarObject(const objectKeypoints: pCvSeq; const objectDescriptors: pCvSeq;
const imageKeypoints: pCvSeq; const imageDescriptors: pCvSeq; const src_corners: TArray<TCvPoint>;
dst_corners: TArray<TCvPoint>): Integer;
var
h: array [0 .. 8] of Double;
_h: TCvMat;
ptpairs: TArray<Integer>;
pt1, pt2: TArray<TCvPoint2D32f>;
_pt1, _pt2: TCvMat;
i, n: Integer;
x, y, _Z, _X, _Y: Double;
begin
_h := cvMat(3, 3, CV_64F, @h);
// Èùåì ïàðû îñîáåííîñòåé íà îáåèõ êàðòèíêàõ, êîòîðûå ñîîòâåòñòâóþò
// äðóã äðóãó
findPairs(objectKeypoints, objectDescriptors, imageKeypoints, imageDescriptors, ptpairs);
n := length(ptpairs) div 2;
// Åñëè ïàð ìàëî, çíà÷èò íàäî âûõîäèòü îáúåêò íå íàéäåí
if (n < 4) then
Exit(0);
// Âûäåëÿåì ïàìÿòü
SetLength(pt1, n);
SetLength(pt2, n);
// Ñ÷èòûâàåì êîîðäèíàòû «îñîáûõ»òî÷åê
for i := 0 to n - 1 do
begin
pt1[i] := pCvSURFPoint(cvGetSeqElem(objectKeypoints, ptpairs[i * 2])).pt;
pt2[i] := pCvSURFPoint(cvGetSeqElem(imageKeypoints, ptpairs[i * 2 + 1])).pt;
end;
// Ïî ïîëó÷åííûì âåêòîðàì ñîçäà¸ì ìàòðèö
_pt1 := cvMat(1, n, CV_32FC2, @pt1[0]);
_pt2 := cvMat(1, n, CV_32FC2, @pt2[0]);
// Íàõîäèì òðàíñôîðìàöèþ ìåæäó èñõîäíûì èçîáðàæåíèåì è ñ òåì, êîòîðîå
// èùåì
if (cvFindHomography(@_pt1, @_pt2, @_h, CV_RANSAC, 5) = 0) then
Exit(0);
// Ïî ïîëó÷åííîìó çíà÷åíèþ òðàíñôîðìàöèè (â ìàòðèöó _h) íàõîäèì
// êîîðäèíàòû ÷åòûð¸õóãîëüíèêà, õàðàêòåðèçóþùåãî îáúåêò
for i := 0 to 3 do
begin
x := src_corners[i].x;
y := src_corners[i].y;
_Z := 1. / (h[6] * x + h[7] * y + h[8]);
_X := (h[0] * x + h[1] * y + h[2]) * _Z;
_Y := (h[3] * x + h[4] * y + h[5]) * _Z;
dst_corners[i] := cvPoint(cvRound(_X), cvRound(_Y));
end;
Exit(1);
end;
Var
object_filename, scene_filename: AnsiString;
storage: pCvMemStorage;
colors: array [0 .. 8] of TCvScalar = (
(
val:
(
0,
0,
255,
0
)
),
(
val:
(
0,
128,
255,
0
)
),
(
val:
(
0,
255,
255,
0
)
),
(
val:
(
0,
255,
0,
0
)
),
(
val:
(
255,
128,
0,
0
)
),
(
val:
(
255,
255,
0,
0
)
),
(
val:
(
255,
0,
0,
0
)
),
(
val:
(
255,
0,
255,
0
)
),
(
val:
(
255,
255,
255,
0
)
)
);
_object, image, object_color: pIplImage;
objectKeypoints, objectDescriptors, imageKeypoints, imageDescriptors: pCvSeq;
i: Integer;
params: TCvSURFParams;
tt: Double;
src_corners, dst_corners: TArray<TCvPoint>;
correspond: pIplImage;
r1, r2: TCvPoint;
ptpairs: TArray<Integer>;
_r1, _r2: pCvSURFPoint;
r: pCvSURFPoint;
center: TCvPoint;
radius: Integer;
begin
try
initModule_nonfree;
// Èíèöèàëèçàöèÿ ïàðàìåòðîâ
object_filename := iif(ParamCount = 2, ParamStr(1), 'resource\box.png');
scene_filename := iif(ParamCount = 2, ParamStr(2), 'resource\box_in_scene.png');
storage := cvCreateMemStorage(0);
cvNamedWindow('Object', 1);
cvNamedWindow('Object Correspond', 1);
// Çàãðóçêà èçîáðàæåíèé
_object := cvLoadImage(pcvChar(@object_filename[1]), CV_LOAD_IMAGE_GRAYSCALE);
image := cvLoadImage(pcvChar(@scene_filename[1]), CV_LOAD_IMAGE_GRAYSCALE);
if (not Assigned(_object)) or (not Assigned(image)) then
begin
WriteLn(Format('Can not load %s and/or %s', [object_filename, scene_filename]));
WriteLn('Usage: find_obj [<object_filename> <scene_filename>]');
Halt;
end;
// Ïåðåâîä â ãðàäàöèè ñåðîãî
object_color := cvCreateImage(cvGetSize(_object), 8, 3);
cvCvtColor(_object, object_color, CV_GRAY2BGR);
// Èíèöèàëèçàöèÿ ñòðóêòóðû CvSURFParams ñ ðàçìåðîì äåñêðèïòîðîâ â 128
// ýëåìåíòîâ
params := CvSURFParams(500, 1);
// Çàñåêàåì âðåìÿ
tt := cvGetTickCount();
// Èùåì îñîáåííîñòè îáúåêòà ðàñïîçíàâàíèÿ
cvExtractSURF(_object, nil, @objectKeypoints, @objectDescriptors, storage, params);
WriteLn(Format('Object Descriptors: %d', [objectDescriptors.total]));
// Èùåì îñîáåííîñòè ñöåíû
cvExtractSURF(image, nil, @imageKeypoints, @imageDescriptors, storage, params);
WriteLn(Format('Image Descriptors: %d', [imageDescriptors.total]));
// Ñêîëüêî ïîòðåáîâàëîñü âðåìåíè (Ó ìåíÿ 167 ìèëëè ñåêóíä)
tt := cvGetTickCount() - tt;
WriteLn(Format('Extraction time = %gms', [tt / (cvGetTickFrequency() * 1000)]));
// Óñòàíàâëèâàåì ãðàíèöû èçîáðàæåíèé, âíóòðè êîòîðûõ áóäóò ñðàâíèâàòüñÿ
// îñîáåííîñòè
SetLength(src_corners, 4);
src_corners[0] := cvPoint(0, 0);
src_corners[1] := cvPoint(_object.width, 0);
src_corners[2] := cvPoint(_object.width, _object.height);
src_corners[3] := cvPoint(0, _object.height);
SetLength(dst_corners, 4);
// Ñîçäàíèå äîïîëíèòåëüíîãî èçîáðàæåíèå (â í¸ì áóäåò ñöåíà è îáúåêò)
// Çàïóñòèòå ïðèìåð è ïîéì¸òå î ÷¸ì ðå÷ü
correspond := cvCreateImage(cvSize(image.width, _object.height + image.height), 8, 1);
cvSetImageROI(correspond, cvRect(0, 0, _object.width, _object.height));
cvCopy(_object, correspond);
cvSetImageROI(correspond, cvRect(0, _object.height, correspond.width, correspond.height));
cvCopy(image, correspond);
cvResetImageROI(correspond);
// Âûçûâàåì ôóíêöèþ, íàõîäÿùóþ îáúåêò íà ýêðàíå
if (locatePlanarObject(objectKeypoints, objectDescriptors, imageKeypoints, imageDescriptors, src_corners,
dst_corners) <> 0) then
begin
// Îáâîäèì íóæíûé ÷åòûð¸õóãîëüíèê
for i := 0 to 3 do
begin
r1 := dst_corners[i mod 4];
r2 := dst_corners[(i + 1) mod 4];
cvLine(correspond, cvPoint(r1.x, r1.y + _object.height), cvPoint(r2.x, r2.y + _object.height), colors[8]);
end;
end;
// Åñëè â ýòîì ìåñòå âûâåñòè ðåçóëüòàò íà ýêðàí, òî ïîëó÷èòüñÿ òî, ÷òî
// ïîêàçàíî íà ðèñóíêå 23.3.
// Ñíîâà èùóòñÿ âñå ñîâïàäàþùèå ïàðû îñîáåííîñòåé â îáåèõ êàðòèíêàõ
findPairs(objectKeypoints, objectDescriptors, imageKeypoints, imageDescriptors, ptpairs);
// Ìåæäó ïàðàìè îñîáåííîñòåé íà ðèñóíêå ïðîâîäÿòñÿ ïðÿìûå
i := 0;
While i < length(ptpairs) do
begin
_r1 := pCvSURFPoint(cvGetSeqElem(objectKeypoints, ptpairs[i]));
_r2 := pCvSURFPoint(cvGetSeqElem(imageKeypoints, ptpairs[i + 1]));
cvLine(correspond, cvPointFrom32f(_r1.pt), cvPoint(cvRound(_r2.pt.x), cvRound(_r2.pt.y + _object.height)),
colors[8]);
i := i + 2;
end;
// Ðåçóëüòàò ìîæíî ïîñìîòðåòü íà ðèñíóêå 23.4.
cvShowImage('Object Correspond', correspond);
// Âûäåëÿåì îñîáåííîñòèî îêðóæíîñòÿìè (Ðèñ. 23.5)
for i := 0 to objectKeypoints.total - 1 do
begin
r := pCvSURFPoint(cvGetSeqElem(objectKeypoints, i));
center.x := cvRound(r.pt.x);
center.y := cvRound(r.pt.y);
radius := cvRound(r.size * 1.2 / 9 * 2);
cvCircle(object_color, center, radius, colors[0], 1, 8, 0);
end;
cvShowImage('Object', object_color);
cvWaitKey(0);
cvDestroyAllWindows;
except
on E: Exception do
WriteLn(E.ClassName, ': ', E.Message);
end;
end.

View File

@ -0,0 +1,162 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{2A7D6208-4A7B-47C0-A5E9-02443BE8B744}</ProjectGuid>
<MainSource>cv_ExtractSURF.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<TargetedPlatforms>1</TargetedPlatforms>
<AppType>Console</AppType>
<FrameworkType>None</FrameworkType>
<ProjectVersion>14.4</ProjectVersion>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
<DCC_ExeOutput>..\..\..\bin\</DCC_ExeOutput>
<DCC_ImageBase>00400000</DCC_ImageBase>
<DCC_N>false</DCC_N>
<Manifest_File>None</Manifest_File>
<DCC_E>false</DCC_E>
<DCC_S>false</DCC_S>
<DCC_K>false</DCC_K>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=;CFBundleDisplayName=;CFBundleIdentifier=;CFBundleVersion=;CFBundlePackageType=;CFBundleSignature=;CFBundleAllowMixedLocalizations=;CFBundleExecutable=</VerInfo_Keys>
<DCC_F>false</DCC_F>
<VerInfo_Locale>1049</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_DebugInformation>false</DCC_DebugInformation>
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_Optimize>false</DCC_Optimize>
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<Manifest_File>None</Manifest_File>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\..\include\uLibName.pas"/>
<DCCReference Include="..\..\..\include\highgui\highgui_c.pas"/>
<DCCReference Include="..\..\..\include\сore\core_c.pas"/>
<DCCReference Include="..\..\..\include\сore\Core.types_c.pas"/>
<DCCReference Include="..\..\..\include\imgproc\imgproc.types_c.pas"/>
<DCCReference Include="..\..\..\include\imgproc\imgproc_c.pas"/>
<DCCReference Include="..\..\..\include\legacy\legacy.pas"/>
<DCCReference Include="..\..\..\include\calib3d\calib3d.pas"/>
<DCCReference Include="..\..\..\include\imgproc\imgproc.pas"/>
<DCCReference Include="..\..\..\include\objdetect\haar.pas"/>
<DCCReference Include="..\..\..\include\objdetect\objdetect.pas"/>
<DCCReference Include="..\..\..\include\video\tracking.pas"/>
<DCCReference Include="..\..\..\include\сore\core.pas"/>
<DCCReference Include="..\..\..\include\legacy\compat.pas"/>
<DCCReference Include="..\..\..\include\nonfree\nonfree.pas"/>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType/>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">cv_ExtractSURF.dpr</Source>
</Source>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1049</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription"/>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"/>
<VersionInfoKeys Name="LegalCopyright"/>
<VersionInfoKeys Name="LegalTrademarks"/>
<VersionInfoKeys Name="OriginalFilename"/>
<VersionInfoKeys Name="ProductName"/>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
<VersionInfoKeys Name="CFBundleName"/>
<VersionInfoKeys Name="CFBundleDisplayName"/>
<VersionInfoKeys Name="CFBundleIdentifier"/>
<VersionInfoKeys Name="CFBundleVersion"/>
<VersionInfoKeys Name="CFBundlePackageType"/>
<VersionInfoKeys Name="CFBundleSignature"/>
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
<VersionInfoKeys Name="CFBundleExecutable"/>
</VersionInfoKeys>
</Delphi.Personality>
<Platforms>
<Platform value="OSX32">False</Platform>
<Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform>
</Platforms>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
</Project>
<!-- EurekaLog First Line
[Exception Log]
EurekaLog Version=7001
DeleteMapAfterCompile=1
EurekaLog Last Line -->

Binary file not shown.

View File

@ -176,7 +176,7 @@ begin
max_val := 0.0;
cvSetImageROI(hue, selection);
cvSetImageROI(mask, selection);
cvCalcHist(@hue, hist, 0, mask);
cvCalcHist(hue, hist, 0, mask);
cvGetMinMaxHistValue(hist, nil, @max_val);
if (max_val <> 0) then
cvConvertScale(hist^.bins, hist^.bins, (255.0 / max_val), 0)

View File

@ -208,8 +208,9 @@ var
i: integer;
count: integer;
pt: array [0 .. 3] of TCvPoint;
rect: PCvPoint absolute pt;
rect: PCvPoint;
begin
rect:=@pt;
cpy := cvCloneImage(img);
// initialize reader of the sequence
@ -221,10 +222,10 @@ begin
// CvPoint pt[4], *rect = pt;
count := 4;
// read 4 vertices
CV_READ_SEQ_ELEM(pt[0], reader, sizeof(TCvPoint));
CV_READ_SEQ_ELEM(pt[1], reader, sizeof(TCvPoint));
CV_READ_SEQ_ELEM(pt[2], reader, sizeof(TCvPoint));
CV_READ_SEQ_ELEM(pt[3], reader, sizeof(TCvPoint));
CV_READ_SEQ_ELEM(@pt[0], reader, sizeof(TCvPoint));
CV_READ_SEQ_ELEM(@pt[1], reader, sizeof(TCvPoint));
CV_READ_SEQ_ELEM(@pt[2], reader, sizeof(TCvPoint));
CV_READ_SEQ_ELEM(@pt[3], reader, sizeof(TCvPoint));
// draw the square as a closed polyline
cvPolyLine(cpy, @rect, @count, 1, 1, CV_RGB(255, 0, 0), 3, CV_AA, 0);

View File

@ -150,6 +150,9 @@
<Projects Include="LibTest\cvAdaptiveSkinDetector\cv_AdaptiveSkinDetector.dproj">
<Dependencies/>
</Projects>
<Projects Include="LibTest\cvExtractSURF\cv_ExtractSURF.dproj">
<Dependencies/>
</Projects>
<Projects Include="MultiDemo\Hello World\HelloWorld.dproj">
<Dependencies/>
</Projects>
@ -635,6 +638,15 @@
<Target Name="cv_AdaptiveSkinDetector:Make">
<MSBuild Projects="LibTest\cvAdaptiveSkinDetector\cv_AdaptiveSkinDetector.dproj" Targets="Make"/>
</Target>
<Target Name="cv_ExtractSURF">
<MSBuild Projects="LibTest\cvExtractSURF\cv_ExtractSURF.dproj"/>
</Target>
<Target Name="cv_ExtractSURF:Clean">
<MSBuild Projects="LibTest\cvExtractSURF\cv_ExtractSURF.dproj" Targets="Clean"/>
</Target>
<Target Name="cv_ExtractSURF:Make">
<MSBuild Projects="LibTest\cvExtractSURF\cv_ExtractSURF.dproj" Targets="Make"/>
</Target>
<Target Name="HelloWorld">
<MSBuild Projects="MultiDemo\Hello World\HelloWorld.dproj"/>
</Target>
@ -744,13 +756,13 @@
<MSBuild Projects="MultiDemo\FrameRecon\FrameRecon.dproj" Targets="Make"/>
</Target>
<Target Name="Build">
<CallTarget Targets="cv_AddWeighted;cvSetImageROI_cvAddWeighted;cv_And;cv_Canny;cv_CopyMakeBorder;cv_CreateCameraCapture;cv_CreateTrackbar;cv_CreateVideoWriter;cv_CvtColor;cv_CvtPixToPlane;cvErode_cvDilate;cv_FindContours;cv_FloodFill;cv_GetSubRect;cv_HoughCircles;cv_HoughLines2;cv_InRangeS;cv_Laplace;cv_LoadImage;cv_LoadImage2;cv_LoadVideo;cv_MorphologyEx;cv_RandInt;cv_Resize;cv_SetImageROI;cv_SetImageROI2;cv_SetMouseCallback;cv_Smooth;cv_Sobel;cvSplit_cvMerge;cv_Save;cv_Sub;cvThreshold_cvAdaptiveThreshold;cv_Integral;cv_WarpPerspective;cv_MatchShapes;cv_WarpAffine;cv_SnakeImage;cv_CalcOpticalFlowPyrLK;cv_CreateGaussianBGModel;cv_CreateFGDStatModel;cvCodeBook;cv_FindContours2;cv_CreateStructuringElementEx;cv_LinearPolar;cvMotion;cv_PyrSegmentation;cv_LoadHaarClassifierCascade;cv_AdaptiveSkinDetector;HelloWorld;VideoProcessing;FaceDetect;Stereo;CameraCaptureAndFindContours;HandsDetect;Squares;CameraCalibrate;CameraShift;minarea;fback_c;FrameRecon"/>
<CallTarget Targets="cv_AddWeighted;cvSetImageROI_cvAddWeighted;cv_And;cv_Canny;cv_CopyMakeBorder;cv_CreateCameraCapture;cv_CreateTrackbar;cv_CreateVideoWriter;cv_CvtColor;cv_CvtPixToPlane;cvErode_cvDilate;cv_FindContours;cv_FloodFill;cv_GetSubRect;cv_HoughCircles;cv_HoughLines2;cv_InRangeS;cv_Laplace;cv_LoadImage;cv_LoadImage2;cv_LoadVideo;cv_MorphologyEx;cv_RandInt;cv_Resize;cv_SetImageROI;cv_SetImageROI2;cv_SetMouseCallback;cv_Smooth;cv_Sobel;cvSplit_cvMerge;cv_Save;cv_Sub;cvThreshold_cvAdaptiveThreshold;cv_Integral;cv_WarpPerspective;cv_MatchShapes;cv_WarpAffine;cv_SnakeImage;cv_CalcOpticalFlowPyrLK;cv_CreateGaussianBGModel;cv_CreateFGDStatModel;cvCodeBook;cv_FindContours2;cv_CreateStructuringElementEx;cv_LinearPolar;cvMotion;cv_PyrSegmentation;cv_LoadHaarClassifierCascade;cv_AdaptiveSkinDetector;cv_ExtractSURF;HelloWorld;VideoProcessing;FaceDetect;Stereo;CameraCaptureAndFindContours;HandsDetect;Squares;CameraCalibrate;CameraShift;minarea;fback_c;FrameRecon"/>
</Target>
<Target Name="Clean">
<CallTarget Targets="cv_AddWeighted:Clean;cvSetImageROI_cvAddWeighted:Clean;cv_And:Clean;cv_Canny:Clean;cv_CopyMakeBorder:Clean;cv_CreateCameraCapture:Clean;cv_CreateTrackbar:Clean;cv_CreateVideoWriter:Clean;cv_CvtColor:Clean;cv_CvtPixToPlane:Clean;cvErode_cvDilate:Clean;cv_FindContours:Clean;cv_FloodFill:Clean;cv_GetSubRect:Clean;cv_HoughCircles:Clean;cv_HoughLines2:Clean;cv_InRangeS:Clean;cv_Laplace:Clean;cv_LoadImage:Clean;cv_LoadImage2:Clean;cv_LoadVideo:Clean;cv_MorphologyEx:Clean;cv_RandInt:Clean;cv_Resize:Clean;cv_SetImageROI:Clean;cv_SetImageROI2:Clean;cv_SetMouseCallback:Clean;cv_Smooth:Clean;cv_Sobel:Clean;cvSplit_cvMerge:Clean;cv_Save:Clean;cv_Sub:Clean;cvThreshold_cvAdaptiveThreshold:Clean;cv_Integral:Clean;cv_WarpPerspective:Clean;cv_MatchShapes:Clean;cv_WarpAffine:Clean;cv_SnakeImage:Clean;cv_CalcOpticalFlowPyrLK:Clean;cv_CreateGaussianBGModel:Clean;cv_CreateFGDStatModel:Clean;cvCodeBook:Clean;cv_FindContours2:Clean;cv_CreateStructuringElementEx:Clean;cv_LinearPolar:Clean;cvMotion:Clean;cv_PyrSegmentation:Clean;cv_LoadHaarClassifierCascade:Clean;cv_AdaptiveSkinDetector:Clean;HelloWorld:Clean;VideoProcessing:Clean;FaceDetect:Clean;Stereo:Clean;CameraCaptureAndFindContours:Clean;HandsDetect:Clean;Squares:Clean;CameraCalibrate:Clean;CameraShift:Clean;minarea:Clean;fback_c:Clean;FrameRecon:Clean"/>
<CallTarget Targets="cv_AddWeighted:Clean;cvSetImageROI_cvAddWeighted:Clean;cv_And:Clean;cv_Canny:Clean;cv_CopyMakeBorder:Clean;cv_CreateCameraCapture:Clean;cv_CreateTrackbar:Clean;cv_CreateVideoWriter:Clean;cv_CvtColor:Clean;cv_CvtPixToPlane:Clean;cvErode_cvDilate:Clean;cv_FindContours:Clean;cv_FloodFill:Clean;cv_GetSubRect:Clean;cv_HoughCircles:Clean;cv_HoughLines2:Clean;cv_InRangeS:Clean;cv_Laplace:Clean;cv_LoadImage:Clean;cv_LoadImage2:Clean;cv_LoadVideo:Clean;cv_MorphologyEx:Clean;cv_RandInt:Clean;cv_Resize:Clean;cv_SetImageROI:Clean;cv_SetImageROI2:Clean;cv_SetMouseCallback:Clean;cv_Smooth:Clean;cv_Sobel:Clean;cvSplit_cvMerge:Clean;cv_Save:Clean;cv_Sub:Clean;cvThreshold_cvAdaptiveThreshold:Clean;cv_Integral:Clean;cv_WarpPerspective:Clean;cv_MatchShapes:Clean;cv_WarpAffine:Clean;cv_SnakeImage:Clean;cv_CalcOpticalFlowPyrLK:Clean;cv_CreateGaussianBGModel:Clean;cv_CreateFGDStatModel:Clean;cvCodeBook:Clean;cv_FindContours2:Clean;cv_CreateStructuringElementEx:Clean;cv_LinearPolar:Clean;cvMotion:Clean;cv_PyrSegmentation:Clean;cv_LoadHaarClassifierCascade:Clean;cv_AdaptiveSkinDetector:Clean;cv_ExtractSURF:Clean;HelloWorld:Clean;VideoProcessing:Clean;FaceDetect:Clean;Stereo:Clean;CameraCaptureAndFindContours:Clean;HandsDetect:Clean;Squares:Clean;CameraCalibrate:Clean;CameraShift:Clean;minarea:Clean;fback_c:Clean;FrameRecon:Clean"/>
</Target>
<Target Name="Make">
<CallTarget Targets="cv_AddWeighted:Make;cvSetImageROI_cvAddWeighted:Make;cv_And:Make;cv_Canny:Make;cv_CopyMakeBorder:Make;cv_CreateCameraCapture:Make;cv_CreateTrackbar:Make;cv_CreateVideoWriter:Make;cv_CvtColor:Make;cv_CvtPixToPlane:Make;cvErode_cvDilate:Make;cv_FindContours:Make;cv_FloodFill:Make;cv_GetSubRect:Make;cv_HoughCircles:Make;cv_HoughLines2:Make;cv_InRangeS:Make;cv_Laplace:Make;cv_LoadImage:Make;cv_LoadImage2:Make;cv_LoadVideo:Make;cv_MorphologyEx:Make;cv_RandInt:Make;cv_Resize:Make;cv_SetImageROI:Make;cv_SetImageROI2:Make;cv_SetMouseCallback:Make;cv_Smooth:Make;cv_Sobel:Make;cvSplit_cvMerge:Make;cv_Save:Make;cv_Sub:Make;cvThreshold_cvAdaptiveThreshold:Make;cv_Integral:Make;cv_WarpPerspective:Make;cv_MatchShapes:Make;cv_WarpAffine:Make;cv_SnakeImage:Make;cv_CalcOpticalFlowPyrLK:Make;cv_CreateGaussianBGModel:Make;cv_CreateFGDStatModel:Make;cvCodeBook:Make;cv_FindContours2:Make;cv_CreateStructuringElementEx:Make;cv_LinearPolar:Make;cvMotion:Make;cv_PyrSegmentation:Make;cv_LoadHaarClassifierCascade:Make;cv_AdaptiveSkinDetector:Make;HelloWorld:Make;VideoProcessing:Make;FaceDetect:Make;Stereo:Make;CameraCaptureAndFindContours:Make;HandsDetect:Make;Squares:Make;CameraCalibrate:Make;CameraShift:Make;minarea:Make;fback_c:Make;FrameRecon:Make"/>
<CallTarget Targets="cv_AddWeighted:Make;cvSetImageROI_cvAddWeighted:Make;cv_And:Make;cv_Canny:Make;cv_CopyMakeBorder:Make;cv_CreateCameraCapture:Make;cv_CreateTrackbar:Make;cv_CreateVideoWriter:Make;cv_CvtColor:Make;cv_CvtPixToPlane:Make;cvErode_cvDilate:Make;cv_FindContours:Make;cv_FloodFill:Make;cv_GetSubRect:Make;cv_HoughCircles:Make;cv_HoughLines2:Make;cv_InRangeS:Make;cv_Laplace:Make;cv_LoadImage:Make;cv_LoadImage2:Make;cv_LoadVideo:Make;cv_MorphologyEx:Make;cv_RandInt:Make;cv_Resize:Make;cv_SetImageROI:Make;cv_SetImageROI2:Make;cv_SetMouseCallback:Make;cv_Smooth:Make;cv_Sobel:Make;cvSplit_cvMerge:Make;cv_Save:Make;cv_Sub:Make;cvThreshold_cvAdaptiveThreshold:Make;cv_Integral:Make;cv_WarpPerspective:Make;cv_MatchShapes:Make;cv_WarpAffine:Make;cv_SnakeImage:Make;cv_CalcOpticalFlowPyrLK:Make;cv_CreateGaussianBGModel:Make;cv_CreateFGDStatModel:Make;cvCodeBook:Make;cv_FindContours2:Make;cv_CreateStructuringElementEx:Make;cv_LinearPolar:Make;cvMotion:Make;cv_PyrSegmentation:Make;cv_LoadHaarClassifierCascade:Make;cv_AdaptiveSkinDetector:Make;cv_ExtractSURF:Make;HelloWorld:Make;VideoProcessing:Make;FaceDetect:Make;Stereo:Make;CameraCaptureAndFindContours:Make;HandsDetect:Make;Squares:Make;CameraCalibrate:Make;CameraShift:Make;minarea:Make;fback_c:Make;FrameRecon:Make"/>
</Target>
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
</Project>