Login  Register

Re: skeleton length

Posted by Gabriel Landini on Feb 27, 2007; 12:00pm
URL: http://imagej.273.s1.nabble.com/skeleton-length-tp3700229p3700231.html

On Tuesday 27 February 2007 08:07:50 Michael Miller wrote:
> I've been working on using ImageJ to compute lengths via skeletons for some
> time. My solution is below.
>
> Parse the entire skeleton (loop over every pixel). Once you find a part of
> the skeleton:
>    -count up the number of horizontal Nh, vertical Nv, and diagonal Nd
> connections separately
> Once you're done with this loop, you will have counted every pair of pixels
> exactly twice; divide each Nd, Nv, Nh by 2.

A problem arises when you have a "T" configuration of pixels which can easily
happen when skeletonizing:

(you need a fixed font to see this):

 A
BCD

In this configuration your method will find the distances CB, CD, CA, but also
the unnecessary AB and AD (since the skeleton is already connected from A to
C.
This will over-estimage the length of the skeletons.
In reality each corner (above A-C-D) will be overestimated by sqrt(2) pixels.
This can account for quite a bit in some skeletons.

I would be happy to try some other ideas.

Cheers,

Gabriel