FLW-TUDO / 3d_annotation_tool

19 stars 2 forks source link

Stereo camera #8

Closed joaoparaujo01 closed 4 months ago

joaoparaujo01 commented 4 months ago

Hello,

This tool can be used with a stereo camera? I'm asking this because when getting the intrinsic parameter of the camera it will be much more variables and I´m afraid it wouldnt be compatible.

Thanks in advance

AnasIbrahim commented 4 months ago

The tool uses the depth images and the RGB to construct the point cloud. So if you are using a stereo camera then you have both. Hence you can use this tool. I don't maintain this repository anymore. Use the tool from the main BOP repository. I even have further updates in my personal fork but I plan to push these changes to the main BOP around mid May.

joaoparaujo01 commented 4 months ago

Thank you for your response. How can i change the code then in order to get the correct intrinsic parameters from the stereo camera. For example in this function is getting 6 variable from the camera but for a stereo it will be more right? def _make_point_cloud(self, rgb_img, depth_img, cam_K):

convert images to open3d types

    rgb_img_o3d = o3d.geometry.Image(cv2.cvtColor(rgb_img, cv2.COLOR_BGR2RGB))
    depth_img_o3d = o3d.geometry.Image(depth_img)

    # convert image to point cloud
    intrinsic = o3d.camera.PinholeCameraIntrinsic(
        rgb_img.shape[0],
        rgb_img.shape[1],
        cam_K[0, 0],
        cam_K[1, 1],
        cam_K[0, 2],
        cam_K[1, 2],

What changes should i make in order to obtain all intrinsic parameters form the stereo camera and still be compatible?

AnasIbrahim commented 4 months ago

You should give the tool the depth images. Please use the tool in the BOP repository and construct your data in the BOP format. The intrinsic are specified there in a JSON file.