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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -