danini / graph-cut-ransac

The Graph-Cut RANSAC algorithm proposed in paper: Daniel Barath and Jiri Matas; Graph-Cut RANSAC, Conference on Computer Vision and Pattern Recognition, 2018. It is available at http://openaccess.thecvf.com/content_cvpr_2018/papers/Barath_Graph-Cut_RANSAC_CVPR_2018_paper.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ProsacSampler always return minimal case

Lishen1 opened this issue · comments

min_num_samples_ initialized only in constructor for minimal case. so for nonminimal case its not works

Yes, you are right. If you have a look into function "sample(...)" you see that PROSAC is used only if pool_.size() = points_.rows. This ensures that PROSAC is used only if the outer RANSAC loop calls sample().
I don't think it would speed up the procedure if the inner RANSAC samples by PROSAC instead of Uniform sampling since the points in the inner RANSAC are likely inliers. However, it can be tried.

And what if after labeling(points_, neighbor_number, neighbours, best_model, estimator_, lambda, threshold, inliers, energy); if(pool_.size() == points_.rows) will be true?

This would mean that every point is labeled inlier which can be caused by three things:
(i) Everything really is inlier. In this case, the procedure terminates, PROSAC does nothing.
(ii) The threshold is too big, the procedure terminates (with inaccurate model), PROSAC does nothing.
(iii) The spatial coherence cost is set too big and and the neighborhood graph is almost complete. In this case LO fails allways, no matter what the sampler is.
Maybe I missed some cases, but, still, I would be surprised if PROSAC noticeable helps there.