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

Home » Public Forums » archive » Re: Composition structure
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: Composition structure [message #41276 is a reply to message #41104] Sun, 03 October 2004 14:57 Go to previous message
jcesq is currently offline  jcesq
Messages: 9
Registered: October 2004
Junior Member
Thanks for all suggestions! I'm going to use Kuyper procedure (the
simplest), once my image have always the same size:

Composite = Image1

Then, for each additional image:

Composite = Composite > ImageN

Best Regards for all...
Jeferson


Paul Van Delst <paul.vandelst@noaa.gov> wrote in message news:<cjkboj$ls7$1@news.nems.noaa.gov>...
> Jeferson E. wrote:
>> Hello there!
>>
>> Assuming I have 5 images and I want to get the maximum value
>> composition. I can use something like that:
>>
>> Composite = Image1 > Image2 > Image3 > Image4 > Image5
>>
>> However, in the case I don't know the number of images, I can't use
>> this structure. What could be done?
>
> Depends how you call your application, no?
>
> Let's say you have 10 images (say, 800x640) - you'd need to stick them in some sort of
> array to allow you code to process an arbitrary number of images,
>
> n = 20
> ImageArray = bytarr(800,640,n)
> .... here fill you image array....
> GetImageMax, ImageArray, ImageMax
>
> where the procedure is something like below:
>
> PRO GetImageMax, ImageArray, $ ; Input
> ImageMax ; Output
>
> ; -- Get some array info
> Info = SIZE( ImageArray, /STRUCTURE )
>
> ; -- Is the image array 3-d?
> IF ( Info.N_DIMENSIONS NE 3 ) THEN $
> MESSAGE, 'Must pass in a 3-D array!'
>
> ; -- Determine the number of images
> n_Images = Info.DIMENSIONS[2]
>
> ; -- Find the maximum
> ImageMax = ImageArray[*,*,0]
> FOR i = 1, n_Images-1 DO BEGIN
> ImageMax = ImageMax > ImageArray[*,*,i]
> ENDFOR
>
> END
>
> I'm sure other folks will post cleverer solutions that don't use loops.
>
> paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: array operators - vector processing relevant
Next Topic: WIDGET ID FINDING FUNCTION

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

Current Time: Mon Dec 01 21:11:41 PST 2025

Total time taken to generate the page: 1.36023 seconds