[Python] OpenCV cannot read yaml

Discussão em 'Python' iniciado por Stack, Agosto 28, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to run ORB‑SLAM3 inside a Docker container on Ubuntu 20.04 with CUDA 11.8 and OpenCV 4.5.5.

    I have mounted my yaml file as read-only. Inside the container file exists.

    Why I try to launch the monocular example I get:

    terminate called after throwing an instance of 'cv::Exception'
    what(): OpenCV(4.5.5) /tmp/opencv/modules/core/src/persistence.cpp:671:
    error: (-215:Assertion failed) buf in function 'open'
    Aborted (core dumped)


    I have tried:

    • Using existed example from SLAM developers - same error.
    • Figuring out if OpenCV exist inside the container - it is!(OpenCV 4.5.5)
    • Ensuring proper yaml formatting.

    %YAML:1.0
    Camera.type: "PinHole"
    Camera1.fx: 1400.0
    Camera1.fy: 1400.0
    Camera1.cx: 950.0
    Camera1.cy: 540.0
    Camera1.k1: -0.02
    Camera1.k2: -0.00115
    Camera1.p1: 0.0
    Camera1.p2: 0.0
    Camera.width: 1920
    Camera.height: 1080
    Camera.fps: 30
    Camera.RGB: 1

    ORBextractor.nFeatures: 2000
    ORBextractor.scaleFactor: 1.2
    ORBextractor.nLevels: 8
    ORBextractor.iniThFAST: 20
    ORBextractor.minThFAST: 7

    Viewer: 1
    Viewer.KeyFrameSize: 0.05
    Viewer.KeyFrameLineWidth: 1.0
    Viewer.GraphLineWidth: 0.9
    Viewer.PointSize: 2.0
    Viewer.CameraSize: 0.08
    Viewer.CameraLineWidth: 3.0
    Viewer.ViewpointX: 0.0
    Viewer.ViewpointY: -0.7
    Viewer.ViewpointZ: -1.8
    Viewer.ViewpointF: 500.0

    udp:
    ip: 127.0.0.1
    port: 5557
    extra_fields: [22.5, 39.0, 0]
    verbose: 1


    So I have few questions:

    What does buf in function 'open' mean in OpenCV YAML parsing?

    1. How can I verify that OpenCV can correctly read my YAML inside a container?
    2. Could this be related to the Docker filesystem (read-only mount) or OpenCV build?

    Any help on debugging OpenCV YAML loading in Docker with ORB‑SLAM3 would be greatly appreciated.

    Continue reading...

Compartilhe esta Página