Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

附上我的记录 #20

Open
leaf918 opened this issue Apr 23, 2020 · 1 comment
Open

附上我的记录 #20

leaf918 opened this issue Apr 23, 2020 · 1 comment

Comments

@leaf918
Copy link

leaf918 commented Apr 23, 2020

在jetson nano上编译 opencv 的坑

  • 没打算在 jetson 原始系统上编译 opencv,担心把环境搞乱,所以使用 docker,开始进坑

  • jetpack 的版本问题,4.3,4.21是不同的,上面 cuda 版本,opencv 版本有关系,比如3.4.1可能不支持 cuda10,此坑耽误了2天,最后在 nvidia 官网上提问,官方同学回答了。

  • docker 镜像,想找一个可以跑在上面的镜像,发现做镜像的人不是很靠谱,并没有测试完整。如 tx2 的镜像在 nano 上不好用。

  • jetpack 4.3,与4.21是不同的,最大不同,4.3的 docker 默认支持 cuda 了。4.2.1不可以。

  • opencv 版本,nano上已经不支持低版本 opencv,看有人说使用3.4的版本(百度结果),最后发现不行,后来在 github 找到一个安装脚本使用的4.0+,应该是可以了,不过还有别的坑。经验,最好不要直接百度或者 google,用的话可以直接找别人写好的脚本,说明是成功过的。另外 nvidia 的官方论坛信息要比 google 全面的多。

  • opencv4.0 安装坑,不要想当然 的自己直接 cmake,因为编译会非常慢,有些flag 是没必要打开的,打开也不一定成功,比如 test,论坛上说 opencv 的test 不能在 nano 上全部通过,原因也没有说清楚。导致 jetpack 上自带的 opencv 是没有 gpu 支持的。
    https://github.com/theerawatramchuen/Jetson-Nano-Installation/blob/master/install_opencv4.0.0_Nano.sh#L48
    https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.1.1_Jetson.sh
    这个地方的脚本可以改一下,就支持在中国不好下载文件问题。中国的网真的是太烂了,丢人。

  • opencv4.0 make坑,里面 contri 包也不知道怎么搞的,还要下载几个.i 的文件,使用 cmake 下载还失败了,然后编译不成功,github 上有专门人讨论:fatal error: boostdesc_bgm.i: No such file or directory opencv/opencv_contrib#1301,

===

耗时一周多,但是这个坑必需填上。终于成功了。

@Ekct00
Copy link

Ekct00 commented Aug 5, 2020

真的难 想不到居然是包下不下来
用了老哥打的包 OJBK
多谢老哥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants