Delete SAFELOADLIB, adding 'delayed'

Signed-off-by: Laentir Valetov <laex@bk.ru>
This commit is contained in:
Laentir Valetov 2022-03-16 23:15:42 +04:00
parent e60343d2d9
commit e546cdae09
13 changed files with 1224 additions and 2882 deletions

View File

@ -1,11 +1,6 @@
{$i jedi.inc}
{$DEFINE DelphiOCVVersion_29}
{.$DEFINE DelphiOCVVersion_30}
{$IF DEFINED(DelphiOCVVersion_29) and DEFINED(DelphiOCVVersion_30)}
Error!!
{$IFEND}
{$IFNDEF FPC}
{$IFDEF DEBUG}
@ -16,12 +11,7 @@
{$POINTERMATH ON}
{$ENDIF}
{.$DEFINE SAFELOADLIB}
{$IFDEF SAFELOADLIB}
{$IFDEF DEBUG}
{.$DEFINE USE_STUB_FOR_MISS_FUNC}
{$ENDIF}
{$ENDIF}
{$DEFINE DELAYEDLOADLIB}
{$IFNDEF FPC}
{$WARN SYMBOL_DEPRECATED OFF}

View File

@ -75,16 +75,8 @@ Type
CVAPI(CvPOSITObject* ) cvCreatePOSITObject( CvPoint3D32f* points, int point_count );
*)
{$IFDEF SAFELOADLIB}
Type
TcvCreatePOSITObject = function(points: pCvPoint3D32f; point_count: Integer): PCvPOSITObject; cdecl;
var
cvCreatePOSITObject: TcvCreatePOSITObject;
{$ELSE}
function cvCreatePOSITObject(points: pCvPoint3D32f; point_count: Integer): PCvPOSITObject; cdecl;
{$ENDIF}
(* Runs POSIT (POSe from ITeration) algorithm for determining 3d position of
an object given its model and projection in a weak-perspective case
@ -92,59 +84,29 @@ function cvCreatePOSITObject(points: pCvPoint3D32f; point_count: Integer): PCvPO
double focal_length, CvTermCriteria criteria,
float* rotation_matrix, float* translation_vector);
*)
{$IFDEF SAFELOADLIB}
Type
TcvPOSIT = procedure(posit_object: PCvPOSITObject; imagePoints: pCvPoint2D32f; focal_length: double; criteria: TCvTermCriteria; rotation_matrix: TCvMatr32f;
translation_vector: TCvVect32f); cdecl;
var
cvPOSIT: TcvPOSIT;
{$ELSE}
procedure cvPOSIT(posit_object: PCvPOSITObject; imagePoints: pCvPoint2D32f; focal_length: double; criteria: TCvTermCriteria; rotation_matrix: TCvMatr32f;
translation_vector: TCvVect32f); cdecl;
{$ENDIF}
(*
Releases CvPOSITObject structure
CVAPI(void) cvReleasePOSITObject( CvPOSITObject** posit_object );
*)
{$IFDEF SAFELOADLIB}
Type
TcvReleasePOSITObject = procedure(Var posit_object: PCvPOSITObject); cdecl;
var
cvReleasePOSITObject: TcvReleasePOSITObject;
{$ELSE}
procedure cvReleasePOSITObject(Var posit_object: PCvPOSITObject); cdecl;
{$ENDIF}
(* updates the number of RANSAC iterations
CVAPI(int) cvRANSACUpdateNumIters( double p, double err_prob,
int model_points, int max_iters );
*)
{$IFDEF SAFELOADLIB}
Type
TcvRANSACUpdateNumIters = function(p: double; err_prob: double; model_points: Integer; max_iters: Integer): Integer; cdecl;
var
cvRANSACUpdateNumIters: TcvRANSACUpdateNumIters;
{$ELSE}
function cvRANSACUpdateNumIters(p: double; err_prob: double; model_points: Integer; max_iters: Integer): Integer; cdecl;
{$ENDIF}
(* CVAPI(void) cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst ); *)
{$IFDEF SAFELOADLIB}
type
TcvConvertPointsHomogeneous = procedure(const src: pCvMat; dst: pCvMat); cdecl;
var
cvConvertPointsHomogeneous: TcvConvertPointsHomogeneous;
{$ELSE}
procedure cvConvertPointsHomogeneous(const src: pCvMat; dst: pCvMat); cdecl;
{$ENDIF}
const
(* Calculates fundamental matrix given a set of corresponding points *)
@ -171,18 +133,10 @@ const
double param1 CV_DEFAULT(3.), double param2 CV_DEFAULT(0.99),
CvMat* status CV_DEFAULT(NULL) );
*)
{$IFDEF SAFELOADLIB}
Type
TcvFindFundamentalMat = function(const points1: pCvMat; const points2: pCvMat; fundamental_matrix: pCvMat; method: Integer = CV_FM_RANSAC; param1: double = 3;
param2: double = 0.99; status: pCvMat = nil): Integer; cdecl;
function cvFindFundamentalMat(const points1: pCvMat; const points2: pCvMat; fundamental_matrix: pCvMat; method: Integer = CV_FM_RANSAC; param1: double = 3; param2: double = 0.99;
status: pCvMat = nil): Integer; cdecl;
Var
cvFindFundamentalMat: TcvFindFundamentalMat;
{$ELSE}
function cvFindFundamentalMat(const points1: pCvMat; const points2: pCvMat; fundamental_matrix: pCvMat; method: Integer = CV_FM_RANSAC; param1: double = 3;
param2: double = 0.99; status: pCvMat = nil): Integer; cdecl;
{$ENDIF}
(*
For each input point on one of images
computes parameters of the corresponding
@ -193,16 +147,9 @@ function cvFindFundamentalMat(const points1: pCvMat; const points2: pCvMat; fund
const CvMat* fundamental_matrix,
CvMat* correspondent_lines );
*)
{$IFDEF SAFELOADLIB}
Type
TcvComputeCorrespondEpilines = procedure(const points: pCvMat; which_image: Integer; const fundamental_matrix: pCvMat; correspondent_lines: pCvMat); cdecl;
var
cvComputeCorrespondEpilines: TcvComputeCorrespondEpilines;
{$ELSE}
procedure cvComputeCorrespondEpilines(const points: pCvMat; which_image: Integer; const fundamental_matrix: pCvMat; correspondent_lines: pCvMat); cdecl;
{$ENDIF}
(*
Triangulation functions
@ -210,30 +157,16 @@ procedure cvComputeCorrespondEpilines(const points: pCvMat; which_image: Integer
CvMat* projPoints1, CvMat* projPoints2,
CvMat* points4D);
*)
{$IFDEF SAFELOADLIB}
Type
TcvTriangulatePoints = procedure(projMatr1: pCvMat; projMatr2: pCvMat; projPoints1: pCvMat; projPoints2: pCvMat; points4D: pCvMat); cdecl;
var
cvTriangulatePoints: TcvTriangulatePoints;
{$ELSE}
procedure cvTriangulatePoints(projMatr1: pCvMat; projMatr2: pCvMat; projPoints1: pCvMat; projPoints2: pCvMat; points4D: pCvMat); cdecl;
{$ENDIF}
(*
CVAPI(void) cvCorrectMatches(CvMat* F, CvMat* points1, CvMat* points2,
CvMat* new_points1, CvMat* new_points2);
*)
{$IFDEF SAFELOADLIB}
type
TcvCorrectMatches = procedure(F: pCvMat; points1: pCvMat; points2: pCvMat; new_points1: pCvMat; new_points2: pCvMat); cdecl;
var
cvCorrectMatches: TcvCorrectMatches;
{$ELSE}
procedure cvCorrectMatches(F: pCvMat; points1: pCvMat; points2: pCvMat; new_points1: pCvMat; new_points2: pCvMat); cdecl;
{$ENDIF}
(*
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
@ -247,35 +180,19 @@ procedure cvCorrectMatches(F: pCvMat; points1: pCvMat; points2: pCvMat; new_poin
CvRect* valid_pixel_ROI CV_DEFAULT(0),
int center_principal_point CV_DEFAULT(0));
*)
{$IFDEF SAFELOADLIB}
Type
TcvGetOptimalNewCameraMatrix = procedure(const camera_matrix: pCvMat; const dist_coeffs: pCvMat; image_size: TCvSize; alpha: double;
new_camera_matrix: pCvMat; new_imag_size: TCvSize { = CV_DEFAULT(cvSize(0,0))) }; valid_pixel_ROI: PCvRect = nil;
center_principal_point: Integer = 0); cdecl;
var
cvGetOptimalNewCameraMatrix: TcvGetOptimalNewCameraMatrix;
{$ELSE}
procedure cvGetOptimalNewCameraMatrix(const camera_matrix: pCvMat; const dist_coeffs: pCvMat; image_size: TCvSize; alpha: double; new_camera_matrix: pCvMat;
new_imag_size: TCvSize { = CV_DEFAULT(cvSize(0,0))) }; valid_pixel_ROI: PCvRect = nil; center_principal_point: Integer = 0); cdecl;
{$ENDIF}
(*
Converts rotation vector to rotation matrix or vice versa
CVAPI(int) cvRodrigues2( const CvMat* src, CvMat* dst,
CvMat* jacobian CV_DEFAULT(0) );
*)
{$IFDEF SAFELOADLIB}
type
TcvRodrigues2 = function(const src: pCvMat; dst: pCvMat; jacobian: pCvMat = nil): Integer; cdecl;
var
cvRodrigues2: TcvRodrigues2;
{$ELSE}
function cvRodrigues2(const src: pCvMat; dst: pCvMat; jacobian: pCvMat = nil): Integer; cdecl;
{$ENDIF}
(*
Finds perspective transformation between the object plane and image (view) plane
@ -286,18 +203,10 @@ function cvRodrigues2(const src: pCvMat; dst: pCvMat; jacobian: pCvMat = nil): I
double ransacReprojThreshold CV_DEFAULT(3),
CvMat* mask CV_DEFAULT(0));
*)
{$IFDEF SAFELOADLIB}
type
TcvFindHomography = function(const src_points: pCvMat; const dst_points: pCvMat; homography: pCvMat; method: Integer = 0; ransacReprojThreshold: double = 3;
mask: pCvMat = nil): Integer; cdecl;
function cvFindHomography(const src_points: pCvMat; const dst_points: pCvMat; homography: pCvMat; method: Integer = 0; ransacReprojThreshold: double = 3; mask: pCvMat = nil)
: Integer; cdecl;
Var
cvFindHomography: TcvFindHomography;
{$ELSE}
function cvFindHomography(const src_points: pCvMat; const dst_points: pCvMat; homography: pCvMat; method: Integer = 0; ransacReprojThreshold: double = 3;
mask: pCvMat = nil): Integer; cdecl;
{$ENDIF}
(*
Computes RQ decomposition for 3x3 matrices
@ -307,18 +216,10 @@ function cvFindHomography(const src_points: pCvMat; const dst_points: pCvMat; ho
CvMat *matrixQz CV_DEFAULT(NULL),
CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));
*)
{$IFDEF SAFELOADLIB}
type
TcvRQDecomp3x3 = procedure(const matrixM: pCvMat; matrixR: pCvMat; matrixQ: pCvMat; matrixQx: pCvMat = nil; matrixQy: pCvMat = nil; matrixQz: pCvMat = nil;
eulerAngles: PCvPoint3D64f = nil); cdecl;
Var
cvRQDecomp3x3: TcvRQDecomp3x3;
{$ELSE}
procedure cvRQDecomp3x3(const matrixM: pCvMat; matrixR: pCvMat; matrixQ: pCvMat; matrixQx: pCvMat = nil; matrixQy: pCvMat = nil; matrixQz: pCvMat = nil;
eulerAngles: PCvPoint3D64f = nil); cdecl;
{$ENDIF}
(*
Computes projection matrix decomposition
@ -329,33 +230,18 @@ procedure cvRQDecomp3x3(const matrixM: pCvMat; matrixR: pCvMat; matrixQ: pCvMat;
CvMat *rotMatrZ CV_DEFAULT(NULL),
CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));
*)
{$IFDEF SAFELOADLIB}
Type
TcvDecomposeProjectionMatrix = procedure(const projMatr: pCvMat; calibMatr: pCvMat; rotMatr: pCvMat; posVect: pCvMat; rotMatrX: pCvMat = nil;
rotMatrY: pCvMat = nil; rotMatrZ: pCvMat = nil; eulerAngles: PCvPoint3D64f = nil); cdecl;
procedure cvDecomposeProjectionMatrix(const projMatr: pCvMat; calibMatr: pCvMat; rotMatr: pCvMat; posVect: pCvMat; rotMatrX: pCvMat = nil; rotMatrY: pCvMat = nil;
rotMatrZ: pCvMat = nil; eulerAngles: PCvPoint3D64f = nil); cdecl;
var
cvDecomposeProjectionMatrix: TcvDecomposeProjectionMatrix;
{$ELSE}
procedure cvDecomposeProjectionMatrix(const projMatr: pCvMat; calibMatr: pCvMat; rotMatr: pCvMat; posVect: pCvMat; rotMatrX: pCvMat = nil;
rotMatrY: pCvMat = nil; rotMatrZ: pCvMat = nil; eulerAngles: PCvPoint3D64f = nil); cdecl;
{$ENDIF}
(*
Computes d(AB)/dA and d(AB)/dB
CVAPI(void) cvCalcMatMulDeriv( const CvMat* A, const CvMat* B, CvMat* dABdA, CvMat* dABdB );
*)
{$IFDEF SAFELOADLIB}
type
TcvCalcMatMulDeriv = procedure(const A: pCvMat; const B: pCvMat; dABdA: pCvMat; dABdB: pCvMat); cdecl;
var
cvCalcMatMulDeriv: TcvCalcMatMulDeriv;
{$ELSE}
procedure cvCalcMatMulDeriv(const A: pCvMat; const B: pCvMat; dABdA: pCvMat; dABdB: pCvMat); cdecl;
{$ENDIF}
(*
Computes r3 = rodrigues(rodrigues(r2)*rodrigues(r1)),
t3 = rodrigues(r2)*t1 + t2 and the respective derivatives
@ -368,20 +254,10 @@ procedure cvCalcMatMulDeriv(const A: pCvMat; const B: pCvMat; dABdA: pCvMat; dAB
CvMat* dt3dr1 CV_DEFAULT(0), CvMat* dt3dt1 CV_DEFAULT(0),
CvMat* dt3dr2 CV_DEFAULT(0), CvMat* dt3dt2 CV_DEFAULT(0) );
*)
{$IFDEF SAFELOADLIB}
type
TcvComposeRT = procedure(const _rvec1: pCvMat; const _tvec1: pCvMat; const _rvec2: pCvMat; const _tvec2: pCvMat; _rvec3: pCvMat; _tvec3: pCvMat;
dr3dr1: pCvMat = nil; dr3dt1: pCvMat = nil; dr3dr2: pCvMat = nil; dr3dt2: pCvMat = nil; dt3dr1: pCvMat = nil; dt3dt1: pCvMat = nil; dt3dr2: pCvMat = nil;
dt3dt2: pCvMat = nil); cdecl;
procedure cvComposeRT(const _rvec1: pCvMat; const _tvec1: pCvMat; const _rvec2: pCvMat; const _tvec2: pCvMat; _rvec3: pCvMat; _tvec3: pCvMat; dr3dr1: pCvMat = nil;
dr3dt1: pCvMat = nil; dr3dr2: pCvMat = nil; dr3dt2: pCvMat = nil; dt3dr1: pCvMat = nil; dt3dt1: pCvMat = nil; dt3dr2: pCvMat = nil; dt3dt2: pCvMat = nil); cdecl;
var
cvComposeRT: TcvComposeRT;
{$ELSE}
procedure cvComposeRT(const _rvec1: pCvMat; const _tvec1: pCvMat; const _rvec2: pCvMat; const _tvec2: pCvMat; _rvec3: pCvMat; _tvec3: pCvMat;
dr3dr1: pCvMat = nil; dr3dt1: pCvMat = nil; dr3dr2: pCvMat = nil; dr3dt2: pCvMat = nil; dt3dr1: pCvMat = nil; dt3dt1: pCvMat = nil; dt3dr2: pCvMat = nil;
dt3dt2: pCvMat = nil); cdecl;
{$ENDIF}
(*
Projects object points to the view plane using
the specified extrinsic and intrinsic camera parameters
@ -394,20 +270,11 @@ procedure cvComposeRT(const _rvec1: pCvMat; const _tvec1: pCvMat; const _rvec2:
CvMat* dpddist CV_DEFAULT(NULL),
double aspect_ratio CV_DEFAULT(0));
*)
{$IFDEF SAFELOADLIB}
type
TcvProjectPoints2 = procedure(const object_points: pCvMat; const rotation_vector: pCvMat; const translation_vector: pCvMat; const camera_matrix: pCvMat;
const distortion_coeffs: pCvMat; image_points: pCvMat; dpdrot: pCvMat = nil; dpdt: pCvMat = nil; dpdf: pCvMat = nil; dpdc: pCvMat = nil;
dpddist: pCvMat = nil; aspect_ratio: double = 0); cdecl;
var
cvProjectPoints2: TcvProjectPoints2;
{$ELSE}
procedure cvProjectPoints2(const object_points: pCvMat; const rotation_vector: pCvMat; const translation_vector: pCvMat; const camera_matrix: pCvMat;
const distortion_coeffs: pCvMat; image_points: pCvMat; dpdrot: pCvMat = nil; dpdt: pCvMat = nil; dpdf: pCvMat = nil; dpdc: pCvMat = nil;
dpddist: pCvMat = nil; aspect_ratio: double = 0); cdecl;
{$ENDIF}
const distortion_coeffs: pCvMat; image_points: pCvMat; dpdrot: pCvMat = nil; dpdt: pCvMat = nil; dpdf: pCvMat = nil; dpdc: pCvMat = nil; dpddist: pCvMat = nil;
aspect_ratio: double = 0); cdecl;
(* Finds extrinsic camera parameters from
a few known corresponding point pairs and intrinsic parameters
@ -419,18 +286,10 @@ procedure cvProjectPoints2(const object_points: pCvMat; const rotation_vector: p
CvMat* translation_vector,
int use_extrinsic_guess CV_DEFAULT(0) );
*)
{$IFDEF SAFELOADLIB}
type
TcvFindExtrinsicCameraParams2 = procedure(const object_points: pCvMat; const image_points: pCvMat; const camera_matrix: pCvMat;
const distortion_coeffs: pCvMat; rotation_vector: pCvMat; translation_vector: pCvMat; use_extrinsic_guess: Integer = 0); cdecl;
var
cvFindExtrinsicCameraParams2: TcvFindExtrinsicCameraParams2;
{$ELSE}
procedure cvFindExtrinsicCameraParams2(const object_points: pCvMat; const image_points: pCvMat; const camera_matrix: pCvMat; const distortion_coeffs: pCvMat;
rotation_vector: pCvMat; translation_vector: pCvMat; use_extrinsic_guess: Integer = 0); cdecl;
{$ENDIF}
(* Computes initial estimate of the intrinsic camera parameters
in case of planar calibration target (e.g. chessboard)
@ -441,18 +300,9 @@ procedure cvFindExtrinsicCameraParams2(const object_points: pCvMat; const image_
double aspect_ratio CV_DEFAULT(1.));
*)
{$IFDEF SAFELOADLIB}
Type
TcvInitIntrinsicParams2D = procedure(const object_points: pCvMat; const image_points: pCvMat; const npoints: pCvMat; image_size: TCvSize;
camera_matrix: pCvMat; aspect_ratio: double = 1); cdecl;
var
cvInitIntrinsicParams2D: TcvInitIntrinsicParams2D;
{$ELSE}
procedure cvInitIntrinsicParams2D(const object_points: pCvMat; const image_points: pCvMat; const npoints: pCvMat; image_size: TCvSize; camera_matrix: pCvMat;
aspect_ratio: double = 1); cdecl;
{$ENDIF}
const
CV_CALIB_CB_ADAPTIVE_THRESH = 1;
@ -469,16 +319,9 @@ const
CVAPI(int) cvCheckChessboard(IplImage* src, CvSize size);
*)
{$IFDEF SAFELOADLIB}
Type
TcvCheckChessboard = function(const image: pCvArr; size: TCvSize): Integer; cdecl;
var
cvCheckChessboard: TcvCheckChessboard;
{$ELSE}
function cvCheckChessboard(const image: pCvArr; size: TCvSize): Integer; cdecl;
{$ENDIF}
(*
Detects corners on a chessboard calibration pattern
@ -489,18 +332,9 @@ function cvCheckChessboard(const image: pCvArr; size: TCvSize): Integer; cdecl;
int* corner_count CV_DEFAULT(NULL),
int flags CV_DEFAULT(CV_CALIB_CB_ADAPTIVE_THRESH+CV_CALIB_CB_NORMALIZE_IMAGE) );
*)
{$IFDEF SAFELOADLIB}
type
TcvFindChessboardCorners = function(const image: Pointer; pattern_size: TCvSize; corners: pCvPoint2D32f; corner_count: pInteger = nil;
flags: Integer = CV_CALIB_CB_ADAPTIVE_THRESH + CV_CALIB_CB_NORMALIZE_IMAGE): Integer; cdecl;
var
cvFindChessboardCorners: TcvFindChessboardCorners;
{$ELSE}
function cvFindChessboardCorners(const image: Pointer; pattern_size: TCvSize; corners: pCvPoint2D32f; corner_count: pInteger = nil;
flags: Integer = CV_CALIB_CB_ADAPTIVE_THRESH + CV_CALIB_CB_NORMALIZE_IMAGE): Integer; cdecl;
{$ENDIF}
const
CV_CALIB_USE_INTRINSIC_GUESS = 1;
@ -528,16 +362,9 @@ const
int count,
int pattern_was_found );
*)
{$IFDEF SAFELOADLIB}
type
TcvDrawChessboardCorners = procedure(image: pIplImage; pattern_size: TCvSize; corners: pCvPoint2D32f; count: Integer; pattern_was_found: Integer); cdecl;
var
cvDrawChessboardCorners: TcvDrawChessboardCorners;
{$ELSE}
procedure cvDrawChessboardCorners(image: pIplImage; pattern_size: TCvSize; corners: pCvPoint2D32f; count: Integer; pattern_was_found: Integer); cdecl;
{$ENDIF}
{
/* Finds intrinsic and extrinsic camera parameters
from a few views of known calibration pattern *)
@ -553,25 +380,7 @@ procedure cvDrawChessboardCorners(image: pIplImage; pattern_size: TCvSize; corne
int flags CV_DEFAULT(0),
CvTermCriteria term_crit CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,DBL_EPSILON)) );
}
{$IFDEF SAFELOADLIB}
type
TcvCalibrateCamera2 = function(
{ } const object_points: pCvMat;
{ } const image_points: pCvMat;
{ } const point_counts: pCvMat;
{ } image_size: TCvSize;
{ } camera_matrix: pCvMat;
{ } distortion_coeffs: pCvMat;
{ } rotation_vectors: pCvMat { =nil };
{ } translation_vectors: pCvMat { =nil };
{ } flags: Integer { =0 };
{ } term_crit: TCvTermCriteria { =cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,DBL_EPSILON) }
): double; cdecl;
var
cvCalibrateCamera2: TcvCalibrateCamera2;
{$ELSE}
function cvCalibrateCamera2(
{ } const object_points: pCvMat;
{ } const image_points: pCvMat;
@ -584,7 +393,7 @@ function cvCalibrateCamera2(
{ } flags: Integer { =0 };
{ } term_crit: TCvTermCriteria { =cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,DBL_EPSILON) }
): double; cdecl;
{$ENDIF}
(* Computes various useful characteristics of the camera from the data computed by
cvCalibrateCamera2
@ -598,18 +407,9 @@ function cvCalibrateCamera2(
CvPoint2D64f *principal_point CV_DEFAULT(NULL),
double *pixel_aspect_ratio CV_DEFAULT(NULL));
*)
{$IFDEF SAFELOADLIB}
type
TcvCalibrationMatrixValues = procedure(const camera_matrix: pCvMat; image_size: TCvSize; aperture_width: double = 0; aperture_height: double = 0;
fovx: PDouble = nil; fovy: PDouble = nil; focal_length: PDouble = nil; principal_point: PCvPoint2D64f = nil; pixel_aspect_ratio: PDouble = nil); cdecl;
Var
cvCalibrationMatrixValues: TcvCalibrationMatrixValues;
{$ELSE}
procedure cvCalibrationMatrixValues(const camera_matrix: pCvMat; image_size: TCvSize; aperture_width: double = 0; aperture_height: double = 0;
fovx: PDouble = nil; fovy: PDouble = nil; focal_length: PDouble = nil; principal_point: PCvPoint2D64f = nil; pixel_aspect_ratio: PDouble = nil); cdecl;
{$ENDIF}
procedure cvCalibrationMatrixValues(const camera_matrix: pCvMat; image_size: TCvSize; aperture_width: double = 0; aperture_height: double = 0; fovx: PDouble = nil;
fovy: PDouble = nil; focal_length: PDouble = nil; principal_point: PCvPoint2D64f = nil; pixel_aspect_ratio: PDouble = nil); cdecl;
const
CV_CALIB_FIX_INTRINSIC = 256;
@ -629,22 +429,11 @@ const
CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,1e-6)),
int flags CV_DEFAULT(CV_CALIB_FIX_INTRINSIC));
*)
{$IFDEF SAFELOADLIB}
type
TcvStereoCalibrate = function(const object_points: pCvMat; const image_points1: pCvMat; const image_points2: pCvMat; const npoints: pCvMat;
camera_matrix1: pCvMat; dist_coeffs1: pCvMat; camera_matrix2: pCvMat; dist_coeffs2: pCvMat; image_size: TCvSize; R: pCvMat; T: pCvMat; E: pCvMat { = nil };
F: pCvMat { = nil }; term_crit: TCvTermCriteria { = CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 30, 1E-6)) };
flags: Integer { = CV_DEFAULT(CV_CALIB_FIX_INTRINSIC) } ): double; cdecl;
var
cvStereoCalibrate: TcvStereoCalibrate;
{$ELSE}
function cvStereoCalibrate(const object_points: pCvMat; const image_points1: pCvMat; const image_points2: pCvMat; const npoints: pCvMat; camera_matrix1: pCvMat;
dist_coeffs1: pCvMat; camera_matrix2: pCvMat; dist_coeffs2: pCvMat; image_size: TCvSize; R: pCvMat; T: pCvMat; E: pCvMat { = nil }; F: pCvMat { = nil };
term_crit: TCvTermCriteria { = CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 30, 1E-6)) };
flags: Integer { = CV_DEFAULT(CV_CALIB_FIX_INTRINSIC) } ): double; cdecl;
{$ENDIF}
term_crit: TCvTermCriteria { = CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 30, 1E-6)) }; flags: Integer { = CV_DEFAULT(CV_CALIB_FIX_INTRINSIC) } )
: double; cdecl;
const
CV_CALIB_ZERO_DISPARITY = 1024;
@ -664,22 +453,11 @@ const
CvRect* valid_pix_ROI1 CV_DEFAULT(0),
CvRect* valid_pix_ROI2 CV_DEFAULT(0));
*)
{$IFDEF SAFELOADLIB}
type
TcvStereoRectify = procedure(const camera_matrix1: pCvMat; const camera_matrix2: pCvMat; const dist_coeffs1: pCvMat; const dist_coeffs2: pCvMat;
image_size: TCvSize; const R: pCvMat; const T: pCvMat; R1: pCvMat; R2: pCvMat; P1: pCvMat; P2: pCvMat; Q: pCvMat { = nil };
flags: Integer { = CV_CALIB_ZERO_DISPARITY }; alpha: double { = -1 }; new_image_size: TCvSize { =CV_DEFAULT(cvSize(0,0)) };
valid_pix_ROI1: PCvRect { =nil }; valid_pix_ROI2: PCvRect { =nil } ); cdecl;
procedure cvStereoRectify(const camera_matrix1: pCvMat; const camera_matrix2: pCvMat; const dist_coeffs1: pCvMat; const dist_coeffs2: pCvMat; image_size: TCvSize; const R: pCvMat;
const T: pCvMat; R1: pCvMat; R2: pCvMat; P1: pCvMat; P2: pCvMat; Q: pCvMat { = nil }; flags: Integer { = CV_CALIB_ZERO_DISPARITY }; alpha: double { = -1 };
new_image_size: TCvSize { =CV_DEFAULT(cvSize(0,0)) }; valid_pix_ROI1: PCvRect { =nil }; valid_pix_ROI2: PCvRect { =nil } ); cdecl;
var
cvStereoRectify: TcvStereoRectify;
{$ELSE}
procedure cvStereoRectify(const camera_matrix1: pCvMat; const camera_matrix2: pCvMat; const dist_coeffs1: pCvMat; const dist_coeffs2: pCvMat;
image_size: TCvSize; const R: pCvMat; const T: pCvMat; R1: pCvMat; R2: pCvMat; P1: pCvMat; P2: pCvMat; Q: pCvMat { = nil };
flags: Integer { = CV_CALIB_ZERO_DISPARITY }; alpha: double { = -1 }; new_image_size: TCvSize { =CV_DEFAULT(cvSize(0,0)) }; valid_pix_ROI1: PCvRect { =nil };
valid_pix_ROI2: PCvRect { =nil } ); cdecl;
{$ENDIF}
(*
Computes rectification transformations for uncalibrated pair of images using a set
of point correspondences
@ -689,18 +467,9 @@ procedure cvStereoRectify(const camera_matrix1: pCvMat; const camera_matrix2: pC
CvMat* H1, CvMat* H2,
double threshold CV_DEFAULT(5));
*)
{$IFDEF SAFELOADLIB}
Type
TcvStereoRectifyUncalibrated = function(const points1: pCvMat; const points2: pCvMat; const F: pCvMat; img_size: TCvSize; H1: pCvMat; H2: pCvMat;
threshold: double = 5): Integer; cdecl;
var
cvStereoRectifyUncalibrated: TcvStereoRectifyUncalibrated;
{$ELSE}
function cvStereoRectifyUncalibrated(const points1: pCvMat; const points2: pCvMat; const F: pCvMat; img_size: TCvSize; H1: pCvMat; H2: pCvMat;
threshold: double = 5): Integer; cdecl;
{$ENDIF}
function cvStereoRectifyUncalibrated(const points1: pCvMat; const points2: pCvMat; const F: pCvMat; img_size: TCvSize; H1: pCvMat; H2: pCvMat; threshold: double = 5)
: Integer; cdecl;
(* stereo correspondence parameters and functions *)
const
@ -788,73 +557,37 @@ const
CVAPI(CvStereoBMState* ) cvCreateStereoBMState(int preset CV_DEFAULT(CV_STEREO_BM_BASIC),
int numberOfDisparities CV_DEFAULT(0));
*)
{$IFDEF SAFELOADLIB}
type
TcvCreateStereoBMState = function(preset: Integer = CV_STEREO_BM_BASIC; numberOfDisparities: Integer = 0): pCvStereoBMState; cdecl;
var
cvCreateStereoBMState: TcvCreateStereoBMState;
{$ELSE}
function cvCreateStereoBMState(preset: Integer = CV_STEREO_BM_BASIC; numberOfDisparities: Integer = 0): pCvStereoBMState; cdecl;
{$ENDIF}
(*
CVAPI(void) cvReleaseStereoBMState( CvStereoBMState** state );
*)
{$IFDEF SAFELOADLIB}
type
TcvReleaseStereoBMState = procedure(Var state: pCvStereoBMState); cdecl;
var
cvReleaseStereoBMState: TcvReleaseStereoBMState;
{$ELSE}
procedure cvReleaseStereoBMState(Var state: pCvStereoBMState); cdecl;
{$ENDIF}
(*
CVAPI(void) cvFindStereoCorrespondenceBM( const CvArr* left, const CvArr* right,
CvArr* disparity, CvStereoBMState* state );
*)
{$IFDEF SAFELOADLIB}
type
TcvFindStereoCorrespondenceBM = procedure(const left: pCvArr; const right: pCvArr; disparity: pCvArr; state: pCvStereoBMState); cdecl;
var
cvFindStereoCorrespondenceBM: TcvFindStereoCorrespondenceBM;
{$ELSE}
procedure cvFindStereoCorrespondenceBM(const left: pCvArr; const right: pCvArr; disparity: pCvArr; state: pCvStereoBMState); cdecl;
{$ENDIF}
(*
CVAPI(CvRect) cvGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity,
int numberOfDisparities, int SADWindowSize );
*)
{$IFDEF SAFELOADLIB}
type
TcvGetValidDisparityROI = function(roi1: TCvRect; roi2: TCvRect; minDisparity: Integer; numberOfDisparities: Integer; SADWindowSize: Integer): TCvRect; cdecl;
var
cvGetValidDisparityROI: TcvGetValidDisparityROI;
{$ELSE}
function cvGetValidDisparityROI(roi1: TCvRect; roi2: TCvRect; minDisparity: Integer; numberOfDisparities: Integer; SADWindowSize: Integer): TCvRect; cdecl;
{$ENDIF}
(*
CVAPI(void) cvValidateDisparity( CvArr* disparity, const CvArr* cost,
int minDisparity, int numberOfDisparities,
int disp12MaxDiff CV_DEFAULT(1) );
*)
{$IFDEF SAFELOADLIB}
type
TcvValidateDisparity = procedure(disparity: pCvArr; const cost: pCvArr; minDisparity: Integer; numberOfDisparities: Integer;
disp12MaxDiff: Integer = 1); cdecl;
var
cvValidateDisparity: TcvValidateDisparity;
{$ELSE}
procedure cvValidateDisparity(disparity: pCvArr; const cost: pCvArr; minDisparity: Integer; numberOfDisparities: Integer; disp12MaxDiff: Integer = 1); cdecl;
{$ENDIF}
(*
Reprojects the computed disparity image to the 3D space using the specified 4x4 matrix
@ -864,148 +597,74 @@ procedure cvValidateDisparity(disparity: pCvArr; const cost: pCvArr; minDisparit
const CvMat* Q,
int handleMissingValues CV_DEFAULT(0) );
*)
{$IFDEF SAFELOADLIB}
Type
TcvReprojectImageTo3D = procedure(
{ } const disparityImage: pCvMat;
{ } _3dImage: pIplImage;
{ } const Q: pCvMat;
{ } handleMissingValues: Integer = 0); cdecl;
var
cvReprojectImageTo3D: TcvReprojectImageTo3D;
{$ELSE}
procedure cvReprojectImageTo3D(
{ } const disparityImage: pCvMat;
{ } _3dImage: pIplImage;
{ } const Q: pCvMat;
{ } handleMissingValues: Integer = 0); cdecl;
{$ENDIF}
// ------------------------------------
{$IF DEFINED(SAFELOADLIB) AND DEFINED(DEBUG)}
procedure Init_opencv_calib3d_lib;
{$ENDIF}
// ------------------------------------
implementation
uses ocv.lib;
{$IFDEF SAFELOADLIB}
Var
calib3dDLL: Cardinal;
procedure Init_opencv_calib3d_lib;
begin
calib3dDLL := ocvLoadLibrary(calib3d_lib);
Assert(calib3dDLL <> 0, 'Can not init ' + calib3d_lib);
cvCreatePOSITObject := ocvGetProcAddress('cvCreatePOSITObject', calib3dDLL);
cvPOSIT := ocvGetProcAddress('cvPOSIT', calib3dDLL);
cvReleasePOSITObject := ocvGetProcAddress('cvReleasePOSITObject', calib3dDLL);
cvRANSACUpdateNumIters := ocvGetProcAddress('cvRANSACUpdateNumIters', calib3dDLL);
cvConvertPointsHomogeneous := ocvGetProcAddress('cvConvertPointsHomogeneous', calib3dDLL);
cvFindFundamentalMat := ocvGetProcAddress('cvFindFundamentalMat', calib3dDLL);
cvComputeCorrespondEpilines := ocvGetProcAddress('cvComputeCorrespondEpilines', calib3dDLL);
cvTriangulatePoints := ocvGetProcAddress('cvTriangulatePoints', calib3dDLL);
cvCorrectMatches := ocvGetProcAddress('cvCorrectMatches', calib3dDLL);
cvGetOptimalNewCameraMatrix := ocvGetProcAddress('cvGetOptimalNewCameraMatrix', calib3dDLL);
cvRodrigues2 := ocvGetProcAddress('cvRodrigues2', calib3dDLL);
cvFindHomography := ocvGetProcAddress('cvFindHomography', calib3dDLL);
cvRQDecomp3x3 := ocvGetProcAddress('cvRQDecomp3x3', calib3dDLL);
cvDecomposeProjectionMatrix := ocvGetProcAddress('cvDecomposeProjectionMatrix', calib3dDLL);
cvCalcMatMulDeriv := ocvGetProcAddress('cvCalcMatMulDeriv', calib3dDLL);
cvComposeRT := ocvGetProcAddress('cvComposeRT', calib3dDLL);
cvProjectPoints2 := ocvGetProcAddress('cvProjectPoints2', calib3dDLL);
cvFindExtrinsicCameraParams2 := ocvGetProcAddress('cvFindExtrinsicCameraParams2', calib3dDLL);
cvInitIntrinsicParams2D := ocvGetProcAddress('cvInitIntrinsicParams2D', calib3dDLL);
cvCheckChessboard := ocvGetProcAddress('cvCheckChessboard', calib3dDLL);
cvFindChessboardCorners := ocvGetProcAddress('cvFindChessboardCorners', calib3dDLL);
cvDrawChessboardCorners := ocvGetProcAddress('cvDrawChessboardCorners', calib3dDLL);
cvCalibrateCamera2 := ocvGetProcAddress('cvCalibrateCamera2', calib3dDLL);
cvCalibrationMatrixValues := ocvGetProcAddress('cvCalibrationMatrixValues', calib3dDLL);
cvStereoCalibrate := ocvGetProcAddress('cvStereoCalibrate', calib3dDLL);
cvStereoRectify := ocvGetProcAddress('cvStereoRectify', calib3dDLL);
cvStereoRectifyUncalibrated := ocvGetProcAddress('cvStereoRectifyUncalibrated', calib3dDLL);
cvCreateStereoBMState := ocvGetProcAddress('cvCreateStereoBMState', calib3dDLL);
cvReleaseStereoBMState := ocvGetProcAddress('cvReleaseStereoBMState', calib3dDLL);
cvFindStereoCorrespondenceBM := ocvGetProcAddress('cvFindStereoCorrespondenceBM', calib3dDLL);
cvGetValidDisparityROI := ocvGetProcAddress('cvGetValidDisparityROI', calib3dDLL);
cvValidateDisparity := ocvGetProcAddress('cvValidateDisparity', calib3dDLL);
cvReprojectImageTo3D := ocvGetProcAddress('cvReprojectImageTo3D', calib3dDLL);
end;
initialization
Init_opencv_calib3d_lib;
{$ELSE}
function cvCreatePOSITObject(points: pCvPoint3D32f; point_count: Integer): PCvPOSITObject; cdecl; external calib3d_lib;
function cvCreatePOSITObject(points: pCvPoint3D32f; point_count: Integer): PCvPOSITObject; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvPOSIT(posit_object: PCvPOSITObject; imagePoints: pCvPoint2D32f; focal_length: double; criteria: TCvTermCriteria; rotation_matrix: TCvMatr32f;
translation_vector: TCvVect32f); cdecl; external calib3d_lib;
procedure cvReleasePOSITObject(Var posit_object: PCvPOSITObject); cdecl; external calib3d_lib;
function cvRANSACUpdateNumIters(p: double; err_prob: double; model_points: Integer; max_iters: Integer): Integer; cdecl; external calib3d_lib;
procedure cvConvertPointsHomogeneous(const src: pCvMat; dst: pCvMat); cdecl; external calib3d_lib;
function cvFindFundamentalMat(const points1: pCvMat; const points2: pCvMat; fundamental_matrix: pCvMat; method: Integer = CV_FM_RANSAC; param1: double = 3;
param2: double = 0.99; status: pCvMat = nil): Integer; cdecl; external calib3d_lib;
procedure cvComputeCorrespondEpilines(const points: pCvMat; which_image: Integer; const fundamental_matrix: pCvMat; correspondent_lines: pCvMat); cdecl;
external calib3d_lib;
procedure cvTriangulatePoints(projMatr1: pCvMat; projMatr2: pCvMat; projPoints1: pCvMat; projPoints2: pCvMat; points4D: pCvMat); cdecl; external calib3d_lib;
procedure cvCorrectMatches(F: pCvMat; points1: pCvMat; points2: pCvMat; new_points1: pCvMat; new_points2: pCvMat); cdecl; external calib3d_lib;
translation_vector: TCvVect32f); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleasePOSITObject(Var posit_object: PCvPOSITObject); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvRANSACUpdateNumIters(p: double; err_prob: double; model_points: Integer; max_iters: Integer): Integer; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvConvertPointsHomogeneous(const src: pCvMat; dst: pCvMat); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindFundamentalMat(const points1: pCvMat; const points2: pCvMat; fundamental_matrix: pCvMat; method: Integer = CV_FM_RANSAC; param1: double = 3; param2: double = 0.99;
status: pCvMat = nil): Integer; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvComputeCorrespondEpilines(const points: pCvMat; which_image: Integer; const fundamental_matrix: pCvMat; correspondent_lines: pCvMat); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvTriangulatePoints(projMatr1: pCvMat; projMatr2: pCvMat; projPoints1: pCvMat; projPoints2: pCvMat; points4D: pCvMat); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCorrectMatches(F: pCvMat; points1: pCvMat; points2: pCvMat; new_points1: pCvMat; new_points2: pCvMat); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvGetOptimalNewCameraMatrix(const camera_matrix: pCvMat; const dist_coeffs: pCvMat; image_size: TCvSize; alpha: double; new_camera_matrix: pCvMat;
new_imag_size: TCvSize { = CV_DEFAULT(cvSize(0,0))) }; valid_pixel_ROI: PCvRect = nil; center_principal_point: Integer = 0); cdecl; external calib3d_lib;
function cvRodrigues2(const src: pCvMat; dst: pCvMat; jacobian: pCvMat = nil): Integer; cdecl; external calib3d_lib;
function cvFindHomography(const src_points: pCvMat; const dst_points: pCvMat; homography: pCvMat; method: Integer = 0; ransacReprojThreshold: double = 3;
mask: pCvMat = nil): Integer; cdecl; external calib3d_lib;
new_imag_size: TCvSize { = CV_DEFAULT(cvSize(0,0))) }; valid_pixel_ROI: PCvRect = nil; center_principal_point: Integer = 0); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvRodrigues2(const src: pCvMat; dst: pCvMat; jacobian: pCvMat = nil): Integer; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindHomography(const src_points: pCvMat; const dst_points: pCvMat; homography: pCvMat; method: Integer = 0; ransacReprojThreshold: double = 3; mask: pCvMat = nil)
: Integer; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvRQDecomp3x3(const matrixM: pCvMat; matrixR: pCvMat; matrixQ: pCvMat; matrixQx: pCvMat = nil; matrixQy: pCvMat = nil; matrixQz: pCvMat = nil;
eulerAngles: PCvPoint3D64f = nil); cdecl; external calib3d_lib;
procedure cvDecomposeProjectionMatrix(const projMatr: pCvMat; calibMatr: pCvMat; rotMatr: pCvMat; posVect: pCvMat; rotMatrX: pCvMat = nil;
rotMatrY: pCvMat = nil; rotMatrZ: pCvMat = nil; eulerAngles: PCvPoint3D64f = nil); cdecl; external calib3d_lib;
procedure cvCalcMatMulDeriv(const A: pCvMat; const B: pCvMat; dABdA: pCvMat; dABdB: pCvMat); cdecl; external calib3d_lib;
procedure cvComposeRT(const _rvec1: pCvMat; const _tvec1: pCvMat; const _rvec2: pCvMat; const _tvec2: pCvMat; _rvec3: pCvMat; _tvec3: pCvMat;
dr3dr1: pCvMat = nil; dr3dt1: pCvMat = nil; dr3dr2: pCvMat = nil; dr3dt2: pCvMat = nil; dt3dr1: pCvMat = nil; dt3dt1: pCvMat = nil; dt3dr2: pCvMat = nil;
dt3dt2: pCvMat = nil); cdecl; external calib3d_lib;
eulerAngles: PCvPoint3D64f = nil); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvDecomposeProjectionMatrix(const projMatr: pCvMat; calibMatr: pCvMat; rotMatr: pCvMat; posVect: pCvMat; rotMatrX: pCvMat = nil; rotMatrY: pCvMat = nil;
rotMatrZ: pCvMat = nil; eulerAngles: PCvPoint3D64f = nil); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcMatMulDeriv(const A: pCvMat; const B: pCvMat; dABdA: pCvMat; dABdB: pCvMat); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvComposeRT(const _rvec1: pCvMat; const _tvec1: pCvMat; const _rvec2: pCvMat; const _tvec2: pCvMat; _rvec3: pCvMat; _tvec3: pCvMat; dr3dr1: pCvMat = nil;
dr3dt1: pCvMat = nil; dr3dr2: pCvMat = nil; dr3dt2: pCvMat = nil; dt3dr1: pCvMat = nil; dt3dt1: pCvMat = nil; dt3dr2: pCvMat = nil; dt3dt2: pCvMat = nil); cdecl;
external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvProjectPoints2(const object_points: pCvMat; const rotation_vector: pCvMat; const translation_vector: pCvMat; const camera_matrix: pCvMat;
const distortion_coeffs: pCvMat; image_points: pCvMat; dpdrot: pCvMat = nil; dpdt: pCvMat = nil; dpdf: pCvMat = nil; dpdc: pCvMat = nil;
dpddist: pCvMat = nil; aspect_ratio: double = 0); cdecl; external calib3d_lib;
const distortion_coeffs: pCvMat; image_points: pCvMat; dpdrot: pCvMat = nil; dpdt: pCvMat = nil; dpdf: pCvMat = nil; dpdc: pCvMat = nil; dpddist: pCvMat = nil;
aspect_ratio: double = 0); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindExtrinsicCameraParams2(const object_points: pCvMat; const image_points: pCvMat; const camera_matrix: pCvMat; const distortion_coeffs: pCvMat;
rotation_vector: pCvMat; translation_vector: pCvMat; use_extrinsic_guess: Integer = 0); cdecl; external calib3d_lib;
rotation_vector: pCvMat; translation_vector: pCvMat; use_extrinsic_guess: Integer = 0); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvInitIntrinsicParams2D(const object_points: pCvMat; const image_points: pCvMat; const npoints: pCvMat; image_size: TCvSize; camera_matrix: pCvMat;
aspect_ratio: double = 1); cdecl; external calib3d_lib;
function cvCheckChessboard(const image: pCvArr; size: TCvSize): Integer; cdecl; external calib3d_lib;
aspect_ratio: double = 1); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCheckChessboard(const image: pCvArr; size: TCvSize): Integer; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindChessboardCorners(const image: Pointer; pattern_size: TCvSize; corners: pCvPoint2D32f; corner_count: pInteger = nil;
flags: Integer = CV_CALIB_CB_ADAPTIVE_THRESH + CV_CALIB_CB_NORMALIZE_IMAGE): Integer; cdecl; external calib3d_lib;
procedure cvDrawChessboardCorners(image: pIplImage; pattern_size: TCvSize; corners: pCvPoint2D32f; count: Integer; pattern_was_found: Integer); cdecl;
external calib3d_lib;
flags: Integer = CV_CALIB_CB_ADAPTIVE_THRESH + CV_CALIB_CB_NORMALIZE_IMAGE): Integer; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvDrawChessboardCorners(image: pIplImage; pattern_size: TCvSize; corners: pCvPoint2D32f; count: Integer; pattern_was_found: Integer); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCalibrateCamera2(const object_points: pCvMat; const image_points: pCvMat; const point_counts: pCvMat; image_size: TCvSize; camera_matrix: pCvMat;
distortion_coeffs: pCvMat; rotation_vectors: pCvMat { =nil }; translation_vectors: pCvMat { =nil }; flags: Integer { =0 };
term_crit: TCvTermCriteria { =cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,DBL_EPSILON) }
): double; cdecl; external calib3d_lib;
procedure cvCalibrationMatrixValues(const camera_matrix: pCvMat; image_size: TCvSize; aperture_width: double = 0; aperture_height: double = 0;
fovx: PDouble = nil; fovy: PDouble = nil; focal_length: PDouble = nil; principal_point: PCvPoint2D64f = nil; pixel_aspect_ratio: PDouble = nil); cdecl;
external calib3d_lib;
): double; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalibrationMatrixValues(const camera_matrix: pCvMat; image_size: TCvSize; aperture_width: double = 0; aperture_height: double = 0; fovx: PDouble = nil;
fovy: PDouble = nil; focal_length: PDouble = nil; principal_point: PCvPoint2D64f = nil; pixel_aspect_ratio: PDouble = nil); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvStereoCalibrate(const object_points: pCvMat; const image_points1: pCvMat; const image_points2: pCvMat; const npoints: pCvMat; camera_matrix1: pCvMat;
dist_coeffs1: pCvMat; camera_matrix2: pCvMat; dist_coeffs2: pCvMat; image_size: TCvSize; R: pCvMat; T: pCvMat; E: pCvMat { = nil }; F: pCvMat { = nil };
term_crit: TCvTermCriteria { = CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 30, 1E-6)) };
flags: Integer { = CV_DEFAULT(CV_CALIB_FIX_INTRINSIC) } ): double; cdecl; external calib3d_lib;
procedure cvStereoRectify(const camera_matrix1: pCvMat; const camera_matrix2: pCvMat; const dist_coeffs1: pCvMat; const dist_coeffs2: pCvMat;
image_size: TCvSize; const R: pCvMat; const T: pCvMat; R1: pCvMat; R2: pCvMat; P1: pCvMat; P2: pCvMat; Q: pCvMat { = nil };
flags: Integer { = CV_CALIB_ZERO_DISPARITY }; alpha: double { = -1 }; new_image_size: TCvSize { =CV_DEFAULT(cvSize(0,0)) }; valid_pix_ROI1: PCvRect { =nil };
valid_pix_ROI2: PCvRect { =nil } ); cdecl; external calib3d_lib;
function cvStereoRectifyUncalibrated(const points1: pCvMat; const points2: pCvMat; const F: pCvMat; img_size: TCvSize; H1: pCvMat; H2: pCvMat;
threshold: double = 5): Integer; cdecl; external calib3d_lib;
function cvCreateStereoBMState(preset: Integer = CV_STEREO_BM_BASIC; numberOfDisparities: Integer = 0): pCvStereoBMState; cdecl; external calib3d_lib;
procedure cvReleaseStereoBMState(Var state: pCvStereoBMState); cdecl; external calib3d_lib;
procedure cvFindStereoCorrespondenceBM(const left: pCvArr; const right: pCvArr; disparity: pCvArr; state: pCvStereoBMState); cdecl; external calib3d_lib;
function cvGetValidDisparityROI(roi1: TCvRect; roi2: TCvRect; minDisparity: Integer; numberOfDisparities: Integer; SADWindowSize: Integer): TCvRect; cdecl;
external calib3d_lib;
procedure cvValidateDisparity(disparity: pCvArr; const cost: pCvArr; minDisparity: Integer; numberOfDisparities: Integer; disp12MaxDiff: Integer = 1); cdecl;
external calib3d_lib;
procedure cvReprojectImageTo3D(const disparityImage: pCvMat; _3dImage: pIplImage; const Q: pCvMat; handleMissingValues: Integer = 0); cdecl;
external calib3d_lib;
{$ENDIF}
term_crit: TCvTermCriteria { = CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 30, 1E-6)) }; flags: Integer { = CV_DEFAULT(CV_CALIB_FIX_INTRINSIC) } ): double;
cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvStereoRectify(const camera_matrix1: pCvMat; const camera_matrix2: pCvMat; const dist_coeffs1: pCvMat; const dist_coeffs2: pCvMat; image_size: TCvSize; const R: pCvMat;
const T: pCvMat; R1: pCvMat; R2: pCvMat; P1: pCvMat; P2: pCvMat; Q: pCvMat { = nil }; flags: Integer { = CV_CALIB_ZERO_DISPARITY }; alpha: double { = -1 };
new_image_size: TCvSize { =CV_DEFAULT(cvSize(0,0)) }; valid_pix_ROI1: PCvRect { =nil }; valid_pix_ROI2: PCvRect { =nil } ); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvStereoRectifyUncalibrated(const points1: pCvMat; const points2: pCvMat; const F: pCvMat; img_size: TCvSize; H1: pCvMat; H2: pCvMat; threshold: double = 5): Integer;
cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateStereoBMState(preset: Integer = CV_STEREO_BM_BASIC; numberOfDisparities: Integer = 0): pCvStereoBMState; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseStereoBMState(Var state: pCvStereoBMState); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindStereoCorrespondenceBM(const left: pCvArr; const right: pCvArr; disparity: pCvArr; state: pCvStereoBMState); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvGetValidDisparityROI(roi1: TCvRect; roi2: TCvRect; minDisparity: Integer; numberOfDisparities: Integer; SADWindowSize: Integer): TCvRect; cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvValidateDisparity(disparity: pCvArr; const cost: pCvArr; minDisparity: Integer; numberOfDisparities: Integer; disp12MaxDiff: Integer = 1); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReprojectImageTo3D(const disparityImage: pCvMat; _3dImage: pIplImage; const Q: pCvMat; handleMissingValues: Integer = 0); cdecl; external calib3d_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
end.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1091,70 +1091,70 @@ implementation
uses ocv.lib;
// procedure cvCvtColor(const src: pIplImage; dst: pIplImage; code: Integer); external imgproc_lib;
// procedure cvCvtColor(const src: pIplImage; dst: pIplImage; code: Integer); external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCvtColor(const src: PCvArr; dst: PCvArr; code: Integer); cdecl; external imgproc_lib name 'cvCvtColor';
procedure cvCvtColor(const src: pCvMat; dst: pCvMat; code: Integer); cdecl; external imgproc_lib name 'cvCvtColor';
// procedure cvCvtColor(const src: PCvArr; dst: pCvMat; code: Integer); external imgproc_lib name 'cvCvtColor';
function cvThreshold(const src, dst: PCvArr; threshold, max_value: Double; threshold_type: Integer): Double; cdecl; external imgproc_lib;
function cvThreshold(const src, dst: PCvArr; threshold, max_value: Double; threshold_type: Integer): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvSmooth(const src: PCvArr; dst: PCvArr; smoothtype: Integer = CV_GAUSSIAN; size1: Integer = 3; size2: Integer = 0; sigma1: Double = 0;
sigma2: Double = 0); cdecl; external imgproc_lib;
procedure cvResize(const src: PCvArr; dst: PCvArr; interpolation: Integer = CV_INTER_LINEAR); cdecl; external imgproc_lib;
sigma2: Double = 0); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvResize(const src: PCvArr; dst: PCvArr; interpolation: Integer = CV_INTER_LINEAR); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateStructuringElementEx(cols: Integer; rows: Integer; anchor_x: Integer; anchor_y: Integer; shape: Integer; values: PInteger = nil)
: pIplConvKernel; cdecl; external imgproc_lib;
procedure cvErode(const src: PCvArr; dst: PCvArr; element: pIplConvKernel = nil; iterations: Integer = 1); cdecl; external imgproc_lib;
procedure cvDilate(const src: PCvArr; dst: PCvArr; element: pIplConvKernel = nil; iterations: Integer = 1); cdecl; external imgproc_lib;
procedure cvReleaseStructuringElement(Var element: pIplConvKernel); cdecl; external imgproc_lib;
: pIplConvKernel; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvErode(const src: PCvArr; dst: PCvArr; element: pIplConvKernel = nil; iterations: Integer = 1); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvDilate(const src: PCvArr; dst: PCvArr; element: pIplConvKernel = nil; iterations: Integer = 1); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseStructuringElement(Var element: pIplConvKernel); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvMorphologyEx(const src: PCvArr; dst: PCvArr; temp: PCvArr; element: pIplConvKernel; operation: Integer; iterations: Integer = 1); cdecl;
external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFloodFill(image: PCvArr; seed_point: TCvPoint; new_val: TCvScalar; lo_diff: TCvScalar { * cvScalarAll(0) * };
up_diff: TCvScalar { * cvScalarAll(0) * }; comp: pCvConnectedComp = NIL; flags: Integer = 4; mask: PCvArr = NIL); cdecl; external imgproc_lib;
up_diff: TCvScalar { * cvScalarAll(0) * }; comp: pCvConnectedComp = NIL; flags: Integer = 4; mask: PCvArr = NIL); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvAdaptiveThreshold(const src: PCvArr; dst: PCvArr; max_value: Double; adaptive_method: Integer = CV_ADAPTIVE_THRESH_MEAN_C;
threshold_type: Integer = CV_THRESH_BINARY; block_size: Integer = 3; param1: Double = 5); cdecl; external imgproc_lib;
threshold_type: Integer = CV_THRESH_BINARY; block_size: Integer = 3; param1: Double = 5); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCopyMakeBorder(const src: PCvArr; dst: PCvArr; offset: TCvPoint; bordertype: Integer; value: TCvScalar { * cvScalarAll(0) * } ); cdecl;
external imgproc_lib;
procedure cvSobel(const src: PCvArr; dst: PCvArr; xorder: Integer; yorder: Integer; aperture_size: Integer = 3); cdecl; external imgproc_lib;
procedure cvLaplace(const src: PCvArr; dst: PCvArr; aperture_size: Integer = 3); cdecl; external imgproc_lib;
procedure cvCanny(const image: PCvArr; edges: PCvArr; threshold1: Double; threshold2: Double; aperture_size: Integer = 3); cdecl; external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvSobel(const src: PCvArr; dst: PCvArr; xorder: Integer; yorder: Integer; aperture_size: Integer = 3); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvLaplace(const src: PCvArr; dst: PCvArr; aperture_size: Integer = 3); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCanny(const image: PCvArr; edges: PCvArr; threshold1: Double; threshold2: Double; aperture_size: Integer = 3); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvHoughLines2(image: PCvArr; line_storage: Pointer; method: Integer; rho: Double; theta: Double; threshold: Integer; param1: Double = 0;
param2: Double = 0): pCvSeq; cdecl; external imgproc_lib;
param2: Double = 0): pCvSeq; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvHoughCircles(image: PCvArr; circle_storage: Pointer; method: Integer; dp: Double; min_dist: Double; param1: Double = 100; param2: Double = 100;
min_radius: Integer = 0; max_radius: Integer = 0): pCvSeq; cdecl; external imgproc_lib;
procedure cvIntegral(const image: PCvArr; sum: PCvArr; sqsum: PCvArr = NIL; tilted_sum: PCvArr = NIL); cdecl; external imgproc_lib;
min_radius: Integer = 0; max_radius: Integer = 0): pCvSeq; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvIntegral(const image: PCvArr; sum: PCvArr; sqsum: PCvArr = NIL; tilted_sum: PCvArr = NIL); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindContours(image: PCvArr; storage: pCvMemStorage; first_contour: pCvSeq; header_size: Integer { = SizeOf(TCvContour) };
mode: Integer { = CV_RETR_LIST }; method: Integer { = CV_CHAIN_APPROX_SIMPLE }; offset: TCvPoint { =cvPoint(0,0) } ): Integer; cdecl; external imgproc_lib;
mode: Integer { = CV_RETR_LIST }; method: Integer { = CV_CHAIN_APPROX_SIMPLE }; offset: TCvPoint { =cvPoint(0,0) } ): Integer; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvApproxPoly(const src_seq: pCvSeq; header_size: Integer; storage: pCvMemStorage; method: Integer; eps: Double; recursive: Integer = 0): pCvSeq; cdecl;
external imgproc_lib;
procedure cvEqualizeHist(const src, dst: PCvArr); cdecl; external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvEqualizeHist(const src, dst: PCvArr); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindCornerSubPix(const image: PCvArr; corners: pCvPoint2D32f; count: Integer; win: TCvSize; zero_zone: TCvSize; criteria: TCvTermCriteria); cdecl;
external imgproc_lib;
procedure cvInitUndistortMap(const camera_matrix: pCvMat; const distortion_coeffs: pCvMat; mapx: PCvArr; mapy: PCvArr); cdecl; external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvInitUndistortMap(const camera_matrix: pCvMat; const distortion_coeffs: pCvMat; mapx: PCvArr; mapy: PCvArr); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvRemap(const src: PCvArr; dst: PCvArr; const mapx: PCvArr; const mapy: PCvArr; flags: Integer { =CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS };
fillval: TCvScalar { =cvScalarAll(0) }
); cdecl; external imgproc_lib;
function cvArcLength(const curve: Pointer; slice: TCvSlice { = CV_WHOLE_SEQ }; is_closed: Integer { = 1 } ): Double; cdecl; external imgproc_lib;
); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvArcLength(const curve: Pointer; slice: TCvSlice { = CV_WHOLE_SEQ }; is_closed: Integer { = 1 } ): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvContourPerimeter(const contour: Pointer): Double; {$IFDEF USE_INLINE}inline; {$ENDIF}
begin
result := cvArcLength(contour, CV_WHOLE_SEQ, 1);
end;
function cvMatchShapes(const object1: Pointer; const object2: Pointer; method: Integer; parameter: Double = 0): Double; cdecl; external imgproc_lib;
function cv2DRotationMatrix(center: TCvPoint2D32f; angle: Double; scale: Double; map_matrix: pCvMat): pCvMat; cdecl; external imgproc_lib;
function cvMatchShapes(const object1: Pointer; const object2: Pointer; method: Integer; parameter: Double = 0): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cv2DRotationMatrix(center: TCvPoint2D32f; angle: Double; scale: Double; map_matrix: pCvMat): pCvMat; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvWarpAffine(const src: PCvArr; dst: PCvArr; const map_matrix: pCvMat; flags: Integer { = CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS };
fillval: TCvScalar { = cvScalarAll(0) } ); cdecl; external imgproc_lib;
function cvGetPerspectiveTransform(const src: pCvPoint2D32f; const dst: pCvPoint2D32f; map_matrix: pCvMat): pCvMat; cdecl; external imgproc_lib;
fillval: TCvScalar { = cvScalarAll(0) } ); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvGetPerspectiveTransform(const src: pCvPoint2D32f; const dst: pCvPoint2D32f; map_matrix: pCvMat): pCvMat; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvWarpPerspective(const src: PCvArr; dst: PCvArr; const map_matrix: pCvMat; flags: Integer { =CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS };
fillval: TCvScalar { =cvScalarAll(0) } ); cdecl; external imgproc_lib;
function cvBoundingRect(points: PCvArr; update: Integer = 0): TCvRect; cdecl; external imgproc_lib;
function cvContourArea(const contour: PCvArr; slice: TCvSlice { = CV_WHOLE_SEQ }; oriented: Integer = 0): Double; cdecl; external imgproc_lib;
fillval: TCvScalar { =cvScalarAll(0) } ); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvBoundingRect(points: PCvArr; update: Integer = 0): TCvRect; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvContourArea(const contour: PCvArr; slice: TCvSlice { = CV_WHOLE_SEQ }; oriented: Integer = 0): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvConvexHull2(const input: pCvSeq; hull_storage: Pointer = nil; orientation: Integer = CV_CLOCKWISE; return_points: Integer = 0): pCvSeq; cdecl;
external imgproc_lib;
function cvConvexityDefects(contour: pCvSeq; convexhull: pCvSeq; storage: pCvMemStorage = nil): pCvSeq; cdecl; external imgproc_lib;
procedure cvPyrDown(const src: PCvArr; dst: PCvArr; filter: Integer = CV_GAUSSIAN_5x5); cdecl; external imgproc_lib;
procedure cvPyrUp(const src: PCvArr; dst: PCvArr; filter: Integer = CV_GAUSSIAN_5x5); cdecl; external imgproc_lib;
function cvCheckContourConvexity(const contour: pCvSeq): Integer; cdecl; external imgproc_lib;
function cvCreateHist(dims: Integer; sizes: PInteger; _type: Integer; ranges: Pointer = nil; uniform: Integer = 1): pCvHistogram; cdecl; external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvConvexityDefects(contour: pCvSeq; convexhull: pCvSeq; storage: pCvMemStorage = nil): pCvSeq; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvPyrDown(const src: PCvArr; dst: PCvArr; filter: Integer = CV_GAUSSIAN_5x5); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvPyrUp(const src: PCvArr; dst: PCvArr; filter: Integer = CV_GAUSSIAN_5x5); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCheckContourConvexity(const contour: pCvSeq): Integer; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateHist(dims: Integer; sizes: PInteger; _type: Integer; ranges: Pointer = nil; uniform: Integer = 1): pCvHistogram; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcHist(var image: PCvArr; hist: pCvHistogram; accumulate: Integer = 0; const mask: PCvArr = nil);
{$IFDEF USE_INLINE}inline; {$ENDIF} overload;
@ -1180,51 +1180,51 @@ end;
// end;
procedure cvGetMinMaxHistValue(const hist: pCvHistogram; min_value: pSingle; max_value: pSingle; min_idx: PInteger = nil; max_idx: PInteger = nil); cdecl;
external imgproc_lib;
// procedure cvCalcArrHist; external imgproc_lib;
procedure cvCalcArrHist(var arr: PCvArr; hist: pCvHistogram; accumulate: Integer = 0; const mask: PCvArr = nil); cdecl; external imgproc_lib; overload;
procedure cvCalcArrHist(var arr: pIplImage; hist: pCvHistogram; accumulate: Integer = 0; const mask: pIplImage = nil); cdecl; external imgproc_lib; overload;
procedure cvCalcArrHist(var arr: pCvMat; hist: pCvHistogram; accumulate: Integer = 0; const mask: pCvMat = nil); cdecl; external imgproc_lib; overload;
procedure cvCalcArrBackProject(var image: PCvArr; dst: PCvArr; const hist: pCvHistogram); cdecl; external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
// procedure cvCalcArrHist; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcArrHist(var arr: PCvArr; hist: pCvHistogram; accumulate: Integer = 0; const mask: PCvArr = nil); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF}; overload;
procedure cvCalcArrHist(var arr: pIplImage; hist: pCvHistogram; accumulate: Integer = 0; const mask: pIplImage = nil); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF}; overload;
procedure cvCalcArrHist(var arr: pCvMat; hist: pCvHistogram; accumulate: Integer = 0; const mask: pCvMat = nil); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF}; overload;
procedure cvCalcArrBackProject(var image: PCvArr; dst: PCvArr; const hist: pCvHistogram); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
//procedure cvCalcBackProject; external imgproc_lib name 'cvCalcArrBackProject';
procedure cvCalcBackProject(var image: pIplImage; dst: PCvArr; const hist: pCvHistogram); cdecl; external imgproc_lib name 'cvCalcArrBackProject'; overload;
procedure cvCalcBackProject(var image: PCvArr; dst: PCvArr; const hist: pCvHistogram); cdecl; external imgproc_lib name 'cvCalcArrBackProject'; overload;
procedure cvGoodFeaturesToTrack(const image: PCvArr; eig_image: PCvArr; temp_image: PCvArr; corners: pCvPoint2D32f; corner_count: PInteger;
quality_level: Double; min_distance: Double; const mask: PCvArr = nil; block_size: Integer = 3; use_harris: Integer = 0; k: Double = 0.04); cdecl;
external imgproc_lib;
function cvMinAreaRect2(points: PCvArr; storage: pCvMemStorage = nil): TCvBox2D; cdecl; external imgproc_lib;
function cvMinEnclosingCircle(points: PCvArr; center: pCvPoint2D32f; radius: pSingle): Integer; cdecl; external imgproc_lib;
procedure cvBoxPoints(box: TCvBox2D; pt: TBoxPoints); cdecl; external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvMinAreaRect2(points: PCvArr; storage: pCvMemStorage = nil): TCvBox2D; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvMinEnclosingCircle(points: PCvArr; center: pCvPoint2D32f; radius: pSingle): Integer; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvBoxPoints(box: TCvBox2D; pt: TBoxPoints); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvLogPolar(const src: PCvArr; dst: PCvArr; center: TCvPoint2D32f; M: Double; flags: Integer = CV_INTER_LINEAR + CV_WARP_FILL_OUTLIERS); cdecl;
external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvLinearPolar(const src: PCvArr; dst: PCvArr; center: TCvPoint2D32f; maxRadius: Double; flags: Integer = CV_INTER_LINEAR + CV_WARP_FILL_OUTLIERS);
cdecl; external imgproc_lib;
procedure cvReleaseHist(Var hist: pCvHistogram); cdecl; external imgproc_lib;
procedure cvClearHist(hist: pCvHistogram); cdecl; external imgproc_lib;
procedure cvMoments(const arr: PCvArr; moments: pCvMoments; binary: Integer = 0); cdecl; external imgproc_lib;
function cvGetSpatialMoment(moments: pCvMoments; x_order, y_order: Integer): Double; cdecl; external imgproc_lib;
procedure cvMatchTemplate(const image: PCvArr; const templ: PCvArr; result: PCvArr; method: Integer); cdecl; external imgproc_lib;
function cvGetCentralMoment(moments: pCvMoments; x_order, y_order: Integer): Double; cdecl; external imgproc_lib;
cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseHist(Var hist: pCvHistogram); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvClearHist(hist: pCvHistogram); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvMoments(const arr: PCvArr; moments: pCvMoments; binary: Integer = 0); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvGetSpatialMoment(moments: pCvMoments; x_order, y_order: Integer): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvMatchTemplate(const image: PCvArr; const templ: PCvArr; result: PCvArr; method: Integer); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvGetCentralMoment(moments: pCvMoments; x_order, y_order: Integer): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvUndistort2(const src: PCvArr; dst: PCvArr; const camera_matrix: PCvArr; const distortion_coeffs: PCvArr; const new_camera_matrix: PCvArr = nil);
cdecl; external imgproc_lib;
function cvGetAffineTransform(const src: pCvPoint2D32f; const dst: pCvPoint2D32f; map_matrix: pCvMat): pCvMat; cdecl; external imgproc_lib;
cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvGetAffineTransform(const src: pCvPoint2D32f; const dst: pCvPoint2D32f; map_matrix: pCvMat): pCvMat; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvUndistortPoints(const src: pCvMat; dst: pCvMat; const camera_matrix: pCvMat; const dist_coeffs: pCvMat; const R: pCvMat = nil;
const P: pCvMat = nil); cdecl; external imgproc_lib;
const P: pCvMat = nil); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvStartFindContours(image: PCvArr; storage: pCvMemStorage; header_size: Integer { =sizeof(TCvContour)) }; mode: Integer { = CV_RETR_LIST };
method: Integer { =CV_CHAIN_APPROX_SIMPLE }; offset: TCvPoint { =cvPoint(0,0) } ): pCvContourScanner; cdecl; external imgproc_lib;
function cvFindNextContour(scanner: pCvContourScanner): pCvSeq; cdecl; external imgproc_lib;
procedure cvSubstituteContour(scanner: pCvContourScanner; new_contour: pCvSeq); cdecl; external imgproc_lib;
function cvEndFindContours(Var scanner: pCvContourScanner): pCvSeq; cdecl; external imgproc_lib;
method: Integer { =CV_CHAIN_APPROX_SIMPLE }; offset: TCvPoint { =cvPoint(0,0) } ): pCvContourScanner; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindNextContour(scanner: pCvContourScanner): pCvSeq; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvSubstituteContour(scanner: pCvContourScanner; new_contour: pCvSeq); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvEndFindContours(Var scanner: pCvContourScanner): pCvSeq; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCompareHist(hist1: pCvHistogram; hist2: pCvHistogram; method: Integer): Double; cdecl; external imgproc_lib;
function cvCompareHist(hist1: pCvHistogram; hist2: pCvHistogram; method: Integer): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvAcc(const image: PCvArr; sum: PCvArr; const mask: PCvArr = nil); cdecl; external imgproc_lib;
procedure cvSquareAcc(const image: PCvArr; sqsum: PCvArr; const mask: PCvArr = nil); cdecl; external imgproc_lib;
procedure cvMultiplyAcc(const image1: PCvArr; const image2: PCvArr; acc: PCvArr; const mask: PCvArr = nil); cdecl; external imgproc_lib;
procedure cvRunningAvg(const image: PCvArr; acc: PCvArr; alpha: Double; const mask: PCvArr = nil); cdecl; external imgproc_lib;
procedure cvAcc(const image: PCvArr; sum: PCvArr; const mask: PCvArr = nil); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvSquareAcc(const image: PCvArr; sqsum: PCvArr; const mask: PCvArr = nil); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvMultiplyAcc(const image1: PCvArr; const image2: PCvArr; acc: PCvArr; const mask: PCvArr = nil); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvRunningAvg(const image: PCvArr; acc: PCvArr; alpha: Double; const mask: PCvArr = nil); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFilter2D(const src: PCvArr; dst: PCvArr; const kernel: pCvMat; anchor: TCvPoint); cdecl; external imgproc_lib;
procedure cvFilter2D(const src: PCvArr; dst: PCvArr; const kernel: pCvMat; anchor: TCvPoint); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFilter2D(const src: PCvArr; dst: PCvArr; const kernel: pCvMat);
begin
@ -1232,46 +1232,46 @@ begin
end;
function cvCreatePyramid(const img: PCvArr; extra_layers: Integer; rate: Double; const layer_sizes: pCvSize = nil; bufarr: PCvArr = nil; calc: Integer = 1;
filter: Integer = CV_GAUSSIAN_5x5): ppCvMat; cdecl; external imgproc_lib;
procedure cvReleasePyramid(var pyramid: ppCvMat; extra_layers: Integer); cdecl; external imgproc_lib;
filter: Integer = CV_GAUSSIAN_5x5): ppCvMat; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleasePyramid(var pyramid: ppCvMat; extra_layers: Integer); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvPyrMeanShiftFiltering(const src: PCvArr; dst: PCvArr; sp: Double; sr: Double; max_level: Integer { = 1 };
termcrit: TCvTermCriteria { = CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 5, 1)) } ); cdecl; external imgproc_lib;
procedure cvWatershed(const image: PCvArr; markers: PCvArr); cdecl; external imgproc_lib;
procedure cvConvertMaps(const mapx: PCvArr; const mapy: PCvArr; mapxy: PCvArr; mapalpha: PCvArr); cdecl; external imgproc_lib;
termcrit: TCvTermCriteria { = CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 5, 1)) } ); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvWatershed(const image: PCvArr; markers: PCvArr); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvConvertMaps(const mapx: PCvArr; const mapy: PCvArr; mapxy: PCvArr; mapalpha: PCvArr); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvInitUndistortRectifyMap(const camera_matrix: pCvMat; const dist_coeffs: pCvMat; const R: pCvMat; const new_camera_matrix: pCvMat; mapx: PCvArr;
mapy: PCvArr); cdecl; external imgproc_lib;
function cvGetNormalizedCentralMoment(moments: pCvMoments; x_order: Integer; y_order: Integer): Double; cdecl; external imgproc_lib;
procedure cvGetHuMoments(moments: pCvMoments; hu_moments: pCvHuMoments); cdecl; external imgproc_lib;
function cvSampleLine(const image: PCvArr; pt1: TCvPoint; pt2: TCvPoint; buffer: Pointer; connectivity: Integer = 8): Integer; cdecl; external imgproc_lib;
procedure cvGetRectSubPix(const src: PCvArr; dst: PCvArr; center: TCvPoint2D32f); cdecl; external imgproc_lib;
procedure cvGetQuadrangleSubPix(const src: PCvArr; dst: PCvArr; const map_matrix: pCvMat); cdecl; external imgproc_lib;
mapy: PCvArr); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvGetNormalizedCentralMoment(moments: pCvMoments; x_order: Integer; y_order: Integer): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvGetHuMoments(moments: pCvMoments; hu_moments: pCvHuMoments); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvSampleLine(const image: PCvArr; pt1: TCvPoint; pt2: TCvPoint; buffer: Pointer; connectivity: Integer = 8): Integer; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvGetRectSubPix(const src: PCvArr; dst: PCvArr; center: TCvPoint2D32f); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvGetQuadrangleSubPix(const src: PCvArr; dst: PCvArr; const map_matrix: pCvMat); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCalcEMD2(const signature1: PCvArr; const signature2: PCvArr; distance_type: Integer; distance_func: TCvDistanceFunction = nil;
const cost_matrix: PCvArr = nil; flow: PCvArr = nil; lower_bound: pfloat = nil; userdata: Pointer = nil): float; cdecl; external imgproc_lib;
const cost_matrix: PCvArr = nil; flow: PCvArr = nil; lower_bound: pfloat = nil; userdata: Pointer = nil): float; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvApproxChains(src_seq: pCvSeq; storage: pCvMemStorage; method: Integer = CV_CHAIN_APPROX_SIMPLE; parameter: Double = 0;
minimal_perimeter: Integer = 0; recursive: Integer = 0): pCvSeq; cdecl; external imgproc_lib;
procedure cvStartReadChainPoints(chain: pCvChain; reader: pCvChainPtReader); cdecl; external imgproc_lib;
function cvReadChainPoint(reader: pCvChainPtReader): TCvPoint; cdecl; external imgproc_lib;
function cvFitEllipse2(const points: PCvArr): TCvBox2D; cdecl; external imgproc_lib;
function cvMaxRect(const rect1: pCvRect; const rect2: pCvRect): TCvRect; cdecl; external imgproc_lib;
function cvPointSeqFromMat(seq_kind: Integer; const mat: PCvArr; contour_header: pCvContour; block: pCvSeqBlock): pCvSeq; cdecl; external imgproc_lib;
function cvPointPolygonTest(const contour: PCvArr; pt: TCvPoint2D32f; measure_dist: Integer): Double; cdecl; external imgproc_lib;
procedure cvSetHistBinRanges(hist: pCvHistogram; ranges: pSingle; uniform: Integer = 1); cdecl; external imgproc_lib;
minimal_perimeter: Integer = 0; recursive: Integer = 0): pCvSeq; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvStartReadChainPoints(chain: pCvChain; reader: pCvChainPtReader); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvReadChainPoint(reader: pCvChainPtReader): TCvPoint; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFitEllipse2(const points: PCvArr): TCvBox2D; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvMaxRect(const rect1: pCvRect; const rect2: pCvRect): TCvRect; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvPointSeqFromMat(seq_kind: Integer; const mat: PCvArr; contour_header: pCvContour; block: pCvSeqBlock): pCvSeq; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvPointPolygonTest(const contour: PCvArr; pt: TCvPoint2D32f; measure_dist: Integer): Double; cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvSetHistBinRanges(hist: pCvHistogram; ranges: pSingle; uniform: Integer = 1); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvMakeHistHeaderForArray(dims: Integer; sizes: PInteger; hist: pCvHistogram; data: pfloat; ranges: ppfloat = nil; uniform: Integer = 1): pCvHistogram;
cdecl; external imgproc_lib;
procedure cvNormalizeHist(hist: pCvHistogram; factor: Double); cdecl; external imgproc_lib;
procedure cvThreshHist(hist: pCvHistogram; threshold: Double); cdecl; external imgproc_lib;
procedure cvCopyHist(const src: pCvHistogram; Var dst: pCvHistogram); cdecl; external imgproc_lib;
procedure cvCalcBayesianProb(Var src: pCvHistogram; number: Integer; Var dst: pCvHistogram); cdecl; external imgproc_lib;
cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvNormalizeHist(hist: pCvHistogram; factor: Double); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvThreshHist(hist: pCvHistogram; threshold: Double); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCopyHist(const src: pCvHistogram; Var dst: pCvHistogram); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcBayesianProb(Var src: pCvHistogram; number: Integer; Var dst: pCvHistogram); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcArrBackProjectPatch(var image: PCvArr; dst: PCvArr; range: TCvSize; hist: pCvHistogram; method: Integer; factor: Double); cdecl;
external imgproc_lib;
procedure cvCalcProbDensity(const hist1: pCvHistogram; const hist2: pCvHistogram; dst_hist: pCvHistogram; scale: Double = 255); cdecl; external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcProbDensity(const hist1: pCvHistogram; const hist2: pCvHistogram; dst_hist: pCvHistogram; scale: Double = 255); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvDistTransform(const src: PCvArr; dst: PCvArr; distance_type: Integer = CV_DIST_L2; mask_size: Integer = 3; const mask: pfloat = nil;
labels: PCvArr = nil; labelType: Integer = CV_DIST_LABEL_CCOMP); cdecl; external imgproc_lib;
procedure cvPreCornerDetect(const image: PCvArr; corners: PCvArr; aperture_size: Integer = 3); cdecl; external imgproc_lib;
procedure cvCornerEigenValsAndVecs(const image: PCvArr; eigenvv: PCvArr; block_size: Integer; aperture_size: Integer = 3); cdecl; external imgproc_lib;
procedure cvCornerMinEigenVal(const image: PCvArr; eigenval: PCvArr; block_size: Integer; aperture_size: Integer = 3); cdecl; external imgproc_lib;
labels: PCvArr = nil; labelType: Integer = CV_DIST_LABEL_CCOMP); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvPreCornerDetect(const image: PCvArr; corners: PCvArr; aperture_size: Integer = 3); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCornerEigenValsAndVecs(const image: PCvArr; eigenvv: PCvArr; block_size: Integer; aperture_size: Integer = 3); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCornerMinEigenVal(const image: PCvArr; eigenval: PCvArr; block_size: Integer; aperture_size: Integer = 3); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCornerHarris(const image: PCvArr; harris_response: PCvArr; block_size: Integer; aperture_size: Integer = 3; k: Double = 0.04); cdecl;
external imgproc_lib;
procedure cvFitLine(const points: PCvArr; dist_type: Integer; param: Double; reps: Double; aeps: Double; Var line: Single); cdecl; external imgproc_lib;
external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFitLine(const points: PCvArr; dist_type: Integer; param: Double; reps: Double; aeps: Double; Var line: Single); cdecl; external imgproc_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
end.

View File

@ -116,8 +116,8 @@ procedure cvCalcCovarMatrixEx(nObjects: Integer; input: pointer; ioFlags: Intege
float* eigVals );
*)
{$EXTERNALSYM cvCalcEigenObjects}
procedure cvCalcEigenObjects(nObjects: Integer; input: pointer; output: pointer; ioFlags: Integer; ioBufSize: Integer; userData: pointer;
calcLimit: pCvTermCriteria; avg: pIplImage; eigVals: pFloat); cdecl;
procedure cvCalcEigenObjects(nObjects: Integer; input: pointer; output: pointer; ioFlags: Integer; ioBufSize: Integer; userData: pointer; calcLimit: pCvTermCriteria;
avg: pIplImage; eigVals: pFloat); cdecl;
(* Calculates dot product (obj - avg) * eigObj (i.e. projects image to eigen vector)
@ -388,8 +388,8 @@ procedure cvCreateHandMask(var hand_points: TCvSeq; var img_mask: TIplImage; var
CvMemStorage* storage, CvSeq **numbers);
*)
{$EXTERNALSYM cvFindHandRegion}
procedure cvFindHandRegion(var points: TCvPoint3D32f; count: Integer; var indexs: TCvSeq; var line: Single; size: TCvSize2D32f; flag: Integer;
var center: TCvPoint3D32f; var storage: TCvMemStorage; var numbers: pCvSeq); cdecl;
procedure cvFindHandRegion(var points: TCvPoint3D32f; count: Integer; var indexs: TCvSeq; var line: Single; size: TCvSize2D32f; flag: Integer; var center: TCvPoint3D32f;
var storage: TCvMemStorage; var numbers: pCvSeq); cdecl;
(* Finds hand region in range image data (advanced version)
@ -400,8 +400,8 @@ procedure cvFindHandRegion(var points: TCvPoint3D32f; count: Integer; var indexs
CvMemStorage* storage, CvSeq **numbers);
*)
{$EXTERNALSYM cvFindHandRegionA}
procedure cvFindHandRegionA(var points: TCvPoint3D32f; count: Integer; var indexs: TCvSeq; var line: Single; size: TCvSize2D32f; jc: Integer;
var center: TCvPoint3D32f; var storage: TCvMemStorage; var numbers: pCvSeq); cdecl;
procedure cvFindHandRegionA(var points: TCvPoint3D32f; count: Integer; var indexs: TCvSeq; var line: Single; size: TCvSize2D32f; jc: Integer; var center: TCvPoint3D32f;
var storage: TCvMemStorage; var numbers: pCvSeq); cdecl;
(* Calculates the cooficients of the homography matrix
@ -464,8 +464,8 @@ const
double parameter4 CV_DEFAULT(0));
*)
function cvFindDominantPoints(contour: pCvSeq; storage: pCvMemStorage; method: Integer = CV_DOMINANT_IPAN; parameter1: double = 0; parameter2: double = 0;
parameter3: double = 0; parameter4: double = 0): pCvSeq; cdecl;
function cvFindDominantPoints(contour: pCvSeq; storage: pCvMemStorage; method: Integer = CV_DOMINANT_IPAN; parameter1: double = 0; parameter2: double = 0; parameter3: double = 0;
parameter4: double = 0): pCvSeq; cdecl;
(* *************************************************************************************** *)
//
@ -1043,8 +1043,8 @@ const
int coeff_usage, CvSize win,
CvTermCriteria criteria, int calc_gradient CV_DEFAULT(1));
}
procedure cvSnakeImage(const image: pIplImage; points: pCvPointArray; length: Integer; alpha: PSingle; beta: PSingle; gamma: PSingle; coeff_usage: Integer;
win: TCvSize; criteria: TCvTermCriteria; calc_gradient: Integer = 1); cdecl;
procedure cvSnakeImage(const image: pIplImage; points: pCvPointArray; length: Integer; alpha: PSingle; beta: PSingle; gamma: PSingle; coeff_usage: Integer; win: TCvSize;
criteria: TCvTermCriteria; calc_gradient: Integer = 1); cdecl;
(* ***************************************************************************************\
// * Texture Descriptors *
@ -3165,8 +3165,7 @@ Type
// CvMemStorage* storage, CvSeq** comp,
// int level, double threshold1,
// double threshold2 );
procedure cvPyrSegmentation(src: pIplImage; dst: pIplImage; storage: pCvMemStorage;
var comp: pCvSeq; level: Integer; threshold1: double; threshold2: double); cdecl;
procedure cvPyrSegmentation(src: pIplImage; dst: pIplImage; storage: pCvMemStorage; var comp: pCvSeq; level: Integer; threshold1: double; threshold2: double); cdecl;
(* ***************************************************************************************\
// * Planar subdivisions *
@ -3785,15 +3784,14 @@ function cvCreateBGCodeBookModel: pCvBGCodeBookModel; cdecl;
// CVAPI(void) cvReleaseBGCodeBookModel( CvBGCodeBookModel** model );
procedure cvReleaseBGCodeBookModel(model: pCvBGCodeBookModel); cdecl;
// CVAPI(void) cvBGCodeBookUpdate( CvBGCodeBookModel* model, const CvArr* image, CvRect roi CV_DEFAULT(cvRect(0,0,0,0)),const CvArr* mask CV_DEFAULT(0) );
procedure cvBGCodeBookUpdate(model: pCvBGCodeBookModel; const image: pIplImage; roi: TCvRect { =CV_DEFAULT(cvRect(0,0,0,0)) };
const mask: pCvArr { =0 } ); cdecl;
procedure cvBGCodeBookUpdate(model: pCvBGCodeBookModel; const image: pIplImage; roi: TCvRect { =CV_DEFAULT(cvRect(0,0,0,0)) }; const mask: pCvArr { =0 } ); cdecl;
// CVAPI(int) cvBGCodeBookDiff( const CvBGCodeBookModel* model, const CvArr* image, CvArr* fgmask, CvRect roi CV_DEFAULT(cvRect(0,0,0,0)) );
function cvBGCodeBookDiff(const model: pCvBGCodeBookModel; const image: pCvArr; fgmask: pCvArr; roi: TCvRect { = cvRect(0,0,0,0) } ): Integer; cdecl;
// CVAPI(void) cvBGCodeBookClearStale( CvBGCodeBookModel* model, int staleThresh, CvRect roi CV_DEFAULT(cvRect(0,0,0,0)), const CvArr* mask CV_DEFAULT(0) );
procedure cvBGCodeBookClearStale(model: pCvBGCodeBookModel; staleThresh: Integer; roi: TCvRect { =cvRect(0,0,0,0) }; const mask: pCvArr = nil); cdecl;
// CVAPI(CvSeq*) cvSegmentFGMask( CvArr *fgmask, int poly1Hull0 CV_DEFAULT(1), float perimScale CV_DEFAULT(4.f), CvMemStorage* storage CV_DEFAULT(0), CvPoint offset CV_DEFAULT(cvPoint(0,0)));
function cvSegmentFGMask(fgmask: pCvArr; poly1Hull0: Integer { =1 }; perimScale: Single { = 4 }; storage: pCvMemStorage { =nil };
offset: TCvPoint { =cvPoint(0,0) } ): pCvSeq; cdecl;
function cvSegmentFGMask(fgmask: pCvArr; poly1Hull0: Integer { =1 }; perimScale: Single { = 4 }; storage: pCvMemStorage { =nil }; offset: TCvPoint { =cvPoint(0,0) } )
: pCvSeq; cdecl;
const
CV_UNDEF_SC_PARAM = 12345; // default value of parameters
@ -3835,9 +3833,8 @@ const
double param4 CV_DEFAULT(CV_UNDEF_SC_PARAM),
double param5 CV_DEFAULT(CV_UNDEF_SC_PARAM) );
*)
procedure cvFindStereoCorrespondence(const leftImage: pCvArr; const rightImage: pCvArr; mode: Integer; dispImage: pCvArr; maxDisparity: Integer;
param1: double = CV_UNDEF_SC_PARAM; param2: double = CV_UNDEF_SC_PARAM; param3: double = CV_UNDEF_SC_PARAM; param4: double = CV_UNDEF_SC_PARAM;
param5: double = CV_UNDEF_SC_PARAM); cdecl;
procedure cvFindStereoCorrespondence(const leftImage: pCvArr; const rightImage: pCvArr; mode: Integer; dispImage: pCvArr; maxDisparity: Integer; param1: double = CV_UNDEF_SC_PARAM;
param2: double = CV_UNDEF_SC_PARAM; param3: double = CV_UNDEF_SC_PARAM; param4: double = CV_UNDEF_SC_PARAM; param5: double = CV_UNDEF_SC_PARAM); cdecl;
(*
***************************************************************************************
@ -3906,8 +3903,7 @@ Type
CvPoint2D32f* warpPoint,
int direction);
*)
function icvConvertWarpCoordinates(coeffs: TicvConvertWarpCoordinatesCoeff; cameraPoint: pCvPoint2D32f; warpPoint: pCvPoint2D32f; direction: Integer)
: Integer; cdecl;
function icvConvertWarpCoordinates(coeffs: TicvConvertWarpCoordinatesCoeff; cameraPoint: pCvPoint2D32f; warpPoint: pCvPoint2D32f; direction: Integer): Integer; cdecl;
(*
CVAPI(int) icvGetSymPoint3D( CvPoint3D64f pointCorner,
CvPoint3D64f point1,
@ -3933,8 +3929,7 @@ function icvCompute3DPoint(alpha: double; betta: double; coeffs: pCvStereoLineCo
double* convRotMatr,
double* convTransVect);
*)
function icvCreateConvertMatrVect(rotMatr1: pdouble; transVect1: pdouble; rotMatr2: pdouble; transVect2: pdouble; convRotMatr: pdouble; convTransVect: pdouble)
: Integer; cdecl;
function icvCreateConvertMatrVect(rotMatr1: pdouble; transVect1: pdouble; rotMatr2: pdouble; transVect2: pdouble; convRotMatr: pdouble; convTransVect: pdouble): Integer; cdecl;
(*
CVAPI(int) icvConvertPointSystem(CvPoint3D64f M2,
CvPoint3D64f* M1,
@ -3950,8 +3945,7 @@ function icvComputeCoeffForStereo(stereoCamera: pCvStereoCamera): Integer; cdecl
(*
CVAPI(int) icvGetCrossPieceVector(CvPoint2D32f p1_start,CvPoint2D32f p1_end,CvPoint2D32f v2_start,CvPoint2D32f v2_end,CvPoint2D32f *cross);
*)
function icvGetCrossPieceVector(p1_start: TCvPoint2D32f; p1_end: TCvPoint2D32f; v2_start: TCvPoint2D32f; v2_end: TCvPoint2D32f; cross: pCvPoint2D32f)
: Integer; cdecl;
function icvGetCrossPieceVector(p1_start: TCvPoint2D32f; p1_end: TCvPoint2D32f; v2_start: TCvPoint2D32f; v2_end: TCvPoint2D32f; cross: pCvPoint2D32f): Integer; cdecl;
(*
CVAPI(int) icvGetCrossLineDirect(CvPoint2D32f p1,CvPoint2D32f p2,float a,float b,float c,CvPoint2D32f* cross);
*)
@ -3970,8 +3964,8 @@ function icvDefinePointPosition(point1: TCvPoint2D32f; point2: TCvPoint2D32f; po
CvStereoCamera* stereoparams
);
*)
function icvStereoCalibration(numImages: Integer; nums: PInteger; imageSize: TCvSize; imagePoints1: pCvPoint2D32f; imagePoints2: pCvPoint2D32f;
objectPoints: pCvPoint3D32f; stereoparams: pCvStereoCamera): Integer; cdecl;
function icvStereoCalibration(numImages: Integer; nums: PInteger; imageSize: TCvSize; imagePoints1: pCvPoint2D32f; imagePoints2: pCvPoint2D32f; objectPoints: pCvPoint3D32f;
stereoparams: pCvStereoCamera): Integer; cdecl;
(*
CVAPI(int) icvComputeRestStereoParams(CvStereoCamera *stereoparams);
*)
@ -3994,8 +3988,8 @@ procedure cvComputePerspectiveMap(const coeffs: TicvConvertWarpCoordinatesCoeff;
CvStereoLineCoeff* coeffs,
int* needSwapCameras);
*)
function icvComCoeffForLine(point1: TCvPoint2D64f; point2: TCvPoint2D64f; point3: TCvPoint2D64f; point4: TCvPoint2D64f; camMatr1: pdouble; rotMatr1: pdouble;
transVect1: pdouble; camMatr2: pdouble; rotMatr2: pdouble; transVect2: pdouble; coeffs: pCvStereoLineCoeff; needSwapCameras: PInteger): Integer; cdecl;
function icvComCoeffForLine(point1: TCvPoint2D64f; point2: TCvPoint2D64f; point3: TCvPoint2D64f; point4: TCvPoint2D64f; camMatr1: pdouble; rotMatr1: pdouble; transVect1: pdouble;
camMatr2: pdouble; rotMatr2: pdouble; transVect2: pdouble; coeffs: pCvStereoLineCoeff; needSwapCameras: PInteger): Integer; cdecl;
(*
CVAPI(int) icvGetDirectionForPoint( CvPoint2D64f point,
double* camMatr,
@ -4007,8 +4001,7 @@ function icvGetDirectionForPoint(point: TCvPoint2D64f; camMatr: pdouble; direct:
CvPoint3D64f point21,CvPoint3D64f point22,
CvPoint3D64f* midPoint);
*)
function icvGetCrossLines(point11: TCvPoint3D64f; point12: TCvPoint3D64f; point21: TCvPoint3D64f; point22: TCvPoint3D64f; midPoint: pCvPoint3D64f)
: Integer; cdecl;
function icvGetCrossLines(point11: TCvPoint3D64f; point12: TCvPoint3D64f; point21: TCvPoint3D64f; point22: TCvPoint3D64f; midPoint: pCvPoint3D64f): Integer; cdecl;
(*
CVAPI(int) icvComputeStereoLineCoeffs( CvPoint3D64f pointA,
CvPoint3D64f pointB,
@ -4016,8 +4009,7 @@ function icvGetCrossLines(point11: TCvPoint3D64f; point12: TCvPoint3D64f; point2
double gamma,
CvStereoLineCoeff* coeffs);
*)
function icvComputeStereoLineCoeffs(pointA: TCvPoint3D64f; pointB: TCvPoint3D64f; pointCam1: TCvPoint3D64f; gamma: double; coeffs: pCvStereoLineCoeff)
: Integer; cdecl;
function icvComputeStereoLineCoeffs(pointA: TCvPoint3D64f; pointB: TCvPoint3D64f; pointCam1: TCvPoint3D64f; gamma: double; coeffs: pCvStereoLineCoeff): Integer; cdecl;
(*
CVAPI(int) icvComputeFundMatrEpipoles ( double* camMatr1,
double* rotMatr1,
@ -4080,8 +4072,7 @@ procedure icvGetCrossPieceDirect(p_start: TCvPoint2D64f; p_end: TCvPoint2D64f; a
CvPoint2D64f* cross,
int* result);
*)
procedure icvGetCrossPiecePiece(p1_start: TCvPoint2D64f; p1_end: TCvPoint2D64f; p2_start: TCvPoint2D64f; p2_end: TCvPoint2D64f; cross: pCvPoint2D64f;
result: PInteger); cdecl;
procedure icvGetCrossPiecePiece(p1_start: TCvPoint2D64f; p1_end: TCvPoint2D64f; p2_start: TCvPoint2D64f; p2_end: TCvPoint2D64f; cross: pCvPoint2D64f; result: PInteger); cdecl;
(*
CVAPI(void) icvGetPieceLength(CvPoint2D64f point1,CvPoint2D64f point2,double* dist);
*)
@ -4119,9 +4110,8 @@ procedure icvProjectPointToImage(point: TCvPoint3D64f; camMatr: pdouble; rotMatr
Type
TicvGetQuadsTransformQuad = array [0 .. 3, 0 .. 1] of double;
procedure icvGetQuadsTransform(imageSize: TCvSize; camMatr1: pdouble; rotMatr1: pdouble; transVect1: pdouble; camMatr2: pdouble; rotMatr2: pdouble;
transVect2: pdouble; warpSize: pCvSize; quad1: TicvGetQuadsTransformQuad; quad2: TicvGetQuadsTransformQuad; fundMatr: pdouble; epipole1: pCvPoint3D64f;
epipole2: pCvPoint3D64f); cdecl;
procedure icvGetQuadsTransform(imageSize: TCvSize; camMatr1: pdouble; rotMatr1: pdouble; transVect1: pdouble; camMatr2: pdouble; rotMatr2: pdouble; transVect2: pdouble;
warpSize: pCvSize; quad1: TicvGetQuadsTransformQuad; quad2: TicvGetQuadsTransformQuad; fundMatr: pdouble; epipole1: pCvPoint3D64f; epipole2: pCvPoint3D64f); cdecl;
(*
CVAPI(void) icvGetQuadsTransformStruct( CvStereoCamera* stereoCamera);
*)
@ -4138,8 +4128,8 @@ procedure icvComputeStereoParamsForCameras(stereoCamera: pCvStereoCamera); cdecl
CvPoint2D64f* point21,CvPoint2D64f* point22,
int* result);
*)
procedure icvGetCutPiece(areaLineCoef1: pdouble; areaLineCoef2: pdouble; epipole: TCvPoint2D64f; imageSize: TCvSize; point11: pCvPoint2D64f;
point12: pCvPoint2D64f; point21: pCvPoint2D64f; point22: pCvPoint2D64f; result: PInteger); cdecl;
procedure icvGetCutPiece(areaLineCoef1: pdouble; areaLineCoef2: pdouble; epipole: TCvPoint2D64f; imageSize: TCvSize; point11: pCvPoint2D64f; point12: pCvPoint2D64f;
point21: pCvPoint2D64f; point22: pCvPoint2D64f; result: PInteger); cdecl;
(*
CVAPI(void) icvGetMiddleAnglePoint( CvPoint2D64f basePoint,
CvPoint2D64f point1,CvPoint2D64f point2,
@ -4358,8 +4348,7 @@ function cvInitFaceTracker(pFaceTracking: pCvFaceTracker; const imgGray: pIplIma
CvRect* pRects, int nRects,
CvPoint* ptRotate, double* dbAngleRotate);
*)
function cvTrackFace(pFaceTracker: pCvFaceTracker; imgGray: pIplImage; pRects: pCvRect; nRects: Integer; ptRotate: pCvPoint; dbAngleRotate: pdouble)
: Integer; cdecl;
function cvTrackFace(pFaceTracker: pCvFaceTracker; imgGray: pIplImage; pRects: pCvRect; nRects: Integer; ptRotate: pCvPoint; dbAngleRotate: pdouble): Integer; cdecl;
(*
CVAPI(void) cvReleaseFaceTracker(CvFaceTracker** ppFaceTracker);
*)
@ -4468,8 +4457,8 @@ Type
{$EXTERNALSYM cv3dTrackerCalibrateCameras}
function cv3dTrackerCalibrateCameras(num_cameras: Integer; camera_intrinsics: pCv3dTrackerCameraIntrinsics; etalon_size: TCvSize; square_size: Single;
var samples: pIplImage; camera_info: pCv3dTrackerCameraInfo): TCvBool; cdecl;
function cv3dTrackerCalibrateCameras(num_cameras: Integer; camera_intrinsics: pCv3dTrackerCameraIntrinsics; etalon_size: TCvSize; square_size: Single; var samples: pIplImage;
camera_info: pCv3dTrackerCameraInfo): TCvBool; cdecl;
(*
CVAPI(int) cv3dTrackerLocateObjects(int num_cameras, int num_objects,
@ -4612,8 +4601,8 @@ type
int contour_orientation CV_DEFAULT(-1),
int attempt_number CV_DEFAULT(10));
*)
function cvVoronoiDiagramFromContour(ContourSeq: pCvSeq; var VoronoiDiagram: pCvVoronoiDiagram2D; VoronoiStorage: pCvMemStorage;
contour_type: TCvLeeParameters = CV_LEE_INT; contour_orientation: Integer = -1; attempt_number: Integer = 10): Integer; cdecl;
function cvVoronoiDiagramFromContour(ContourSeq: pCvSeq; var VoronoiDiagram: pCvVoronoiDiagram2D; VoronoiStorage: pCvMemStorage; contour_type: TCvLeeParameters = CV_LEE_INT;
contour_orientation: Integer = -1; attempt_number: Integer = 10): Integer; cdecl;
(*
Computes Voronoi Diagram for domains in given image
*)
@ -4680,8 +4669,7 @@ Type
TcvInitPerspectiveTransformVertex = array [0 .. 3] of TCvPoint2D32f;
TcvInitPerspectiveTransformMatrix = array [0 .. 2, 0 .. 2] of double;
procedure cvInitPerspectiveTransform(size: TCvSize; const vertex: TcvInitPerspectiveTransformVertex; matrix: TcvInitPerspectiveTransformMatrix;
rectMap: pCvArr); cdecl;
procedure cvInitPerspectiveTransform(size: TCvSize; const vertex: TcvInitPerspectiveTransformVertex; matrix: TcvInitPerspectiveTransformMatrix; rectMap: pCvArr); cdecl;
(*
CVAPI(void) cvInitStereoRectification( CvStereoCamera* params,
@ -4744,8 +4732,8 @@ procedure cvPreWarpImage(line_count: Integer; img: pIplImage; dst: puchar; dst_n
int* num_runs1,
int* num_runs2);
*)
procedure cvFindRuns(line_count: Integer; prewarp1: puchar; prewarp2: puchar; line_lengths1: PInteger; line_lengths2: PInteger; runs1: PInteger;
runs2: PInteger; num_runs1: PInteger; num_runs2: PInteger); cdecl;
procedure cvFindRuns(line_count: Integer; prewarp1: puchar; prewarp2: puchar; line_lengths1: PInteger; line_lengths2: PInteger; runs1: PInteger; runs2: PInteger;
num_runs1: PInteger; num_runs2: PInteger); cdecl;
(*
Compares two sets of compressed scanlines
*)
@ -4792,9 +4780,8 @@ procedure cvMakeAlphaScanlines(scanlines1: PInteger; scanlines2: PInteger; scanl
int* first_corr,
int* second_corr);
*)
procedure cvMorphEpilinesMulti(line_count: Integer; first_pix: puchar; first_num: PInteger; second_pix: puchar; second_num: PInteger; dst_pix: puchar;
dst_num: PInteger; alpha: float; first: PInteger; first_runs: PInteger; second: PInteger; second_runs: PInteger; first_corr: PInteger;
second_corr: PInteger); cdecl;
procedure cvMorphEpilinesMulti(line_count: Integer; first_pix: puchar; first_num: PInteger; second_pix: puchar; second_num: PInteger; dst_pix: puchar; dst_num: PInteger;
alpha: float; first: PInteger; first_runs: PInteger; second: PInteger; second_runs: PInteger; first_corr: PInteger; second_corr: PInteger); cdecl;
(*
Does reverse warping of the morphing result to make
it fill the destination image rectangle
@ -5030,8 +5017,8 @@ function cvFindFeaturesBoxed(tr: pCvFeatureTree; bounds_min: pCvMat; bounds_max:
int type CV_DEFAULT(CV_64FC1), double r CV_DEFAULT(4),
int64 seed CV_DEFAULT(-1));
*)
function cvCreateLSH(ops: pCvLSHOperations; d: Integer; L: Integer { =10 }; K: Integer { =10 }; type_: Integer { =CV_64FC1 }; r: double { =4 };
seed: int64 { =-1 } ): pCvLSH; cdecl;
function cvCreateLSH(ops: pCvLSHOperations; d: Integer; L: Integer { =10 }; K: Integer { =10 }; type_: Integer { =CV_64FC1 }; r: double { =4 }; seed: int64 { =-1 } )
: pCvLSH; cdecl;
(*
Construct in-memory LSH table, with n bins.
*)
@ -5040,8 +5027,7 @@ function cvCreateLSH(ops: pCvLSHOperations; d: Integer; L: Integer { =10 }; K: I
int type CV_DEFAULT(CV_64FC1), double r CV_DEFAULT(4),
int64 seed CV_DEFAULT(-1));
*)
function cvCreateMemoryLSH(d: Integer; n: Integer; L: Integer { =10 }; K: Integer { =10 }; type_: Integer { =CV_64FC1 }; r: double { =4 }; seed: int64 { =-1 } )
: pCvLSH; cdecl;
function cvCreateMemoryLSH(d: Integer; n: Integer; L: Integer { =10 }; K: Integer { =10 }; type_: Integer { =CV_64FC1 }; r: double { =4 }; seed: int64 { =-1 } ): pCvLSH; cdecl;
(*
Free the given LSH structure.
*)
@ -5120,8 +5106,8 @@ procedure cvCalcOpticalFlowLK(const prev: pCvArr; const curr: pCvArr; win_size:
CvSize max_range, int use_previous,
CvArr* velx, CvArr* vely );
*)
procedure cvCalcOpticalFlowBM(const prev: pCvArr; const curr: pCvArr; block_size: TCvSize; shift_size: TCvSize; max_range: TCvSize; use_previous: Integer;
velx: pCvArr; vely: pCvArr); cdecl;
procedure cvCalcOpticalFlowBM(const prev: pCvArr; const curr: pCvArr; block_size: TCvSize; shift_size: TCvSize; max_range: TCvSize; use_previous: Integer; velx: pCvArr;
vely: pCvArr); cdecl;
(*
Calculates Optical flow for 2 images using Horn & Schunck algorithm
*)
@ -5130,8 +5116,7 @@ procedure cvCalcOpticalFlowBM(const prev: pCvArr; const curr: pCvArr; block_size
int use_previous, CvArr* velx, CvArr* vely,
double lambda, CvTermCriteria criteria );
*)
procedure cvCalcOpticalFlowHS(const prev: pCvArr; const curr: pCvArr; use_previous: Integer; velx: pCvArr; vely: pCvArr; lambda: double;
criteria: TCvTermCriteria); cdecl;
procedure cvCalcOpticalFlowHS(const prev: pCvArr; const curr: pCvArr; use_previous: Integer; velx: pCvArr; vely: pCvArr; lambda: double; criteria: TCvTermCriteria); cdecl;
(*
***************************************************************************************\
* Background/foreground segmentation *
@ -5392,197 +5377,236 @@ begin
result := (edge and (not 3)) + ((edge + rotate) and 3);
end;
function cvCreateStereoGCState(numberOfDisparities: Integer; maxIters: Integer): pCvStereoGCState; cdecl; external legacy_lib;
function cvCreateStereoGCState(numberOfDisparities: Integer; maxIters: Integer): pCvStereoGCState; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindStereoCorrespondenceGC(const left: pIplImage; const right: pIplImage; disparityLeft: pCvMat; disparityRight: pCvMat; state: pCvStereoGCState;
useDisparityGuess: Integer = 0); cdecl; external legacy_lib;
procedure cvReleaseStereoGCState(Var state: pCvStereoGCState); cdecl; external legacy_lib;
procedure cvSnakeImage(const image: pIplImage; points: pCvPointArray; length: Integer; alpha: PSingle; beta: PSingle; gamma: PSingle; coeff_usage: Integer;
win: TCvSize; criteria: TCvTermCriteria; calc_gradient: Integer = 1); cdecl; external legacy_lib;
useDisparityGuess: Integer = 0); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseStereoGCState(Var state: pCvStereoGCState); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvSnakeImage(const image: pIplImage; points: pCvPointArray; length: Integer; alpha: PSingle; beta: PSingle; gamma: PSingle; coeff_usage: Integer; win: TCvSize;
criteria: TCvTermCriteria; calc_gradient: Integer = 1); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateSubdiv2D(subdiv_type: Integer; header_size: Integer; vtx_size: Integer; quadedge_size: Integer; storage: pCvMemStorage): pCvSubdiv2D; cdecl;
external legacy_lib;
procedure cvInitSubdivDelaunay2D(subdiv: pCvSubdiv2D; rect: TCvRect); cdecl; external legacy_lib;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvInitSubdivDelaunay2D(subdiv: pCvSubdiv2D; rect: TCvRect); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvSubdiv2DLocate(subdiv: pCvSubdiv2D; pt: TCvPoint2D32f; edge: pCvSubdiv2DEdge; vertex: pCvSubdiv2DPoint = nil): TCvSubdiv2DPointLocation; cdecl;
external legacy_lib;
procedure cvCalcSubdivVoronoi2D(subdiv: pCvSubdiv2D); cdecl; external legacy_lib;
function cvSubdivDelaunay2DInsert(subdiv: pCvSubdiv2D; pt: TCvPoint2D32f): pCvSubdiv2DPoint; cdecl; external legacy_lib;
function cvCreateGaussianBGModel(first_frame: pIplImage; parameters: pCvGaussBGStatModelParams = nil): pCvBGStatModel; cdecl; external legacy_lib;
function cvUpdateBGStatModel(current_frame: pIplImage; bg_model: pCvBGStatModel; learningRate: double = -1): Integer; cdecl; external legacy_lib;
procedure cvReleaseBGStatModel(Var bg_model: pCvBGStatModel); cdecl; external legacy_lib;
function cvCreateFGDStatModel(first_frame: pIplImage; parameters: pCvFGDStatModelParams = nil): pCvBGStatModel; cdecl; external legacy_lib;
function cvCreateBGCodeBookModel: pCvBGCodeBookModel; cdecl; external legacy_lib;
procedure cvReleaseBGCodeBookModel(model: pCvBGCodeBookModel); cdecl; external legacy_lib;
procedure cvBGCodeBookUpdate(model: pCvBGCodeBookModel; const image: pIplImage; roi: TCvRect { =CV_DEFAULT(cvRect(0,0,0,0)) }; const mask: pCvArr { =0 } );
cdecl; external legacy_lib;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcSubdivVoronoi2D(subdiv: pCvSubdiv2D); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvSubdivDelaunay2DInsert(subdiv: pCvSubdiv2D; pt: TCvPoint2D32f): pCvSubdiv2DPoint; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateGaussianBGModel(first_frame: pIplImage; parameters: pCvGaussBGStatModelParams = nil): pCvBGStatModel; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvUpdateBGStatModel(current_frame: pIplImage; bg_model: pCvBGStatModel; learningRate: double = -1): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseBGStatModel(Var bg_model: pCvBGStatModel); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateFGDStatModel(first_frame: pIplImage; parameters: pCvFGDStatModelParams = nil): pCvBGStatModel; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateBGCodeBookModel: pCvBGCodeBookModel; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseBGCodeBookModel(model: pCvBGCodeBookModel); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvBGCodeBookUpdate(model: pCvBGCodeBookModel; const image: pIplImage; roi: TCvRect { =CV_DEFAULT(cvRect(0,0,0,0)) }; const mask: pCvArr { =0 } ); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvBGCodeBookDiff(const model: pCvBGCodeBookModel; const image: pCvArr; fgmask: pCvArr; roi: TCvRect { = cvRect(0,0,0,0) } ): Integer; cdecl;
external legacy_lib;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvBGCodeBookClearStale(model: pCvBGCodeBookModel; staleThresh: Integer; roi: TCvRect { =cvRect(0,0,0,0) }; const mask: pCvArr = nil); cdecl;
external legacy_lib;
function cvSegmentFGMask(fgmask: pCvArr; poly1Hull0: Integer { =1 }; perimScale: Single { = 4 }; storage: pCvMemStorage { =nil };
offset: TCvPoint { =cvPoint(0,0) } ): pCvSeq; cdecl; external legacy_lib;
procedure cvPyrSegmentation(src: pIplImage; dst: pIplImage; storage: pCvMemStorage;
var comp: pCvSeq; level: Integer; threshold1: double; threshold2: double); cdecl; external legacy_lib;
procedure cvCalcEigenObjects(nObjects: Integer; input: pointer; output: pointer; ioFlags: Integer; ioBufSize: Integer; userData: pointer;
calcLimit: pCvTermCriteria; avg: pIplImage; eigVals: pFloat); cdecl; external legacy_lib;
procedure cvEigenDecomposite(obj: pIplImage; nEigObjs: Integer; eigInput: pointer; ioFlags: Integer; userData: pointer; avg: pIplImage; coeffs: pFloat); cdecl; external legacy_lib;
function cvSegmentImage(const srcarr: pCvArr; dstarr: pCvArr; canny_threshold: double; ffill_threshold: double; storage: pCvMemStorage): pCvSeq; cdecl; external legacy_lib;
procedure cvCalcCovarMatrixEx(nObjects: Integer; input: pointer; ioFlags: Integer; ioBufSize: Integer; buffer: pByte; userData: pointer; avg: pIplImage;
var covarMatrix: Single); cdecl; external legacy_lib;
function cvCalcDecompCoeff(obj: pIplImage; eigObj: pIplImage; avg: pIplImage): double; cdecl; external legacy_lib;
procedure cvEigenProjection(eigInput: pointer; nEigObjs: Integer; ioFlags: Integer; userData: pointer; coeffs: PSingle; avg: pIplImage; proj: pIplImage); cdecl; external legacy_lib;
function icvCreate1DHMM(var this_hmm: pCvEHMM; state_number: Integer; Var num_mix: Integer; obs_size: Integer): Integer; cdecl; external legacy_lib;
function icvRelease1DHMM(var phmm: pCvEHMM): Integer; cdecl; external legacy_lib;
function icvUniform1DSegm(var obs_info: TCv1DObsInfo; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib;
function icvInit1DMixSegm(var obs_info_array: pCv1DObsInfo; num_img: Integer; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib;
function icvEstimate1DHMMStateParams(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib;
function icvEstimate1DObsProb(var obs_info: TCvImgObsInfo; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib;
function icvEstimate1DTransProb(var obs_info_array: pCv1DObsInfo; num_seq: Integer; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib;
function icvViterbi(var obs_info: TCv1DObsInfo; var hmm: TCvEHMM): Single; cdecl; external legacy_lib;
function icv1DMixSegmL2(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib;
function cvCreate2DHMM(Var stateNumber: Integer; Var numMix: Integer; obsSize: Integer): pCvEHMM; cdecl; external legacy_lib;
procedure cvRelease2DHMM(var hmm: pCvEHMM); cdecl; external legacy_lib;
function cvCreateObsInfo(numObs: TCvSize; obsSize: Integer): pCvImgObsInfo; cdecl; external legacy_lib;
procedure cvReleaseObsInfo(var obs_info: pCvImgObsInfo); cdecl; external legacy_lib;
procedure cvImgToObs_DCT(const arr: pCvArr; var obs: Single; dctSize: TCvSize; obsSize: TCvSize; delta: TCvSize); cdecl; external legacy_lib;
procedure cvUniformImgSegm(var obs_info: TCvImgObsInfo; var ehmm: TCvEHMM); cdecl; external legacy_lib;
procedure cvInitMixSegm(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM); cdecl; external legacy_lib;
procedure cvEstimateHMMStateParams(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM); cdecl; external legacy_lib;
procedure cvEstimateTransProb(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM); cdecl; external legacy_lib;
procedure cvEstimateObsProb(var obs_info: TCvImgObsInfo; var hmm: TCvEHMM); cdecl; external legacy_lib;
function cvEViterbi(var obs_info: TCvImgObsInfo; var hmm: TCvEHMM): Single; cdecl; external legacy_lib;
procedure cvMixSegmL2(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM); cdecl; external legacy_lib;
procedure cvCreateHandMask(var hand_points: TCvSeq; var img_mask: TIplImage; var roi: TCvRect); cdecl; external legacy_lib;
procedure cvFindHandRegion(var points: TCvPoint3D32f; count: Integer; var indexs: TCvSeq; var line: Single; size: TCvSize2D32f; flag: Integer;
var center: TCvPoint3D32f; var storage: TCvMemStorage; var numbers: pCvSeq); cdecl; external legacy_lib;
procedure cvFindHandRegionA(var points: TCvPoint3D32f; count: Integer; var indexs: TCvSeq; var line: Single; size: TCvSize2D32f; jc: Integer;
var center: TCvPoint3D32f; var storage: TCvMemStorage; var numbers: pCvSeq); cdecl; external legacy_lib;
procedure cvCalcImageHomography(var line: Single; var center: TCvPoint3D32f; var intrinsic: Single; var homography: Single); cdecl; external legacy_lib;
procedure cvCalcPGH(const contour: pCvSeq; var hist: TCvHistogram); cdecl; external legacy_lib;
function cvFindDominantPoints(contour: pCvSeq; storage: pCvMemStorage; method: Integer = CV_DOMINANT_IPAN; parameter1: double = 0; parameter2: double = 0;
parameter3: double = 0; parameter4: double = 0): pCvSeq; cdecl; external legacy_lib;
procedure cvFindStereoCorrespondence(const leftImage: pCvArr; const rightImage: pCvArr; mode: Integer; dispImage: pCvArr; maxDisparity: Integer;
param1: double = CV_UNDEF_SC_PARAM; param2: double = CV_UNDEF_SC_PARAM; param3: double = CV_UNDEF_SC_PARAM; param4: double = CV_UNDEF_SC_PARAM;
param5: double = CV_UNDEF_SC_PARAM); cdecl; external legacy_lib;
function icvConvertWarpCoordinates(coeffs: TicvConvertWarpCoordinatesCoeff; cameraPoint: pCvPoint2D32f; warpPoint: pCvPoint2D32f; direction: Integer)
: Integer; cdecl; external legacy_lib;
function icvGetSymPoint3D(pointCorner: TCvPoint3D64f; point1: TCvPoint3D64f; point2: TCvPoint3D64f; pointSym2: pCvPoint3D64f): Integer; cdecl; external legacy_lib;
procedure icvGetPieceLength3D(point1: TCvPoint3D64f; point2: TCvPoint3D64f; dist: pdouble); cdecl; external legacy_lib;
function icvCompute3DPoint(alpha: double; betta: double; coeffs: pCvStereoLineCoeff; point: pCvPoint3D64f): Integer; cdecl; external legacy_lib;
function icvCreateConvertMatrVect(rotMatr1: pdouble; transVect1: pdouble; rotMatr2: pdouble; transVect2: pdouble; convRotMatr: pdouble; convTransVect: pdouble)
: Integer; cdecl; external legacy_lib;
function icvConvertPointSystem(M2: TCvPoint3D64f; M1: pCvPoint3D64f; rotMatr: pdouble; transVect: pdouble): Integer; cdecl; external legacy_lib;
function icvComputeCoeffForStereo(stereoCamera: pCvStereoCamera): Integer; cdecl; external legacy_lib;
function icvGetCrossPieceVector(p1_start: TCvPoint2D32f; p1_end: TCvPoint2D32f; v2_start: TCvPoint2D32f; v2_end: TCvPoint2D32f; cross: pCvPoint2D32f)
: Integer; cdecl; external legacy_lib;
function icvGetCrossLineDirect(p1: TCvPoint2D32f; p2: TCvPoint2D32f; a: float; b: float; c: float; cross: pCvPoint2D32f): Integer; cdecl; external legacy_lib;
function icvDefinePointPosition(point1: TCvPoint2D32f; point2: TCvPoint2D32f; point: TCvPoint2D32f): float; cdecl; external legacy_lib;
function icvStereoCalibration(numImages: Integer; nums: PInteger; imageSize: TCvSize; imagePoints1: pCvPoint2D32f; imagePoints2: pCvPoint2D32f;
objectPoints: pCvPoint3D32f; stereoparams: pCvStereoCamera): Integer; cdecl; external legacy_lib;
function icvComputeRestStereoParams(stereoparams: pCvStereoCamera): Integer; cdecl; external legacy_lib;
procedure cvComputePerspectiveMap(const coeffs: TicvConvertWarpCoordinatesCoeff; rectMapX: pCvArr; rectMapY: pCvArr); cdecl; external legacy_lib;
function icvComCoeffForLine(point1: TCvPoint2D64f; point2: TCvPoint2D64f; point3: TCvPoint2D64f; point4: TCvPoint2D64f; camMatr1: pdouble; rotMatr1: pdouble;
transVect1: pdouble; camMatr2: pdouble; rotMatr2: pdouble; transVect2: pdouble; coeffs: pCvStereoLineCoeff; needSwapCameras: PInteger): Integer; cdecl; external legacy_lib;
function icvGetDirectionForPoint(point: TCvPoint2D64f; camMatr: pdouble; direct: pCvPoint3D64f): Integer; cdecl; external legacy_lib;
function icvGetCrossLines(point11: TCvPoint3D64f; point12: TCvPoint3D64f; point21: TCvPoint3D64f; point22: TCvPoint3D64f; midPoint: pCvPoint3D64f)
: Integer; cdecl; external legacy_lib;
function icvComputeStereoLineCoeffs(pointA: TCvPoint3D64f; pointB: TCvPoint3D64f; pointCam1: TCvPoint3D64f; gamma: double; coeffs: pCvStereoLineCoeff)
: Integer; cdecl; external legacy_lib;
function icvGetAngleLine(startPoint: TCvPoint2D64f; imageSize: TCvSize; point1: pCvPoint2D64f; point2: pCvPoint2D64f): Integer; cdecl; external legacy_lib;
procedure icvGetCoefForPiece(p_start: TCvPoint2D64f; p_end: TCvPoint2D64f; a: pdouble; b: pdouble; c: pdouble; result: PInteger); cdecl; external legacy_lib;
procedure icvComputeeInfiniteProject1(rotMatr: pdouble; camMatr1: pdouble; camMatr2: pdouble; point1: TCvPoint2D32f; point2: pCvPoint2D32f); cdecl; external legacy_lib;
procedure icvComputeeInfiniteProject2(rotMatr: pdouble; camMatr1: pdouble; camMatr2: pdouble; point1: pCvPoint2D32f; point2: TCvPoint2D32f); cdecl; external legacy_lib;
procedure icvGetCrossDirectDirect(direct1: pdouble; direct2: pdouble; cross: pCvPoint2D64f; result: PInteger); cdecl; external legacy_lib;
procedure icvGetCrossPieceDirect(p_start: TCvPoint2D64f; p_end: TCvPoint2D64f; a: double; b: double; c: double; cross: pCvPoint2D64f; result: PInteger); cdecl; external legacy_lib;
procedure icvGetCrossPiecePiece(p1_start: TCvPoint2D64f; p1_end: TCvPoint2D64f; p2_start: TCvPoint2D64f; p2_end: TCvPoint2D64f; cross: pCvPoint2D64f;
result: PInteger); cdecl; external legacy_lib;
procedure icvGetPieceLength(point1: TCvPoint2D64f; point2: TCvPoint2D64f; dist: pdouble); cdecl; external legacy_lib;
procedure icvGetCrossRectDirect(imageSize: TCvSize; a: double; b: double; c: double; start: pCvPoint2D64f; end_: pCvPoint2D64f; result: PInteger); cdecl; external legacy_lib;
procedure icvProjectPointToImage(point: TCvPoint3D64f; camMatr: pdouble; rotMatr: pdouble; transVect: pdouble; projPoint: pCvPoint2D64f); cdecl; external legacy_lib;
procedure icvGetQuadsTransform(imageSize: TCvSize; camMatr1: pdouble; rotMatr1: pdouble; transVect1: pdouble; camMatr2: pdouble; rotMatr2: pdouble;
transVect2: pdouble; warpSize: pCvSize; quad1: TicvGetQuadsTransformQuad; quad2: TicvGetQuadsTransformQuad; fundMatr: pdouble; epipole1: pCvPoint3D64f;
epipole2: pCvPoint3D64f); cdecl; external legacy_lib;
procedure icvGetQuadsTransformStruct(stereoCamera: pCvStereoCamera); cdecl; external legacy_lib;
procedure icvComputeStereoParamsForCameras(stereoCamera: pCvStereoCamera); cdecl; external legacy_lib;
procedure icvGetCutPiece(areaLineCoef1: pdouble; areaLineCoef2: pdouble; epipole: TCvPoint2D64f; imageSize: TCvSize; point11: pCvPoint2D64f;
point12: pCvPoint2D64f; point21: pCvPoint2D64f; point22: pCvPoint2D64f; result: PInteger); cdecl; external legacy_lib;
procedure icvGetMiddleAnglePoint(basePoint: TCvPoint2D64f; point1: TCvPoint2D64f; point2: TCvPoint2D64f; midPoint: pCvPoint2D64f); cdecl; external legacy_lib;
procedure icvGetNormalDirect(direct: pdouble; point: TCvPoint2D64f; normDirect: pdouble); cdecl; external legacy_lib;
function icvGetVect(basePoint: TCvPoint2D64f; point1: TCvPoint2D64f; point2: TCvPoint2D64f): double; cdecl; external legacy_lib;
procedure icvProjectPointToDirect(point: TCvPoint2D64f; lineCoeff: pdouble; projectPoint: pCvPoint2D64f); cdecl; external legacy_lib;
procedure icvGetDistanceFromPointToDirect(point: TCvPoint2D64f; lineCoef: pdouble; dist: pdouble); cdecl; external legacy_lib;
function icvCreateIsometricImage(src: pIplImage; dst: pIplImage; desired_depth: Integer; desired_num_channels: Integer): pIplImage; cdecl; external legacy_lib;
procedure cvDeInterlace(const frame: pCvArr; fieldEven: pCvArr; fieldOdd: pCvArr); cdecl; external legacy_lib;
function cvCreateContourTree(const contour: pCvSeq; storage: pCvMemStorage; threshold: double): pCvContourTree; cdecl; external legacy_lib;
function cvContourFromContourTree(const tree: pCvContourTree; storage: pCvMemStorage; criteria: TCvTermCriteria): pCvSeq; cdecl; external legacy_lib;
function cvMatchContourTrees(const tree1: pCvContourTree; const tree2: pCvContourTree; method: Integer; threshold: double): double; cdecl; external legacy_lib;
function cvCalcContoursCorrespondence(const contour1: pCvSeq; const contour2: pCvSeq; storage: pCvMemStorage): pCvSeq; cdecl; external legacy_lib;
function cvMorphContours(const contour1: pCvSeq; const contour2: pCvSeq; corr: pCvSeq; alpha: double; storage: pCvMemStorage): pCvSeq; cdecl; external legacy_lib;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvSegmentFGMask(fgmask: pCvArr; poly1Hull0: Integer { =1 }; perimScale: Single { = 4 }; storage: pCvMemStorage { =nil }; offset: TCvPoint { =cvPoint(0,0) } ): pCvSeq;
cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvPyrSegmentation(src: pIplImage; dst: pIplImage; storage: pCvMemStorage; var comp: pCvSeq; level: Integer; threshold1: double; threshold2: double); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcEigenObjects(nObjects: Integer; input: pointer; output: pointer; ioFlags: Integer; ioBufSize: Integer; userData: pointer; calcLimit: pCvTermCriteria;
avg: pIplImage; eigVals: pFloat); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvEigenDecomposite(obj: pIplImage; nEigObjs: Integer; eigInput: pointer; ioFlags: Integer; userData: pointer; avg: pIplImage; coeffs: pFloat); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvSegmentImage(const srcarr: pCvArr; dstarr: pCvArr; canny_threshold: double; ffill_threshold: double; storage: pCvMemStorage): pCvSeq; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcCovarMatrixEx(nObjects: Integer; input: pointer; ioFlags: Integer; ioBufSize: Integer; buffer: pByte; userData: pointer; avg: pIplImage; var covarMatrix: Single);
cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCalcDecompCoeff(obj: pIplImage; eigObj: pIplImage; avg: pIplImage): double; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvEigenProjection(eigInput: pointer; nEigObjs: Integer; ioFlags: Integer; userData: pointer; coeffs: PSingle; avg: pIplImage; proj: pIplImage); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvCreate1DHMM(var this_hmm: pCvEHMM; state_number: Integer; Var num_mix: Integer; obs_size: Integer): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvRelease1DHMM(var phmm: pCvEHMM): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvUniform1DSegm(var obs_info: TCv1DObsInfo; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvInit1DMixSegm(var obs_info_array: pCv1DObsInfo; num_img: Integer; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvEstimate1DHMMStateParams(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvEstimate1DObsProb(var obs_info: TCvImgObsInfo; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvEstimate1DTransProb(var obs_info_array: pCv1DObsInfo; num_seq: Integer; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvViterbi(var obs_info: TCv1DObsInfo; var hmm: TCvEHMM): Single; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icv1DMixSegmL2(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreate2DHMM(Var stateNumber: Integer; Var numMix: Integer; obsSize: Integer): pCvEHMM; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvRelease2DHMM(var hmm: pCvEHMM); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateObsInfo(numObs: TCvSize; obsSize: Integer): pCvImgObsInfo; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseObsInfo(var obs_info: pCvImgObsInfo); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvImgToObs_DCT(const arr: pCvArr; var obs: Single; dctSize: TCvSize; obsSize: TCvSize; delta: TCvSize); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvUniformImgSegm(var obs_info: TCvImgObsInfo; var ehmm: TCvEHMM); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvInitMixSegm(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvEstimateHMMStateParams(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvEstimateTransProb(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvEstimateObsProb(var obs_info: TCvImgObsInfo; var hmm: TCvEHMM); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvEViterbi(var obs_info: TCvImgObsInfo; var hmm: TCvEHMM): Single; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvMixSegmL2(var obs_info_array: pCvImgObsInfo; num_img: Integer; var hmm: TCvEHMM); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCreateHandMask(var hand_points: TCvSeq; var img_mask: TIplImage; var roi: TCvRect); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindHandRegion(var points: TCvPoint3D32f; count: Integer; var indexs: TCvSeq; var line: Single; size: TCvSize2D32f; flag: Integer; var center: TCvPoint3D32f;
var storage: TCvMemStorage; var numbers: pCvSeq); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindHandRegionA(var points: TCvPoint3D32f; count: Integer; var indexs: TCvSeq; var line: Single; size: TCvSize2D32f; jc: Integer; var center: TCvPoint3D32f;
var storage: TCvMemStorage; var numbers: pCvSeq); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcImageHomography(var line: Single; var center: TCvPoint3D32f; var intrinsic: Single; var homography: Single); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcPGH(const contour: pCvSeq; var hist: TCvHistogram); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindDominantPoints(contour: pCvSeq; storage: pCvMemStorage; method: Integer = CV_DOMINANT_IPAN; parameter1: double = 0; parameter2: double = 0; parameter3: double = 0;
parameter4: double = 0): pCvSeq; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindStereoCorrespondence(const leftImage: pCvArr; const rightImage: pCvArr; mode: Integer; dispImage: pCvArr; maxDisparity: Integer; param1: double = CV_UNDEF_SC_PARAM;
param2: double = CV_UNDEF_SC_PARAM; param3: double = CV_UNDEF_SC_PARAM; param4: double = CV_UNDEF_SC_PARAM; param5: double = CV_UNDEF_SC_PARAM); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvConvertWarpCoordinates(coeffs: TicvConvertWarpCoordinatesCoeff; cameraPoint: pCvPoint2D32f; warpPoint: pCvPoint2D32f; direction: Integer): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvGetSymPoint3D(pointCorner: TCvPoint3D64f; point1: TCvPoint3D64f; point2: TCvPoint3D64f; pointSym2: pCvPoint3D64f): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetPieceLength3D(point1: TCvPoint3D64f; point2: TCvPoint3D64f; dist: pdouble); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvCompute3DPoint(alpha: double; betta: double; coeffs: pCvStereoLineCoeff; point: pCvPoint3D64f): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvCreateConvertMatrVect(rotMatr1: pdouble; transVect1: pdouble; rotMatr2: pdouble; transVect2: pdouble; convRotMatr: pdouble; convTransVect: pdouble): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvConvertPointSystem(M2: TCvPoint3D64f; M1: pCvPoint3D64f; rotMatr: pdouble; transVect: pdouble): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvComputeCoeffForStereo(stereoCamera: pCvStereoCamera): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvGetCrossPieceVector(p1_start: TCvPoint2D32f; p1_end: TCvPoint2D32f; v2_start: TCvPoint2D32f; v2_end: TCvPoint2D32f; cross: pCvPoint2D32f): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvGetCrossLineDirect(p1: TCvPoint2D32f; p2: TCvPoint2D32f; a: float; b: float; c: float; cross: pCvPoint2D32f): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvDefinePointPosition(point1: TCvPoint2D32f; point2: TCvPoint2D32f; point: TCvPoint2D32f): float; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvStereoCalibration(numImages: Integer; nums: PInteger; imageSize: TCvSize; imagePoints1: pCvPoint2D32f; imagePoints2: pCvPoint2D32f; objectPoints: pCvPoint3D32f;
stereoparams: pCvStereoCamera): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvComputeRestStereoParams(stereoparams: pCvStereoCamera): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvComputePerspectiveMap(const coeffs: TicvConvertWarpCoordinatesCoeff; rectMapX: pCvArr; rectMapY: pCvArr); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvComCoeffForLine(point1: TCvPoint2D64f; point2: TCvPoint2D64f; point3: TCvPoint2D64f; point4: TCvPoint2D64f; camMatr1: pdouble; rotMatr1: pdouble; transVect1: pdouble;
camMatr2: pdouble; rotMatr2: pdouble; transVect2: pdouble; coeffs: pCvStereoLineCoeff; needSwapCameras: PInteger): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvGetDirectionForPoint(point: TCvPoint2D64f; camMatr: pdouble; direct: pCvPoint3D64f): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvGetCrossLines(point11: TCvPoint3D64f; point12: TCvPoint3D64f; point21: TCvPoint3D64f; point22: TCvPoint3D64f; midPoint: pCvPoint3D64f): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvComputeStereoLineCoeffs(pointA: TCvPoint3D64f; pointB: TCvPoint3D64f; pointCam1: TCvPoint3D64f; gamma: double; coeffs: pCvStereoLineCoeff): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvGetAngleLine(startPoint: TCvPoint2D64f; imageSize: TCvSize; point1: pCvPoint2D64f; point2: pCvPoint2D64f): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetCoefForPiece(p_start: TCvPoint2D64f; p_end: TCvPoint2D64f; a: pdouble; b: pdouble; c: pdouble; result: PInteger); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvComputeeInfiniteProject1(rotMatr: pdouble; camMatr1: pdouble; camMatr2: pdouble; point1: TCvPoint2D32f; point2: pCvPoint2D32f); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvComputeeInfiniteProject2(rotMatr: pdouble; camMatr1: pdouble; camMatr2: pdouble; point1: pCvPoint2D32f; point2: TCvPoint2D32f); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetCrossDirectDirect(direct1: pdouble; direct2: pdouble; cross: pCvPoint2D64f; result: PInteger); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetCrossPieceDirect(p_start: TCvPoint2D64f; p_end: TCvPoint2D64f; a: double; b: double; c: double; cross: pCvPoint2D64f; result: PInteger); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetCrossPiecePiece(p1_start: TCvPoint2D64f; p1_end: TCvPoint2D64f; p2_start: TCvPoint2D64f; p2_end: TCvPoint2D64f; cross: pCvPoint2D64f; result: PInteger); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetPieceLength(point1: TCvPoint2D64f; point2: TCvPoint2D64f; dist: pdouble); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetCrossRectDirect(imageSize: TCvSize; a: double; b: double; c: double; start: pCvPoint2D64f; end_: pCvPoint2D64f; result: PInteger); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvProjectPointToImage(point: TCvPoint3D64f; camMatr: pdouble; rotMatr: pdouble; transVect: pdouble; projPoint: pCvPoint2D64f); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetQuadsTransform(imageSize: TCvSize; camMatr1: pdouble; rotMatr1: pdouble; transVect1: pdouble; camMatr2: pdouble; rotMatr2: pdouble; transVect2: pdouble;
warpSize: pCvSize; quad1: TicvGetQuadsTransformQuad; quad2: TicvGetQuadsTransformQuad; fundMatr: pdouble; epipole1: pCvPoint3D64f; epipole2: pCvPoint3D64f); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetQuadsTransformStruct(stereoCamera: pCvStereoCamera); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvComputeStereoParamsForCameras(stereoCamera: pCvStereoCamera); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetCutPiece(areaLineCoef1: pdouble; areaLineCoef2: pdouble; epipole: TCvPoint2D64f; imageSize: TCvSize; point11: pCvPoint2D64f; point12: pCvPoint2D64f;
point21: pCvPoint2D64f; point22: pCvPoint2D64f; result: PInteger); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetMiddleAnglePoint(basePoint: TCvPoint2D64f; point1: TCvPoint2D64f; point2: TCvPoint2D64f; midPoint: pCvPoint2D64f); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetNormalDirect(direct: pdouble; point: TCvPoint2D64f; normDirect: pdouble); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvGetVect(basePoint: TCvPoint2D64f; point1: TCvPoint2D64f; point2: TCvPoint2D64f): double; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvProjectPointToDirect(point: TCvPoint2D64f; lineCoeff: pdouble; projectPoint: pCvPoint2D64f); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvGetDistanceFromPointToDirect(point: TCvPoint2D64f; lineCoef: pdouble; dist: pdouble); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvCreateIsometricImage(src: pIplImage; dst: pIplImage; desired_depth: Integer; desired_num_channels: Integer): pIplImage; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvDeInterlace(const frame: pCvArr; fieldEven: pCvArr; fieldOdd: pCvArr); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateContourTree(const contour: pCvSeq; storage: pCvMemStorage; threshold: double): pCvContourTree; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvContourFromContourTree(const tree: pCvContourTree; storage: pCvMemStorage; criteria: TCvTermCriteria): pCvSeq; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvMatchContourTrees(const tree1: pCvContourTree; const tree2: pCvContourTree; method: Integer; threshold: double): double; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCalcContoursCorrespondence(const contour1: pCvSeq; const contour2: pCvSeq; storage: pCvMemStorage): pCvSeq; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvMorphContours(const contour1: pCvSeq; const contour2: pCvSeq; corr: pCvSeq; alpha: double; storage: pCvMemStorage): pCvSeq; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateGLCM(const srcImage: pIplImage; stepMagnitude: Integer; const stepDirections: PInteger = nil; numStepDirections: Integer = 0;
optimizationType: Integer = CV_GLCM_OPTIMIZATION_NONE): pCvGLCM; cdecl; external legacy_lib;
procedure cvReleaseGLCM(var GLCM: pCvGLCM; flag: Integer = CV_GLCM_ALL); cdecl; external legacy_lib;
procedure cvCreateGLCMDescriptors(destGLCM: pCvGLCM; descriptorOptimizationType: Integer = CV_GLCMDESC_OPTIMIZATION_ALLOWDOUBLENEST); cdecl; external legacy_lib;
function cvGetGLCMDescriptor(GLCM: pCvGLCM; step: Integer; descriptor: Integer): double; cdecl; external legacy_lib;
procedure cvGetGLCMDescriptorStatistics(GLCM: pCvGLCM; descriptor: Integer; average: pdouble; standardDeviation: pdouble); cdecl; external legacy_lib;
function cvCreateGLCMImage(GLCM: pCvGLCM; step: Integer): pIplImage; cdecl; external legacy_lib;
function cvInitFaceTracker(pFaceTracking: pCvFaceTracker; const imgGray: pIplImage; pRects: pCvRect; nRects: Integer): pCvFaceTracker; cdecl; external legacy_lib;
function cvTrackFace(pFaceTracker: pCvFaceTracker; imgGray: pIplImage; pRects: pCvRect; nRects: Integer; ptRotate: pCvPoint; dbAngleRotate: pdouble)
: Integer; cdecl; external legacy_lib;
procedure cvReleaseFaceTracker(var ppFaceTracker: pCvFaceTracker); cdecl; external legacy_lib;
function cvFindFace(image: pIplImage; storage: pCvMemStorage): pCvSeq; cdecl; external legacy_lib;
function cvPostBoostingFindFace(image: pIplImage; storage: pCvMemStorage): pCvSeq; cdecl; external legacy_lib;
function cv3dTrackerCalibrateCameras(num_cameras: Integer; camera_intrinsics: pCv3dTrackerCameraIntrinsics; etalon_size: TCvSize; square_size: Single;
var samples: pIplImage; camera_info: pCv3dTrackerCameraInfo): TCvBool; cdecl; external legacy_lib;
optimizationType: Integer = CV_GLCM_OPTIMIZATION_NONE): pCvGLCM; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseGLCM(var GLCM: pCvGLCM; flag: Integer = CV_GLCM_ALL); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCreateGLCMDescriptors(destGLCM: pCvGLCM; descriptorOptimizationType: Integer = CV_GLCMDESC_OPTIMIZATION_ALLOWDOUBLENEST); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvGetGLCMDescriptor(GLCM: pCvGLCM; step: Integer; descriptor: Integer): double; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvGetGLCMDescriptorStatistics(GLCM: pCvGLCM; descriptor: Integer; average: pdouble; standardDeviation: pdouble); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateGLCMImage(GLCM: pCvGLCM; step: Integer): pIplImage; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvInitFaceTracker(pFaceTracking: pCvFaceTracker; const imgGray: pIplImage; pRects: pCvRect; nRects: Integer): pCvFaceTracker; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvTrackFace(pFaceTracker: pCvFaceTracker; imgGray: pIplImage; pRects: pCvRect; nRects: Integer; ptRotate: pCvPoint; dbAngleRotate: pdouble): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseFaceTracker(var ppFaceTracker: pCvFaceTracker); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindFace(image: pIplImage; storage: pCvMemStorage): pCvSeq; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvPostBoostingFindFace(image: pIplImage; storage: pCvMemStorage): pCvSeq; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cv3dTrackerCalibrateCameras(num_cameras: Integer; camera_intrinsics: pCv3dTrackerCameraIntrinsics; etalon_size: TCvSize; square_size: Single; var samples: pIplImage;
camera_info: pCv3dTrackerCameraInfo): TCvBool; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cv3dTrackerLocateObjects(num_cameras: Integer; num_objects: Integer; camera_info: pCv3dTrackerCameraInfo; tracking_info: pCv3dTracker2dTrackedObject;
tracked_objects: pCv3dTrackerTrackedObject): Integer; cdecl; external legacy_lib;
function cvVoronoiDiagramFromContour(ContourSeq: pCvSeq; var VoronoiDiagram: pCvVoronoiDiagram2D; VoronoiStorage: pCvMemStorage;
contour_type: TCvLeeParameters = CV_LEE_INT; contour_orientation: Integer = -1; attempt_number: Integer = 10): Integer; cdecl; external legacy_lib;
tracked_objects: pCv3dTrackerTrackedObject): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvVoronoiDiagramFromContour(ContourSeq: pCvSeq; var VoronoiDiagram: pCvVoronoiDiagram2D; VoronoiStorage: pCvMemStorage; contour_type: TCvLeeParameters = CV_LEE_INT;
contour_orientation: Integer = -1; attempt_number: Integer = 10): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvVoronoiDiagramFromImage(pImage: pIplImage; var ContourSeq: pCvSeq; var VoronoiDiagram: pCvVoronoiDiagram2D; VoronoiStorage: pCvMemStorage;
regularization_method: TCvLeeParameters = CV_LEE_NON; approx_precision: float = -1 { CV_LEE_AUTO } ): Integer; cdecl; external legacy_lib;
procedure cvReleaseVoronoiStorage(VoronoiDiagram: pCvVoronoiDiagram2D; var pVoronoiStorage: pCvMemStorage); cdecl; external legacy_lib;
function cvLinearContorModelFromVoronoiDiagram(VoronoiDiagram: pCvVoronoiDiagram2D; maxWidth: float): pCvGraph; cdecl; external legacy_lib;
function cvReleaseLinearContorModelStorage(var Graph: pCvGraph): Integer; cdecl; external legacy_lib;
procedure cvInitPerspectiveTransform(size: TCvSize; const vertex: TcvInitPerspectiveTransformVertex; matrix: TcvInitPerspectiveTransformMatrix;
rectMap: pCvArr); cdecl; external legacy_lib;
procedure cvMakeScanlines(const matrix: pCvMatrix3; img_size: TCvSize; scanlines1: PInteger; scanlines2: PInteger; lengths1: PInteger; lengths2: PInteger;
line_count: PInteger); cdecl; external legacy_lib;
procedure cvPreWarpImage(line_count: Integer; img: pIplImage; dst: puchar; dst_nums: PInteger; scanlines: PInteger); cdecl; external legacy_lib;
procedure cvFindRuns(line_count: Integer; prewarp1: puchar; prewarp2: puchar; line_lengths1: PInteger; line_lengths2: PInteger; runs1: PInteger;
runs2: PInteger; num_runs1: PInteger; num_runs2: PInteger); cdecl; external legacy_lib;
regularization_method: TCvLeeParameters = CV_LEE_NON; approx_precision: float = -1 { CV_LEE_AUTO } ): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseVoronoiStorage(VoronoiDiagram: pCvVoronoiDiagram2D; var pVoronoiStorage: pCvMemStorage); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvLinearContorModelFromVoronoiDiagram(VoronoiDiagram: pCvVoronoiDiagram2D; maxWidth: float): pCvGraph; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvReleaseLinearContorModelStorage(var Graph: pCvGraph): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvInitPerspectiveTransform(size: TCvSize; const vertex: TcvInitPerspectiveTransformVertex; matrix: TcvInitPerspectiveTransformMatrix; rectMap: pCvArr); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvMakeScanlines(const matrix: pCvMatrix3; img_size: TCvSize; scanlines1: PInteger; scanlines2: PInteger; lengths1: PInteger; lengths2: PInteger; line_count: PInteger);
cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvPreWarpImage(line_count: Integer; img: pIplImage; dst: puchar; dst_nums: PInteger; scanlines: PInteger); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindRuns(line_count: Integer; prewarp1: puchar; prewarp2: puchar; line_lengths1: PInteger; line_lengths2: PInteger; runs1: PInteger; runs2: PInteger;
num_runs1: PInteger; num_runs2: PInteger); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvDynamicCorrespondMulti(line_count: Integer; first: PInteger; first_runs: PInteger; second: PInteger; second_runs: PInteger; first_corr: PInteger;
second_corr: PInteger); cdecl; external legacy_lib;
procedure cvMakeAlphaScanlines(scanlines1: PInteger; scanlines2: PInteger; scanlinesA: PInteger; lengths: PInteger; line_count: Integer; alpha: float); cdecl; external legacy_lib;
procedure cvMorphEpilinesMulti(line_count: Integer; first_pix: puchar; first_num: PInteger; second_pix: puchar; second_num: PInteger; dst_pix: puchar;
dst_num: PInteger; alpha: float; first: PInteger; first_runs: PInteger; second: PInteger; second_runs: PInteger; first_corr: PInteger;
second_corr: PInteger); cdecl; external legacy_lib;
procedure cvPostWarpImage(line_count: Integer; src: puchar; src_nums: PInteger; img: pIplImage; scanlines: PInteger); cdecl; external legacy_lib;
procedure cvDeleteMoire(img: pIplImage); cdecl; external legacy_lib;
function cvCreateConDensation(dynam_params: Integer; measure_params: Integer; sample_count: Integer): pCvConDensation; cdecl; external legacy_lib;
procedure cvReleaseConDensation(var condens: pCvConDensation); cdecl; external legacy_lib;
procedure cvConDensUpdateByTime(condens: pCvConDensation); cdecl; external legacy_lib;
procedure cvConDensInitSampleSet(condens: pCvConDensation; lower_bound: pCvMat; upper_bound: pCvMat); cdecl; external legacy_lib;
procedure cvClearSubdivVoronoi2D(subdiv: pCvSubdiv2D); cdecl; external legacy_lib;
function cvFindNearestPoint2D(subdiv: pCvSubdiv2D; pt: TCvPoint2D32f): pCvSubdiv2DPoint; cdecl; external legacy_lib;
procedure icvDrawMosaic(subdiv: pCvSubdiv2D; src: pIplImage; dst: pIplImage); cdecl; external legacy_lib;
function icvSubdiv2DCheck(subdiv: pCvSubdiv2D): Integer; cdecl; external legacy_lib;
function cvCreateKDTree(desc: pCvMat): pCvFeatureTree; cdecl; external legacy_lib;
function cvCreateSpillTree(const raw_data: pCvMat; const naive: Integer = 50; const rho: double = 0.7; const tau: double = 0.1): pCvFeatureTree; cdecl; external legacy_lib;
procedure cvReleaseFeatureTree(tr: pCvFeatureTree); cdecl; external legacy_lib;
procedure cvFindFeatures(tr: pCvFeatureTree; const query_points: pCvMat; indices: pCvMat; dist: pCvMat; K: Integer; emax: Integer = 20); cdecl; external legacy_lib;
function cvFindFeaturesBoxed(tr: pCvFeatureTree; bounds_min: pCvMat; bounds_max: pCvMat; out_indices: pCvMat): Integer; cdecl; external legacy_lib;
function cvCreateLSH(ops: pCvLSHOperations; d: Integer; L: Integer { =10 }; K: Integer { =10 }; type_: Integer { =CV_64FC1 }; r: double { =4 };
seed: int64 { =-1 } ): pCvLSH; cdecl; external legacy_lib;
function cvCreateMemoryLSH(d: Integer; n: Integer; L: Integer { =10 }; K: Integer { =10 }; type_: Integer { =CV_64FC1 }; r: double { =4 }; seed: int64 { =-1 } )
: pCvLSH; cdecl; external legacy_lib;
procedure cvReleaseLSH(lsh: pCvLSH); cdecl; external legacy_lib;
function LSHSize(lsh: pCvLSH): uint; cdecl; external legacy_lib;
procedure cvLSHAdd(lsh: pCvLSH; const data: pCvMat; indices: pCvMat = nil); cdecl; external legacy_lib;
procedure cvLSHRemove(lsh: pCvLSH; const indices: pCvMat); cdecl; external legacy_lib;
procedure cvLSHQuery(lsh: pCvLSH; const query_points: pCvMat; indices: pCvMat; dist: pCvMat; K: Integer; emax: Integer); cdecl; external legacy_lib;
procedure cvCalcOpticalFlowLK(const prev: pCvArr; const curr: pCvArr; win_size: TCvSize; velx: pCvArr; vely: pCvArr); cdecl; external legacy_lib;
procedure cvCalcOpticalFlowBM(const prev: pCvArr; const curr: pCvArr; block_size: TCvSize; shift_size: TCvSize; max_range: TCvSize; use_previous: Integer;
velx: pCvArr; vely: pCvArr); cdecl; external legacy_lib;
procedure cvCalcOpticalFlowHS(const prev: pCvArr; const curr: pCvArr; use_previous: Integer; velx: pCvArr; vely: pCvArr; lambda: double;
criteria: TCvTermCriteria); cdecl; external legacy_lib;
procedure cvRefineForegroundMaskBySegm(segments: pCvSeq; bg_model: pCvBGStatModel); cdecl; external legacy_lib;
function cvChangeDetection(prev_frame: pIplImage; curr_frame: pIplImage; change_mask: pIplImage): Integer; cdecl; external legacy_lib;
second_corr: PInteger); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvMakeAlphaScanlines(scanlines1: PInteger; scanlines2: PInteger; scanlinesA: PInteger; lengths: PInteger; line_count: Integer; alpha: float); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvMorphEpilinesMulti(line_count: Integer; first_pix: puchar; first_num: PInteger; second_pix: puchar; second_num: PInteger; dst_pix: puchar; dst_num: PInteger;
alpha: float; first: PInteger; first_runs: PInteger; second: PInteger; second_runs: PInteger; first_corr: PInteger; second_corr: PInteger); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvPostWarpImage(line_count: Integer; src: puchar; src_nums: PInteger; img: pIplImage; scanlines: PInteger); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvDeleteMoire(img: pIplImage); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateConDensation(dynam_params: Integer; measure_params: Integer; sample_count: Integer): pCvConDensation; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseConDensation(var condens: pCvConDensation); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvConDensUpdateByTime(condens: pCvConDensation); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvConDensInitSampleSet(condens: pCvConDensation; lower_bound: pCvMat; upper_bound: pCvMat); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvClearSubdivVoronoi2D(subdiv: pCvSubdiv2D); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindNearestPoint2D(subdiv: pCvSubdiv2D; pt: TCvPoint2D32f): pCvSubdiv2DPoint; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure icvDrawMosaic(subdiv: pCvSubdiv2D; src: pIplImage; dst: pIplImage); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function icvSubdiv2DCheck(subdiv: pCvSubdiv2D): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateKDTree(desc: pCvMat): pCvFeatureTree; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateSpillTree(const raw_data: pCvMat; const naive: Integer = 50; const rho: double = 0.7; const tau: double = 0.1): pCvFeatureTree; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseFeatureTree(tr: pCvFeatureTree); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvFindFeatures(tr: pCvFeatureTree; const query_points: pCvMat; indices: pCvMat; dist: pCvMat; K: Integer; emax: Integer = 20); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvFindFeaturesBoxed(tr: pCvFeatureTree; bounds_min: pCvMat; bounds_max: pCvMat; out_indices: pCvMat): Integer; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateLSH(ops: pCvLSHOperations; d: Integer; L: Integer { =10 }; K: Integer { =10 }; type_: Integer { =CV_64FC1 }; r: double { =4 }; seed: int64 { =-1 } ): pCvLSH;
cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateMemoryLSH(d: Integer; n: Integer; L: Integer { =10 }; K: Integer { =10 }; type_: Integer { =CV_64FC1 }; r: double { =4 }; seed: int64 { =-1 } ): pCvLSH; cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseLSH(lsh: pCvLSH); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function LSHSize(lsh: pCvLSH): uint; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvLSHAdd(lsh: pCvLSH; const data: pCvMat; indices: pCvMat = nil); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvLSHRemove(lsh: pCvLSH; const indices: pCvMat); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvLSHQuery(lsh: pCvLSH; const query_points: pCvMat; indices: pCvMat; dist: pCvMat; K: Integer; emax: Integer); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcOpticalFlowLK(const prev: pCvArr; const curr: pCvArr; win_size: TCvSize; velx: pCvArr; vely: pCvArr); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcOpticalFlowBM(const prev: pCvArr; const curr: pCvArr; block_size: TCvSize; shift_size: TCvSize; max_range: TCvSize; use_previous: Integer; velx: pCvArr;
vely: pCvArr); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcOpticalFlowHS(const prev: pCvArr; const curr: pCvArr; use_previous: Integer; velx: pCvArr; vely: pCvArr; lambda: double; criteria: TCvTermCriteria); cdecl;
external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvRefineForegroundMaskBySegm(segments: pCvSeq; bg_model: pCvBGStatModel); cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvChangeDetection(prev_frame: pIplImage; curr_frame: pIplImage; change_mask: pIplImage): Integer; cdecl; external legacy_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
end.

View File

@ -42,19 +42,19 @@ unit ocv.lib;
interface
const
{$IFDEF DelphiOCVVersion_29}
// {$IFDEF DelphiOCVVersion_29}
CV_VERSION_EPOCH = '2';
CV_VERSION_MAJOR = '4';
CV_VERSION_MINOR = '13';
CV_VERSION_REVISION = '3';
{$ELSE}
{$IFDEF DelphiOCVVersion_30}
CV_VERSION_EPOCH = '3';
CV_VERSION_MAJOR = '0';
CV_VERSION_MINOR = '0';
CV_VERSION_REVISION = '0';
{$ENDIF}
{$ENDIF}
CV_VERSION_REVISION = '6';
// {$ELSE}
// {$IFDEF DelphiOCVVersion_30}
// CV_VERSION_EPOCH = '3';
// CV_VERSION_MAJOR = '0';
// CV_VERSION_MINOR = '0';
// CV_VERSION_REVISION = '0';
// {$ENDIF}
// {$ENDIF}
CV_VERSION = CV_VERSION_EPOCH + '.' + CV_VERSION_MAJOR + '.' + CV_VERSION_MINOR + '.' + CV_VERSION_REVISION;
// * old style version constants*/
@ -312,112 +312,7 @@ opencv_contrib_lib = {$IFDEF MSWINDOWS}
//
// -------------------------------
//
{$IFDEF SAFELOADLIB}
function ocvLoadLibrary(const Name: String): Cardinal;
function ocvFreeLibrary(const LibHandle: Cardinal; const Remove: Boolean = true): Boolean;
function ocvGetProcAddress(const ProcName: String; const LibHandle: Cardinal = 0; const Check: Boolean = true): Pointer;
procedure ocvErrorMessage(const ErrorText: String);
{$ENDIF}
implementation
{$IFDEF SAFELOADLIB}
Uses
Winapi.Windows,
System.Generics.Collections,
ocv.utils;
procedure ocvErrorMessage(const ErrorText: String);
begin
if IsConsole then
begin
Writeln(ErrorText);
Writeln('Press ENTER for exit');
Readln;
end
else
MessageBox(0, LPCWSTR(ErrorText), 'Error', MB_OK);
Halt(1);
end;
{$IFDEF USE_STUB_FOR_MISS_FUNC}
procedure STUB_PROC;
begin
ocvErrorMessage('STUB: Call missing functions');
end;
{$ENDIF}
Type
TOCVLibHandles = TDictionary<String, Cardinal>;
Var
OCVLibHandles: TOCVLibHandles;
function ocvLoadLibrary(const Name: String): Cardinal;
begin
if not OCVLibHandles.TryGetValue(Name, Result) then
begin
{$R-}
Result := LoadLibrary(LPCWSTR(@Name[1]));
{$R+}
if Result = 0 then
ocvErrorMessage('Can not load DLL: ' + Name);
OCVLibHandles.Add(Name, Result);
end;
end;
function ocvFreeLibrary(const LibHandle: Cardinal; const Remove: Boolean): Boolean;
Var
P: TPair<String, Cardinal>;
begin
if LibHandle = 0 then
Result := False
else
begin
Result := FreeLibrary(LibHandle);
if Remove and OCVLibHandles.ContainsValue(LibHandle) then
for P in OCVLibHandles do
if P.Value = LibHandle then
begin
OCVLibHandles.Remove(P.Key);
Break;
end;
end;
end;
function ocvGetProcAddress(const ProcName: String; const LibHandle: Cardinal; const Check: Boolean): Pointer;
begin
if LibHandle = 0 then
Result := nil
else
Result := GetProcAddress(LibHandle, c_str(ProcName));
if not Assigned(Result) then
{$IFDEF USE_STUB_FOR_MISS_FUNC}
Result := @STUB_PROC;
{$ELSE}
ocvErrorMessage('Can not load procedure or function: ' + ProcName);
{$ENDIF}
end;
procedure ocvFreeLibraries;
Var
P: TPair<String, Cardinal>;
begin
for P in OCVLibHandles do
ocvFreeLibrary(P.Value, False);
OCVLibHandles.Clear;
end;
initialization
OCVLibHandles := TOCVLibHandles.Create;
finalization
ocvFreeLibraries;
OCVLibHandles.Free;
{$ENDIF}
end.

View File

@ -47,25 +47,21 @@
*)
{$I OpenCV.inc}
//
unit ocv.nonfree;
interface
{$IFNDEF DelphiOCVVersion_30}
function initModule_nonfree(): ByteBool; cdecl;
{$ENDIF}
implementation
uses ocv.lib;
{$IFNDEF DelphiOCVVersion_30}
//function initModule_nonfree; external nonfree_lib index 895;
function initModule_nonfree(): ByteBool; cdecl; external nonfree_lib name '?initModule_nonfree@cv@@YA_NXZ';
function initModule_nonfree(): ByteBool; cdecl; external nonfree_lib name '?initModule_nonfree@cv@@YA_NXZ' {$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
initialization
initModule_nonfree;
{$ENDIF}
end.

View File

@ -144,27 +144,13 @@ Type
// It is obsolete: convert your cascade to xml and use cvLoad instead
// CVAPI(CvHaarClassifierCascade*) cvLoadHaarClassifierCascade(
// const char* directory, CvSize orig_window_size);
{$IFDEF SAFELOADLIB}
type
TcvLoadHaarClassifierCascade = function(const directory: PAnsiChar; orig_window_size: TCvSize): pCvHaarClassifierCascade; cdecl;
var
cvLoadHaarClassifierCascade: TcvLoadHaarClassifierCascade;
{$ELSE}
function cvLoadHaarClassifierCascade(const directory: PAnsiChar; orig_window_size: TCvSize): pCvHaarClassifierCascade; cdecl;
{$ENDIF}
// CVAPI(void) cvReleaseHaarClassifierCascade( CvHaarClassifierCascade** cascade );
{$IFDEF SAFELOADLIB}
type
TcvReleaseHaarClassifierCascade = procedure(Var cascade: pCvHaarClassifierCascade); cdecl;
var
cvReleaseHaarClassifierCascade: TcvReleaseHaarClassifierCascade;
{$ELSE}
procedure cvReleaseHaarClassifierCascade(Var cascade: pCvHaarClassifierCascade); cdecl;
{$ENDIF}
Const
CV_HAAR_DO_CANNY_PRUNING = 1;
@ -178,20 +164,11 @@ Const
// int min_neighbors CV_DEFAULT(3), int flags CV_DEFAULT(0),
// CvSize min_size CV_DEFAULT(cvSize(0,0)), CvSize max_size CV_DEFAULT(cvSize(0,0)));
{$IFDEF SAFELOADLIB}
type
TcvHaarDetectObjects = function(const image: pCvArr; cascade: pCvHaarClassifierCascade; storage: pCvMemStorage; scale_factor: Double { 1.1 };
min_neighbors: Integer { 3 }; flags: Integer { 0 }; min_size: TCvSize { CV_DEFAULT(cvSize(0,0)) }; max_size: TCvSize { CV_DEFAULT(cvSize(0,0)) } )
: pCvSeq; cdecl;
var
cvHaarDetectObjects: TcvHaarDetectObjects;
{$ELSE}
function cvHaarDetectObjects(const image: pCvArr; cascade: pCvHaarClassifierCascade; storage: pCvMemStorage; scale_factor: Double { 1.1 };
min_neighbors: Integer { 3 }; flags: Integer { 0 }; min_size: TCvSize { CV_DEFAULT(cvSize(0,0)) }; max_size: TCvSize { CV_DEFAULT(cvSize(0,0)) } )
: pCvSeq; cdecl;
{$ENDIF}
(*
sets images for haar classifier cascade
@ -199,34 +176,19 @@ function cvHaarDetectObjects(const image: pCvArr; cascade: pCvHaarClassifierCasc
const CvArr* sum, const CvArr* sqsum,
const CvArr* tilted_sum, double scale );
*)
{$IFDEF SAFELOADLIB}
type
TcvSetImagesForHaarClassifierCascade = procedure(cascade: pCvHaarClassifierCascade; const sum: pCvArr; const sqsum: pCvArr;
const tilted_sum: pCvArr; scale: Double); cdecl;
var
cvSetImagesForHaarClassifierCascade: TcvSetImagesForHaarClassifierCascade;
{$ELSE}
procedure cvSetImagesForHaarClassifierCascade(cascade: pCvHaarClassifierCascade; const sum: pCvArr; const sqsum: pCvArr; const tilted_sum: pCvArr;
scale: Double); cdecl;
{$ENDIF}
(*
runs the cascade on the specified window
CVAPI(int) cvRunHaarClassifierCascade( const CvHaarClassifierCascade* cascade,
CvPoint pt, int start_stage CV_DEFAULT(0));
*)
{$IFDEF SAFELOADLIB}
type
TcvRunHaarClassifierCascade = function(const cascade: pCvHaarClassifierCascade; pt: TCvPoint; start_stage: Integer = 0): Integer; cdecl;
var
cvRunHaarClassifierCascade: TcvRunHaarClassifierCascade;
{$ELSE}
function cvRunHaarClassifierCascade(const cascade: pCvHaarClassifierCascade; pt: TCvPoint; start_stage: Integer = 0): Integer; cdecl;
{$ENDIF}
// ****************************************************************************************
// * Latent SVM Object Detection functions *
// ****************************************************************************************
@ -316,16 +278,9 @@ Type
// trained Latent SVM detector in internal representation
// CVAPI(CvLatentSvmDetector*) cvLoadLatentSvmDetector(const char* filename);
{$IFDEF SAFELOADLIB}
type
TcvLoadLatentSvmDetector = function(const filename: pCVChar): pCvLatentSvmDetector; cdecl;
var
cvLoadLatentSvmDetector: TcvLoadLatentSvmDetector;
{$ELSE}
function cvLoadLatentSvmDetector(const filename: pCVChar): pCvLatentSvmDetector; cdecl;
{$ENDIF}
(*
release memory allocated for CvLatentSvmDetector structure
@ -337,16 +292,9 @@ function cvLoadLatentSvmDetector(const filename: pCVChar): pCvLatentSvmDetector;
CVAPI(void) cvReleaseLatentSvmDetector(CvLatentSvmDetector** detector);
*)
{$IFDEF SAFELOADLIB}
type
TcvReleaseLatentSvmDetector = procedure(Var detector: pCvLatentSvmDetector); cdecl;
var
cvReleaseLatentSvmDetector: TcvReleaseLatentSvmDetector;
{$ELSE}
procedure cvReleaseLatentSvmDetector(Var detector: pCvLatentSvmDetector); cdecl;
{$ENDIF}
(*
find rectangular regions in the given image that are likely
to contain objects and corresponding confidence levels
@ -372,18 +320,10 @@ procedure cvReleaseLatentSvmDetector(Var detector: pCvLatentSvmDetector); cdecl;
float overlap_threshold CV_DEFAULT(0.5f),
int numThreads CV_DEFAULT(-1));
*)
{$IFDEF SAFELOADLIB}
type
TcvLatentSvmDetectObjects = function(image: pIplImage; detector: pCvLatentSvmDetector; storage: pCvMemStorage; overlap_threshold: single = 0.5;
numThreads: Integer = -1): pCvSeq; cdecl;
var
cvLatentSvmDetectObjects: TcvLatentSvmDetectObjects;
{$ELSE}
function cvLatentSvmDetectObjects(image: pIplImage; detector: pCvLatentSvmDetector; storage: pCvMemStorage; overlap_threshold: single = 0.5;
numThreads: Integer = -1): pCvSeq; cdecl;
{$ENDIF}
(*
CV_EXPORTS CvSeq* cvHaarDetectObjectsForROC( const CvArr* image,
CvHaarClassifierCascade* cascade, CvMemStorage* storage,
@ -411,47 +351,22 @@ type
corners: PCvMat;
end;
{$IF DEFINED(SAFELOADLIB) AND DEFINED(DEBUG)}
procedure Init_opencv_objdetect_lib;
{$IFEND}
implementation
uses ocv.lib;
{$IFDEF SAFELOADLIB}
Var
objdetectDLL: Cardinal;
procedure Init_opencv_objdetect_lib;
begin
objdetectDLL := ocvLoadLibrary(objdetect_lib);
Assert(objdetectDLL <> 0, 'Can not init ' + objdetect_lib);
cvLatentSvmDetectObjects := ocvGetProcAddress('cvLatentSvmDetectObjects', objdetectDLL);
cvLoadLatentSvmDetector := ocvGetProcAddress('cvLoadLatentSvmDetector', objdetectDLL);
cvReleaseLatentSvmDetector := ocvGetProcAddress('cvReleaseLatentSvmDetector', objdetectDLL);
cvHaarDetectObjects := ocvGetProcAddress('cvHaarDetectObjects', objdetectDLL);
cvLoadHaarClassifierCascade := ocvGetProcAddress('cvLoadHaarClassifierCascade', objdetectDLL);
cvReleaseHaarClassifierCascade := ocvGetProcAddress('cvReleaseHaarClassifierCascade', objdetectDLL);
cvSetImagesForHaarClassifierCascade := ocvGetProcAddress('cvSetImagesForHaarClassifierCascade', objdetectDLL);
cvRunHaarClassifierCascade := ocvGetProcAddress('cvRunHaarClassifierCascade', objdetectDLL);
end;
{$ELSE}
function cvLatentSvmDetectObjects(image: pIplImage; detector: pCvLatentSvmDetector; storage: pCvMemStorage; overlap_threshold: single = 0.5;
numThreads: Integer = -1): pCvSeq; cdecl; external objdetect_lib;
function cvLoadLatentSvmDetector(const filename: pCVChar): pCvLatentSvmDetector; cdecl; external objdetect_lib;
procedure cvReleaseLatentSvmDetector(Var detector: pCvLatentSvmDetector); cdecl; external objdetect_lib;
numThreads: Integer = -1): pCvSeq; cdecl; external objdetect_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvLoadLatentSvmDetector(const filename: pCVChar): pCvLatentSvmDetector; cdecl; external objdetect_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseLatentSvmDetector(Var detector: pCvLatentSvmDetector); cdecl; external objdetect_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvHaarDetectObjects(const image: pCvArr; cascade: pCvHaarClassifierCascade; storage: pCvMemStorage; scale_factor: Double { 1.1 };
min_neighbors: Integer { 3 }; flags: Integer { 0 }; min_size: TCvSize { CV_DEFAULT(cvSize(0,0)) }; max_size: TCvSize { CV_DEFAULT(cvSize(0,0)) } )
: pCvSeq; cdecl; external objdetect_lib;
function cvLoadHaarClassifierCascade(const directory: PAnsiChar; orig_window_size: TCvSize): pCvHaarClassifierCascade; cdecl; external objdetect_lib;
procedure cvReleaseHaarClassifierCascade(Var cascade: pCvHaarClassifierCascade); cdecl; external objdetect_lib;
: pCvSeq; cdecl; external objdetect_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvLoadHaarClassifierCascade(const directory: PAnsiChar; orig_window_size: TCvSize): pCvHaarClassifierCascade; cdecl; external objdetect_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseHaarClassifierCascade(Var cascade: pCvHaarClassifierCascade); cdecl; external objdetect_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvSetImagesForHaarClassifierCascade(cascade: pCvHaarClassifierCascade; const sum: pCvArr; const sqsum: pCvArr; const tilted_sum: pCvArr;
scale: Double); cdecl; external objdetect_lib;
function cvRunHaarClassifierCascade(const cascade: pCvHaarClassifierCascade; pt: TCvPoint; start_stage: Integer = 0): Integer; cdecl; external objdetect_lib;
{$ENDIF}
scale: Double); cdecl; external objdetect_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvRunHaarClassifierCascade(const cascade: pCvHaarClassifierCascade; pt: TCvPoint; start_stage: Integer = 0): Integer; cdecl; external objdetect_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
end.

View File

@ -67,43 +67,13 @@ const
CvArr* dst, double inpaintRange, int flags );
*)
{$IFDEF SAFELOADLIB}
Type
TcvInpaint = procedure(const src: pCvArr; const inpaint_mask: pCvArr; dst: pCvArr; inpaintRange: double; flags: Integer); cdecl;
Var
cvInpaint: TcvInpaint = nil;
{$ELSE}
procedure cvInpaint(const src: pCvArr; const inpaint_mask: pCvArr; dst: pCvArr; inpaintRange: double; flags: Integer); cdecl;
{$ENDIF}
{$IF DEFINED(SAFELOADLIB) AND DEFINED(DEBUG)}
procedure Init_opencv_photo_lib;
{$ENDIF}
implementation
uses ocv.lib;
{$IFDEF SAFELOADLIB}
Var
PhotoDLL: Cardinal;
procedure Init_opencv_photo_lib;
begin
PhotoDLL := ocvLoadLibrary(opencv_photo_lib);
Assert(PhotoDLL <> 0, 'Can not init ' + opencv_photo_lib);
cvInpaint := ocvGetProcAddress('cvInpaint', PhotoDLL);
end;
initialization
Init_opencv_photo_lib;
{$ELSE}
procedure cvInpaint(const src: pCvArr; const inpaint_mask: pCvArr; dst: pCvArr; inpaintRange: double; flags: Integer); cdecl; external opencv_photo_lib;
{$ENDIF}
procedure cvInpaint(const src: pCvArr; const inpaint_mask: pCvArr; dst: pCvArr; inpaintRange: double; flags: Integer); cdecl;
external opencv_photo_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
end.

