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:
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
and seems to not be reassigned after.
Thanks in advance,