fixed build on Linux
This commit is contained in:
parent
127d6649a1
commit
4a073bd951
@ -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
|
||||
|
||||
|
@ -46,6 +46,8 @@
|
||||
#include "opencv2/core/core.hpp"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <limits>
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
#include <stdio.h>
|
||||
|
||||
namespace cv{
|
||||
|
||||
|
@ -47,7 +47,6 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/select.h>
|
||||
#include <dc1394/dc1394.h>
|
||||
#include <cv.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -51,7 +51,6 @@
|
||||
// required to enable some functions used here...
|
||||
#define XINE_ENABLE_EXPERIMENTAL_FEATURES
|
||||
|
||||
#include <cv.h>
|
||||
#include <cassert>
|
||||
|
||||
extern "C"
|
||||
|
@ -425,8 +425,6 @@ CV_INLINE void cvMinAreaRect( CvPoint* points, int n,
|
||||
vect1->y = pt[1].y - pt[0].y;
|
||||
vect2->x = pt[3].x - pt[0].x;
|
||||
vect2->y = pt[3].y - pt[0].y;
|
||||
|
||||
CV_UNREFERENCED( (left, bottom, right, top) );
|
||||
}
|
||||
|
||||
typedef int CvDisType;
|
||||
@ -828,6 +826,50 @@ typedef struct CvMatrix3
|
||||
}
|
||||
CvMatrix3;
|
||||
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -347,7 +347,7 @@ CV_EXPORTS void remap( const Mat& src, Mat& dst, const Mat& map1, const Mat& map
|
||||
|
||||
CV_EXPORTS void convertMaps( const Mat& map1, const Mat& map2, Mat& dstmap1, Mat& dstmap2,
|
||||
int dstmap1type, bool nninterpolation=false );
|
||||
|
||||
|
||||
CV_EXPORTS Mat getRotationMatrix2D( Point2f center, double angle, double scale );
|
||||
CV_EXPORTS Mat getPerspectiveTransform( const Point2f src[], const Point2f dst[] );
|
||||
CV_EXPORTS Mat getAffineTransform( const Point2f src[], const Point2f dst[] );
|
||||
@ -388,12 +388,15 @@ CV_EXPORTS void undistort( const Mat& src, Mat& dst, const Mat& cameraMatrix,
|
||||
CV_EXPORTS void initUndistortRectifyMap( const Mat& cameraMatrix, const Mat& distCoeffs,
|
||||
const Mat& R, const Mat& newCameraMatrix,
|
||||
Size size, int m1type, Mat& map1, Mat& map2 );
|
||||
CV_EXPORTS Mat getOptimalNewCameraMatrix( const Mat& cameraMatrix, const Mat& distCoeffs,
|
||||
Size imageSize, double alpha, Size newImgSize=Size(),
|
||||
Rect* validPixROI=0);
|
||||
CV_EXPORTS Mat getDefaultNewCameraMatrix( const Mat& cameraMatrix, Size imgsize=Size(),
|
||||
bool centerPrincipalPoint=false );
|
||||
|
||||
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());
|
||||
|
||||
template<> CV_EXPORTS void Ptr<CvHistogram>::delete_obj();
|
||||
|
||||
|
@ -205,6 +205,32 @@ CVAPI(void) cvLinearPolar( const CvArr* src, CvArr* dst,
|
||||
CvPoint2D32f center, double maxRadius,
|
||||
int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS));
|
||||
|
||||
/* 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));
|
||||
|
||||
/* creates structuring element used for morphological operations */
|
||||
CVAPI(IplConvKernel*) cvCreateStructuringElementEx(
|
||||
int cols, int rows, int anchor_x, int anchor_y,
|
||||
|
Loading…
x
Reference in New Issue
Block a user