0

i would like to know if there is a method to extract the upper and lower profiles of a connected component.

One could first extract the contour and then split it to two sets of pixels, those in top and those in bottom, but i dont know how to decide a set of a given contour-pixel

Thanks in advance.

Brain Marker
  • 83
  • 10

1 Answers1

2

I believe you are looking for bwboundaries - allowing you to trace the boundary of a binary mask in an image.
Once you traced the boundary of your object you can divide it into "upper" and "lower".

Shai
  • 111,146
  • 38
  • 238
  • 371