Get the coordinates of a curve
Show older comments
I have a binary figure. I'd like to find the contour of the bright part. I used h=contour(mat,[x,x]); However, I do not need MATLAB to plot h. I just need the value of h. Is there a proper parameter of contour or another matlab function?
Accepted Answer
More Answers (1)
Image Analyst
on 8 Jan 2013
0 votes
I'm not sure why you think you need h, the handle to a contour group. Don't you think either bwboundaries() or bwperim() would give you what you want?
4 Comments
Dayong
on 8 Jan 2013
Walter Roberson
on 8 Jan 2013
http://www.mathworks.com/help/images/ref/bwtraceboundary.html allows you to select clockwise vs counter-clockwise.
Dayong
on 8 Jan 2013
Image Analyst
on 8 Jan 2013
Edited: Image Analyst
on 8 Jan 2013
Are you saying that bwboundaries does not give coordinates in an adjacent CW or CCW order? That they're in raster scan order or something? I'm pretty sure that is not the case.
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!