Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Select pixels lying within a circle from image

1,241 views
Skip to first unread message

Ben Grant

unread,
Nov 21, 2010, 4:35:33 AM11/21/10
to
Hi All, I have certain circular regions of interest in an image and i automatically detect these circles as well as their radius. However, I then want to determine the indices of the pixels lying within the circle. I used the code http://matlab.pastebin.com/nfz9TXFW shown there, but to no avail. I colored the pixels white to check the indices, and it comes up w/ a rectangle not a circle, so that's a bad sign. Any thoughts? Thanks
Ben

ImageAnalyst

unread,
Nov 21, 2010, 9:32:00 AM11/21/10
to
Ben:
That code is lame and inefficient. Use the code Sean gave here:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/291115


Also check out
http://www.mathworks.com/matlabcentral/newsreader/view_thread/295305#792594

By the way, a circle detection m-file was submitted last week to the
File Exchange:
http://www.mathworks.com/matlabcentral/fileexchange/9168-detect-circles-with-various-radii-in-grayscale-image-via-hough-transform

Now, you said you automatically detected the circular ROI's in the
image. HOW did you do that? Do you have a binary image as a result
of doing that? The binary image will be true or false depending on if
the pixel is in or out of the regions you identified. But you need to
finish your question. What are you going to do with the pixels inside
the ROI's after you've identified them. THAT'S the important part,
and where you could go wrong if you don't do it correctly. Are you
going to mask the image? Crop it? Measure the original image
properties inside the circles? What?
-ImageAnalyst

alxre...@gmail.com

unread,
Aug 29, 2015, 3:38:08 AM8/29/15
to
ImageAnalyst,
Thank you for the above information on finding circles on an image. I am working on a project where we take the picture of oil drop in a fixed circle region. I am trying to detect this region (circular), crop it for further analysis such as image quantification to differentiate from other liquids.

Kindly help us.
0 new messages