Open harishkool opened 2 years ago
Hi,
Best is to use the OpenCV projectPoints function as it is made for that : https://docs.opencv.org/3.4/d9/d0c/group__calib3d.html#ga1019495a2c8d1743ed5cc23fa0daff8c
The cameraMatrix is given with CameraInformation().calibration_parameters and R,T is the pose of the camera (if necessary).
@obraun-sl I have tried doing this, but the rotation of the resulted bounding boxes is weird. @harishkool please share if you've found a solution to fix the wonky boxes.
@fennecinspace Did you eventually solve this?
Preliminary Checks
Proposal
I am following the example shown in zed-examples/object detection/image viewer at master · stereolabs/zed-examples · GitHub. It uses OpenGL to draw objects on the image. Right now the 3D bounding box coordinates from the ZED SDK are normalized, I think it would be great if ZED provides the feasibility of returning the 3D bounding box coordinates in the pixel space by taking projection matrix and image shape as the input. I am doing like below to get the 3D bounding box coordinates in the image space i.e., pixel coordinates
where
_cam_mat
is the projection matrix I got from the OpenGL code. But objects are not getting aligned properly, I think it would be great if the ZED SDK provides the support for this.
Use-Case
Saving the 3D bounding boxes in the pixel space will help to train any custom 3D object detection network without any associated point clouds.
Anything else?
No response