Skip to content
Snippets Groups Projects
Commit 1e9f9cb2 authored by Angel Santamaria-Navarro's avatar Angel Santamaria-Navarro
Browse files

FIX fundamental_matrix matches queryIdx and trainIdx

parent 19cd7104
No related branches found
No related tags found
No related merge requests found
......@@ -224,8 +224,8 @@ int main(int argc, char** argv)
if (matches[ii].distance <= 50) //std::max(2*min_dist, 0.02) )
{
good_matches.push_back(matches[ii]);
matched_1.push_back(keypoints_1[matches[ii].trainIdx].pt);
matched_2.push_back(keypoints_1[matches[ii].queryIdx].pt);
matched_1.push_back(keypoints_1[matches[ii].queryIdx].pt);
matched_2.push_back(keypoints_1[matches[ii].trainIdx].pt);
}
}
......
......@@ -191,8 +191,8 @@ void MatcherBase::ransacTest(const KeyPointVector& _raw_kps1,
PointVector raw_pts1, raw_pts2;
for (std::vector<cv::DMatch>::const_iterator it= _raw_matches.begin(); it!= _raw_matches.end(); ++it)
{
raw_pts1.push_back(cv::Point2f(_raw_kps1[it->queryIdx].pt.x, _raw_kps1[it->queryIdx].pt.y));
raw_pts2.push_back(cv::Point2f(_raw_kps2[it->trainIdx].pt.x, _raw_kps2[it->trainIdx].pt.y));
raw_pts1.push_back(_raw_kps1[it->queryIdx].pt);
raw_pts2.push_back(_raw_kps2[it->trainIdx].pt);
}
// Compute F matrix using RANSAC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment