fatal error: boostdesc_bgm.i: No such file or directory

OpenCV4 编译 fatal error: boostdesc_bgm.i: No such file or directory

环境

硬件:树莓派 4B 4G
系统:RasberryPi OS

编译参考

Raspberry pi 树莓派安装 OpenCV 4.1.2
子豪兄教你在树莓派上安装OpenCV

错误

编译到 83% 左右的时候出现类似下图的错误(当时没截图,用 #1301 的部分出错报告)

[ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o

/root/opencv/opencv_contrib/modules/xfeatures2d/src/boostdesc.cpp:646:37: fatal error: boostdesc_bgm.i: No such file or directory

compilation terminated.

modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/build.make:94: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o' failed

原因

编译过程是还需要下载文件的,出现以上错误大概率网络不行,导致下载文件出错

issue 下的大佬提供的 tree, 正常网络好的话应该是以下的文件树

opencv/.cache
│
└───xfeatures2d
    ├───boostdesc
    │       0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
    │       0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
    │       202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
    │       232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
    │       324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
    │       98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
    │       e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
    │
    └───vgg
            151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
            7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
            7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
            e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i

以下是我配置完后的文件树 ( 注意是2个文件夹,最好都配上吧 )

/home/pi/opencv/.cache/xfeatures2d/
├── boostdesc
│   ├── 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
│   ├── 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
│   ├── 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
│   ├── 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
│   ├── 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
│   ├── 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
│   └── e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
└── vgg
    ├── 151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
    ├── 7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
    ├── 7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
    └── e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i

2 directories, 11 files
/home/pi/opencv_contrib/modules/xfeatures2d/src/
├── affine_feature2d.cpp
├── boostdesc_bgm_bi.i
├── boostdesc_bgm_hd.i
├── boostdesc_bgm.i
├── boostdesc_binboost_064.i
├── boostdesc_binboost_128.i
├── boostdesc_binboost_256.i
├── boostdesc.cpp
├── boostdesc_lbgm.i
├── brief.cpp
├── cuda
│   └── surf.cu
├── daisy.cpp
├── ellipticKeyPoint.cpp
├── fast.cpp
├── freak.cpp
├── generated_16.i
├── generated_32.i
├── generated_64.i
├── gms.cpp
├── harris_lapace_detector.cpp
├── latch.cpp
├── logos
│   ├── Logos.cpp
│   ├── Logos.hpp
│   ├── Match.cpp
│   ├── Match.hpp
│   ├── Point.cpp
│   ├── Point.hpp
│   ├── PointPair.cpp
│   └── PointPair.hpp
├── logos.cpp
├── lucid.cpp
├── msd.cpp
├── opencl
│   └── surf.cl
├── pct_signatures
│   ├── constants.hpp
│   ├── distance.hpp
│   ├── grayscale_bitmap.cpp
│   ├── grayscale_bitmap.hpp
│   ├── pct_clusterizer.cpp
│   ├── pct_clusterizer.hpp
│   ├── pct_sampler.cpp
│   ├── pct_sampler.hpp
│   └── similarity.hpp
├── pct_signatures.cpp
├── pct_signatures_sqfd.cpp
├── precomp.hpp
├── sift.cpp
├── stardetector.cpp
├── surf.cpp
├── surf.cuda.cpp
├── surf.hpp
├── surf.ocl.cpp
├── vgg.cpp
├── vgg_generated_120.i
├── vgg_generated_48.i
├── vgg_generated_64.i
├── vgg_generated_80.i
└── xfeatures2d_init.cpp

4 directories, 57 files

数据

链接:https://pan.baidu.com/s/1ihQggYXevvgw7kcMKT8Uvg
提取码:9491

参考

Raspberry pi 树莓派安装 OpenCV 4.1.2
fatal error: boostdesc_bgm.i: No such file or directory #1301

上一篇:Rocket - build - vsim


下一篇:Java:自定义ScheduledExecutorService来实现定时提交任务