View File

@ -85,21 +85,10 @@ const
int flags );
*)
{$IFDEF SAFELOADLIB}
Type
TcvCalcOpticalFlowPyrLK = procedure(const prev: pIplImage; const curr: pIplImage; prev_pyr: pIplImage; curr_pyr: pIplImage;
const prev_features: pCvPoint2D32f; curr_features: pCvPoint2D32f; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; track_error: PSingle;
criteria: TCvTermCriteria; flags: Integer); cdecl;
Var
cvCalcOpticalFlowPyrLK: TcvCalcOpticalFlowPyrLK;
{$ELSE}
{$EXTERNALSYM cvCalcOpticalFlowPyrLK}
procedure cvCalcOpticalFlowPyrLK(const prev: pIplImage; const curr: pIplImage; prev_pyr: pIplImage; curr_pyr: pIplImage; const prev_features: pCvPoint2D32f;
curr_features: pCvPoint2D32f; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; track_error: PSingle; criteria: TCvTermCriteria;
flags: Integer); cdecl;
{$ENDIF}
curr_features: pCvPoint2D32f; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; track_error: PSingle; criteria: TCvTermCriteria; flags: Integer); cdecl;
(* Modification of a previous sparse optical flow algorithm to calculate
affine flow
@ -112,38 +101,21 @@ procedure cvCalcOpticalFlowPyrLK(const prev: pIplImage; const curr: pIplImage; p
char* status, float* track_error,
CvTermCriteria criteria, int flags );
*)
{$IFDEF SAFELOADLIB}
Type
TcvCalcAffineFlowPyrLK = procedure(const prev: pCvArr; const curr: pCvArr; prev_pyr: pCvArr; curr_pyr: pCvArr; const prev_features: pCvPoint2D32f;
var curr_features: TCvPoint2D32f; var matrices: Single; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; var track_error: Single;
criteria: TCvTermCriteria; flags: Integer); cdecl;
Var
cvCalcAffineFlowPyrLK: TcvCalcAffineFlowPyrLK;
{$ELSE}
{$EXTERNALSYM cvCalcAffineFlowPyrLK}
procedure cvCalcAffineFlowPyrLK(const prev: pCvArr; const curr: pCvArr; prev_pyr: pCvArr; curr_pyr: pCvArr; const prev_features: pCvPoint2D32f;
var curr_features: TCvPoint2D32f; var matrices: Single; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; var track_error: Single;
criteria: TCvTermCriteria; flags: Integer); cdecl;
{$ENDIF}
procedure cvCalcAffineFlowPyrLK(const prev: pCvArr; const curr: pCvArr; prev_pyr: pCvArr; curr_pyr: pCvArr; const prev_features: pCvPoint2D32f; var curr_features: TCvPoint2D32f;
var matrices: Single; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; var track_error: Single; criteria: TCvTermCriteria; flags: Integer); cdecl;
(*
Estimate rigid transformation between 2 images or 2 point sets
CVAPI(int) cvEstimateRigidTransform( const CvArr* A, const CvArr* B,
CvMat* M, int full_affine );
*)
{$IFDEF SAFELOADLIB}
Type
TcvEstimateRigidTransform = function(const A: pCvArr; const B: pCvArr; var M: TCvMat; full_affine: Integer): Integer; cdecl;
var
cvEstimateRigidTransform: TcvEstimateRigidTransform;
{$ELSE}
{$EXTERNALSYM cvEstimateRigidTransform}
function cvEstimateRigidTransform(const A: pCvArr; const B: pCvArr; var M: TCvMat; full_affine: Integer): Integer; cdecl;
{$ENDIF}
(*
Estimate optical flow for each pixel using the two-frame G. Farneback algorithm
@ -152,19 +124,11 @@ function cvEstimateRigidTransform(const A: pCvArr; const B: pCvArr; var M: TCvMa
int winsize, int iterations, int poly_n,
double poly_sigma, int flags );
*)
{$IFDEF SAFELOADLIB}
type
TcvCalcOpticalFlowFarneback = procedure(const prev: pCvMat; const next: pCvMat; flow: pCvMat; pyr_scale: double; levels: Integer; winsize: Integer;
iterations: Integer; poly_n: Integer; poly_sigma: double; flags: Integer); cdecl;
var
cvCalcOpticalFlowFarneback: TcvCalcOpticalFlowFarneback;
{$ELSE}
{$EXTERNALSYM cvCalcOpticalFlowFarneback}
procedure cvCalcOpticalFlowFarneback(const prev: pCvMat; const next: pCvMat; flow: pCvMat; pyr_scale: double; levels: Integer; winsize: Integer;
iterations: Integer; poly_n: Integer; poly_sigma: double; flags: Integer); cdecl;
{$ENDIF}
procedure cvCalcOpticalFlowFarneback(const prev: pCvMat; const next: pCvMat; flow: pCvMat; pyr_scale: double; levels: Integer; winsize: Integer; iterations: Integer;
poly_n: Integer; poly_sigma: double; flags: Integer); cdecl;
(* ******************************** motion templates ************************************ *)
(* *****************************************************************************************
@ -183,17 +147,10 @@ procedure cvCalcOpticalFlowFarneback(const prev: pCvMat; const next: pCvMat; flo
CVAPI(void) cvUpdateMotionHistory( const CvArr* silhouette, CvArr* mhi,
double timestamp, double duration );
*)
{$IFDEF SAFELOADLIB}
Type
TcvUpdateMotionHistory = procedure(const silhouette: pCvArr; mhi: pCvArr; timestamp: double; duration: double); cdecl;
var
cvUpdateMotionHistory: TcvUpdateMotionHistory;
{$ELSE}
{$EXTERNALSYM cvUpdateMotionHistory}
procedure cvUpdateMotionHistory(const silhouette: pCvArr; mhi: pCvArr; timestamp: double; duration: double); cdecl;
{$ENDIF}
(*
Calculates gradient of the motion history image and fills
a mask indicating where the gradient is valid
@ -202,17 +159,10 @@ procedure cvUpdateMotionHistory(const silhouette: pCvArr; mhi: pCvArr; timestamp
double delta1, double delta2,
int aperture_size CV_DEFAULT(3));
*)
{$IFDEF SAFELOADLIB}
Type
TcvCalcMotionGradient = procedure(const mhi: pCvArr; mask: pCvArr; orientation: pCvArr; delta1: double; delta2: double; aperture_size: Integer = 3); cdecl;
var
cvCalcMotionGradient: TcvCalcMotionGradient;
{$ELSE}
{$EXTERNALSYM cvCalcMotionGradient}
procedure cvCalcMotionGradient(const mhi: pCvArr; mask: pCvArr; orientation: pCvArr; delta1: double; delta2: double; aperture_size: Integer = 3); cdecl;
{$ENDIF}
(* Calculates average motion direction within a selected motion region
(region can be selected by setting ROIs and/or by composing a valid gradient mask
with the region mask)
@ -221,17 +171,10 @@ procedure cvCalcMotionGradient(const mhi: pCvArr; mask: pCvArr; orientation: pCv
const CvArr* mhi, double timestamp,
double duration );
*)
{$IFDEF SAFELOADLIB}
type
TcvCalcGlobalOrientation = function(const orientation: pCvArr; const mask: pCvArr; const mhi: pCvArr; timestamp: double; duration: double): double; cdecl;
var
cvCalcGlobalOrientation: TcvCalcGlobalOrientation;
{$ELSE}
{$EXTERNALSYM cvCalcGlobalOrientation}
function cvCalcGlobalOrientation(const orientation: pCvArr; const mask: pCvArr; const mhi: pCvArr; timestamp: double; duration: double): double; cdecl;
{$ENDIF}
(* Splits a motion history image into a few parts corresponding to separate independent motions
(e.g. left hand, right hand)
@ -239,17 +182,10 @@ function cvCalcGlobalOrientation(const orientation: pCvArr; const mask: pCvArr;
CvMemStorage* storage,
double timestamp, double seg_thresh );
*)
{$IFDEF SAFELOADLIB}
type
TcvSegmentMotion = function(const mhi: pCvArr; seg_mask: pCvArr; storage: pCvMemStorage; timestamp: double; seg_thresh: double): pCvSeq; cdecl;
var
cvSegmentMotion: TcvSegmentMotion;
{$ELSE}
{$EXTERNALSYM cvSegmentMotion}
function cvSegmentMotion(const mhi: pCvArr; seg_mask: pCvArr; storage: pCvMemStorage; timestamp: double; seg_thresh: double): pCvSeq; cdecl;
{$ENDIF}
(* ****************************************************************************************
* Tracking *
*************************************************************************************** *)
@ -262,34 +198,19 @@ function cvSegmentMotion(const mhi: pCvArr; seg_mask: pCvArr; storage: pCvMemSto
CvTermCriteria criteria, CvConnectedComp* comp,
CvBox2D* box CV_DEFAULT(NULL) );
*)
{$IFDEF SAFELOADLIB}
type
TcvCamShift = function(const prob_image: pIplImage; window: TCvRect; criteria: TCvTermCriteria; comp: pCvConnectedComp; box: pCvBox2D = nil): Integer; cdecl;
var
cvCamShift: TcvCamShift;
{$ELSE}
{$EXTERNALSYM cvCamShift}
function cvCamShift(const prob_image: pIplImage; window: TCvRect; criteria: TCvTermCriteria; comp: pCvConnectedComp; box: pCvBox2D = nil): Integer; cdecl;
{$ENDIF}
(* Implements MeanShift algorithm - determines object position
from the object histogram back project
CVAPI(int) cvMeanShift( const CvArr* prob_image, CvRect window,
CvTermCriteria criteria, CvConnectedComp* comp );
*)
{$IFDEF SAFELOADLIB}
type
TcvMeanShift = function(const prob_image: pCvArr; window: TCvRect; criteria: TCvTermCriteria; var comp: TCvConnectedComp): Integer; cdecl;
var
cvMeanShift: TcvMeanShift;
{$ELSE}
{$EXTERNALSYM cvMeanShift}
function cvMeanShift(const prob_image: pCvArr; window: TCvRect; criteria: TCvTermCriteria; var comp: TCvConnectedComp): Integer; cdecl;
{$ENDIF}
(*
standard Kalman filter (in G. Welch' and G. Bishop's notation):
@ -350,33 +271,20 @@ Type
CVAPI(CvKalman* ) cvCreateKalman( int dynam_params, int measure_params,
int control_params CV_DEFAULT(0));
*)
{$IFDEF SAFELOADLIB}
type
TcvCreateKalman = function(dynam_params: Integer; measure_params: Integer; control_params: Integer = 0): pCvKalman; cdecl;
var
cvCreateKalman: TcvCreateKalman;
{$ELSE}
{$EXTERNALSYM cvCreateKalman}
function cvCreateKalman(dynam_params: Integer; measure_params: Integer; control_params: Integer = 0): pCvKalman; cdecl;
{$ENDIF}
(*
Releases Kalman filter state
CVAPI(void) cvReleaseKalman( CvKalman** kalman);
*)
{$IFDEF SAFELOADLIB}
type
TcvReleaseKalman = procedure(var kalman: pCvKalman); cdecl;
var
cvReleaseKalman: TcvReleaseKalman;
{$ELSE}
{$EXTERNALSYM cvReleaseKalman}
procedure cvReleaseKalman(var kalman: pCvKalman); cdecl;
{$ENDIF}
(*
Updates Kalman filter by time (predicts future state of the system)
CVAPI(const CvMat* cvKalmanPredict( CvKalman* kalman,
@ -387,91 +295,47 @@ procedure cvReleaseKalman(var kalman: pCvKalman); cdecl;
CVAPI(const CvMat* ) cvKalmanCorrect( CvKalman* kalman, const CvMat* measurement );
*)
type
TcvKalmanPredict = function(var kalman: TCvKalman; const control: pCvMat = nil): pCvMat; cdecl;
TcvKalmanCorrect = function(var kalman: TCvKalman; const measurement: pCvMat): pCvMat; cdecl;
{$IFDEF SAFELOADLIB}
var
cvKalmanPredict: TcvKalmanPredict;
cvKalmanCorrect: TcvKalmanCorrect;
{$ELSE}
{$EXTERNALSYM cvKalmanPredict}
function cvKalmanPredict(var kalman: TCvKalman; const control: pCvMat = nil): pCvMat; cdecl;
{$EXTERNALSYM cvKalmanUpdateByTime}
function cvKalmanUpdateByTime(var kalman: TCvKalman; const control: pCvMat = nil): pCvMat; cdecl;
{$EXTERNALSYM cvKalmanCorrect}
function cvKalmanCorrect(var kalman: TCvKalman; const measurement: pCvMat): pCvMat; cdecl;
{$ENDIF}
Var
{$EXTERNALSYM cvKalmanUpdateByTime}
cvKalmanUpdateByTime: TcvKalmanPredict;// {$IFNDEF SAFELOADLIB} = cvKalmanPredict {$ENDIF};
{$EXTERNALSYM cvKalmanUpdateByMeasurement}
cvKalmanUpdateByMeasurement: TcvKalmanCorrect;//{$IFNDEF SAFELOADLIB} = cvKalmanCorrect{$ENDIF};
{$IF DEFINED(SAFELOADLIB) AND DEFINED(DEBUG)}
procedure Init_opencv_Tracking_lib;
{$ENDIF}
function cvKalmanUpdateByMeasurement(var kalman: TCvKalman; const measurement: pCvMat): pCvMat; cdecl;
implementation
uses
ocv.lib;
{$IFDEF SAFELOADLIB}
Var
TrackingDLL: Cardinal;
procedure Init_opencv_Tracking_lib;
begin
TrackingDLL := ocvLoadLibrary(tracking_lib);
Assert(TrackingDLL <> 0, 'Can not init ' + tracking_lib);
cvCalcOpticalFlowPyrLK := ocvGetProcAddress('cvCalcOpticalFlowPyrLK', TrackingDLL);
cvCalcAffineFlowPyrLK := ocvGetProcAddress('cvCalcAffineFlowPyrLK', TrackingDLL);
cvEstimateRigidTransform := ocvGetProcAddress('cvEstimateRigidTransform', TrackingDLL);
cvCalcOpticalFlowFarneback := ocvGetProcAddress('cvCalcOpticalFlowFarneback', TrackingDLL);
cvUpdateMotionHistory := ocvGetProcAddress('cvUpdateMotionHistory', TrackingDLL);
cvCalcMotionGradient := ocvGetProcAddress('cvCalcMotionGradient', TrackingDLL);
cvCalcGlobalOrientation := ocvGetProcAddress('cvCalcGlobalOrientation', TrackingDLL);
cvSegmentMotion := ocvGetProcAddress('cvSegmentMotion', TrackingDLL);
cvCamShift := ocvGetProcAddress('cvCamShift', TrackingDLL);
cvMeanShift := ocvGetProcAddress('cvMeanShift', TrackingDLL);
cvCreateKalman := ocvGetProcAddress('cvCreateKalman', TrackingDLL);
cvReleaseKalman := ocvGetProcAddress('cvReleaseKalman', TrackingDLL);
cvKalmanPredict := ocvGetProcAddress('cvKalmanPredict', TrackingDLL);
cvKalmanCorrect := ocvGetProcAddress('cvKalmanCorrect', TrackingDLL);
end;
{$ELSE}
function cvCamShift(const prob_image: pIplImage; window: TCvRect; criteria: TCvTermCriteria; comp: pCvConnectedComp; box: pCvBox2D = nil): Integer; cdecl; external tracking_lib;
function cvCamShift(const prob_image: pIplImage; window: TCvRect; criteria: TCvTermCriteria; comp: pCvConnectedComp; box: pCvBox2D = nil): Integer; cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcOpticalFlowPyrLK(const prev: pIplImage; const curr: pIplImage; prev_pyr: pIplImage; curr_pyr: pIplImage; const prev_features: pCvPoint2D32f;
curr_features: pCvPoint2D32f; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; track_error: PSingle; criteria: TCvTermCriteria;
flags: Integer); cdecl; external tracking_lib;
procedure cvCalcOpticalFlowFarneback(const prev: pCvMat; const next: pCvMat; flow: pCvMat; pyr_scale: double; levels: Integer; winsize: Integer;
iterations: Integer; poly_n: Integer; poly_sigma: double; flags: Integer); cdecl; external tracking_lib;
procedure cvUpdateMotionHistory(const silhouette: pCvArr; mhi: pCvArr; timestamp: double; duration: double); cdecl; external tracking_lib;
procedure cvCalcMotionGradient(const mhi: pCvArr; mask: pCvArr; orientation: pCvArr; delta1: double; delta2: double; aperture_size: Integer = 3); cdecl; external tracking_lib;
function cvSegmentMotion(const mhi: pCvArr; seg_mask: pCvArr; storage: pCvMemStorage; timestamp: double; seg_thresh: double): pCvSeq; cdecl; external tracking_lib;
function cvCalcGlobalOrientation(const orientation: pCvArr; const mask: pCvArr; const mhi: pCvArr; timestamp: double; duration: double): double; cdecl; external tracking_lib;
procedure cvCalcAffineFlowPyrLK(const prev: pCvArr; const curr: pCvArr; prev_pyr: pCvArr; curr_pyr: pCvArr; const prev_features: pCvPoint2D32f;
var curr_features: TCvPoint2D32f; var matrices: Single; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; var track_error: Single;
criteria: TCvTermCriteria; flags: Integer); cdecl; external tracking_lib;
function cvEstimateRigidTransform(const A: pCvArr; const B: pCvArr; var M: TCvMat; full_affine: Integer): Integer; cdecl; external tracking_lib;
function cvMeanShift(const prob_image: pCvArr; window: TCvRect; criteria: TCvTermCriteria; var comp: TCvConnectedComp): Integer; cdecl; external tracking_lib;
function cvCreateKalman(dynam_params: Integer; measure_params: Integer; control_params: Integer = 0): pCvKalman; cdecl; external tracking_lib;
function cvKalmanPredict(var kalman: TCvKalman; const control: pCvMat = nil): pCvMat; cdecl; external tracking_lib;
function cvKalmanCorrect(var kalman: TCvKalman; const measurement: pCvMat): pCvMat; cdecl; external tracking_lib;
procedure cvReleaseKalman(var kalman: pCvKalman); cdecl; external tracking_lib;
{$ENDIF}
initialization
{$IFDEF SAFELOADLIB}
Init_opencv_Tracking_lib;
{$ENDIF}
cvKalmanUpdateByTime := @cvKalmanPredict;
cvKalmanUpdateByMeasurement := @cvKalmanCorrect;
curr_features: pCvPoint2D32f; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; track_error: PSingle; criteria: TCvTermCriteria; flags: Integer); cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcOpticalFlowFarneback(const prev: pCvMat; const next: pCvMat; flow: pCvMat; pyr_scale: double; levels: Integer; winsize: Integer; iterations: Integer;
poly_n: Integer; poly_sigma: double; flags: Integer); cdecl; external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvUpdateMotionHistory(const silhouette: pCvArr; mhi: pCvArr; timestamp: double; duration: double); cdecl; external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcMotionGradient(const mhi: pCvArr; mask: pCvArr; orientation: pCvArr; delta1: double; delta2: double; aperture_size: Integer = 3); cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvSegmentMotion(const mhi: pCvArr; seg_mask: pCvArr; storage: pCvMemStorage; timestamp: double; seg_thresh: double): pCvSeq; cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCalcGlobalOrientation(const orientation: pCvArr; const mask: pCvArr; const mhi: pCvArr; timestamp: double; duration: double): double; cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvCalcAffineFlowPyrLK(const prev: pCvArr; const curr: pCvArr; prev_pyr: pCvArr; curr_pyr: pCvArr; const prev_features: pCvPoint2D32f; var curr_features: TCvPoint2D32f;
var matrices: Single; count: Integer; win_size: TCvSize; level: Integer; status: pCVChar; var track_error: Single; criteria: TCvTermCriteria; flags: Integer); cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvEstimateRigidTransform(const A: pCvArr; const B: pCvArr; var M: TCvMat; full_affine: Integer): Integer; cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvMeanShift(const prob_image: pCvArr; window: TCvRect; criteria: TCvTermCriteria; var comp: TCvConnectedComp): Integer; cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvCreateKalman(dynam_params: Integer; measure_params: Integer; control_params: Integer = 0): pCvKalman; cdecl;
external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvKalmanPredict(var kalman: TCvKalman; const control: pCvMat = nil): pCvMat; cdecl; external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvKalmanUpdateByTime(var kalman: TCvKalman; const control: pCvMat = nil): pCvMat; cdecl; external tracking_lib name 'cvKalmanPredict'{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvKalmanCorrect(var kalman: TCvKalman; const measurement: pCvMat): pCvMat; cdecl; external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
function cvKalmanUpdateByMeasurement(var kalman: TCvKalman; const measurement: pCvMat): pCvMat; cdecl; external tracking_lib name 'cvKalmanCorrect'{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
procedure cvReleaseKalman(var kalman: pCvKalman); cdecl; external tracking_lib{$IFDEF DELAYEDLOADLIB} delayed{$ENDIF};
end.

View File

@ -449,6 +449,36 @@
{$DEFINE HAS_TYPES}
{$ENDIF VER330}
{$IFDEF VER340} { Delphi 10.4 }
{$DEFINE Delphi}
{$DEFINE Delphi32}
{$DEFINE Delphi4UP}
{$DEFINE Delphi5UP}
{$DEFINE Delphi6UP}
{$DEFINE Delphi7UP}
{$DEFINE Delphi8UP}
{$DEFINE Delphi9UP}
{$DEFINE Delphi10UP}
{$WARN UNSAFE_TYPE OFF} {Disable warning for unsafe types in Delphi 7}
{$DEFINE Has_Int64}
{$DEFINE HAS_TYPES}
{$ENDIF VER340}
{$IFDEF VER350} { Delphi 11 }
{$DEFINE Delphi}
{$DEFINE Delphi32}
{$DEFINE Delphi4UP}
{$DEFINE Delphi5UP}
{$DEFINE Delphi6UP}
{$DEFINE Delphi7UP}
{$DEFINE Delphi8UP}
{$DEFINE Delphi9UP}
{$DEFINE Delphi10UP}
{$WARN UNSAFE_TYPE OFF} {Disable warning for unsafe types in Delphi 7}
{$DEFINE Has_Int64}
{$DEFINE HAS_TYPES}
{$ENDIF VER350}
{$IFDEF UNIX}
{$ifdef VER140} // Kylix 1 & 2
{$DEFINE KYLIX}