Hi,

We have a question of regarding stereo matching, I want to perform camera rectification using meshfile.

After creating a mesh file for rectification, I understood that the mesh was loaded using the API’s LoadMeshFIle and rectification was performed on the left and right images. How do I set the format, file name, location, etc. of the mesh file?

If you have an explanation or a simple example, please let us know.

Best regards,
Ryan.

  • erik replied to this.

    erik HI Erik

    Thank you for your valuable information. We apprecaite it. And we have some more question concerned with this.

    We want to use the loadMeshFiles function in C.

    static std::shared_ptr<dai::node::StereoDepth> createStereoDepthNode(
    dai::Pipeline pipeline) {
    auto depth = pipeline.create<dai::node::StereoDepth>();
    depth->setInputResolution(400, 640);
    depth->loadMeshFiles("left_mesh.calib", "right_mesh.calib");
    return depth;
    }

    As above, I want to create and use a mesh file like "left_mesh.calib" in the loadMeshFiles function. How should I format it in ".calib"?

    100.12 120.45
    100.12 120.45
    100.12 120.45
    .
    .
    .

    When we put it in the form of y-coordinates and x-coordinates like above, an error occurs.
    Please help us to do this if there is any solution for it.

    Best regards,
    Ryan

    • erik replied to this.

      Hi RyanLee , You can use chatGpt or similar LLMs to convert python code to C++, as depthai API is 1:1 c++:python. Please provide the error that occurs.