Home | History | Annotate | Download | only in src

Lines Matching refs:m1

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,
176 int count = m1->rows*m1->cols, maxGoodCount = 0;
177 CV_ASSERT( CV_ARE_SIZES_EQ(m1, m2) && CV_ARE_SIZES_EQ(m1, mask) );
188 ms1 = cvCreateMat( 1, modelPoints, m1->type );
194 ms1 = (CvMat*)m1;
203 bool found = getSubset( m1, m2, ms1, ms2, modelPoints );
219 goodCount = findInliers( m1, m2, &model_i, err, tmask, reprojThreshold );
244 if( ms1 != m1 )
257 bool CvModelEstimator2::runLMeDS( const CvMat* m1, const CvMat* m2, CvMat* model,
271 int count = m1->rows*m1->cols;
274 CV_ASSERT( CV_ARE_SIZES_EQ(m1, m2) && CV_ARE_SIZES_EQ(m1, mask) );
284 ms1 = cvCreateMat( 1, modelPoints, m1->type );
290 ms1 = (CvMat*)m1;
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 );
343 if( ms1 != m1 )
353 bool CvModelEstimator2::getSubset( const CvMat* m1, const CvMat* m2,
358 int type = CV_MAT_TYPE(m1->type), elemSize = CV_ELEM_SIZE(type);
359 const int *m1ptr = m1->data.i, *m2ptr = m2->data.i;
361 int count = m1->cols*m1->rows;
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 )
446 int i, count = m1->rows*m1->cols;
447 const CvPoint2D64f* M = (const CvPoint2D64f*)m1->data.ptr;
506 void CvHomographyEstimator::computeReprojError( const CvMat* m1, const CvMat* m2,
509 int i, count = m1->rows*m1->cols;
510 const CvPoint2D64f* M = (const CvPoint2D64f*)m1->data.ptr;
524 bool CvHomographyEstimator::refine( const CvMat* m1, const CvMat* m2, CvMat* model, int maxIters )
527 int i, j, k, count = m1->rows*m1->cols;
528 const CvPoint2D64f* M = (const CvPoint2D64f*)m1->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 );
693 const CvPoint2D64f* m1 = (const CvPoint2D64f*)_m1->data.ptr;
699 // the equation: (m2[i], 1)'*F*(m1[i], 1) = 0
702 double x0 = m1[i].x, y0 = m1[i].y;
802 const CvPoint2D64f* m1 = (const CvPoint2D64f*)_m1->data.ptr;
810 double x = m1[i].x, y = m1[i].y;
826 double x = m1[i].x - m0c.x, y = m1[i].y - m0c.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
849 double x0 = (m1[i].x - m0c.x)*scale0;
850 double y0 = (m1[i].y - m0c.y)*scale0;
917 const CvPoint2D64f* m1 = (const CvPoint2D64f*)_m1->data.ptr;
926 a = F[0]*m1[i].x + F[1]*m1[i].y + F[2];
927 b = F[3]*m1[i].x + F[4]*m1[i].y + F[5];
928 c = F[6]*m1[i].x + F[7]*m1[i].y + F[8];
938 d1 = m1[i].x*a + m1[i].y*b + c;
951 CvMat *m1 = 0, *m2 = 0, *tempMask = 0;
969 m1 = cvCreateMat( 1, count, CV_64FC2 );
970 cvConvertPointsHomogeneous( points1, m1 );
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 );
1006 icvCompressPoints( (CvPoint2D64f*)m1->data.ptr, tempMask->data.ptr, 1, count );
1009 m1->cols = m2->cols = count;
1010 estimator.run8Point(m1, m2, &_F3x3);
1019 cvReleaseMat( &m1 );