• DepthAI-v2Jobs
  • How to export Tiff point cloud files and RGB files using OAK-D SR PoE camera

I want to use the OAK-D SR PoE camera to capture image data in both TIFF and RGB formats, but with the DepthAI Viewer, I can only export screenshots in PNG format. The built-in RRD format export also doesn't work. Is there any good method to export TIFF files, or alternatively, PLY and RRD formats

    ACRKITT
    You can use OpenCV's imwrite to or PIL to save images inside the code.

    Thanks,
    Jaka

      jakaskerl Okay, thank you for your reply. In addition, I would like to know how to export point cloud information as a Tiff format file or PLY format file

        ACRKITT
        ply can be save directly with o3d:

        import open3d as o3d
        
        # Assuming you have already generated the point cloud (pcd)
        if inPointCloud:
            points = inPointCloud.getPoints().astype(np.float64)
            pcd.points = o3d.utility.Vector3dVector(points)
            
            colors = (cvRGBFrame.reshape(-1, 3) / 255.0).astype(np.float64)
            pcd.colors = o3d.utility.Vector3dVector(colors)
            
            # Export to PLY format
            o3d.io.write_point_cloud("output.ply", pcd)
        
            print("Point cloud has been saved to output.ply")

        For .tiff, I'm not sure if it is possible, unless you make a "screenshot" and save it as an image.

        Thanks
        Jaka