ENH: calib3d: better code grouping