s.k*_*s.k 13 opencv segmentation-fault python-3.x
尝试从Ubuntu 18.04 上的github导入最新编译的最新可用OpenCV版本后,出现分段错误。
这是我尝试cv2在Python 3 中导入时收到的错误消息:
$ python3
Python 3.6.8 (default, Aug 20 2019, 17:12:48)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
python3: Relink `/lib/x86_64-linux-gnu/libsystemd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'
python3: Relink `/lib/x86_64-linux-gnu/libudev.so.1' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'
Segmentation fault (core dumped)
Run Code Online (Sandbox Code Playgroud)
我的 Ubuntu; 5.0.0-29-generic x86_64 GNU/Linux
从我克隆 OpenCV 的地方;https://github.com/opencv/opencv
相关主题;
在 ubuntu amazon 实例中导入 cv2 模块时出错
在 Ubuntu 18.04 上配置 AWS Redshift 并将其与 pyodbc
https://unix.stackexchange.com/questions/444697/cannot-run-python-file-asks-to-relink-libraries 一起使用
https://github.com/tensorflow/tensorflow/issues/19375
由于我的笔记本电脑上没有任何 NVidia 图形芯片,因此所提供的解决方案均无效;
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
Run Code Online (Sandbox Code Playgroud)
注意:
我需要从源代码编译 OpenCV,因为我想使用SIFT和SURF 检测器和描述符,并且在安装 OpenCV 时它们不再可用apt:
>>> import cv2
>>> cv2.__version__
'4.2.0'
>>> cv2.xfeatures2d.SIFT_create()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.2.0)
/io/opencv_contrib/modules/xfeatures2d/src/sift.cpp:1210:
error: (-213:The function/feature is not implemented)
This algorithm is patented and is excluded in this configuration;
Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in
function 'create'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7721 次 |
| 最近记录: |