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

Home » Public Forums » archive » Re: repeat.. until loops
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: repeat.. until loops [message #15934] Sun, 27 June 1999 00:00
Craig Aranjo is currently offline  Craig Aranjo
Messages: 3
Registered: June 1999
Junior Member
I solved it (finally!!).

For some reason it didn't like the assignment row_start = i

Why is IDL so fickle?


Craig Aranjo <aranjo@currantbun.com> wrote in message
news:377601ab.0@news1...
> Perhaps i didbn't explain this properly:
>
> half_col = col_max / 2
>
> I wanto to move radially inwards from left to right half way down the
binary
> image until i find a white pixel. Unfortuantely, the repeat...until loop
> does not terminate after it has found the white pixel... it continues
until
> it exceeds the row max value and propagtes an error. I would like it to
> return the value i of the white pixel.
>
> Any help with the code below
>
> Thanks
>
> Craig
>
>
> Craig Aranjo <aranjo@currantbun.com> wrote in message
> news:3774fe7b.0@news1...
>>
>> Why does this not work in IDL??
>>
>> repeat begin
>> if img(i, half_col) ge 245 then row_start = i $
>> else i = i + 1
>> endrep $
>> until img(i, half_col) ge 245
>>
>>
>> I am looking at a binary image for the first white pixel halfway down
the
>> image (moving inwards).
>> It always gives me an error that exceeds the maximum row valuie of the
>> image.
>>
>>
>> Any ideas.... I'm sure this is a really silly question.
>>
>>
>
>
Re: repeat.. until loops [message #15935 is a reply to message #15934] Sun, 27 June 1999 00:00 Go to previous message
Craig Aranjo is currently offline  Craig Aranjo
Messages: 3
Registered: June 1999
Junior Member
Perhaps i didbn't explain this properly:

half_col = col_max / 2

I wanto to move radially inwards from left to right half way down the binary
image until i find a white pixel. Unfortuantely, the repeat...until loop
does not terminate after it has found the white pixel... it continues until
it exceeds the row max value and propagtes an error. I would like it to
return the value i of the white pixel.

Any help with the code below

Thanks

Craig


Craig Aranjo <aranjo@currantbun.com> wrote in message
news:3774fe7b.0@news1...
>
> Why does this not work in IDL??
>
> repeat begin
> if img(i, half_col) ge 245 then row_start = i $
> else i = i + 1
> endrep $
> until img(i, half_col) ge 245
>
>
> I am looking at a binary image for the first white pixel halfway down the
> image (moving inwards).
> It always gives me an error that exceeds the maximum row valuie of the
> image.
>
>
> Any ideas.... I'm sure this is a really silly question.
>
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: When should objects be used?
Next Topic: can you translate IDL5.1 to IDL2.x...(Hough transform source)

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

Current Time: Wed Oct 08 17:17:45 PDT 2025

Total time taken to generate the page: 0.00533 seconds