comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: the length of line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: the length of line [message #31046 is a reply to message #31044] Tue, 04 June 2002 10:22 Go to previous messageGo to previous message
Eric Vella is currently offline  Eric Vella
Messages: 8
Registered: April 1999
Junior Member
To really solve this problem as you have outlined it, you probably need some
clever recursive algorithm for traversing the line and following all
branches, summing the length as you go. You might want to separate the
"line" into blocks connected purely by straight segments, separated from
other blocks by diagonal connections. The "length" of each block is then
the number of pixels, and each extra block extends the length of the line by
an additional diagonal. If you only need an approximate length, why not
ignore the diagonals and simply count pixels?

"Xiaoying Jin" <xje4e@mizzou.edu> wrote in message
news:adgr20$5r5$1@dipsy.missouri.edu...
> Hi, there,
>
> I have an image having a line on it. The line has one-pixel width. The
> approxiamate method to calculate the length of the line is like this:
> the length is calculated as the sum of distances between adjacent pixels
on
> the line, where 1 is the vertical or horizontal distance between adjacent
> pixels and sqrt(2) is the distance between pixels on diagonals.
>
> My question is:
> How can I trace this line and get the length of the line?
>
> Any suggestion will be appreciated.
>
> Regards,
>
> Xiaoying Jin
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: how to modify the default 'printf' format
Next Topic: segmentation of more channel images

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 02:31:12 PDT 2025

Total time taken to generate the page: 0.00732 seconds