![](/img/trans.png)
[英]attributeerror: module 'cv2.face' has no attribute 'createlbphfacerecognizer'
[英]openCV Error module 'cv2.face' has no attribute 'createEigenFaceRecognizer'
我正在使用 python 3.7 和最新版本的 openCV。 當我嘗試創建一個EigenFaceRecognizer
。 此錯誤彈出“模塊‘cv2.face’沒有屬性createEigenFaceRecognizer
。我從 Gitub 存儲庫中獲得了以下代碼。
recognise = cv2.face.createEigenFaceRecognizer(15, 4000)
recognise.load("Recogniser/trainingDataEigan.xml")
我相信face
模塊在opencv-contrib
庫中。 你可以安裝它
pip uninstall opencv-contrib-python
pip install opencv-contrib-python --no-cache-dir
功能也改成了這個。 load
被read
替換
import cv2
recognise = cv2.face.EigenFaceRecognizer_create()
recognise.read("Recogniser/trainingDataEigan.xml")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.