Circles Questions

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

Circles Questions

meastwood98
Hi, i've got some BINARY images with shapes on them that are not quite circular, i want to write a plug-in for imageJ using java that will find the biggest circle that can fit in the shapes and then select and cut the circle.

Im not sure how to go about this, i.e. finding the shapes automatically and then trying different circles in them.

Any suggestions or help would be very much appriciated,

Thankyou,
Mark
Reply | Threaded
Open this post in threaded view
|

Re: Circles Questions

J H-4
I'm not sure if there's an ImageJ package for this, but it's a
nontrivial topic from computational geometry called inscribed circles,
particularly the Largest Empty Circle Problem.

Doing a quick google, here's a nice java implementation
http://www.nirarebakun.com/graph/elc.html

There's two more here
http://scicomp.npl.co.uk/eurometros/gen_report.php?category=test+data&pkey=13&subform=yes
http://www.cs.mcgill.ca/~cs507/projects/1998/vperep/Asphera.java

The opposite, smallest bounding circle, is called circumcircles and there's
a nice java package here for it:
http://lab.polygonal.de/2007/02/17/bounding-circle-computation/

Hope this helps.

On 2/15/08, meastwood98 <[hidden email]> wrote:

>
> Hi, i've got some BINARY images with shapes on them that are not quite
> circular, i want to write a plug-in for imageJ using java that will find
> the
> biggest circle that can fit in the shapes and then select and cut the
> circle.
>
> Im not sure how to go about this, i.e. finding the shapes automatically
> and
> then trying different circles in them.
>
> Any suggestions or help would be very much appriciated,
>
> Thankyou,
> Mark
> --
> View this message in context:
> http://www.nabble.com/Circles-Questions-tp15502977p15502977.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Circles Questions

Gabriel Landini
On 2/15/08, meastwood98 <[hidden email]> wrote:
> Hi, i've got some BINARY images with shapes on them that are not quite
> circular, i want to write a plug-in for imageJ using java that will find
> the  biggest circle that can fit in the shapes and then select and cut the
> circle.

The biggest circle that can fit the shapes is infinite.
I guess that you are looking for the minimal bounding circle.

You can get the x and y coordinates of the centre and the radius of the
minimum boinding circle with the Particles8_Plus plugin which is part of the
Morphology collection that you can find here:

http://www.dentistry.bham.ac.uk/landinig/software/software.html

The parameters that you are looking for are MBCX, MBCY and MBCRadius.

Cheers,

G.
Reply | Threaded
Open this post in threaded view
|

Re: Circles Questions

meastwood98
Hi, i have downloaded this, could you explain how i use it? i am not very experienced with imageJ, thank you.


Gabriel Landini wrote
On 2/15/08, meastwood98 <meastwood98@yahoo.co.uk> wrote:
> Hi, i've got some BINARY images with shapes on them that are not quite
> circular, i want to write a plug-in for imageJ using java that will find
> the  biggest circle that can fit in the shapes and then select and cut the
> circle.

The biggest circle that can fit the shapes is infinite.
I guess that you are looking for the minimal bounding circle.

You can get the x and y coordinates of the centre and the radius of the
minimum boinding circle with the Particles8_Plus plugin which is part of the
Morphology collection that you can find here:

http://www.dentistry.bham.ac.uk/landinig/software/software.html

The parameters that you are looking for are MBCX, MBCY and MBCRadius.

Cheers,

G.
Reply | Threaded
Open this post in threaded view
|

Re: Circles Questions

meastwood98
In reply to this post by J H-4
I dont think that i have explained my self properly. What i am trying to do is, for example say i have a rectangle, i am trying to find the largest circle that i can fit into the rectangle, of course in my work they wont be rectangles, they will be random shapes. Does this make it clearer?


J H-4 wrote
I'm not sure if there's an ImageJ package for this, but it's a
nontrivial topic from computational geometry called inscribed circles,
particularly the Largest Empty Circle Problem.

Doing a quick google, here's a nice java implementation
http://www.nirarebakun.com/graph/elc.html

There's two more here
http://scicomp.npl.co.uk/eurometros/gen_report.php?category=test+data&pkey=13&subform=yes
http://www.cs.mcgill.ca/~cs507/projects/1998/vperep/Asphera.java

The opposite, smallest bounding circle, is called circumcircles and there's
a nice java package here for it:
http://lab.polygonal.de/2007/02/17/bounding-circle-computation/

Hope this helps.

On 2/15/08, meastwood98 <meastwood98@yahoo.co.uk> wrote:
>
> Hi, i've got some BINARY images with shapes on them that are not quite
> circular, i want to write a plug-in for imageJ using java that will find
> the
> biggest circle that can fit in the shapes and then select and cut the
> circle.
>
> Im not sure how to go about this, i.e. finding the shapes automatically
> and
> then trying different circles in them.
>
> Any suggestions or help would be very much appriciated,
>
> Thankyou,
> Mark
> --
> View this message in context:
> http://www.nabble.com/Circles-Questions-tp15502977p15502977.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Circles Questions

Robert Dougherty
You could try Process/Binary/Distance Map and then find the largest value in
the distance map (perhaps with Analyze/Set Measurements/Min and Max Grey
Value and then Analyze/Measure).  The value will be the radius; you will
need to multiply by 2 for the diameter.

Bob

Robert P. Dougherty, Ph.D.
President, OptiNav, Inc.
[hidden email]
Phone (425) 467-1118
Cell (425) 891-4883
Fax (425) 467-1119
www.optinav.com
-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
meastwood98
Sent: Monday, February 18, 2008 3:18 AM
To: [hidden email]
Subject: Re: Circles Questions

I dont think that i have explained my self properly. What i am trying to do
is, for example say i have a rectangle, i am trying to find the largest
circle that i can fit into the rectangle, of course in my work they wont be
rectangles, they will be random shapes. Does this make it clearer?
Reply | Threaded
Open this post in threaded view
|

Re: Circles Questions

Dimiter Prodanov-2
In reply to this post by meastwood98
Hi

This reminds me of a problem for size estimation.
You can try doing granulometry and then Top-hat
with a structuring element of a larger size than
the size of your objects of interest.

Best regards,

Dimiter Prodanov



>