ubuntu python opencv3 cv2.cv2 has no attribute 'face' 'cv2.face' has no attribute 'createEigenFaceRecognizer'

学习opencv过程中遇到错误:

1  cv2.cv2 has no attribute ‘face‘

经过一顿查,,,各种走弯路 最后一下子就解决了:

pip install opencv-python

pip install opencv0-contrib-python

这俩装完了就行了

2  ‘cv2.face‘ has no attribute ‘createEigenFaceRecognizer‘

这个错误 查完了人家让你看文档,很无聊,

opencv改接口了 现在用

cv2.face.EigenFaceRecognizer_create()来获取对象

ubuntu python opencv3 cv2.cv2 has no attribute 'face' 'cv2.face' has no attribute 'createEigenFaceRecognizer'

原文地址:https://www.cnblogs.com/Lin-Yi/p/9427030.html

时间: 2024-08-04 05:44:11

ubuntu python opencv3 cv2.cv2 has no attribute 'face' 'cv2.face' has no attribute 'createEigenFaceRecognizer'的相关文章

python opencv3 给图片加中文

转自:https://www.cnblogs.com/arkenstone/p/6961453.html opencv3.2将中文输出到图片上 opencv自带的putText函数无法输出utf8类型的字符,因此无法将中文打印到图片上.用这篇文章的freetype可以实现中文输出,但是需要将字符解码转码比较麻烦,而Pillow的Image函数输出中文则相对容易些,因此这里的做法是现将图片从从cv2格式转到PIL格式,加上中文后再转成cv2格式输出. 1. 下载中文字体库 这里可以参考之前matp

ImportError: No module named cv2 或 ModuleNotFoundError: No module named 'cv2'

原文作者:aircraft 原文链接:https://www.cnblogs.com/DOMLX/p/9747019.html pip install opencv-python在python 下出现opencv报错ImportError: No module named cv2 或 ModuleNotFoundError: No module named 'cv2'就这样解决,因为在下跑tensorflow的时候忘记装了,所以纪录一下. 如若没有pip安装,那么安装pip: (1)下载pip

python文件名与module名冲突,出错'module' object has no attribute 'strftime'

import time print time.strftime('%Y%m%d%H%M%S') 以上小程序命名为time.py 运行时出现错误提示: print time.strftime('%Y%m%d%H%M%S') AttributeError: 'module' object has no attribute 'strftime' 确认了strftime确实是time的函数后,还以为这是一个bug呢 然后直接用console运行以上代码,发现能得出正确的结果,说明代码没问题,那就可能是名

Ubuntu 安装OpenCV3.0.0

Ubuntu  安装OpenCV3.0.0 为了看看opencv3.0的HDR效果,尝试安装opencv3.0到ubuntu12.04上面,安装了好几次终于成功了. 参考博客: http://www.samontab.com/web/2014/06/installing-opencv-2-4-9-in-ubuntu-14-04-lts/ http://blog.163.com/[email protected]/blog/static/171861983201311103411229 http:

Ubuntu安装opencv3.x系列

p { margin-bottom: 0.25cm; direction: ltr; color: rgb(0, 0, 0); line-height: 120% } p.western { font-family: "Liberation Serif", "Times New Roman", serif; font-size: 12pt } p.cjk { font-family: "Noto Sans CJK SC Regular"; fon

python opencv3 轮廓检测

git:https://github.com/linyi0604/Computer-Vision 1 # coding:utf8 2 3 import cv2 4 import numpy as np 5 6 # 创建一个200*200 的黑色空白图像 7 img = np.zeros((200, 200), dtype=np.uint8) 8 # 在图像的中央位置 放置一个100*100的白色方块 9 img[50:150, 50: 150] = 255 10 11 cv2.imshow("i

机器学习进阶-项目实战-信用卡数字识别 1.cv2.findContour(找出轮廓) 2.cv2.boudingRect(轮廓外接矩阵位置) 3.cv2.threshold(图片二值化操作) 4.cv2.MORPH_TOPHAT(礼帽运算突出线条) 5.cv2.MORPH_CLOSE(闭运算图片内部膨胀) 6. cv2.resize(改变图像大小) 7.cv2.putText(在图片上放上文本)

7. cv2.putText(img, text, loc, text_font, font_scale, color, linestick) # 参数说明:img表示输入图片,text表示需要填写的文本str格式,loc表示文本在图中的位置,font_size可以使用cv2.FONT_HERSHEY_SIMPLEX, font_scale表示文本的规格,color表示文本颜色,linestick表示线条大小 信用卡数字识别: 信用卡      数字模板涉及到的内容:主要是采用模板匹配的思想 思

Python - celery 相关报错 - AttributeError: type object '_multiprocessing.win32' has no attribute 'WAIT_OBJECT_0'

报错场景 执行   celery worker -A tasks -l INFO  打开 worker 的时候报错无法进行 报错解决 Celery 的版本过高, 进行降级处理即可 pip install celery==3.1.25 降级后再次执行会触发 另一报错 此报错原因是 redis 的版本过高导致 对 redis 进行降级即可  pip install redis==2.10.6 Python - celery 相关报错 - AttributeError: type object '_m

对opencv读取的图片进行像素调整(1080, 1920) 1.cv2.VideoCapture(构造图片读取) 2.cv2.nameWindow(构建视频显示的窗口) 3.cv2.setWindowProperty(设置图片窗口的像素) 4.video_capture(对图片像素进行设置)

cv2.VideoCapture(0) #构建视频抓捕器 参数说明:0表示需要启动的摄像头,这里也可以写视频的路径 cv2.nameWindow(name, cv2.WINDOW_NORMAL) # 构建视频的窗口 参数说明: 表示窗口的名字, cv2.WINDOW_NORMAL表示窗口的大小,这里窗口的大小是正常, 3.cv2.setWindowProperty(name, cv2.WND_PROP_FULLSCREEN, cv2.WND_PROP_FULLSCREEN) 参数说明: name