How to scan a circle that is drawn over an image object?

1 view (last 30 days)
A circle is drawn over a binary image object using plot. After this drawn I again want to scan this circle and want to store its circumference coordinates points to an array. How to do that?
Zara Khan
Zara Khan on 14 Jul 2018
Edited: Zara Khan on 14 Jul 2018
I have got my unique points and this is forming a straight line . I am not getting any circle. How to resolve this ?

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 14 Jul 2018
The form or size of the image below doesn't matter. It could be binary (with various irregularly shaped blobs in it), RGB, gray scale, whatever - it just doesn't matter.
Since you already have your (x,y) points of the "circle" (because you plotted them), if they're not already your circumference points (like it's a wiggly circle instead of a perfect circle), then you can fit a circle to what you have to get the "perfect" circle radius and center using the FAQ:
Now once you have the perfect circle, you can regenerate the perfect circle coordinates. Call round() on them if you want to quantize them to integer row, column values.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!