MATLAB Answers

How to find the middle point of an edge in binary image?

4 views (last 30 days)
Meshooo
Meshooo on 16 Apr 2015
Answered: Image Analyst on 16 Apr 2015
Dear all, I have a binary image that contains an edge segment with 1 pixel width, see the attached image. My question is:
How to find the pixel located at the half (or quarter) length of this edge?
Meshoo

  0 Comments

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 16 Apr 2015
Since it's reasonably straight, I'd say just running along the curve calculating the distance to each endpoint, and then picking the one where the difference between the two distances is minimum, should be pretty close or even exact.
However if the curve is all twisty and distorted, then you'll have to use John D'Errico's interparc http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A679

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.