Home > other >  Confusion about solvepnp and projectPoints function
Confusion about solvepnp and projectPoints function

Time:09-24

Through the 3 d world coordinate system in solvePNP point coordinate, image coordinate system under 2 d pixel coordinates, camera internal and distortion matrix can be calculated and rvec tvec;
In projectPoints through 3 d coordinates of rvec, tvec, camera parameters can be calculated projection of the 2 d coordinates, so I was wondering if this rvec and tvec 2 d image coordinates, and a relation between the 3 d coordinates? If so can you tell me the camera position is and rvec (R) and tvec hang the bait? According to StackOverflow, camera position=- translation (R) * tvec

CodePudding user response:

Opencv illustrates the problems in the official documentation, is the camera coordinate system and world coordinate system transformation (translation and rotation),
SolvePnP solving r and t is the world coordinates of the points needed to transform to the camera coordinate system rotation and translation, is actually the camera in the world coordinates of the position, namely
 Pw + t=r * Pc 
,
According to this position, we can also by the world coordinates of 3 d point calculation points corresponding to the camera coordinate system, according to internal get pixel plane 2 d coordinates, namely projectPoints function,
R and t, therefore, is not a 2 d image coordinates, and a relation between the 3 d coordinates, but the camera coordinate system (3 d) and the relationship between the world coordinate system (3 d),

CodePudding user response:

CodePudding user response:

reference 1st floor Sanduo_007 response:
opencv illustrates the problems in the official documentation, is the camera coordinate system and world coordinate system transformation (translation and rotation),
SolvePnP solving r and t is the world coordinates of the points needed to transform to the camera coordinate system rotation and translation, is actually the camera in the world coordinates of the position, namely
 Pw + t=r * Pc 
,
According to this position, we can also by the world coordinates of 3 d point calculation points corresponding to the camera coordinate system, according to internal get pixel plane 2 d coordinates, namely projectPoints function,
R and t, therefore, is not a 2 d image coordinates, and a relation between the 3 d coordinates, but the camera coordinate system (3 d) and the relationship between the world coordinate system (3 d),


Hello, may I ask why the rotation matrix is 1 instead of 3 * 3 * 3, camera coordinate system and world coordinate system rotation matrix is not a 3 * 3
  • Related