resample [message #71519] |
Tue, 29 June 2010 22:09  |
gaurijyoti29
Messages: 10 Registered: April 2009
|
Junior Member |
|
|
Dear Max,
I have done this way
envi_open_file, file1, r_fid=_rfid1
envi_file_query, _rfid1, ns=_ns1, nl=_nl1, nb=_nb1, dims=_dims1,
data_type=_datatype1, interleave=_interleave1, xstart=_xstart1,
ystart=_ystart1
_mapinfo1 = envi_get_map_info(fid=_rfid1)
envi_open_file, file2, r_fid=_rfid2
envi_file_query, _rfid2, ns=_ns2, nl=_nl2, dims=_dims2
_mapinfo2 = envi_get_map_info(fid=_rfid2)
_xfactor = _mapinfo2.ps[0] / _mapinfo1.ps[0]
_yfactor = _mapinfo2.ps[1] / _mapinfo1.ps[1]
envi_doit, 'resize_doit', fid=_rfid1, pos=pos1, dims=_dims1, interp=0,
rfact=[_xfactor,_yfactor], r_fid=_rfid2a, out_name=tempfile
But the resampled file does not give the same number of pixels and
lines corresponding to high resolution image(file2). Kindly suggest me
to fix this problem.
Thanks for your help.
|
|
|
|
|
Re: resample [message #71614 is a reply to message #71519] |
Wed, 30 June 2010 00:15  |
Maxwell Peck
Messages: 61 Registered: February 2010
|
Member |
|
|
On Jun 30, 3:09 pm, dolly <gaurijyot...@gmail.com> wrote:
> Dear Max,
>
> I have done this way
>
> envi_open_file, file1, r_fid=_rfid1
> envi_file_query, _rfid1, ns=_ns1, nl=_nl1, nb=_nb1, dims=_dims1,
> data_type=_datatype1, interleave=_interleave1, xstart=_xstart1,
> ystart=_ystart1
> _mapinfo1 = envi_get_map_info(fid=_rfid1)
>
> envi_open_file, file2, r_fid=_rfid2
> envi_file_query, _rfid2, ns=_ns2, nl=_nl2, dims=_dims2
> _mapinfo2 = envi_get_map_info(fid=_rfid2)
>
> _xfactor = _mapinfo2.ps[0] / _mapinfo1.ps[0]
> _yfactor = _mapinfo2.ps[1] / _mapinfo1.ps[1]
>
> envi_doit, 'resize_doit', fid=_rfid1, pos=pos1, dims=_dims1, interp=0,
> rfact=[_xfactor,_yfactor], r_fid=_rfid2a, out_name=tempfile
>
> But the resampled file does not give the same number of pixels and
> lines corresponding to high resolution image(file2). Kindly suggest me
> to fix this problem.
>
> Thanks for your help.
Now that I think I understand what you want using
ENVI_LAYER_STACKING_DOIT instead is probably a better option for you.
There is a good example in the help.
Max
|
|
|