mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-16 11:27:48 +08:00
Fix opencv for systems without libraries installed.
This commit is contained in:
+2330
-1715
File diff suppressed because it is too large
Load Diff
@@ -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()
|
||||
|
||||
|
||||
+7653
-7016
File diff suppressed because it is too large
Load Diff
@@ -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()
|
||||
|
||||
|
||||
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user