fixed build on Linux
This commit is contained in:
@@ -104,31 +104,6 @@ CVAPI(void) cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2,
|
||||
CVAPI(void) cvCorrectMatches(CvMat* F, CvMat* points1, CvMat* points2,
|
||||
CvMat* new_points1, CvMat* new_points2);
|
||||
|
||||
/* Transforms the input image to compensate lens distortion */
|
||||
CVAPI(void) cvUndistort2( const CvArr* src, CvArr* dst,
|
||||
const CvMat* camera_matrix,
|
||||
const CvMat* distortion_coeffs,
|
||||
const CvMat* new_camera_matrix CV_DEFAULT(0) );
|
||||
|
||||
/* Computes transformation map from intrinsic camera parameters
|
||||
that can used by cvRemap */
|
||||
CVAPI(void) cvInitUndistortMap( const CvMat* camera_matrix,
|
||||
const CvMat* distortion_coeffs,
|
||||
CvArr* mapx, CvArr* mapy );
|
||||
|
||||
/* Computes undistortion+rectification map for a head of stereo camera */
|
||||
CVAPI(void) cvInitUndistortRectifyMap( const CvMat* camera_matrix,
|
||||
const CvMat* dist_coeffs,
|
||||
const CvMat *R, const CvMat* new_camera_matrix,
|
||||
CvArr* mapx, CvArr* mapy );
|
||||
|
||||
/* Computes the original (undistorted) feature coordinates
|
||||
from the observed (distorted) coordinates */
|
||||
CVAPI(void) cvUndistortPoints( const CvMat* src, CvMat* dst,
|
||||
const CvMat* camera_matrix,
|
||||
const CvMat* dist_coeffs,
|
||||
const CvMat* R CV_DEFAULT(0),
|
||||
const CvMat* P CV_DEFAULT(0));
|
||||
|
||||
/* 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
|
||||
@@ -450,13 +425,6 @@ public:
|
||||
namespace cv
|
||||
{
|
||||
|
||||
CV_EXPORTS void undistortPoints( const Mat& src, vector<Point2f>& dst,
|
||||
const Mat& cameraMatrix, const Mat& distCoeffs,
|
||||
const Mat& R=Mat(), const Mat& P=Mat());
|
||||
CV_EXPORTS void undistortPoints( const Mat& src, Mat& dst,
|
||||
const Mat& cameraMatrix, const Mat& distCoeffs,
|
||||
const Mat& R=Mat(), const Mat& P=Mat());
|
||||
|
||||
CV_EXPORTS void Rodrigues(const Mat& src, Mat& dst);
|
||||
CV_EXPORTS void Rodrigues(const Mat& src, Mat& dst, Mat& jacobian);
|
||||
|
||||
@@ -573,7 +541,7 @@ CV_EXPORTS void calibrationMatrixValues( const Mat& cameraMatrix,
|
||||
double& focalLength,
|
||||
Point2d& principalPoint,
|
||||
double& aspectRatio );
|
||||
|
||||
|
||||
CV_EXPORTS double stereoCalibrate( const vector<vector<Point3f> >& objectPoints,
|
||||
const vector<vector<Point2f> >& imagePoints1,
|
||||
const vector<vector<Point2f> >& imagePoints2,
|
||||
@@ -605,6 +573,10 @@ CV_EXPORTS bool stereoRectifyUncalibrated( const Mat& points1,
|
||||
Mat& H1, Mat& H2,
|
||||
double threshold=5 );
|
||||
|
||||
CV_EXPORTS Mat getOptimalNewCameraMatrix( const Mat& cameraMatrix, const Mat& distCoeffs,
|
||||
Size imageSize, double alpha, Size newImgSize=Size(),
|
||||
Rect* validPixROI=0);
|
||||
|
||||
CV_EXPORTS void convertPointsHomogeneous( const Mat& src, vector<Point3f>& dst );
|
||||
CV_EXPORTS void convertPointsHomogeneous( const Mat& src, vector<Point2f>& dst );
|
||||
|
||||
|
@@ -263,49 +263,6 @@ CV_INLINE void cvProjectPointsSimple( int point_count, CvPoint3D64f* _object_po
|
||||
}
|
||||
|
||||
|
||||
CV_INLINE void cvUnDistortOnce( const CvArr* src, CvArr* dst,
|
||||
const float* intrinsic_matrix,
|
||||
const float* distortion_coeffs,
|
||||
int CV_UNREFERENCED(interpolate) )
|
||||
{
|
||||
CvMat _a = cvMat( 3, 3, CV_32F, (void*)intrinsic_matrix );
|
||||
CvMat _k = cvMat( 4, 1, CV_32F, (void*)distortion_coeffs );
|
||||
cvUndistort2( src, dst, &_a, &_k, 0 );
|
||||
}
|
||||
|
||||
|
||||
/* the two functions below have quite hackerish implementations, use with care
|
||||
(or, which is better, switch to cvUndistortInitMap and cvRemap instead */
|
||||
CV_INLINE void cvUnDistortInit( const CvArr* CV_UNREFERENCED(src),
|
||||
CvArr* undistortion_map,
|
||||
const float* A, const float* k,
|
||||
int CV_UNREFERENCED(interpolate) )
|
||||
{
|
||||
union { uchar* ptr; float* fl; } data;
|
||||
CvSize sz;
|
||||
cvGetRawData( undistortion_map, &data.ptr, 0, &sz );
|
||||
assert( sz.width >= 8 );
|
||||
/* just save the intrinsic parameters to the map */
|
||||
data.fl[0] = A[0]; data.fl[1] = A[4];
|
||||
data.fl[2] = A[2]; data.fl[3] = A[5];
|
||||
data.fl[4] = k[0]; data.fl[5] = k[1];
|
||||
data.fl[6] = k[2]; data.fl[7] = k[3];
|
||||
}
|
||||
|
||||
CV_INLINE void cvUnDistort( const CvArr* src, CvArr* dst,
|
||||
const CvArr* undistortion_map,
|
||||
int CV_UNREFERENCED(interpolate) )
|
||||
{
|
||||
union { uchar* ptr; float* fl; } data;
|
||||
float a[] = {0,0,0,0,0,0,0,0,1};
|
||||
CvSize sz;
|
||||
cvGetRawData( undistortion_map, &data.ptr, 0, &sz );
|
||||
assert( sz.width >= 8 );
|
||||
a[0] = data.fl[0]; a[4] = data.fl[1];
|
||||
a[2] = data.fl[2]; a[5] = data.fl[3];
|
||||
cvUnDistortOnce( src, dst, a, data.fl + 4, 1 );
|
||||
}
|
||||
|
||||
#define cvMake2DPoints cvConvertPointsHomogeneous
|
||||
#define cvMake3DPoints cvConvertPointsHomogeneous
|
||||
|
||||
|
Reference in New Issue
Block a user