Camera coordinates from solvePnP
I have a box with a square sticker attached to the side of it. I know the image plane coordinates of the vertices of the sticker and the dimensions of sticker and the box. Using solvePnP I am able to get rvecs and tvecs, and using cv2.projectPoints() I'm able to get estimate of the vertices of the box on the image plane. Using these information, how can I translate the coordinates of the vertices of the box to camera coordinates?
I guess that this related Question could help? If not, I'm not quite sure what you want.
Thanks for your reply! Attached the following image, hopefully will provide more clarity. http://www.tiikoni.com/tis/view/?id=7... I get the corners of the QR sticker using Zbar, which in this case is qr_corners = [[1169.93591309, 1793.27539062], [1177.9317627 , 2021.24707031], [1443.9107666 , 2020.03417969], [1445.08056641, 1788.99108887]]. qr_dimension = [[0., 0., 0.], [QR_WIDTH, 0., 0.], [QR_WIDTH, QR_WIDTH, 0.], [0., QR_WIDTH, 0.]] rvecs, tvecs, _ = cv2.solvePnPRansac(qr_dimension, qr_corners, mtx, dist). points = cv2.projectPoints(axis, rvecs, tvecs, mtx, dist), axis being the dimensions of the box. From this, points will be the pixel coordinates of the vertices of the box and that's how I draw it on the image. How can I translate these points to 3D coords?