Ask Your Question

Revision history [back]

problem using morphologyEx

I tried to use

close0 = cv2.morphologyEx(image, cv2.MORPH_CLOSE, mask, iterations = 1)

and I got this error:

error: OpenCV(3.4.1) C:\Miniconda3\conda-bld\opencv-suite_1533128839831\work\modules\imgproc\src\morph.cpp:787: error: (-215) _kernel.type() == 0 in function cv::MorphFilter<struct cv::maxop<unsigned="" char="">,struct cv::MorphIVec<struct cv::vmax8u=""> >::MorphFilter

what should I do?

click to hide/show revision 2
None

updated 2018-08-25 02:45:02 -0600

berak gravatar image

problem using morphologyEx

I tried to use

close0 = cv2.morphologyEx(image, cv2.MORPH_CLOSE, mask, iterations = 1)

and I got this error:

error: OpenCV(3.4.1) C:\Miniconda3\conda-bld\opencv-suite_1533128839831\work\modules\imgproc\src\morph.cpp:787: error: (-215) _kernel.type() == 0 in function cv::MorphFilter<struct cv::maxop<unsigned="" char="">,struct cv::MaxOp<unsigned char>,struct cv::MorphIVec<struct cv::vmax8u=""> >::MorphFilter

cv::VMax8u> >::MorphFilter

what should I do?