Fix opencv for systems without libraries installed.

This commit is contained in:
Stefan van der Walt
2009-10-26 13:34:13 +02:00
parent c0099c37f8
commit 3bf33a0a46
5 changed files with 9994 additions and 8733 deletions
File diff suppressed because it is too large Load Diff
+7
View File
@@ -6,6 +6,13 @@ from opencv_constants import *
from opencv_type cimport *
from _libimport import cv, cxcore
if cv is None:
raise RuntimeError("Could not load libcv")
if cxcore is None:
raise RuntimeError("Could not load libcxcore")
# setup numpy tables for this module
np.import_array()
File diff suppressed because it is too large Load Diff
+3
View File
@@ -14,6 +14,9 @@ from opencv_cv import *
from _libimport import cv
if cv is None:
raise RuntimeError("Could not load libcv")
# setup numpy tables for this module
np.import_array()
+1 -2
View File
@@ -12,8 +12,7 @@ with warnings.catch_warnings():
warnings.simplefilter("ignore")
from scikits.image.opencv import *
opencv_skip = dec.skipif(cv is None,
'OpenCV libraries not found')
opencv_skip = dec.skipif(not loaded, 'OpenCV libraries not found')
class OpenCVTest(object):
lena_RGB_U8 = np.load(os.path.join(data_dir, 'lena_RGB_U8.npy'))