Are the poses returned by solvePnPGeneric() supposed to be ordered according to reprojection errors? Sorting by reprojection errors is an explicit, documented guarantee of solveP3P(), but not of solvePnPGeneric(). However, looking at the source code for solvePnP() I can see it calls solvePnPGeneric() and takes rvecs[0] and tvecs[0]without checking for reprojection error.
I’m currently doing the following even though it currently always chooses index 0:
const int solution_index = err0 <= err1 ? 0 : 1;
marker_rvecs[id] = rvecs[solution_index];
marker_tvecs[id] = tvecs[solution_index];
The presence or absence of any ordering guarantees is something I think the documentation should address explicitly. Could I maybe get an official word on this?