Lines Matching refs:train
62 static const int queryDescCount = 300; // must be even number because we split train data in some cases in two
67 void generateData( Mat& query, Mat& train );
70 void matchTest( const Mat& query, const Mat& train );
71 void knnMatchTest( const Mat& query, const Mat& train );
72 void radiusMatchTest( const Mat& query, const Mat& train );
161 void CV_DescriptorMatcherTest::generateData( Mat& query, Mat& train )
171 // Generate train decriptors as follows:
172 // copy each query descriptor to train set countFactor times
176 train.create( query.rows*countFactor, query.cols, CV_32FC1 );
184 Mat trainDescriptor = train.row(tIdx);
193 void CV_DescriptorMatcherTest::matchTest( const Mat& query, const Mat& train )
200 dmatcher->match( query, train, matches );
256 dmatcher->add( vector<Mat>(1,train.rowRange(0, train.rows/2)) );
257 dmatcher->add( vector<Mat>(1,train.rowRange(train.rows/2, train.rows)) );
262 masks[mi] = Mat(query.rows, train.rows/2, CV_8UC1, Scalar::all(1));
304 void CV_DescriptorMatcherTest::knnMatchTest( const Mat& query, const Mat& train )
313 dmatcher->knnMatch( query, train, matches, knn );
353 dmatcher->add( vector<Mat>(1,train.rowRange(0, train.rows/2)) );
354 dmatcher->add( vector<Mat>(1,train.rowRange(train.rows/2, train.rows)) );
359 masks[mi] = Mat(query.rows, train.rows/2, CV_8UC1, Scalar::all(1));
413 void CV_DescriptorMatcherTest::radiusMatchTest( const Mat& query, const Mat& train )
420 dmatcher->radiusMatch( query, train, matches, radius );
456 dmatcher->add( vector<Mat>(1,train.rowRange(0, train.rows/2)) );
457 dmatcher->add( vector<Mat>(1,train.rowRange(train.rows/2, train.rows)) );
462 masks[mi] = Mat(query.rows, train.rows/2, CV_8UC1, Scalar::all(1));
519 Mat query, train;
520 generateData( query, train );
522 matchTest( query, train );
524 knnMatchTest( query, train );
526 radiusMatchTest( query, train );