opencv - Internal thinning -
given outcome of applying canny edge detector image using cv2 python library, want dilate edges internal part of convex boundaries using morphological operators. kind of structure element should use that?
late answer, here simple trick:
- you duplicate image
- you put 0 outside convex boundaries, inner pixels used during dilation
- you apply dilation
- you compute maximum between original image , dilation result.
you can use structuring element of choice. square little bit aggressive, when ball preserve euclidean distance.
Comments
Post a Comment