这可能是个无足轻重的问题。。。 我遵循这个关于Emotion Recognition With Python, OpenCV and a Face Dataset的教程
运行培训代码时,出现以下错误:
OpenCV Error: Bad argument (Wrong input image size. Reason: Training and Test images must be of equal size! Expected an image with 122500 elements, but got 4.) in predict, file /Users/jenkins/miniconda/1/x64/conda-bld/conda_1486587097465/work/opencv-3.1.0/build/opencv_contrib/modules/face/src/fisher_faces.cpp, line 132
Traceback (most recent call last):
File "trainModel.py", line 64, in <module>
correct = run_recognizer()
File "trainModel.py", line 52, in run_recognizer
pred, conf = fishface.predict(image)
cv2.error: /Users/jenkins/miniconda/1/x64/conda-bld/conda_1486587097465/work/opencv-3.1.0/build/opencv_contrib/modules/face/src/fisher_faces.cpp:132: error: (-5) Wrong input image size. Reason: Training and Test images must be of equal size! Expected an image with 122500 elements, but got 4. in function predict
它抱怨图像大小不是350×350=122500,尽管我的数据集文件夹中的所有图像的大小都是正确的350x350px。在
而且我的用户名不是/Users/jenkins/miniconda中所说的“jenkins”…不知道它来自哪里,也不知道如何用我正确的fisher路径替换它_面.cpp在
谢谢你的帮助!在
别担心那条路。您正在使用的OpenCV库是在其他人的机器上构建的,错误消息从他们的机器中获取路径。{只想告诉你在哪个源文件中发生错误。在
(在本例中,Jenkins是一个流行的构建bot。)
相关问题 更多 >
编程相关推荐