ppwwyyxx / OpenPano

Automatic Panorama Stitching From Scratch
MIT License
1.85k stars 552 forks source link

The condition to decide whether these two images should be connected(about final inliers.size()) #110

Closed xxxwuwq closed 3 years ago

xxxwuwq commented 3 years ago

In transform_estimate.cc In the function fill_inliers_to_matchinfo

// get the number of keypoint in the polygon
// TODO shouldn't count undistinctive keypoints as keypoints.
// They should get filtered out earlier
auto get_keypoint_cnt = [&](vector<Vec2D> &poly, bool first) {
auto pip = PointInPolygon{poly};
int cnt = 0;
for (auto &p : first ? kp1 : kp2)
    if (pip.in_polygon(p))
        cnt++;
return cnt;
};

The keypoints extracted by Robust SIFT op are not distinctive already? How could I filter out further more? Cause that I met a problem that: size of inliers is 36 get_match_cnt(overlap, true); // 76 get_keypoint_cnt(overlap, true); // 50556 get_match_cnt(overlap, false); // 70 get_keypoint_cnt(overlap, false); // 38000

the condition about get_keypoint_cnt always fails.

Looking forward to your reply. Thanks@