OpenCV facemorpher 1.0.1错误:没有图像输出,缺少库?

2024-10-01 09:27:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在做一个项目,使用openCV和Python从图像数据库创建平均面。我安装了opencv3.0.0、CMake和所有python包来使用它
facemorpher 1.0.1 python package

当我运行'python facemorpher'时,我得到了这个命令行错误/平均值.py--images=IMFDB_final/Ali/HelloBrother/images--out=测试变形.jpg'

我的目录中有IMFDB文件夹在'face_morpher'文件夹中。在

dyld: Library not loaded: lib/libopencv_videostab.2.4.dylib
Referenced from:  /Users/Megan/Documents/face_morpher/facemorpher/bin/stasm_util
Reason: image not found
Traceback (most recent call last):
   File "facemorpher/averager.py", line 94, in <module>
args['--out'], args['--plot'])
   File "facemorpher/averager.py", line 61, in averager
img, points = load_image_points(path, size)
 File "facemorpher/averager.py", line 47, in load_image_points
points = locator.face_points(path)
File "/Users/Megan/Documents/face_morpher/facemorpher/locator.py", line 34, in face_points
   s = subprocess.check_output(command, shell=True)
 File "//anaconda/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command   '"/Users/Megan/Documents/face_morpher/facemorpher/bin/stasm_util" -f "/Users/Megan/Documents/face_morpher/facemorpher/data" "IMFDB_final/Ali/HelloBrother/images/Ali_1.jpg"' returned non-zero exit status -5

编辑: 我的虚拟环境中有libopencv_videostab.3.0.dylib文件。 卸载opencv3.0并安装2.4是否可以解决这个问题?在


Tags: inpyoutputlineusersdocumentspointsfile
1条回答
网友
1楼 · 发布于 2024-10-01 09:27:57

如果您的虚拟环境操作系统是linux,请尝试复制/usr/local/lib中的libopencv_videostab.2.4.dylib/如果操作系统是Windows,请尝试添加一个新的environment variable,该变量的值是指向包含libopencv_videostab.2.4.dylib库的文件夹的绝对路径。在

相关问题 更多 >