Geoscience Reference
In-Depth Information
whereas MATLAB coding conventions require negative signs for north.
X = 36.096003 : (36.770406 - 36.096003)/4100 : 36.770406;
Y = -0.958743 : ( 0.958743 - 0.319922)/4200 : -0.319922;
h e georeferenced image is displayed with coordinates on the axes and a
superimposed grid (Fig. 8.3). By default, the function imshow inverts the
latitude axis when images are displayed by setting the YDir property to
Reverse . To invert the latitude axis direction back to normal, we need to set
the YDir property to Normal by typing
imshow(newnaivasha_rgb,'XData',X,'YData',Y,'InitialMagnification',10)
axis on, grid on, set(gca,'YDir','Normal')
xlabel('Longitude'), ylabel('Latitude')
title('Georeferenced ASTER Image')
Exporting the image is possible in many dif erent ways, for example using
print -djpeg70 -r600 naivasha_georef.jpg
to export it as a JPEG i le naivasha_georef.jpg , compressed to 70% and with
a resolution of 600 dpi.
In the previous example we used the geodetic coordinates of the four
corners to georeference the ASTER image. h e Image Processing Toolbox
also includes functions to automatically align two images that are shit ed
and/or rotated with respect to each other, cover slightly dif erent areas, or
have a dif erent resolutions. We use two ASTER images of the Suguta Valley
in the Northern Kenya Rit as an example. h e images have been processed
in the same way as described for the image of Lake Naivasha and exported
as TIFF i les using imwrite . h e image in the i le sugutavalley_1.tif was taken
on 20th February 2003 and the second image in sugutavalley_2.tif was taken
on 31st August 2003, both just at er 8 o'clock in the morning. Lake Logipi,
in the center of the images, is much larger in the second image than in the
i rst image. h e original images are otherwise almost identical, except for
the second image being shit ed slightly towards the east. To demonstrate
the automatic alignment of the images, the second image has been rotated
counterclockwise by i ve degrees. Furthermore, both images have been
cropped to the area of the Suguta Valley, including a small section of the rit
shoulders to the west and to the east. We import both images using
clear
image1 = imread('sugutavalley_1.tif');
image2 = imread('sugutavalley_2.tif');
Search WWH ::




Custom Search