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?