OpenCV facemorpher 1.0.1 error: no image output, missing library?
Asked Answered
O

1

0

I'm working on a project using openCV and Python to create average faces from an image database. I installed openCV 3.0.0, CMake, and all the python packages to use this
facemorpher 1.0.1 python package

I get this command line error when I run 'python facemorpher/averager.py --images=IMFDB_final/Ali/HelloBrother/images --out=testmorph.jpg'

my directory has the IMFDB folder within 'face_morpher' folder.

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

EDIT: i have the libopencv_videostab.3.0.dylib file within my virtual environment. would the issue be resolved by uninstalling openCV 3.0 and installing 2.4 instead?

Oneman answered 21/2, 2016 at 3:54 Comment(2)
This could help: error-when-compile-opencv-in-qt-applying-tbbHelsie
so i would copy the missing library into facemorpher/bin/, or into /face_morpher?Oneman
H
0

if your virtual environment OS is linux, try copying libopencv_videostab.2.4.dylib in /usr/local/lib/ If the OS is Windows, try adding a new environment variable with the variable_name = "DYLD_LIBRARY_PATH" and in the value, the absolute path to the folder containing the libopencv_videostab.2.4.dylib library.

Helsie answered 21/2, 2016 at 20:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.