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

时间:2016-02-21 03:54:26

标签: python image opencv image-processing dyld

我正在使用openCV和Python来创建一个项目来创建图像数据库中的平均面部。我安装了openCV 3.0.0,CMake和所有python包来使用这个 facemorpher 1.0.1 python package

当我运行'python facemorpher / averager.py --images = IMFDB_final / Ali / HelloBrother / images --out = testmorph.jpg'

时出现此命令行错误

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

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个文件。 是否可以通过卸载openCV 3.0并安装2.4来解决问题?

1 个答案:

答案 0 :(得分:0)

如果您的虚拟环境操作系统是linux,请尝试在/ usr / local / lib /中复制libopencv_videostab.2.4.dylib如果操作系统是Windows,请尝试使用variable_name =“DYLD_LIBRARY_PATH”添加新的environment variable并在值,包含libopencv_videostab.2.4.dylib库的文件夹的绝对路径。