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

Home » Public Forums » archive » mosaic two images in direct graphics
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
mosaic two images in direct graphics [message #44386] Thu, 09 June 2005 06:43 Go to next message
Sebastian is currently offline  Sebastian
Messages: 5
Registered: June 2005
Junior Member
Hello group,

i have a problem merging two images together, and couldn't find
information for a solution.

My problem:

i have two (or even more) images of irregular shape (in fact, they are
referenced orbits of a satellite), the rest of the image is black.
i want to draw the two images using direct graphics. If i just use TV or
TVSCL, the surrounding (black) part of the image overplots the first
image, so i can't see both orbits.
The technique of simply adding the arrays is not satisfying as i want to
add many images with different sizes and i do not want to process them
individually.

My approach would be to te tell TV not to draw the black color, that
would be sufficient. Some sort of transparency would solve my problem as
well.

If it is possible in object graphics for sure, i am willing to transfer
my program to that....

some advice??? Thanks in advance!

Viele Gruesse
Sebastian
Re: Mosaic [message #51415 is a reply to message #44386] Mon, 20 November 2006 08:40 Go to previous messageGo to next message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
X0 and Y0 are vectors which contain the starting pixels for each of
your input images, with respect to the output mosaic. For example, if
you are mosaicking four 100 x 100 images into one 200 x 200 image,
then:

X0 = [0, 0, 100, 100]
Y0 = [0, 100, 0, 100]

(I can't remember if these are referenced from the upper left or lower
left corner.)

POS determines which bands of the input files to include, and in what
order. If there are two bands in the four files listed above, use
something like this:

POS = rebin(lindgen(2), 2, 4)

print, POS
0 1
0 1
0 1
0 1

Hope that helps,
David
Re: Mosaic [message #51423 is a reply to message #44386] Mon, 20 November 2006 00:07 Go to previous messageGo to next message
bujji is currently offline  bujji
Messages: 10
Registered: October 2005
Junior Member
Robert,

I had seen MOSAIC_DOIT but I am having 'n' number of files in a
directory and all the files have to be mosaiced automatically. I am
facing a problem with the x0, y0 and pos arguments

Regards,
Prahlad V

Robert Moss wrote:
> MOSAIC_DOIT is what you are looking for.
>
> r
>
> bujji wrote:
>> Hello All,
>>
>> I am using IDL6.3 on windows. I am having some raw data sets. using
>> ENVI routines I had georeferenced the data. Now I wud like to Mosaic
>> the data.
>> How to Mosaic the data automatically using ENVI and IDL routines(the
>> data is georeferenced).
>>
>> Please suggest me a suitable way.
>>
>> Regards,
>> Prahlad V
Re: Mosaic [message #51424 is a reply to message #44386] Sun, 19 November 2006 16:21 Go to previous messageGo to next message
Robert Moss, PhD is currently offline  Robert Moss, PhD
Messages: 29
Registered: November 2006
Junior Member
MOSAIC_DOIT is what you are looking for.

r

bujji wrote:
> Hello All,
>
> I am using IDL6.3 on windows. I am having some raw data sets. using
> ENVI routines I had georeferenced the data. Now I wud like to Mosaic
> the data.
> How to Mosaic the data automatically using ENVI and IDL routines(the
> data is georeferenced).
>
> Please suggest me a suitable way.
>
> Regards,
> Prahlad V
Re: Mosaic [message #51504 is a reply to message #51415] Thu, 23 November 2006 18:18 Go to previous messageGo to next message
bujji is currently offline  bujji
Messages: 10
Registered: October 2005
Junior Member
Thanks Mr David,

I cud resolve the problem for two images. If there are 'n' number of
images then tell me generic way to define X0,Y0,POS,DIMS.

Regards,
Prahlad

David Streutker wrote:
> X0 and Y0 are vectors which contain the starting pixels for each of
> your input images, with respect to the output mosaic. For example, if
> you are mosaicking four 100 x 100 images into one 200 x 200 image,
> then:
>
> X0 = [0, 0, 100, 100]
> Y0 = [0, 100, 0, 100]
>
> (I can't remember if these are referenced from the upper left or lower
> left corner.)
>
> POS determines which bands of the input files to include, and in what
> order. If there are two bands in the four files listed above, use
> something like this:
>
> POS = rebin(lindgen(2), 2, 4)
>
> print, POS
> 0 1
> 0 1
> 0 1
> 0 1
>
> Hope that helps,
> David
Re: Mosaic [message #51993 is a reply to message #51423] Tue, 26 December 2006 02:53 Go to previous message
linglimu is currently offline  linglimu
Messages: 7
Registered: December 2006
Junior Member
"bujji 写道:
"
> Robert,
>
> I had seen MOSAIC_DOIT but I am having 'n' number of files in a
> directory and all the files have to be mosaiced automatically. I am
> facing a problem with the x0, y0 and pos arguments
>
> Regards,
> Prahlad V
>
> Robert Moss wrote:
>> MOSAIC_DOIT is what you are looking for.
>>
>> r
>>
>> bujji wrote:
>>> Hello All,
>>>
>>> I am using IDL6.3 on windows. I am having some raw data sets. using
>>> ENVI routines I had georeferenced the data. Now I wud like to Mosaic
>>> the data.
>>> How to Mosaic the data automatically using ENVI and IDL routines(the
>>> data is georeferenced).
>>>
>>> Please suggest me a suitable way.
>>>
>>> Regards,
>>> Prahlad V



hello ,this was a question troubling me 3 years ago. Through
MOSAIC_DOIT can been used to mosaic the images based on the Envi
platform,but you should provide goe_information as mentioned above. So
the Goe_information is the key question. how to get the
goe_information, Envi doesn't provide.You can use the follow code ,
which is imbedded in Noaa image processing system programed by me .

;-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- *//
;-*-*-*- mosaic the image -*-*-*-*-*-*//
;-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- *//

pro map_mosaic1,fileName1,fileName2,out_Name,dir

cd,dir

;//-*-*-*-*-*-*-*-*-*-*-*-*-合并前两幅图*-*-*-*-*-*-*- *-*-*-*-*-*-*-*-*-*
envi_open_data_file, fileName1,r_fid=fid1;,/NO_REALIZE
if (fid1 eq -1) then begin
envi_batch_exit
return
end


envi_open_data_file, fileName2,r_fid=fid2;,/NO_REALIZE
if (fid2 eq -1) then begin
envi_batch_exit
return
end


fids = [fid1,fid2]

out_ps = [1100,1100];RS
print , 'selecting file over !!'

;////////use georef_mosaic_setup to get the information of the files
georef_mosaic_setup, fids=fids, out_ps=out_ps, dims=dims, xsize=xsize,
ysize=ysize,$
x0=x0, y0=y0, map_info=map_info

;/////set the necessary parameter
use_see_through = [[1L],[1]]
see_through_val = [[0L],[0]]
pos = [[0,1,2,3,4],[0,1,2,3,4]]
print,xsize,ysize

print , 'To select the output file !!'
;/////////Select the output file
;//////////do mosaic
envi_doit, 'mosaic_doit', fid=fids, pos=pos, dims=dims,
out_name=out_Name, $
r_fid=out_fid1, xsize=xsize, ysize=ysize, x0=x0, y0=y0, georef=1,
map_info=map_info, $
out_dt=4, pixel_size=out_ps, background=0,
see_through_val=see_through_val, $
use_see_through=use_see_through
envi_file_mng, id=fid1, /remove
envi_file_mng, id=fid2, /remove
envi_file_mng, id=out_fid1, /remove

end
Re: Mosaic [message #52024 is a reply to message #51415] Thu, 21 December 2006 11:03 Go to previous message
bujji is currently offline  bujji
Messages: 10
Registered: October 2005
Junior Member
David,
thanx for your reply.
but i want to know a generic way to automatically mosaic the
geo-referenced images.

please let me know how to define "dims" also. and my images are gray
scale images.

regards,
prahlad



David Streutker wrote:
> X0 and Y0 are vectors which contain the starting pixels for each of
> your input images, with respect to the output mosaic. For example, if
> you are mosaicking four 100 x 100 images into one 200 x 200 image,
> then:
>
> X0 = [0, 0, 100, 100]
> Y0 = [0, 100, 0, 100]
>
> (I can't remember if these are referenced from the upper left or lower
> left corner.)
>
> POS determines which bands of the input files to include, and in what
> order. If there are two bands in the four files listed above, use
> something like this:
>
> POS = rebin(lindgen(2), 2, 4)
>
> print, POS
> 0 1
> 0 1
> 0 1
> 0 1
>
> Hope that helps,
> David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Painfully slow IDL startup
Next Topic: Re: Envi: suggest how to save gcps to an ascii file

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

Current Time: Wed Oct 08 19:39:43 PDT 2025

Total time taken to generate the page: 0.00432 seconds