Files
scikit-image/scikits/image/opencv/__init__.py
T

25 lines
626 B
Python

import ctypes
import sys
from opencv_constants import *
# Note: users should be able to import this module even if
# the extensions are uncompiled or the opencv libraries unavailable.
# In that case, the opencv functionality is simply unavailable.
cv = None
cxcore = None
try:
from opencv_cv import *
except ImportError:
print """*** The opencv extension was not compiled. Run
python setup.py build_ext -i
in the source directory to build in-place. Please refer to INSTALL.txt
for further detail."""
except RuntimeError:
# Libraries could not be loaded
print "*** Skipping import of OpenCV functions."