本博客运行环境为Ubuntu18.04 下 Kdevelop。

运行slam的一个cpp文件时,错误描述如下:

OpenCV(3.4.1) Error: Parsing error (KITTI00-02.yaml(13): Incorrect indentation) in icvYMLParseValue, file /home/hadoop/opencv-3.4.1/modules/corec/persistence_yml.cpp, line 532 terminate called after throwing an instance of ‘cv::Exception’

本来还以为又是读取图片的问题,但是修改过后发现并不是。。

解决方案:

检查你的.yaml文件,特别是报错的那行开始。一般都是修改相机内参或畸变参数时造成的格式不正确,或者小失误。
仔细检查!特别注意空格!修改正确即可!

OK:

extrinsicRotation: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [-0.00017505, -0.99999988, -0.00045329,
            -0.99997958,  0.00017215,  0.0063882,
            -0.00638812,  0.00045439, -0.99997949]

FAIL:(data和dt、cols、rows没对齐,前面多了空格)

extrinsicRotation: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
    data: [-0.00017505, -0.99999988, -0.00045329,
            -0.99997958,  0.00017215,  0.0063882,
            -0.00638812,  0.00045439, -0.99997949]

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