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

Home » Public Forums » archive » Re: Help with georeferencing using envi
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: Help with georeferencing using envi [message #52775] Wed, 28 February 2007 09:48
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
On Feb 27, 7:18 pm, "christina" <galax...@gmail.com> wrote:
> Hi all,
>
> I've been working with a marine radar, which produces an images of sea
> ice. I am trying to georeference the images, and I can do it
> successfully by hand using the envi gui, but I've written an IDL code
> to try and automate the process. I am calling ENVI_REGISTER_DOIT, to
> do image to map registration based on some GPS points I have. I think
> there is something wrong related to the pixel size and the output size
> of my image.
>
> Currently, when I set the dimensions of my output warped image to be
> the same as the input image, and I set the pixel size to be 10.8
> meters (estimated acutal pixel size), it only plots 1/4 of the
> original image. I also experimented with the image size and cant get
> the right dimensions.
> If I leave the pixel size at 30 (unrealistic) it will plot the entire
> image, but the georeferenced coordinates dont compare well with actual
> values.
>
> My question is, why would this work with the gui but not with the
> code? The only thing I can see that is different, is that when using
> the gui, envi automatically calculates the pixel dimensions (x,y) for
> the resampled image, whereas when calling envi_register_doit I have to
> give the dimensions. But even when supplying the dimensions that the
> gui had for 10.8 meters, I still only get a subset of my image in the
> end.
>
> Any suggestions would definitly be appreciated!!
>
> Thanks,
> Christina
>
> Here is the portion of my code:
>
> pro envi_geoloc_rdr
>
> compile_opt idl2
> envi, /restore_base_save_files
> envi_batch_init, log_file='batch.txt'
> envi_open_file, 'SIR20060725_0601.png', r_fid=fid
>
> ; Get dimensions of input image
> envi_file_query, fid, ns=ns, nl=nl, nb=nb,
> dims = [-1, 0, ns-1, 0, nl-1]
> pos = lindgen(nb)
>
> ;GPS points and pixel location:
> pts = [[583695.9901, 7911358.9359, 720.00, 514.00], $
> [582018.7661, 7914627.4129, 638.00, 365.00], $
> [578079.7761, 7910047.9329, 465.00, 582.00], $
> [578374.0861, 7909281.7329, 478.00, 623.00], $
> [583118.377, 7911923.053, 688.00, 487.00], $
> [581074.1161, 7913623.7529, 599.00, 414.00], $
> [577392.7161, 7908451.1629, 433.00, 660.00]]
>
> UNITS = envi_translate_projection_units('Meters')
> PROJ = envi_proj_create(/utm, datum='North America 1927', zone=4,
> units=units)
> ;pixel_size = [30., 30.]
> pixel_size = [10.8, 10.8]
>
> ; Perform the image-to-map registration.
> envi_doit, 'envi_register_doit', $
> w_fid=fid, w_pos=pos, w_dims=dims, $
> method=4, /IN_MEMORY, $
> pts=pts, pixel_size=pixel_size, $
> proj=proj, r_fid=use_fileID
>
> ; Save as geotiff
> envi_output_to_external_format, /TIFF, out_name='/space2/williams/
> Radar_Imgs/test_tiff5.tif', fid=use_fileID, pos=pos, dims=dims
>
> envi_batch_exit
> end
>
> ---------------------------
> Christina Williams
> Geophysical Institute
> University of Alaska, Fairbanks
> ---------------------------

I can't really say what the problem is, but here are a few
suggestions:

1. Can you find out the pixel size of the original image, using
ENVI_GET_MAP_INFO or some other means? If you can, try using that
value for the output image.
2. When you say you only get a subset, does that mean that the output
image is smaller than expected, or that it contains large blank
areas? If it is the former, try forcing it to plot over the desired
area using the X0, Y0, XSIZE, and YSIZE keywords.
3. Try other settings for the METHOD keyword.

Good luck,
David
[Message index]
 
Read Message
Previous Topic: convert read_bpm(file, R, G, B) to N x M x 3 array?
Next Topic: IDL Menus to Japanese Language

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

Current Time: Wed Oct 08 15:51:49 PDT 2025

Total time taken to generate the page: 0.00437 seconds