File was not saved due to wrong file name.
Add a comment about bug 4308
This commit is contained in:
parent
09930938e8
commit
cfcef3ec98
@ -21,6 +21,7 @@ int main(int argc, char *argv[])
|
|||||||
vector<String> typeAlgoMatch;
|
vector<String> typeAlgoMatch;
|
||||||
vector<String> fileName;
|
vector<String> fileName;
|
||||||
help();
|
help();
|
||||||
|
system("cd");
|
||||||
// This descriptor are going to be detect and compute
|
// This descriptor are going to be detect and compute
|
||||||
typeDesc.push_back("AKAZE"); // see http://docs.opencv.org/trunk/d8/d30/classcv_1_1AKAZE.html
|
typeDesc.push_back("AKAZE"); // see http://docs.opencv.org/trunk/d8/d30/classcv_1_1AKAZE.html
|
||||||
typeDesc.push_back("ORB"); // see http://docs.opencv.org/trunk/de/dbf/classcv_1_1BRISK.html
|
typeDesc.push_back("ORB"); // see http://docs.opencv.org/trunk/de/dbf/classcv_1_1BRISK.html
|
||||||
@ -112,13 +113,15 @@ int main(int argc, char *argv[])
|
|||||||
drawMatches(img1, keyImg1, img2, keyImg2, bestMatches, result);
|
drawMatches(img1, keyImg1, img2, keyImg2, bestMatches, result);
|
||||||
namedWindow(*itDesc+": "+*itMatcher, WINDOW_AUTOSIZE);
|
namedWindow(*itDesc+": "+*itMatcher, WINDOW_AUTOSIZE);
|
||||||
imshow(*itDesc + ": " + *itMatcher, result);
|
imshow(*itDesc + ": " + *itMatcher, result);
|
||||||
FileStorage fs(*itDesc+"_"+*itMatcher+"_"+fileName[0]+"_"+fileName[1]+".xml", FileStorage::WRITE);
|
// Saved result could be wrong due to bug 4308
|
||||||
|
FileStorage fs(*itDesc + "_" + *itMatcher + ".yml", FileStorage::WRITE);
|
||||||
fs<<"Matches"<<matches;
|
fs<<"Matches"<<matches;
|
||||||
vector<DMatch>::iterator it;
|
vector<DMatch>::iterator it;
|
||||||
cout<<"**********Match results**********\n";
|
cout<<"**********Match results**********\n";
|
||||||
cout << "Index \tIndex \tdistance\n";
|
cout << "Index \tIndex \tdistance\n";
|
||||||
cout << "in img1\tin img2\n";
|
cout << "in img1\tin img2\n";
|
||||||
double cumSumDist2=0; // Use to compute distance between keyPoint matches and to evaluate match algorithm
|
// Use to compute distance between keyPoint matches and to evaluate match algorithm
|
||||||
|
double cumSumDist2=0;
|
||||||
for (it = bestMatches.begin(); it != bestMatches.end(); it++)
|
for (it = bestMatches.begin(); it != bestMatches.end(); it++)
|
||||||
{
|
{
|
||||||
cout << it->queryIdx << "\t" << it->trainIdx << "\t" << it->distance << "\n";
|
cout << it->queryIdx << "\t" << it->trainIdx << "\t" << it->distance << "\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user