2015-04-02 21:43:36 +02:00
|
|
|
(*
|
|
|
|
**************************************************************************************************
|
|
|
|
Project Delphi-OpenCV
|
|
|
|
**************************************************************************************************
|
|
|
|
Contributor:
|
|
|
|
Laentir Valetov
|
|
|
|
email:laex@bk.ru
|
|
|
|
Mikhail Grigorev
|
|
|
|
email:sleuthound@gmail.com
|
|
|
|
**************************************************************************************************
|
|
|
|
You may retrieve the latest version of this file at the GitHub,
|
|
|
|
located at git://github.com/Laex/Delphi-OpenCV.git
|
|
|
|
**************************************************************************************************
|
|
|
|
License:
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
|
|
|
|
you may not use this file except in compliance with the License. You may obtain a copy of the
|
|
|
|
License at http://www.mozilla.org/MPL/
|
|
|
|
|
|
|
|
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
|
|
|
ANY KIND, either express or implied. See the License for the specific language governing rights
|
|
|
|
and limitations under the License.
|
|
|
|
|
|
|
|
Alternatively, the contents of this file may be used under the terms of the
|
|
|
|
GNU Lesser General Public License (the "LGPL License"), in which case the
|
|
|
|
provisions of the LGPL License are applicable instead of those above.
|
|
|
|
If you wish to allow use of your version of this file only under the terms
|
|
|
|
of the LGPL License and not to allow others to use your version of this file
|
|
|
|
under the MPL, indicate your decision by deleting the provisions above and
|
|
|
|
replace them with the notice and other provisions required by the LGPL
|
|
|
|
License. If you do not delete the provisions above, a recipient may use
|
|
|
|
your version of this file under either the MPL or the LGPL License.
|
|
|
|
|
|
|
|
For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
|
|
|
|
**************************************************************************************************
|
|
|
|
Warning: Using Delphi XE3 syntax!
|
|
|
|
**************************************************************************************************
|
|
|
|
The Initial Developer of the Original Code:
|
|
|
|
OpenCV: open source computer vision library
|
|
|
|
Homepage: http://ocv.org
|
|
|
|
Online docs: http://docs.ocv.org
|
|
|
|
Q&A forum: http://answers.ocv.org
|
|
|
|
Dev zone: http://code.ocv.org
|
|
|
|
**************************************************************************************************
|
|
|
|
Original file:
|
|
|
|
opencv\modules\calib3d\include\opencv2\calib3d\calib3d_c.h
|
|
|
|
*************************************************************************************************
|
|
|
|
*)
|
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
unit ocv.calib3d_c;
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2016-07-31 18:23:31 +02:00
|
|
|
{$I OpenCV.inc}
|
|
|
|
|
2013-03-31 22:30:13 +02:00
|
|
|
interface
|
|
|
|
|
2014-05-22 08:53:48 +02:00
|
|
|
uses
|
2014-05-22 16:23:41 +02:00
|
|
|
ocv.core.types_c,
|
|
|
|
ocv.compat;
|
2013-03-31 22:30:13 +02:00
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
(* ***************************************************************************************
|
|
|
|
* Camera Calibration, Pose Estimation and Stereo *
|
|
|
|
**************************************************************************************** *)
|
2013-05-26 10:50:18 +02:00
|
|
|
Type
|
|
|
|
// typedef struct CvPOSITObject CvPOSITObject;
|
|
|
|
PCvPOSITObject = ^TCvPOSITObject;
|
|
|
|
|
|
|
|
TCvPOSITObject = record
|
|
|
|
N: Integer;
|
|
|
|
inv_matr: PSingle;
|
|
|
|
obj_vecs: PSingle;
|
|
|
|
img_vecs: PSingle;
|
|
|
|
end;
|
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Allocates and initializes CvPOSITObject structure before doing cvPOSIT
|
|
|
|
CVAPI(CvPOSITObject* ) cvCreatePOSITObject( CvPoint3D32f* points, int point_count );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
|
|
|
|
{$IFDEF SAFELOADLIB}
|
|
|
|
|
|
|
|
Type
|
|
|
|
TcvCreatePOSITObject = function(points: pCvPoint3D32f; point_count: Integer): PCvPOSITObject; cdecl;
|
|
|
|
|
|
|
|
var
|
|
|
|
cvCreatePOSITObject: TcvCreatePOSITObject;
|
|
|
|
{$ELSE}
|
2013-05-26 10:50:18 +02:00
|
|
|
function cvCreatePOSITObject(points: pCvPoint3D32f; point_count: Integer): PCvPOSITObject; cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(* Runs POSIT (POSe from ITeration) algorithm for determining 3d position of
|
|
|
|
an object given its model and projection in a weak-perspective case
|
|
|
|
|
|
|
|
CVAPI(void) cvPOSIT( CvPOSITObject* posit_object, CvPoint2D32f* image_points,
|
|
|
|
double focal_length, CvTermCriteria criteria,
|
|
|
|
float* rotation_matrix, float* translation_vector);
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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}
|
2015-04-02 21:43:36 +02:00
|
|
|
procedure cvPOSIT(posit_object: PCvPOSITObject; imagePoints: pCvPoint2D32f; focal_length: double; criteria: TCvTermCriteria;
|
|
|
|
rotation_matrix: TCvMatr32f; translation_vector: TCvVect32f); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
|
|
|
(*
|
|
|
|
Releases CvPOSITObject structure
|
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
CVAPI(void) cvReleasePOSITObject( CvPOSITObject** posit_object );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
|
|
|
|
|
|
|
Type
|
|
|
|
TcvReleasePOSITObject = procedure(Var posit_object: PCvPOSITObject); cdecl;
|
|
|
|
|
|
|
|
var
|
|
|
|
cvReleasePOSITObject: TcvReleasePOSITObject;
|
|
|
|
{$ELSE}
|
2013-05-26 10:50:18 +02:00
|
|
|
procedure cvReleasePOSITObject(Var posit_object: PCvPOSITObject); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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}
|
2013-05-26 10:50:18 +02:00
|
|
|
function cvRANSACUpdateNumIters(p: double; err_prob: double; model_points: Integer; max_iters: Integer): Integer; cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
|
|
|
(* CVAPI(void) cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst ); *)
|
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
type
|
|
|
|
TcvConvertPointsHomogeneous = procedure(const src: pCvMat; dst: pCvMat); cdecl;
|
|
|
|
|
|
|
|
var
|
|
|
|
cvConvertPointsHomogeneous: TcvConvertPointsHomogeneous;
|
|
|
|
{$ELSE}
|
2013-05-26 10:50:18 +02:00
|
|
|
procedure cvConvertPointsHomogeneous(const src: pCvMat; dst: pCvMat); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2013-04-14 19:17:55 +02:00
|
|
|
|
|
|
|
const
|
2014-10-18 01:12:32 +02:00
|
|
|
(* Calculates fundamental matrix given a set of corresponding points *)
|
2013-04-14 19:17:55 +02:00
|
|
|
CV_FM_7POINT = 1;
|
|
|
|
CV_FM_8POINT = 2;
|
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_LMEDS = 4;
|
2013-04-14 19:17:55 +02:00
|
|
|
CV_RANSAC = 8;
|
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_FM_LMEDS_ONLY = CV_LMEDS;
|
2013-04-14 19:17:55 +02:00
|
|
|
CV_FM_RANSAC_ONLY = CV_RANSAC;
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_FM_LMEDS = CV_LMEDS;
|
|
|
|
CV_FM_RANSAC = CV_RANSAC;
|
2013-04-14 19:17:55 +02:00
|
|
|
|
|
|
|
CV_ITERATIVE = 0;
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_EPNP = 1; // F.Moreno-Noguer, V.Lepetit and P.Fua "EPnP: Efficient Perspective-n-Point Camera Pose Estimation"
|
|
|
|
CV_P3P = 2;
|
2013-04-14 19:17:55 +02:00
|
|
|
// X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; "Complete Solution Classification for the Perspective-Three-Point Problem"
|
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
CVAPI(int) cvFindFundamentalMat( const CvMat* points1, const CvMat* points2,
|
|
|
|
CvMat* fundamental_matrix,
|
|
|
|
int method CV_DEFAULT(CV_FM_RANSAC),
|
|
|
|
double param1 CV_DEFAULT(3.), double param2 CV_DEFAULT(0.99),
|
|
|
|
CvMat* status CV_DEFAULT(NULL) );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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;
|
|
|
|
|
|
|
|
Var
|
|
|
|
cvFindFundamentalMat: TcvFindFundamentalMat;
|
|
|
|
{$ELSE}
|
2015-04-02 21:43:36 +02:00
|
|
|
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;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
For each input point on one of images
|
|
|
|
computes parameters of the corresponding
|
|
|
|
epipolar line on the other image
|
|
|
|
|
|
|
|
CVAPI(void) cvComputeCorrespondEpilines( const CvMat* points,
|
|
|
|
int which_image,
|
|
|
|
const CvMat* fundamental_matrix,
|
|
|
|
CvMat* correspondent_lines );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
Type
|
|
|
|
TcvComputeCorrespondEpilines = procedure(const points: pCvMat; which_image: Integer; const fundamental_matrix: pCvMat;
|
|
|
|
correspondent_lines: pCvMat); cdecl;
|
|
|
|
|
|
|
|
var
|
|
|
|
cvComputeCorrespondEpilines: TcvComputeCorrespondEpilines;
|
|
|
|
{$ELSE}
|
2015-04-02 21:43:36 +02:00
|
|
|
procedure cvComputeCorrespondEpilines(const points: pCvMat; which_image: Integer; const fundamental_matrix: pCvMat;
|
|
|
|
correspondent_lines: pCvMat); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2015-04-02 21:43:36 +02:00
|
|
|
(*
|
|
|
|
Triangulation functions
|
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
CVAPI(void) cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2,
|
|
|
|
CvMat* projPoints1, CvMat* projPoints2,
|
|
|
|
CvMat* points4D);
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
Type
|
|
|
|
TcvTriangulatePoints = procedure(projMatr1: pCvMat; projMatr2: pCvMat; projPoints1: pCvMat; projPoints2: pCvMat; points4D: pCvMat); cdecl;
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
var
|
|
|
|
cvTriangulatePoints: TcvTriangulatePoints;
|
|
|
|
{$ELSE}
|
|
|
|
procedure cvTriangulatePoints(projMatr1: pCvMat; projMatr2: pCvMat; projPoints1: pCvMat; projPoints2: pCvMat; points4D: pCvMat); cdecl;
|
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
CVAPI(void) cvCorrectMatches(CvMat* F, CvMat* points1, CvMat* points2,
|
|
|
|
CvMat* new_points1, CvMat* new_points2);
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
type
|
|
|
|
TcvCorrectMatches = procedure(F: pCvMat; points1: pCvMat; points2: pCvMat; new_points1: pCvMat; new_points2: pCvMat); cdecl;
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
var
|
|
|
|
cvCorrectMatches: TcvCorrectMatches;
|
|
|
|
{$ELSE}
|
|
|
|
procedure cvCorrectMatches(F: pCvMat; points1: pCvMat; points2: pCvMat; new_points1: pCvMat; new_points2: pCvMat); cdecl;
|
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Computes the optimal new camera matrix according to the free scaling parameter alpha:
|
|
|
|
alpha=0 - only valid pixels will be retained in the undistorted image
|
|
|
|
alpha=1 - all the source image pixels will be retained in the undistorted image
|
|
|
|
|
|
|
|
CVAPI(void) cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix,
|
|
|
|
const CvMat* dist_coeffs,
|
|
|
|
CvSize image_size, double alpha,
|
|
|
|
CvMat* new_camera_matrix,
|
|
|
|
CvSize new_imag_size CV_DEFAULT(cvSize(0,0)),
|
|
|
|
CvRect* valid_pixel_ROI CV_DEFAULT(0),
|
|
|
|
int center_principal_point CV_DEFAULT(0));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
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}
|
2015-04-02 21:43:36 +02:00
|
|
|
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;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Converts rotation vector to rotation matrix or vice versa
|
|
|
|
|
|
|
|
CVAPI(int) cvRodrigues2( const CvMat* src, CvMat* dst,
|
|
|
|
CvMat* jacobian CV_DEFAULT(0) );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
|
|
|
|
|
|
|
type
|
|
|
|
TcvRodrigues2 = function(const src: pCvMat; dst: pCvMat; jacobian: pCvMat = nil): Integer; cdecl;
|
2013-09-25 21:18:23 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
var
|
|
|
|
cvRodrigues2: TcvRodrigues2;
|
|
|
|
{$ELSE}
|
|
|
|
function cvRodrigues2(const src: pCvMat; dst: pCvMat; jacobian: pCvMat = nil): Integer; cdecl;
|
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Finds perspective transformation between the object plane and image (view) plane
|
|
|
|
|
|
|
|
CVAPI(int) cvFindHomography( const CvMat* src_points,
|
|
|
|
const CvMat* dst_points,
|
|
|
|
CvMat* homography,
|
|
|
|
int method CV_DEFAULT(0),
|
|
|
|
double ransacReprojThreshold CV_DEFAULT(3),
|
|
|
|
CvMat* mask CV_DEFAULT(0));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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;
|
|
|
|
|
|
|
|
Var
|
|
|
|
cvFindHomography: TcvFindHomography;
|
|
|
|
{$ELSE}
|
2013-04-14 19:17:55 +02:00
|
|
|
function cvFindHomography(const src_points: pCvMat; const dst_points: pCvMat; homography: pCvMat; method: Integer = 0;
|
|
|
|
ransacReprojThreshold: double = 3; mask: pCvMat = nil): Integer; cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Computes RQ decomposition for 3x3 matrices
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
CVAPI(void) cvRQDecomp3x3( const CvMat *matrixM, CvMat *matrixR, CvMat *matrixQ,
|
|
|
|
CvMat *matrixQx CV_DEFAULT(NULL),
|
|
|
|
CvMat *matrixQy CV_DEFAULT(NULL),
|
|
|
|
CvMat *matrixQz CV_DEFAULT(NULL),
|
|
|
|
CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
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}
|
2015-04-02 21:43:36 +02:00
|
|
|
procedure cvRQDecomp3x3(const matrixM: pCvMat; matrixR: pCvMat; matrixQ: pCvMat; matrixQx: pCvMat = nil; matrixQy: pCvMat = nil;
|
|
|
|
matrixQz: pCvMat = nil; eulerAngles: PCvPoint3D64f = nil); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Computes projection matrix decomposition
|
|
|
|
|
|
|
|
CVAPI(void) cvDecomposeProjectionMatrix( const CvMat *projMatr, CvMat *calibMatr,
|
|
|
|
CvMat *rotMatr, CvMat *posVect,
|
|
|
|
CvMat *rotMatrX CV_DEFAULT(NULL),
|
|
|
|
CvMat *rotMatrY CV_DEFAULT(NULL),
|
|
|
|
CvMat *rotMatrZ CV_DEFAULT(NULL),
|
|
|
|
CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
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;
|
|
|
|
|
|
|
|
var
|
|
|
|
cvDecomposeProjectionMatrix: TcvDecomposeProjectionMatrix;
|
|
|
|
{$ELSE}
|
2015-04-02 21:43:36 +02:00
|
|
|
procedure cvDecomposeProjectionMatrix(const projMatr: pCvMat; calibMatr: pCvMat; rotMatr: pCvMat; posVect: pCvMat; rotMatrX: pCvMat = nil;
|
|
|
|
rotMatrY: pCvMat = nil; rotMatrZ: pCvMat = nil; eulerAngles: PCvPoint3D64f = nil); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Computes d(AB)/dA and d(AB)/dB
|
|
|
|
|
|
|
|
CVAPI(void) cvCalcMatMulDeriv( const CvMat* A, const CvMat* B, CvMat* dABdA, CvMat* dABdB );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
type
|
|
|
|
TcvCalcMatMulDeriv = procedure(const A: pCvMat; const B: pCvMat; dABdA: pCvMat; dABdB: pCvMat); cdecl;
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
var
|
|
|
|
cvCalcMatMulDeriv: TcvCalcMatMulDeriv;
|
|
|
|
{$ELSE}
|
|
|
|
procedure cvCalcMatMulDeriv(const A: pCvMat; const B: pCvMat; dABdA: pCvMat; dABdB: pCvMat); cdecl;
|
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Computes r3 = rodrigues(rodrigues(r2)*rodrigues(r1)),
|
|
|
|
t3 = rodrigues(r2)*t1 + t2 and the respective derivatives
|
|
|
|
|
|
|
|
CVAPI(void) cvComposeRT( const CvMat* _rvec1, const CvMat* _tvec1,
|
|
|
|
const CvMat* _rvec2, const CvMat* _tvec2,
|
|
|
|
CvMat* _rvec3, CvMat* _tvec3,
|
|
|
|
CvMat* dr3dr1 CV_DEFAULT(0), CvMat* dr3dt1 CV_DEFAULT(0),
|
|
|
|
CvMat* dr3dr2 CV_DEFAULT(0), CvMat* dr3dt2 CV_DEFAULT(0),
|
|
|
|
CvMat* dt3dr1 CV_DEFAULT(0), CvMat* dt3dt1 CV_DEFAULT(0),
|
|
|
|
CvMat* dt3dr2 CV_DEFAULT(0), CvMat* dt3dt2 CV_DEFAULT(0) );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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;
|
|
|
|
|
|
|
|
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}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Projects object points to the view plane using
|
|
|
|
the specified extrinsic and intrinsic camera parameters
|
|
|
|
|
|
|
|
CVAPI(void) cvProjectPoints2( const CvMat* object_points, const CvMat* rotation_vector,
|
|
|
|
const CvMat* translation_vector, const CvMat* camera_matrix,
|
|
|
|
const CvMat* distortion_coeffs, CvMat* image_points,
|
|
|
|
CvMat* dpdrot CV_DEFAULT(NULL), CvMat* dpdt CV_DEFAULT(NULL),
|
|
|
|
CvMat* dpdf CV_DEFAULT(NULL), CvMat* dpdc CV_DEFAULT(NULL),
|
|
|
|
CvMat* dpddist CV_DEFAULT(NULL),
|
|
|
|
double aspect_ratio CV_DEFAULT(0));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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}
|
2015-04-02 21:43:36 +02:00
|
|
|
(* Finds extrinsic camera parameters from
|
|
|
|
a few known corresponding point pairs and intrinsic parameters
|
|
|
|
|
|
|
|
CVAPI(void) cvFindExtrinsicCameraParams2( const CvMat* object_points,
|
|
|
|
const CvMat* image_points,
|
|
|
|
const CvMat* camera_matrix,
|
|
|
|
const CvMat* distortion_coeffs,
|
|
|
|
CvMat* rotation_vector,
|
|
|
|
CvMat* translation_vector,
|
|
|
|
int use_extrinsic_guess CV_DEFAULT(0) );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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}
|
2015-04-02 21:43:36 +02:00
|
|
|
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;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(* Computes initial estimate of the intrinsic camera parameters
|
2015-04-02 21:43:36 +02:00
|
|
|
in case of planar calibration target (e.g. chessboard)
|
2013-03-31 22:30:13 +02:00
|
|
|
|
2015-04-02 21:43:36 +02:00
|
|
|
CVAPI(void) cvInitIntrinsicParams2D( const CvMat* object_points,
|
|
|
|
const CvMat* image_points,
|
|
|
|
const CvMat* npoints, CvSize image_size,
|
|
|
|
CvMat* camera_matrix,
|
2015-11-12 16:46:36 +01:00
|
|
|
double aspect_ratio CV_DEFAULT(1.));
|
2015-04-02 21:43:36 +02:00
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
|
|
|
|
{$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}
|
|
|
|
|
2015-04-02 21:43:36 +02:00
|
|
|
const
|
|
|
|
CV_CALIB_CB_ADAPTIVE_THRESH = 1;
|
|
|
|
CV_CALIB_CB_NORMALIZE_IMAGE = 2;
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_CALIB_CB_FILTER_QUADS = 4;
|
|
|
|
CV_CALIB_CB_FAST_CHECK = 8;
|
2013-03-31 22:30:13 +02:00
|
|
|
|
2015-04-02 21:43:36 +02:00
|
|
|
(* Performs a fast check if a chessboard is in the input image. This is a workaround to
|
|
|
|
a problem of cvFindChessboardCorners being slow on images with no chessboard
|
|
|
|
- src: input image
|
|
|
|
- size: chessboard size
|
|
|
|
Returns 1 if a chessboard can be in this image and findChessboardCorners should be called,
|
|
|
|
0 if there is no chessboard, -1 in case of error
|
|
|
|
|
|
|
|
CVAPI(int) cvCheckChessboard(IplImage* src, CvSize size);
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
Type
|
|
|
|
TcvCheckChessboard = function(const image: pCvArr; size: TCvSize): Integer; cdecl;
|
|
|
|
|
|
|
|
var
|
|
|
|
cvCheckChessboard: TcvCheckChessboard;
|
|
|
|
{$ELSE}
|
|
|
|
function cvCheckChessboard(const image: pCvArr; size: TCvSize): Integer; cdecl;
|
|
|
|
{$ENDIF}
|
2015-04-02 21:43:36 +02:00
|
|
|
(*
|
|
|
|
Detects corners on a chessboard calibration pattern
|
|
|
|
|
|
|
|
CVAPI(int) cvFindChessboardCorners(
|
|
|
|
const void* image,
|
|
|
|
CvSize pattern_size,
|
|
|
|
CvPoint2D32f* corners,
|
|
|
|
int* corner_count CV_DEFAULT(NULL),
|
|
|
|
int flags CV_DEFAULT(CV_CALIB_CB_ADAPTIVE_THRESH+CV_CALIB_CB_NORMALIZE_IMAGE) );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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}
|
2015-04-02 21:43:36 +02:00
|
|
|
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;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2013-03-31 22:30:13 +02:00
|
|
|
|
2013-04-02 00:17:25 +02:00
|
|
|
const
|
|
|
|
CV_CALIB_USE_INTRINSIC_GUESS = 1;
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_CALIB_FIX_ASPECT_RATIO = 2;
|
2013-04-02 00:17:25 +02:00
|
|
|
CV_CALIB_FIX_PRINCIPAL_POINT = 4;
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_CALIB_ZERO_TANGENT_DIST = 8;
|
|
|
|
CV_CALIB_FIX_FOCAL_LENGTH = 16;
|
|
|
|
CV_CALIB_FIX_K1 = 32;
|
|
|
|
CV_CALIB_FIX_K2 = 64;
|
|
|
|
CV_CALIB_FIX_K3 = 128;
|
|
|
|
CV_CALIB_FIX_K4 = 2048;
|
|
|
|
CV_CALIB_FIX_K5 = 4096;
|
|
|
|
CV_CALIB_FIX_K6 = 8192;
|
|
|
|
CV_CALIB_RATIONAL_MODEL = 16384;
|
|
|
|
CV_CALIB_THIN_PRISM_MODEL = 32768;
|
|
|
|
CV_CALIB_FIX_S1_S2_S3_S4 = 65536;
|
2013-04-02 00:17:25 +02:00
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Draws individual chessboard corners or the whole chessboard detected
|
|
|
|
|
2013-04-02 00:17:25 +02:00
|
|
|
CVAPI(void) cvDrawChessboardCorners(
|
|
|
|
CvArr* image,
|
|
|
|
CvSize pattern_size,
|
|
|
|
CvPoint2D32f* corners,
|
|
|
|
int count,
|
|
|
|
int pattern_was_found );
|
2014-10-18 01:12:32 +02:00
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2013-03-31 22:30:13 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
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}
|
2013-03-31 22:30:13 +02:00
|
|
|
{
|
|
|
|
/* Finds intrinsic and extrinsic camera parameters
|
2014-10-18 01:12:32 +02:00
|
|
|
from a few views of known calibration pattern *)
|
2013-03-31 22:30:13 +02:00
|
|
|
CVAPI(double) cvCalibrateCamera2(
|
|
|
|
const CvMat* object_points,
|
|
|
|
const CvMat* image_points,
|
|
|
|
const CvMat* point_counts,
|
|
|
|
CvSize image_size,
|
|
|
|
CvMat* camera_matrix,
|
|
|
|
CvMat* distortion_coeffs,
|
|
|
|
CvMat* rotation_vectors CV_DEFAULT(NULL),
|
|
|
|
CvMat* translation_vectors CV_DEFAULT(NULL),
|
|
|
|
int flags CV_DEFAULT(0),
|
|
|
|
CvTermCriteria term_crit CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,DBL_EPSILON)) );
|
|
|
|
}
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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}
|
2013-04-02 00:17:25 +02:00
|
|
|
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) }
|
2013-04-10 01:22:08 +02:00
|
|
|
): double; cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(* Computes various useful characteristics of the camera from the data computed by
|
|
|
|
cvCalibrateCamera2
|
|
|
|
|
|
|
|
CVAPI(void) cvCalibrationMatrixValues( const CvMat *camera_matrix,
|
|
|
|
CvSize image_size,
|
|
|
|
double aperture_width CV_DEFAULT(0),
|
|
|
|
double aperture_height CV_DEFAULT(0),
|
|
|
|
double *fovx CV_DEFAULT(NULL),
|
|
|
|
double *fovy CV_DEFAULT(NULL),
|
|
|
|
double *focal_length CV_DEFAULT(NULL),
|
|
|
|
CvPoint2D64f *principal_point CV_DEFAULT(NULL),
|
|
|
|
double *pixel_aspect_ratio CV_DEFAULT(NULL));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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;
|
2015-04-02 21:43:36 +02:00
|
|
|
pixel_aspect_ratio: PDouble = nil); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
const
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_CALIB_FIX_INTRINSIC = 256;
|
2014-10-18 01:12:32 +02:00
|
|
|
CV_CALIB_SAME_FOCAL_LENGTH = 512;
|
|
|
|
|
|
|
|
(* Computes the transformation from one camera coordinate system to another one
|
|
|
|
from a few correspondent views of the same calibration target. Optionally, calibrates
|
|
|
|
both cameras
|
|
|
|
|
|
|
|
CVAPI(double) cvStereoCalibrate( const CvMat* object_points, const CvMat* image_points1,
|
|
|
|
const CvMat* image_points2, const CvMat* npoints,
|
|
|
|
CvMat* camera_matrix1, CvMat* dist_coeffs1,
|
|
|
|
CvMat* camera_matrix2, CvMat* dist_coeffs2,
|
|
|
|
CvSize image_size, CvMat* R, CvMat* T,
|
|
|
|
CvMat* E CV_DEFAULT(0), CvMat* F CV_DEFAULT(0),
|
|
|
|
CvTermCriteria term_crit CV_DEFAULT(cvTermCriteria(
|
|
|
|
CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,1e-6)),
|
|
|
|
int flags CV_DEFAULT(CV_CALIB_FIX_INTRINSIC));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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}
|
2015-04-02 21:43:36 +02:00
|
|
|
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;
|
2015-11-12 16:46:36 +01:00
|
|
|
E: pCvMat { = nil }; F: pCvMat { = nil }; term_crit: TCvTermCriteria { = CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 30, 1E-6)) };
|
2014-10-18 01:12:32 +02:00
|
|
|
flags: Integer { = CV_DEFAULT(CV_CALIB_FIX_INTRINSIC) } ): double; cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2013-09-25 21:18:23 +02:00
|
|
|
const
|
|
|
|
CV_CALIB_ZERO_DISPARITY = 1024;
|
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Computes 3D rotations (+ optional shift) for each camera coordinate system to make both
|
|
|
|
views parallel (=> to make all the epipolar lines horizontal or vertical)
|
|
|
|
|
|
|
|
CVAPI(void) cvStereoRectify( const CvMat* camera_matrix1, const CvMat* camera_matrix2,
|
|
|
|
const CvMat* dist_coeffs1, const CvMat* dist_coeffs2,
|
|
|
|
CvSize image_size, const CvMat* R, const CvMat* T,
|
|
|
|
CvMat* R1, CvMat* R2, CvMat* P1, CvMat* P2,
|
|
|
|
CvMat* Q CV_DEFAULT(0),
|
|
|
|
int flags CV_DEFAULT(CV_CALIB_ZERO_DISPARITY),
|
|
|
|
double alpha CV_DEFAULT(-1),
|
|
|
|
CvSize new_image_size CV_DEFAULT(cvSize(0,0)),
|
|
|
|
CvRect* valid_pix_ROI1 CV_DEFAULT(0),
|
|
|
|
CvRect* valid_pix_ROI2 CV_DEFAULT(0));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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;
|
|
|
|
|
|
|
|
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}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Computes rectification transformations for uncalibrated pair of images using a set
|
|
|
|
of point correspondences
|
|
|
|
|
|
|
|
CVAPI(int) cvStereoRectifyUncalibrated( const CvMat* points1, const CvMat* points2,
|
|
|
|
const CvMat* F, CvSize img_size,
|
|
|
|
CvMat* H1, CvMat* H2,
|
|
|
|
double threshold CV_DEFAULT(5));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
|
|
|
(* stereo correspondence parameters and functions *)
|
|
|
|
const
|
|
|
|
CV_STEREO_BM_NORMALIZED_RESPONSE = 0;
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_STEREO_BM_XSOBEL = 1;
|
2014-10-18 01:12:32 +02:00
|
|
|
|
|
|
|
Type
|
|
|
|
(* Block matching algorithm structure *)
|
|
|
|
(* typedef struct CvStereoBMState
|
|
|
|
{
|
|
|
|
// pre-filtering (normalization of input images)
|
|
|
|
int preFilterType; // =CV_STEREO_BM_NORMALIZED_RESPONSE now
|
|
|
|
int preFilterSize; // averaging window size: ~5x5..21x21
|
|
|
|
int preFilterCap; // the output of pre-filtering is clipped by [-preFilterCap,preFilterCap]
|
|
|
|
|
|
|
|
// correspondence using Sum of Absolute Difference (SAD)
|
|
|
|
int SADWindowSize; // ~5x5..21x21
|
|
|
|
int minDisparity; // minimum disparity (can be negative)
|
|
|
|
int numberOfDisparities; // maximum disparity - minimum disparity (> 0)
|
|
|
|
|
|
|
|
// post-filtering
|
|
|
|
int textureThreshold; // the disparity is only computed for pixels
|
|
|
|
// with textured enough neighborhood
|
|
|
|
int uniquenessRatio; // accept the computed disparity d* only if
|
|
|
|
// SAD(d) >= SAD(d* )*(1 + uniquenessRatio/100.)
|
|
|
|
// for any d != d*+/-1 within the search range.
|
|
|
|
int speckleWindowSize; // disparity variation window
|
|
|
|
int speckleRange; // acceptable range of variation in window
|
|
|
|
|
|
|
|
int trySmallerWindows; // if 1, the results may be more accurate,
|
|
|
|
// at the expense of slower processing
|
|
|
|
CvRect roi1, roi2;
|
|
|
|
int disp12MaxDiff;
|
|
|
|
|
|
|
|
// temporary buffers
|
|
|
|
CvMat* preFilteredImg0;
|
|
|
|
CvMat* preFilteredImg1;
|
|
|
|
CvMat* slidingSumBuf;
|
|
|
|
CvMat* cost;
|
|
|
|
CvMat* disp;
|
|
|
|
} CvStereoBMState;
|
|
|
|
*)
|
|
|
|
|
|
|
|
pCvStereoBMState = ^TCvStereoBMState;
|
|
|
|
|
|
|
|
TCvStereoBMState = record
|
|
|
|
// pre-filtering (normalization of input images)
|
|
|
|
preFilterType: Integer; // =CV_STEREO_BM_NORMALIZED_RESPONSE now
|
|
|
|
preFilterSize: Integer; // averaging window size: ~5x5..21x21
|
|
|
|
preFilterCap: Integer; // the output of pre-filtering is clipped by [-preFilterCap,preFilterCap]
|
|
|
|
|
|
|
|
// correspondence using Sum of Absolute Difference (SAD)
|
|
|
|
SADWindowSize: Integer; // ~5x5..21x21
|
|
|
|
minDisparity: Integer; // minimum disparity (can be negative)
|
|
|
|
numberOfDisparities: Integer; // maximum disparity - minimum disparity (> 0)
|
|
|
|
|
|
|
|
// post-filtering
|
|
|
|
textureThreshold: Integer; // the disparity is only computed for pixels
|
|
|
|
// with textured enough neighborhood
|
|
|
|
uniquenessRatio: Integer; // accept the computed disparity d* only if
|
|
|
|
// SAD(d) >= SAD(d*)*(1 + uniquenessRatio/100.)
|
|
|
|
// for any d != d*+/-1 within the search range.
|
|
|
|
speckleWindowSize: Integer; // disparity variation window
|
|
|
|
speckleRange: Integer; // acceptable range of variation in window
|
|
|
|
|
|
|
|
trySmallerWindows: Integer; // if 1, the results may be more accurate,
|
|
|
|
// at the expense of slower processing
|
|
|
|
roi1, roi2: TCvRect;
|
|
|
|
disp12MaxDiff: Integer;
|
|
|
|
|
|
|
|
// temporary buffers
|
|
|
|
preFilteredImg0: pCvMat;
|
|
|
|
preFilteredImg1: pCvMat;
|
|
|
|
slidingSumBuf: pCvMat;
|
|
|
|
cost: pCvMat;
|
|
|
|
disp: pCvMat;
|
|
|
|
end;
|
|
|
|
|
|
|
|
const
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_STEREO_BM_BASIC = 0;
|
2014-10-18 01:12:32 +02:00
|
|
|
CV_STEREO_BM_FISH_EYE = 1;
|
2015-11-12 16:46:36 +01:00
|
|
|
CV_STEREO_BM_NARROW = 2;
|
2014-10-18 01:12:32 +02:00
|
|
|
|
|
|
|
(*
|
|
|
|
CVAPI(CvStereoBMState* ) cvCreateStereoBMState(int preset CV_DEFAULT(CV_STEREO_BM_BASIC),
|
|
|
|
int numberOfDisparities CV_DEFAULT(0));
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
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}
|
2015-04-02 21:43:36 +02:00
|
|
|
(*
|
|
|
|
CVAPI(void) cvReleaseStereoBMState( CvStereoBMState** state );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
type
|
|
|
|
TcvReleaseStereoBMState = procedure(Var state: pCvStereoBMState); cdecl;
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
var
|
|
|
|
cvReleaseStereoBMState: TcvReleaseStereoBMState;
|
|
|
|
{$ELSE}
|
|
|
|
procedure cvReleaseStereoBMState(Var state: pCvStereoBMState); cdecl;
|
|
|
|
{$ENDIF}
|
2015-04-02 21:43:36 +02:00
|
|
|
(*
|
|
|
|
CVAPI(void) cvFindStereoCorrespondenceBM( const CvArr* left, const CvArr* right,
|
|
|
|
CvArr* disparity, CvStereoBMState* state );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
type
|
|
|
|
TcvFindStereoCorrespondenceBM = procedure(const left: pCvArr; const right: pCvArr; disparity: pCvArr; state: pCvStereoBMState); cdecl;
|
2014-10-18 01:12:32 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
var
|
|
|
|
cvFindStereoCorrespondenceBM: TcvFindStereoCorrespondenceBM;
|
|
|
|
{$ELSE}
|
|
|
|
procedure cvFindStereoCorrespondenceBM(const left: pCvArr; const right: pCvArr; disparity: pCvArr; state: pCvStereoBMState); cdecl;
|
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
CVAPI(CvRect) cvGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity,
|
|
|
|
int numberOfDisparities, int SADWindowSize );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
|
|
|
|
|
|
|
type
|
|
|
|
TcvGetValidDisparityROI = function(roi1: TCvRect; roi2: TCvRect; minDisparity: Integer; numberOfDisparities: Integer; SADWindowSize: Integer)
|
|
|
|
: TCvRect; cdecl;
|
|
|
|
|
|
|
|
var
|
|
|
|
cvGetValidDisparityROI: TcvGetValidDisparityROI;
|
|
|
|
{$ELSE}
|
2015-04-02 21:43:36 +02:00
|
|
|
function cvGetValidDisparityROI(roi1: TCvRect; roi2: TCvRect; minDisparity: Integer; numberOfDisparities: Integer; SADWindowSize: Integer)
|
|
|
|
: TCvRect; cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2015-04-02 21:43:36 +02:00
|
|
|
(*
|
|
|
|
CVAPI(void) cvValidateDisparity( CvArr* disparity, const CvArr* cost,
|
|
|
|
int minDisparity, int numberOfDisparities,
|
|
|
|
int disp12MaxDiff CV_DEFAULT(1) );
|
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
|
|
|
|
|
|
|
type
|
|
|
|
TcvValidateDisparity = procedure(disparity: pCvArr; const cost: pCvArr; minDisparity: Integer; numberOfDisparities: Integer;
|
|
|
|
disp12MaxDiff: Integer = 1); cdecl;
|
2015-04-02 21:43:36 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
var
|
|
|
|
cvValidateDisparity: TcvValidateDisparity;
|
|
|
|
{$ELSE}
|
2015-04-02 21:43:36 +02:00
|
|
|
procedure cvValidateDisparity(disparity: pCvArr; const cost: pCvArr; minDisparity: Integer; numberOfDisparities: Integer;
|
|
|
|
disp12MaxDiff: Integer = 1); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
Reprojects the computed disparity image to the 3D space using the specified 4x4 matrix
|
|
|
|
|
2013-04-05 23:25:05 +02:00
|
|
|
CVAPI(void) cvReprojectImageTo3D(
|
|
|
|
const CvArr* disparityImage,
|
|
|
|
CvArr* _3dImage,
|
|
|
|
const CvMat* Q,
|
|
|
|
int handleMissingValues CV_DEFAULT(0) );
|
2014-10-18 01:12:32 +02:00
|
|
|
*)
|
2015-11-12 16:46:36 +01:00
|
|
|
{$IFDEF SAFELOADLIB}
|
2013-04-05 23:25:05 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
Type
|
|
|
|
TcvReprojectImageTo3D = procedure(
|
|
|
|
{ } const disparityImage: pCvMat;
|
|
|
|
{ } _3dImage: pIplImage;
|
|
|
|
{ } const Q: pCvMat;
|
|
|
|
{ } handleMissingValues: Integer = 0); cdecl;
|
|
|
|
|
|
|
|
var
|
|
|
|
cvReprojectImageTo3D: TcvReprojectImageTo3D;
|
|
|
|
{$ELSE}
|
2013-04-05 23:25:05 +02:00
|
|
|
procedure cvReprojectImageTo3D(
|
|
|
|
{ } const disparityImage: pCvMat;
|
|
|
|
{ } _3dImage: pIplImage;
|
|
|
|
{ } const Q: pCvMat;
|
|
|
|
{ } handleMissingValues: Integer = 0); cdecl;
|
2015-11-12 16:46:36 +01:00
|
|
|
{$ENDIF}
|
2013-04-05 23:25:05 +02:00
|
|
|
|
2013-03-31 22:30:13 +02:00
|
|
|
implementation
|
|
|
|
|
2014-05-22 16:23:41 +02:00
|
|
|
uses ocv.lib;
|
2014-05-22 08:53:48 +02:00
|
|
|
|
2015-11-12 16:46:36 +01:00
|
|
|
{$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; external calib3d_lib;
|
|
|
|
procedure cvPOSIT; external calib3d_lib;
|
|
|
|
procedure cvReleasePOSITObject; external calib3d_lib;
|
|
|
|
function cvRANSACUpdateNumIters; external calib3d_lib;
|
|
|
|
procedure cvConvertPointsHomogeneous; external calib3d_lib;
|
|
|
|
function cvFindFundamentalMat; external calib3d_lib;
|
|
|
|
procedure cvComputeCorrespondEpilines; external calib3d_lib;
|
|
|
|
procedure cvTriangulatePoints; external calib3d_lib;
|
|
|
|
procedure cvCorrectMatches; external calib3d_lib;
|
|
|
|
procedure cvGetOptimalNewCameraMatrix; external calib3d_lib;
|
|
|
|
function cvRodrigues2; external calib3d_lib;
|
|
|
|
function cvFindHomography; external calib3d_lib;
|
|
|
|
procedure cvRQDecomp3x3; external calib3d_lib;
|
|
|
|
procedure cvDecomposeProjectionMatrix; external calib3d_lib;
|
|
|
|
procedure cvCalcMatMulDeriv; external calib3d_lib;
|
|
|
|
procedure cvComposeRT; external calib3d_lib;
|
|
|
|
procedure cvProjectPoints2; external calib3d_lib;
|
|
|
|
procedure cvFindExtrinsicCameraParams2; external calib3d_lib;
|
|
|
|
procedure cvInitIntrinsicParams2D; external calib3d_lib;
|
|
|
|
function cvCheckChessboard; external calib3d_lib;
|
|
|
|
function cvFindChessboardCorners; external calib3d_lib;
|
|
|
|
procedure cvDrawChessboardCorners; external calib3d_lib;
|
|
|
|
function cvCalibrateCamera2; external calib3d_lib;
|
|
|
|
procedure cvCalibrationMatrixValues; external calib3d_lib;
|
|
|
|
function cvStereoCalibrate; external calib3d_lib;
|
|
|
|
procedure cvStereoRectify; external calib3d_lib;
|
|
|
|
function cvStereoRectifyUncalibrated; external calib3d_lib;
|
|
|
|
function cvCreateStereoBMState; external calib3d_lib;
|
|
|
|
procedure cvReleaseStereoBMState; external calib3d_lib;
|
|
|
|
procedure cvFindStereoCorrespondenceBM; external calib3d_lib;
|
|
|
|
function cvGetValidDisparityROI; external calib3d_lib;
|
|
|
|
procedure cvValidateDisparity; external calib3d_lib;
|
|
|
|
procedure cvReprojectImageTo3D; external calib3d_lib;
|
|
|
|
{$ENDIF}
|
2013-03-31 22:30:13 +02:00
|
|
|
|
|
|
|
end.
|