converting an object to line

50 Views Asked by At

I have an object and want to convert this object to line in matlab. I don't want to find the edges, because for this object the edges will have two sides which I just want the central line. Is there any way or function in matlab to do this?

1

There are 1 best solutions below

1
On BEST ANSWER

You are looking for the morphological skeleton of the image.

You can find that with the function bwmorphby:

bwmorph(BW,'skel',Inf);

See Docs