Exemplo n.º 1
0
void drawMatches(const string &aFilename, Im2D_U_INT1 &aImage0, Im2D_U_INT1 &aImage1)
{
	vector<Match> matches;
	readMatches(aFilename, matches);

	const Match *it = matches.data();
	size_t i = matches.size();
	while (i--)
	{
		drawPoint(aImage0, it->mP0, 255, 5);
		drawPoint(aImage1, it->mP1, 255, 5);
		it++;
	}
}
Exemplo n.º 2
0
void performMatching(char *type)
{
    string terrainCtrlsPath,featuresPath,matchesToPassPath;
    readConfigFile(filename,"terrainCtrlsPath",terrainCtrlsPath);
    readConfigFile(filename,"featuresPath",featuresPath);
    readConfigFile(filename,"matchesToPassPath",matchesToPassPath);

    vector<Match> matches;
    readMatches(matchesToPassPath,matches);
    refineMatches(img1,img2,matches,matches,16,1,0.9);
        printMatches("/home/kevin/Documents/win7share/output/aaa.txt",matches);

//    showMatches(img1,img2,terrainCtrls,imagescale);

//    vector<KeyPoint> kpts;
//    readKeyPoints(featuresPath,kpts);
//    vector<Match> matches;
//    matchUnderTerrainControl(img1,img2,terrainCtrls,kpts,matches,16,64,32,.9);
//    cout<<matches.size()<<endl;
//    ransacTest(matches,matches);
//    cout<<matches.size()<<endl;
//    showMatches(img1,img2,matches,imagescale);
//    printMatches(terrainCtrlsPath,matches,1);
}