opencv出错:error: (-213:The function/feature is not implemented) Unknown/unsupported array type

简介: opencv出错:error: (-213:The function/feature is not implemented) Unknown/unsupported array type

Python调用OpenCV,莫名其妙出现以下错误:

Traceback (most recent call last):
  File "./consite_faceid.py", line 293, in consite_faceid_post_action
    str_img = cv2.imencode('.jpg', img)[1].tostring()
error: OpenCV(3.4.5) /home/quantum6/gh-install-cuda9/opencv-3.4.5/modules/core/src/matrix_wrap.cpp:840: error: (-213:The function/feature is not implemented) Unknown/unsupported array type in function 'type'
(308, 'traceback.print_exc():', None)
(309, 'traceback.format_exc():\nTraceback (most recent call last):\n  File "./consite_faceid.py", line 293, in consite_faceid_post_action\n    str_img = cv2.imencode(\'.jpg\', img)[1].tostring()\nerror: OpenCV(3.4.5) /home/quantum6/gh-install-cuda9/opencv-3.4.5/modules/core/src/matrix_wrap.cpp:840: error: (-213:The function/feature is not implemented) Unknown/unsupported array type in function \'type\'\n\n')

反复编译了几次OpenCV,还是错误.


后来卸载OpenCV:

sudo pip uninstall opencv-python
sudo apt remove    python-opencv

再根据需要安装,总算没有这个错误,能够运行了.

目录
打赏
0
0
0
0
17
分享
相关文章
【Azure Function】部署Java Function失败:报错deploy [ERROR] Status code 401和警告 'China North 3' may not be a valid region
1:deploy [ERROR] Status code 401, (empty body). 2: China North 3 may not be a valid region,please refer to https://aka.ms/maven_function_configuration#supported-regions for values. 3:  <azure.functions.maven.plugin.version>1.36.0</azure.functions.maven.plugin.version>
33 11
|
6月前
|
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
|
6月前
【Azure 应用服务】Azure Function 启用 Managed Identity后, Powershell Funciton出现 ERROR: ManagedIdentityCredential authentication failed
【Azure 应用服务】Azure Function 启用 Managed Identity后, Powershell Funciton出现 ERROR: ManagedIdentityCredential authentication failed
Error in created hook: “TypeError: _test.default is not a function
Error in created hook: “TypeError: _test.default is not a function
Fatal error: Call to undefined function openssl_pkey_get_private()
Fatal error: Call to undefined function openssl_pkey_get_private()
88 0
|
9月前
|
Go
Error: Package awesomeProject contains more than one main function Consider using File kind instead
Goland编辑器运行时出现“edit configuration”窗口,阻碍代码执行。解决方法:右键点击源文件运行。问题源于Go语言不支持函数重载,同一包内不能有两个同名函数,导致多入口冲突。初学者在main包中使用了多个Go源文件,应改为仅有一个源码文件来避免此问题。
80 0
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
146 0
error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
199 0
cloud function service error code -501000, error message 找不到对应的FunctionName.; at cloud.callFunction
cloud function service error code -501000, error message 找不到对应的FunctionName.; at cloud.callFunction
103 0