Skip to content

Commit 6873bde

Browse files
authored
backport C++ 3d/calibration_base.cpp:5.x to calib3d/calibration_base.cpp:4.x (opencv#26414)
* Add vanilla calibration_base from 5.x This is from 5510571 * Have the C implementation use the new C++ one.
1 parent 5817b56 commit 6873bde

File tree

6 files changed

+1698
-1957
lines changed

6 files changed

+1698
-1957
lines changed

modules/calib3d/src/calib3d_c_api.h

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,6 @@ void cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2,
111111
void cvCorrectMatches(CvMat* F, CvMat* points1, CvMat* points2,
112112
CvMat* new_points1, CvMat* new_points2);
113113

114-
115-
/* Computes the optimal new camera matrix according to the free scaling parameter alpha:
116-
alpha=0 - only valid pixels will be retained in the undistorted image
117-
alpha=1 - all the source image pixels will be retained in the undistorted image
118-
*/
119-
void cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix,
120-
const CvMat* dist_coeffs,
121-
CvSize image_size, double alpha,
122-
CvMat* new_camera_matrix,
123-
CvSize new_imag_size CV_DEFAULT(cvSize(0,0)),
124-
CvRect* valid_pixel_ROI CV_DEFAULT(0),
125-
int center_principal_point CV_DEFAULT(0));
126-
127-
/* Converts rotation vector to rotation matrix or vice versa */
128-
int cvRodrigues2( const CvMat* src, CvMat* dst,
129-
CvMat* jacobian CV_DEFAULT(0) );
130-
131114
/* Finds perspective transformation between the object plane and image (view) plane */
132115
int cvFindHomography( const CvMat* src_points,
133116
const CvMat* dst_points,
@@ -138,54 +121,6 @@ int cvFindHomography( const CvMat* src_points,
138121
int maxIters CV_DEFAULT(2000),
139122
double confidence CV_DEFAULT(0.995));
140123

141-
/* Computes RQ decomposition for 3x3 matrices */
142-
void cvRQDecomp3x3( const CvMat *matrixM, CvMat *matrixR, CvMat *matrixQ,
143-
CvMat *matrixQx CV_DEFAULT(NULL),
144-
CvMat *matrixQy CV_DEFAULT(NULL),
145-
CvMat *matrixQz CV_DEFAULT(NULL),
146-
CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));
147-
148-
/* Computes projection matrix decomposition */
149-
void cvDecomposeProjectionMatrix( const CvMat *projMatr, CvMat *calibMatr,
150-
CvMat *rotMatr, CvMat *posVect,
151-
CvMat *rotMatrX CV_DEFAULT(NULL),
152-
CvMat *rotMatrY CV_DEFAULT(NULL),
153-
CvMat *rotMatrZ CV_DEFAULT(NULL),
154-
CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));
155-
156-
/* Computes d(AB)/dA and d(AB)/dB */
157-
void cvCalcMatMulDeriv( const CvMat* A, const CvMat* B, CvMat* dABdA, CvMat* dABdB );
158-
159-
/* Computes r3 = rodrigues(rodrigues(r2)*rodrigues(r1)),
160-
t3 = rodrigues(r2)*t1 + t2 and the respective derivatives */
161-
void cvComposeRT( const CvMat* _rvec1, const CvMat* _tvec1,
162-
const CvMat* _rvec2, const CvMat* _tvec2,
163-
CvMat* _rvec3, CvMat* _tvec3,
164-
CvMat* dr3dr1 CV_DEFAULT(0), CvMat* dr3dt1 CV_DEFAULT(0),
165-
CvMat* dr3dr2 CV_DEFAULT(0), CvMat* dr3dt2 CV_DEFAULT(0),
166-
CvMat* dt3dr1 CV_DEFAULT(0), CvMat* dt3dt1 CV_DEFAULT(0),
167-
CvMat* dt3dr2 CV_DEFAULT(0), CvMat* dt3dt2 CV_DEFAULT(0) );
168-
169-
/* Projects object points to the view plane using
170-
the specified extrinsic and intrinsic camera parameters */
171-
void cvProjectPoints2( const CvMat* object_points, const CvMat* rotation_vector,
172-
const CvMat* translation_vector, const CvMat* camera_matrix,
173-
const CvMat* distortion_coeffs, CvMat* image_points,
174-
CvMat* dpdrot CV_DEFAULT(NULL), CvMat* dpdt CV_DEFAULT(NULL),
175-
CvMat* dpdf CV_DEFAULT(NULL), CvMat* dpdc CV_DEFAULT(NULL),
176-
CvMat* dpddist CV_DEFAULT(NULL),
177-
double aspect_ratio CV_DEFAULT(0));
178-
179-
/* Finds extrinsic camera parameters from
180-
a few known corresponding point pairs and intrinsic parameters */
181-
void cvFindExtrinsicCameraParams2( const CvMat* object_points,
182-
const CvMat* image_points,
183-
const CvMat* camera_matrix,
184-
const CvMat* distortion_coeffs,
185-
CvMat* rotation_vector,
186-
CvMat* translation_vector,
187-
int use_extrinsic_guess CV_DEFAULT(0) );
188-
189124
/* Computes initial estimate of the intrinsic camera parameters
190125
in case of planar calibration target (e.g. chessboard) */
191126
void cvInitIntrinsicParams2D( const CvMat* object_points,

0 commit comments

Comments
 (0)