cvaux.h.svn-base
来自「非结构化路识别」· SVN-BASE 代码 · 共 1,161 行 · 第 1/4 页
SVN-BASE
1,161 行
int num_generations CV_DEFAULT(3),
int quality CV_DEFAULT(2) );
#define CV_UNDEF_SC_PARAM 12345 //default value of parameters
#define CV_IDP_BIRCHFIELD_PARAM1 25
#define CV_IDP_BIRCHFIELD_PARAM2 5
#define CV_IDP_BIRCHFIELD_PARAM3 12
#define CV_IDP_BIRCHFIELD_PARAM4 15
#define CV_IDP_BIRCHFIELD_PARAM5 25
#define CV_DISPARITY_BIRCHFIELD 0
/*F///////////////////////////////////////////////////////////////////////////
//
// Name: cvFindStereoCorrespondence
// Purpose: find stereo correspondence on stereo-pair
// Context:
// Parameters:
// leftImage - left image of stereo-pair (format 8uC1).
// rightImage - right image of stereo-pair (format 8uC1).
// mode - mode of correspondence retrieval (now CV_DISPARITY_BIRCHFIELD only)
// dispImage - destination disparity image
// maxDisparity - maximal disparity
// param1, param2, param3, param4, param5 - parameters of algorithm
// Returns:
// Notes:
// Images must be rectified.
// All images must have format 8uC1.
//F*/
OPENCVAUXAPI void
cvFindStereoCorrespondence(
const CvArr* leftImage, const CvArr* rightImage,
int mode,
CvArr* dispImage,
int maxDisparity,
double param1 CV_DEFAULT(CV_UNDEF_SC_PARAM),
double param2 CV_DEFAULT(CV_UNDEF_SC_PARAM),
double param3 CV_DEFAULT(CV_UNDEF_SC_PARAM),
double param4 CV_DEFAULT(CV_UNDEF_SC_PARAM),
double param5 CV_DEFAULT(CV_UNDEF_SC_PARAM) );
/*****************************************************************************************/
/************ Epiline functions *******************/
typedef struct CvStereoLineCoeff
{
double Xcoef;
double XcoefA;
double XcoefB;
double XcoefAB;
double Ycoef;
double YcoefA;
double YcoefB;
double YcoefAB;
double Zcoef;
double ZcoefA;
double ZcoefB;
double ZcoefAB;
}CvStereoLineCoeff;
typedef struct CvCamera
{
float imgSize[2]; /* size of the camera view, used during calibration */
float matrix[9]; /* intinsic camera parameters: [ fx 0 cx; 0 fy cy; 0 0 1 ] */
float distortion[4]; /* distortion coefficients - two coefficients for radial distortion
and another two for tangential: [ k1 k2 p1 p2 ] */
float rotMatr[9];
float transVect[3]; /* rotation matrix and transition vector relatively
to some reference point in the space. */
}
CvCamera;
typedef struct CvStereoCamera
{
CvCamera* camera[2]; /* two individual camera parameters */
float fundMatr[9]; /* fundamental matrix */
/* New part for stereo */
CvPoint3D32f epipole[2];
CvPoint2D32f quad[2][4]; /* coordinates of destination quadrangle after
epipolar geometry rectification */
double coeffs[2][3][3];/* coefficients for transformation */
CvPoint2D32f border[2][4];
CvSize warpSize;
CvStereoLineCoeff* lineCoeffs;
int needSwapCameras;/* flag set to 1 if need to swap cameras for good reconstruction */
float rotMatrix[9];
float transVector[3];
}
CvStereoCamera;
typedef struct CvContourOrientation
{
float egvals[2];
float egvects[4];
float max, min; // minimum and maximum projections
int imax, imin;
} CvContourOrientation;
#define CV_CAMERA_TO_WARP 1
#define CV_WARP_TO_CAMERA 2
OPENCVAUXAPI CvStatus icvConvertWarpCoordinates(double coeffs[3][3],
CvPoint2D32f* cameraPoint,
CvPoint2D32f* warpPoint,
int direction);
OPENCVAUXAPI CvStatus icvGetSymPoint3D( CvPoint3D64d pointCorner,
CvPoint3D64d point1,
CvPoint3D64d point2,
CvPoint3D64d *pointSym2);
OPENCVAUXAPI void icvGetPieceLength3D(CvPoint3D64d point1,CvPoint3D64d point2,double* dist);
OPENCVAUXAPI CvStatus icvCompute3DPoint( double alpha,double betta,
CvStereoLineCoeff* coeffs,
CvPoint3D64d* point);
OPENCVAUXAPI CvStatus icvCreateConvertMatrVect( CvMatr64d rotMatr1,
CvMatr64d transVect1,
CvMatr64d rotMatr2,
CvMatr64d transVect2,
CvMatr64d convRotMatr,
CvMatr64d convTransVect);
OPENCVAUXAPI CvStatus icvConvertPointSystem(CvPoint3D64d M2,
CvPoint3D64d* M1,
CvMatr64d rotMatr,
CvMatr64d transVect
);
OPENCVAUXAPI CvStatus icvComputeCoeffForStereo( CvStereoCamera* stereoCamera);
OPENCVAUXAPI int icvGetCrossPieceVector(CvPoint2D32f p1_start,CvPoint2D32f p1_end,CvPoint2D32f v2_start,CvPoint2D32f v2_end,CvPoint2D32f *cross);
OPENCVAUXAPI int icvGetCrossLineDirect(CvPoint2D32f p1,CvPoint2D32f p2,float a,float b,float c,CvPoint2D32f* cross);
OPENCVAUXAPI float icvDefinePointPosition(CvPoint2D32f point1,CvPoint2D32f point2,CvPoint2D32f point);
OPENCVAUXAPI CvStatus icvStereoCalibration( int numImages,
int* nums,
CvSize imageSize,
CvPoint2D32f* imagePoints1,
CvPoint2D32f* imagePoints2,
CvPoint3D32f* objectPoints,
CvStereoCamera* stereoparams
);
OPENCVAUXAPI CvStatus icvComputeRestStereoParams(CvStereoCamera *stereoparams);
OPENCVAUXAPI void cvComputePerspectiveMap(const double coeffs[3][3], CvArr* rectMap);
OPENCVAUXAPI CvStatus icvComCoeffForLine( CvPoint2D64d point1,
CvPoint2D64d point2,
CvPoint2D64d point3,
CvPoint2D64d point4,
CvMatr64d camMatr1,
CvMatr64d rotMatr1,
CvMatr64d transVect1,
CvMatr64d camMatr2,
CvMatr64d rotMatr2,
CvMatr64d transVect2,
CvStereoLineCoeff* coeffs,
int* needSwapCameras);
OPENCVAUXAPI CvStatus icvGetDirectionForPoint( CvPoint2D64d point,
CvMatr64d camMatr,
CvPoint3D64d* direct);
OPENCVAUXAPI CvStatus icvGetCrossLines(CvPoint3D64d point11,CvPoint3D64d point12,
CvPoint3D64d point21,CvPoint3D64d point22,
CvPoint3D64d* midPoint);
OPENCVAUXAPI CvStatus icvComputeStereoLineCoeffs( CvPoint3D64d pointA,
CvPoint3D64d pointB,
CvPoint3D64d pointCam1,
double gamma,
CvStereoLineCoeff* coeffs);
OPENCVAUXAPI CvStatus icvComputeFundMatrEpipoles ( CvMatr64d camMatr1,
CvMatr64d rotMatr1,
CvVect64d transVect1,
CvMatr64d camMatr2,
CvMatr64d rotMatr2,
CvVect64d transVect2,
CvPoint2D64d* epipole1,
CvPoint2D64d* epipole2,
CvMatr64d fundMatr);
OPENCVAUXAPI void
icvSolveCubic(CvMat* coeffs,CvMat* result);
OPENCVAUXAPI int icvGetAngleLine( CvPoint2D64d startPoint, CvSize imageSize,CvPoint2D64d *point1,CvPoint2D64d *point2);
OPENCVAUXAPI void icvGetCoefForPiece( CvPoint2D64d p_start,CvPoint2D64d p_end,
double *a,double *b,double *c,
int* result);
OPENCVAUXAPI void icvGetCommonArea( CvSize imageSize,
CvPoint2D64d epipole1,CvPoint2D64d epipole2,
CvMatr64d fundMatr,
CvVect64d coeff11,CvVect64d coeff12,
CvVect64d coeff21,CvVect64d coeff22,
int* result);
OPENCVAUXAPI void icvComputeeInfiniteProject1(CvMatr64d rotMatr,
CvMatr64d camMatr1,
CvMatr64d camMatr2,
CvPoint2D32f point1,
CvPoint2D32f *point2);
OPENCVAUXAPI void icvComputeeInfiniteProject2(CvMatr64d rotMatr,
CvMatr64d camMatr1,
CvMatr64d camMatr2,
CvPoint2D32f* point1,
CvPoint2D32f point2);
OPENCVAUXAPI void icvGetCrossDirectDirect( CvVect64d direct1,CvVect64d direct2,
CvPoint2D64d *cross,int* result);
OPENCVAUXAPI void icvGetCrossPieceDirect( CvPoint2D64d p_start,CvPoint2D64d p_end,
double a,double b,double c,
CvPoint2D64d *cross,int* result);
OPENCVAUXAPI void icvGetCrossPiecePiece( CvPoint2D64d p1_start,CvPoint2D64d p1_end,
CvPoint2D64d p2_start,CvPoint2D64d p2_end,
CvPoint2D64d* cross,
int* result);
OPENCVAUXAPI void icvGetPieceLength(CvPoint2D64d point1,CvPoint2D64d point2,double* dist);
OPENCVAUXAPI void icvGetCrossRectDirect( CvSize imageSize,
double a,double b,double c,
CvPoint2D64d *start,CvPoint2D64d *end,
int* result);
OPENCVAUXAPI void icvProjectPointToImage( CvPoint3D64d point,
CvMatr64d camMatr,CvMatr64d rotMatr,CvVect64d transVect,
CvPoint2D64d* projPoint);
OPENCVAUXAPI void icvGetQuadsTransform( CvSize imageSize,
CvMatr64d camMatr1,
CvMatr64d rotMatr1,
CvVect64d transVect1,
CvMatr64d camMatr2,
CvMatr64d rotMatr2,
CvVect64d transVect2,
CvSize* warpSize,
double quad1[4][2],
double quad2[4][2],
CvMatr64d fundMatr,
CvPoint3D64d* epipole1,
CvPoint3D64d* epipole2
);
OPENCVAUXAPI void icvGetQuadsTransformStruct( CvStereoCamera* stereoCamera);
OPENCVAUXAPI void icvComputeStereoParamsForCameras(CvStereoCamera* stereoCamera);
OPENCVAUXAPI void icvGetCutPiece( CvVect64d areaLineCoef1,CvVect64d areaLineCoef2,
CvPoint2D64d epipole,
CvSize imageSize,
CvPoint2D64d* point11,CvPoint2D64d* point12,
CvPoint2D64d* point21,CvPoint2D64d* point22,
int* result);
OPENCVAUXAPI void icvGetMiddleAnglePoint( CvPoint2D64d basePoint,
CvPoint2D64d point1,CvPoint2D64d point2,
CvPoint2D64d* midPoint);
OPENCVAUXAPI void icvGetNormalDirect(CvVect64d direct,CvPoint2D64d point,CvVect64d normDirect);
OPENCVAUXAPI double icvGetVect(CvPoint2D64d basePoint,CvPoint2D64d point1,CvPoint2D64d point2);
OPENCVAUXAPI void icvProjectPointToDirect( CvPoint2D64d point,CvVect64d lineCoeff,
CvPoint2D64d* projectPoint);
OPENCVAUXAPI void icvGetDistanceFromPointToDirect( CvPoint2D64d point,CvVect64d lineCoef,double*dist);
OPENCVAUXAPI IplImage* icvCreateIsometricImage( IplImage* src, IplImage* dst,
int desired_depth, int desired_num_channels );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?