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.