Lines Matching defs:m2
63 virtual int runKernel( const CvMat* m1, const CvMat* m2, CvMat* model )=0;
64 virtual bool runLMeDS( const CvMat* m1, const CvMat* m2, CvMat* model,
66 virtual bool runRANSAC( const CvMat* m1, const CvMat* m2, CvMat* model,
73 virtual void computeReprojError( const CvMat* m1, const CvMat* m2,
75 virtual int findInliers( const CvMat* m1, const CvMat* m2,
78 virtual bool getSubset( const CvMat* m1, const CvMat* m2,
109 int CvModelEstimator2::findInliers( const CvMat* m1, const CvMat* m2,
117 computeReprojError( m1, m2, model, _err );
162 bool CvModelEstimator2::runRANSAC( const CvMat* m1, const CvMat* m2, CvMat* model,
177 CV_ASSERT( CV_ARE_SIZES_EQ(m1, m2) && CV_ARE_SIZES_EQ(m1, mask) );
189 ms2 = cvCreateMat( 1, modelPoints, m2->type );
195 ms2 = (CvMat*)m2;
203 bool found = getSubset( m1, m2, ms1, ms2, modelPoints );
219 goodCount = findInliers( m1, m2, &model_i, err, tmask, reprojThreshold );
246 if( ms2 != m2 )
257 bool CvModelEstimator2::runLMeDS( const CvMat* m1, const CvMat* m2, CvMat* model,
274 CV_ASSERT( CV_ARE_SIZES_EQ(m1, m2) && CV_ARE_SIZES_EQ(m1, mask) );
285 ms2 = cvCreateMat( 1, modelPoints, m2->type );
291 ms2 = (CvMat*)m2;
302 bool found = getSubset( m1, m2, ms1, ms2, 300 );
318 computeReprojError( m1, m2, &model_i, err );
337 count = findInliers( m1, m2, model, err, mask, sigma );
345 if( ms2 != m2 )
353 bool CvModelEstimator2::getSubset( const CvMat* m1, const CvMat* m2,
359 const int *m1ptr = m1->data.i, *m2ptr = m2->data.i;
363 assert( CV_IS_MAT_CONT(m1->type & m2->type) && (elemSize % sizeof(int) == 0) );
429 virtual int runKernel( const CvMat* m1, const CvMat* m2, CvMat* model );
430 virtual bool refine( const CvMat* m1, const CvMat* m2,
433 virtual void computeReprojError( const CvMat* m1, const CvMat* m2,
444 int CvHomographyEstimator::runKernel( const CvMat* m1, const CvMat* m2, CvMat* H )
448 const CvPoint2D64f* m = (const CvPoint2D64f*)m2->data.ptr;
506 void CvHomographyEstimator::computeReprojError( const CvMat* m1, const CvMat* m2,
511 const CvPoint2D64f* m = (const CvPoint2D64f*)m2->data.ptr;
524 bool CvHomographyEstimator::refine( const CvMat* m1, const CvMat* m2, CvMat* model, int maxIters )
529 const CvPoint2D64f* m = (const CvPoint2D64f*)m2->data.ptr;
663 virtual int runKernel( const CvMat* m1, const CvMat* m2, CvMat* model );
664 virtual int run7Point( const CvMat* m1, const CvMat* m2, CvMat* model );
665 virtual int run8Point( const CvMat* m1, const CvMat* m2, CvMat* model );
667 virtual void computeReprojError( const CvMat* m1, const CvMat* m2,
678 int CvFMEstimator::runKernel( const CvMat* m1, const CvMat* m2, CvMat* model )
680 return modelPoints == 7 ? run7Point( m1, m2, model ) : run8Point( m1, m2, model );
694 const CvPoint2D64f* m2 = (const CvPoint2D64f*)_m2->data.ptr;
699 // the equation: (m2[i], 1)'*F*(m1[i], 1) = 0
703 double x1 = m2[i].x, y1 = m2[i].y;
803 const CvPoint2D64f* m2 = (const CvPoint2D64f*)_m2->data.ptr;
813 x = m2[i].x, y = m2[i].y;
829 x = fabs(m2[i].x - m1c.x), y = fabs(m2[i].y - m1c.y);
844 // form a linear system Ax=0: for each selected pair of points m1 & m2,
845 // the row of A(=a) represents the coefficients of equation: (m2, 1)'*F*(m1, 1) = 0
851 double x1 = (m2[i].x - m1c.x)*scale1;
852 double y1 = (m2[i].y - m1c.y)*scale1;
918 const CvPoint2D64f* m2 = (const CvPoint2D64f*)_m2->data.ptr;
931 d2 = m2[i].x*a + m2[i].y*b + c;
933 a = F[0]*m2[i].x + F[3]*m2[i].y + F[6];
934 b = F[1]*m2[i].x + F[4]*m2[i].y + F[7];
935 c = F[2]*m2[i].x + F[5]*m2[i].y + F[8];
951 CvMat *m1 = 0, *m2 = 0, *tempMask = 0;
972 m2 = cvCreateMat( 1, count, CV_64FC2 );
973 cvConvertPointsHomogeneous( points2, m2 );
990 result = estimator.run7Point(m1, m2, &_F9x3);
992 result = estimator.run8Point(m1, m2, &_F3x3);
1001 result = estimator.runRANSAC(m1, m2, &_F3x3, tempMask, param1, param2 );
1003 result = estimator.runLMeDS(m1, m2, &_F3x3, tempMask, param2 );
1007 count = icvCompressPoints( (CvPoint2D64f*)m2->data.ptr, tempMask->data.ptr, 1, count );
1009 m1->cols = m2->cols = count;
1010 estimator.run8Point(m1, m2, &_F3x3);
1020 cvReleaseMat( &m2 );