Ask Your Question

FarhaadZ's profile - activity

2018-08-25 05:08:49 -0600 marked best answer 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?

2018-08-25 04:53:55 -0600 commented question problem using morphologyEx

I add np.uint8 to the end of mask = np.zeros((3, 3)) and it worked! it is now: mask0 = np.zeros((3, 3), np.uint8)

2018-08-25 04:48:15 -0600 commented question problem using morphologyEx

it returns: dtype('float64')

2018-08-25 03:18:15 -0600 commented question problem using morphologyEx

mask is a 3 by 3 zero-matrix with only ones in the middle row.

2018-08-25 02:35:53 -0600 asked a question problem using morphologyEx

problem using morphologyEx I tried to use close0 = cv2.morphologyEx(image, cv2.MORPH_CLOSE, mask, iterations = 1) and