ppwwyyxx / OpenPano

Automatic Panorama Stitching From Scratch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

xxxwuwq opened this issue · comments

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@