improved the SAC model refinement and fixed a bug where if the number of
inliers refined would go to 0, the original number of inliers would be
overwritten