Login  Register

Largest enclosed convex shape to measure eggs with appendages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Largest enclosed convex shape to measure eggs with appendages

Tom Kazimiers
7 posts
Dear all,

On images like the one attached, I want to measure the maximum length of
each eggshell. Those eggshells are ellipse like structures with usually
two smaller appendages. Those, however, shouldn't be part of the
measurement, but only the eggshell itself.

Unfortunately, it isn't enough to threshold the image and find the
longest straight line in the egg. The problem is: if the appendages are
inconveniently located, the longest straight line will go through them
as well---which wouldn't be what I want to measure.

Therefore, I thought, it would be best to threshold first and then find
the largest enclosed convex shape and then do the measuring on this
shape. Now, I guess I could implement something like

    A Polynomial Solution For Potato-Peeling And Other Polygon Inclusion
    And Enclosure Problems (J. S. Chang and C. K. Yap 1984),

but I was wondering if there is something similar in ImageJ/Fiji already
that I miss or if you have another suggestion on how to do those
measurements. Any ideas?

I tried to use the watershed plugin and it cut the appendages in most
cases, but not in all. Also the cuts where sometimes rather far away
from the egg itself and so the longest straight line could still go
through the cut appendage.

Thanks in advance,
Tom

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

sample_eggshells.tiff (150K) Download Attachment
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Largest enclosed convex shape to measure eggs with appendages

José María Mateos
51 posts
2013/8/19 Tom Kazimiers <[hidden email]>:
> On images like the one attached, I want to measure the maximum length of
> each eggshell. Those eggshells are ellipse like structures with usually
> two smaller appendages. Those, however, shouldn't be part of the
> measurement, but only the eggshell itself.

Those appendages seems to be a nice target for a morphological filter.
I've tried the follwing:

setAutoThreshold("Huang dark");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Options...", "iterations=20 count=3 black edm=Overwrite do=Open");

That creates a mask that contains only the main eggshell body (a bit
distorted after the opening operation), but might be a nice starting
point.

Best,

José.

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

Re: Largest enclosed convex shape to measure eggs with appendages

Gabriel Landini
1783 posts
In reply to this post by Tom Kazimiers
On Monday 19 Aug 2013 11:20:23 Tom Kazimiers wrote:
> Therefore, I thought, it would be best to threshold first and then find
> the largest enclosed convex shape and then do the measuring on this
> shape. Now, I guess I could implement something like

Hi Tom,
If you want the length of Max Feret, you can get rid of the bits sticking out
by greyscale closing (min followed by max) radius of size 8 seems to work.
Then do an automated threshold.

Another perhaps better method is to segment as they are, make a duplicate,
erode it a bit so the bits sticking out disappear and then reconstruct the
original binary  (mask) with the eroded as seed using a procedure called
Viscous Geodesic Reconstruction (macro available in the Morphology collection
in my page). That only reconstructs the mask if the kernel can fully get into
the mask regions (so the thin parts do not get reconstructed (size 20 seems to
work).
Cheers
Gabriel

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

Re: Largest enclosed convex shape to measure eggs with appendages

nicola giacobbe
6 posts
In reply to this post by Tom Kazimiers

I have used the shape smoothing plugin  
(https://code.google.com/p/ij-shape-smoothing/) and it works well.
The effect of the plugin could be seen in the attached image.

On Mon, 19 Aug 2013 12:20:23 +0200, Tom Kazimiers <[hidden email]>  
wrote:

> Dear all,
>
> On images like the one attached, I want to measure the maximum length of
> each eggshell. Those eggshells are ellipse like structures with usually
> two smaller appendages. Those, however, shouldn't be part of the
> measurement, but only the eggshell itself.
>
> Unfortunately, it isn't enough to threshold the image and find the
> longest straight line in the egg. The problem is: if the appendages are
> inconveniently located, the longest straight line will go through them
> as well---which wouldn't be what I want to measure.
>
> Therefore, I thought, it would be best to threshold first and then find
> the largest enclosed convex shape and then do the measuring on this
> shape. Now, I guess I could implement something like
>
>     A Polynomial Solution For Potato-Peeling And Other Polygon Inclusion
>     And Enclosure Problems (J. S. Chang and C. K. Yap 1984),
>
> but I was wondering if there is something similar in ImageJ/Fiji already
> that I miss or if you have another suggestion on how to do those
> measurements. Any ideas?
>
> I tried to use the watershed plugin and it cut the appendages in most
> cases, but not in all. Also the cuts where sometimes rather far away
> from the egg itself and so the longest straight line could still go
> through the cut appendage.
>
> Thanks in advance,
> Tom
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

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

Smoothed Objects.jpg (10K) Download Attachment