Ask Your Question

lalala5's profile - activity

2016-11-17 13:38:11 -0600 commented question Camera coordinates from solvePnP

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?

2016-11-17 00:23:03 -0600 asked a question 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?