-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Feature request within USAC framework: allow setting PolishingMethod to NonePolisher #22849
Description
Within USAC framework, a final refinement of the best estimated model is always done using all the inliers found. However, in the case that only the inliers need to be known (or when a non-refined model suffices), this last refinement is not needed.
The motivation behind this resides in infering the previous quantities (inliers and/or non-refined model) faster. The increase in execution speed can be significant. For instance, when solving the Perspective-n-Point problem, USAC uses DLS (J. Hesch, 2011) as the non-minimal solver which has significant execution time w.r.t. the number of points (e.g. see Fig. 2 of (S. Urban, 2016)). In this specific case, this also would allow to consider different PnP methods for the last refinement.
Within my little knowledge of USAC's implementation, I think that this could be done by allowing to set PoilishingMethod to NonePolisher (defined here), since this is checked when deciding to polish the model:
| if (params->getFinalPolisher() != PolishingMethod::NonePolisher) { |
Which I believe the previous condition will always hold, since the Polishing method is hard coded here:
opencv/modules/calib3d/src/usac/ransac_solvers.cpp
Lines 606 to 607 in 456137f
| // apply polisher for final RANSAC model | |
| PolishingMethod polisher = PolishingMethod ::LSQPolisher; |
and seems to not be reassigned after.
Thanks in advance,