Automatically Selecting a Circle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatically Selecting a Circle

Andrew Sanchez
I am trying to automate the task of manually selecting a circular area.

The circle I need to select is very apparent and has fairly thick white
borders.  I am wondering if ImageJ can recognize the circle.

Unfortunately, the size and location of the circle varies slightly from
image to image.

Is it possible for ImageJ to recognize a large circle in my images, and to
select and crop that area?

The ultimate goal is to then count the number of green pixels within the
circle.

Thank you,
Andrew Sanchez
Lab Assistant
Center for Ecosystem Science
Northern Arizona University

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Automatically Selecting a Circle

Michael Schmid
Hi Andrew,

it's difficult to give any advice without seeing a sample image. Can you
attach one (if a small file) or upload one on a web server?

If some segmentation method (e.g. preprocessing and thresholding) can get
the circle, you may fill the circle, and fit an ellipse (Analyze>Set
Measurements, select 'Fit Ellipse, then Analyze>Measure). With the
coordinates of the circle, you can create a circular selection (if the
previous selection is not good enough).
Then use e.g. Image>Adjust>Color Threshold to select what you consider
green pixels, get the circle selection, and create appropriate macro code
with Plugins>Macros>Record.
Then use e.g. the getRawStatistics macro command.

If segmentation does not work to recognize the circle, have a look at the
various Hough transform plugins, whether you find a suitable one for
detecting your circles.

Michael
___________________________________________________________________
On Fri, May 22, 2015 23:51, Andrew Sanchez wrote:

> I am trying to automate the task of manually selecting a circular area.
>
> The circle I need to select is very apparent and has fairly thick white
> borders.  I am wondering if ImageJ can recognize the circle.
>
> Unfortunately, the size and location of the circle varies slightly from
> image to image.
>
> Is it possible for ImageJ to recognize a large circle in my images, and to
> select and crop that area?
>
> The ultimate goal is to then count the number of green pixels within the
> circle.
>
> Thank you,
> Andrew Sanchez
> Lab Assistant
> Center for Ecosystem Science
> Northern Arizona University
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html