Posted by
Jacqueline Ross on
Jul 08, 2010; 6:48am
URL: http://imagej.273.s1.nabble.com/measuring-object-length-tp3687667p3687669.html
Hi Elizabeth,
You can use binary operations like erosion/dilation, open/close etc. to remove branches once you have a binary image. Prior to skeletonisation, you could use filters to remove noise that often results in branches, e.g remove outliers or a standard median filter. If you could post an image somewhere, then people might have a better idea of what you are trying to do and the issues you are trying to solve. You could post both an original image and the skeleton image or just the skeletonised one... Sometimes, our imagination isn't enough!
Kind regards,
Jacqui
Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research Unit
School of Medical Sciences
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland, NEW ZEALAND
Tel: 64 9 373 7599 Ext 87438
Fax: 64 9 373 7484
http://www.fmhs.auckland.ac.nz/sms/biru/-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Crowell Elizabeth
Sent: Monday, 5 July 2010 8:51 p.m.
To:
[hidden email]
Subject: Re: measuring object length?
Hello,
My attempts to measure the length of variously shaped linear and curved
objects is making some progress.
For the moment, the best option seems to use Process/Binary/Skeletonize,
then take the length as half of the perimeter of the skeletons. This
works better than ellipse fitting, which fails to correctly measure
curved objects. The major problem with the skeleton approach is that
many of my skeletons end up branched, which also leads to large errors
in the length measurements.
How can I reduce/eliminate the formation of branches? If I could clean
up the images before thresholding, and remove the background noise,
perhaps it would be sufficient to reduce the formation of skeleton
branches. Are there any ways to enhance linear objects in images?
Erosion, top-hat filters, etc? I have colleagues who work on
enhancement of round objects, but I have never heard about how one can
enhance linear objects...
Thank you,
Elizabeth
David Webster a écrit :
> Elizabeth,
>
> Hmm! That's what I thought you mean. So, if you had a U sahped object,
> then length would be the distance from one vertex(?) to the other
> measured along a path wihin the U. I think that you a probably looking
> for something like lengths dirived the Skeleton or Medial Axis. I am
> not sure how to compue what you need but will look around to see if I
> can find soemthing. You can check the imageJ wiki for a Skeleton
> Plugin or the menu item Process/Binary/Skeletonize to see what a
> skelton looks like. The problem is that skeletons can have branches.
>
> David
>
> On Fri, Jul 2, 2010 at 2:01 AM, Crowell Elizabeth
> <
[hidden email] <mailto:
[hidden email]>>
> wrote:
>
> Hello David,
>
> Thank you for your response.
>
> What do I mean by object length? I'm not sure how to describe
> this in proper mathematical terms, but I have made a drawing to
> show how I would draw a line on the object manually to measure its
> length (attached, "length.jpg"). For the very linear objects, the
> Feret's diameter is equal to the length, but for curved objects,
> the length would be equal to that of a curved line that bisects
> the object. I have attached an example of the images I am trying
> to process ("4.jpg") to show the diversity of shapes.
>
> Rather than determining the principle axes of my object, I think I
> need to define lines that represent the shortest distance between
> two points on the perimeter of the object (i.e. lines roughly
> perpendicular to the major axis), then determine the center point
> of each of these lines, and connect the points. The length of the
> resulting line would equal my object length.
>
> I did not know how to fit ellipsoids, but I have read on the
> ImageJ site that this is done through Analyze particles. I will
> try fitting ellipsoids, measure the Feret's diameter of my
> ellipses, and compare it to my manual measurements. But I think
> we know already that this will not accurately measure the length
> of curved linear objects?
>
> Please let me know if there is a way to automatically calculate a
> line bisecting an object, or if this can be implemented...
>
> Thanks again for your help,
> Elizabeth
>
>
> David Webster a écrit :
>> Elizabeth,
>>
>> Do you have defintion or examples of what you mean by object length?
>>
>> Having said that, have you considered finding the principle axes
>> (i.e. ellipsoid fit) and then looking for the largest distance
>> between projected points on the major axis?
>>
>> David Webster
>>
>> On Thu, Jul 1, 2010 at 9:23 AM, Crowell Elizabeth
>> <
[hidden email]
>> <mailto:
[hidden email]>> wrote:
>>
>> Dear members,
>>
>> I am trying to measure the lengths of variably shaped
>> objects. Their shapes range from thin lines with or without
>> curvature, to elongated ellipsoids and small circles.
>>
>> - Is there a method for measuring the length of such objects?
>> It seems that I cannot use the Feret's diameter, since it
>> will yield an underestimation of the length of the curved
>> objects?
>>
>> Thank you in advance for sharing your expertise!
>>
>> --
>>
>> Elizabeth CROWELL
>>
>> ----------------------------------------------------------------------
>> Membrane Traffic and Cell Division Research Group
>> Institut Pasteur
>> 28 rue du Dr Roux
>> 75015 PARIS, France
>>
>> Tel : 01.44.38.94.07
>> Fax : 01.45.68.89.54
>> ----------------------------------------------------------------------
>>
>>
>
>
> --
>
> Elizabeth CROWELL
>
> ----------------------------------------------------------------------
> Membrane Traffic and Cell Division Research Group
> Institut Pasteur
> 28 rue du Dr Roux
> 75015 PARIS, France
>
> Tel : 01.44.38.94.07
> Fax : 01.45.68.89.54
> ----------------------------------------------------------------------
>
>
--
Elizabeth CROWELL
----------------------------------------------------------------------
Membrane Traffic and Cell Division Research Group
Institut Pasteur
28 rue du Dr Roux
75015 PARIS, France
Tel : 01.44.38.94.07
Fax : 01.45.68.89.54
----------------------------------------------------------------------