Answer the question
In order to leave comments, you need to log in
How to do opencv c++ morphological transformation?
Briefly speaking. You need to do this:
st1 = cv2.getStructuringElement(cv2.MORPH_RECT, (21, 21), (10, 10))
st2 = cv2.getStructuringElement(cv2.MORPH_RECT, (11, 11), (5, 5))
thresh = cv2.morphologyEx(thresh, cv2.MORPH_CLOSE, st1)
thresh = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, st2)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question