useful matlab plotting of topogrpahy and ancillary...

15
Adaptive Signal Processing Laboratory (ASPL) Electrical and Computer Engineering Department University of Florida Useful Matlab Plotting of Topogrpahy and Ancillary Data ASPL Report No. Rep_2004-12-001 Hojin Jhee, K. (Philips) Shih, K. Clint Slatton December 02, 2004 © 2004, ASPL. All rights reserved Point of Contact: Prof. K. Clint Slatton University of Florida; PO Box 116130; Gainesville, FL 32611 Tel: 352.392.0634, Fax: 352.392.0044, E-mail: [email protected]

Upload: hoangtu

Post on 28-Sep-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Adaptive Signal Processing Laboratory (ASPL) Electrical and Computer Engineering Department

University of Florida

Useful Matlab Plotting of Topogrpahy and Ancillary Data

ASPL Report No. Rep_2004-12-001

Hojin Jhee, K. (Philips) Shih, K. Clint Slatton

December 02, 2004

© 2004, ASPL. All rights reserved

Point of Contact: Prof. K. Clint Slatton University of Florida; PO Box 116130; Gainesville, FL 32611 Tel: 352.392.0634, Fax: 352.392.0044, E-mail: [email protected]

Page 2: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Part I: Plotting topography with widely disparate scales and critical elvations

By Hojin Jhee Problem statement: When we fuse topography data that have very different scales, simply displaying the fused estimate as a psuedcolor image does not work well. The total elevation range used the entire color map, so that small-scale but important details are hidden. This is compounded if there are important elevations or ranges of elevations that we wish to highlight, such as a land-water boundardy. In such cases, we would like to force breaks in the colormap at such elevations, so that one set of colors are used for land and one for water. Finally, we often want to show multiple bits of information on a single plot. For example, we’d like to color-code an Digital Elelvation Model (DEM) acquired from Airborne Laser Swath Mapping (ALSM) data with the intensity of the returns. Or we would like to color-code the DEM from a multiscale fusion with the estimate uncertainty. This report explains how to do this. Color mapping method When we try to plot simulated 2 or 3 dimensional images using Matlab, sometime we encounter trouble of color mapping. Particularly, if the result data to be imaged has huge minimum and maximum value differences, it is not possible to show detailed pixel values with automatic scaling method provided by Matlab. For example, in our Miami data case, the maximum topography elevation is 46 feet and minimum bathymetry elevation (or depth) is -2800 feet. The difference of maximum and minimum data value of our data is over 2700 feet. In this case, Matlab assigns most of colors to sea region as a result, land region is expressed with monotone color. This is the reason why land part of estimation result is shown with only red tone. Although Matlab provides some

Page 3: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

manual (or direct) color mapping tools, such as COLORMAPEDITOR, CAXIS, etc. , however, its ability of mapping is very limited. So, in this case, we need to map color to pixel values using color forcing method. By constructing scaling matrix, it is possible to express detailed pixels using SURF function in Matlab. The maximum elevation value (46 feet) will be scaled down to 1 and minimum elevation value (-2800 feet) will be scaled up to -0.2208 in our case. The following figure shows how to map color to new scaled image.

Estimated elevation result #1 : Colormap using ‘JET(128)’ for land and ‘COPPER(128)’ for sea region

Page 4: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Estimated elevation result #2 : Colormap using ‘JET(128)’ for land and ‘BONE(128)’ for sea region

Page 5: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Estimated elevation result #3 : Colormap using ‘JET(256)’ for both land and sea region

Page 6: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Estimated elevation result #4 : Colormap using ‘JET(64)’ for land and ‘GRAY(64) and BONE(64)’ for sea region

Page 7: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Error variance result #1 : Colormap using ‘GRAY(128)’ for H=1 and ‘JET(128)’ for H=0

Page 8: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Error variance result #2 : Colormap using ‘GRAY(64)’ for H=1 and ‘JET(128) and COPPER(16)’ for H=0

Page 9: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical
Page 10: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Part II: Plotting topography with a colormap that is a function of ancillary data

By Kuei-Tsung (Philips) Shih (Part 2) The data used here are gridded values of elevation and intensities of the 1st-stop points of the Flagler data. The colormap is the default jet(64). The SURF function creates the surface with specified color. Then, two equivalent methods of generating lighting source are used for figures (1) and (2). That is, LIGHTANGLE(AZ,EL) = VIEW(AZ,EL) + CAMLIGHT(‘HEADLIGHT’), where AZ and EL are defined as following. It is convenient to return an handler for the figure and lighting source in case we have to further change the properties of them.

Matlab code: (common in all figures) gridsize = 1; % x1,y1,z1,int1 are the X, Y, Z and intensity of 1st-stop points, respectively [XI YI] = meshgrid(minX:gridsize:maxX,minY:gridsize:maxY); % Grid elevation data ZI = griddata(x1,y1,z1,XI,YI); minZ = min(min(ZI)); maxZ = max(max(ZI)); % Grid intensity data and take logarithm IntI = griddata(x1,y1,int1,XI,YI); LogInt = log10(IntI);

Page 11: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

minLogInt = min(min(LogInt)); maxLogInt = max(max(LogInt));

Page 12: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

(1) Using elevation data as color data

Page 13: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Matlab code:

% Normalize color range to [0,1] CZ = (ZI-minZ)/(maxZ-minZ); % Create surface handle_axe1 = surf(XI,YI,ZI,CZ) %Set figure and axis properties shading interp, view(10,60), colorbar % Create light source handle_light1 = lightangle(10,60) % Set lighting properties lighting phong, material dull

Page 14: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

(2) Using logarithm of intensity as color data

Page 15: Useful Matlab Plotting of Topogrpahy and Ancillary …ncalm.cive.uh.edu/.../files/publications/reports/Rep_2004-12-001.pdf · Adaptive Signal Processing Laboratory (ASPL) Electrical

Matlab code: % Normalize color range to [0,1] CI = (IntI-minLogInt)/(maxLogInt-minLogInt); % Create surface handle_axe1 = surf(XI,YI,ZI,CI) %Set figure properties shading interp, view(10,60), colorbar % Create light source view(10,60); handle_light1 = camlight(‘headlight’) % Set lighting properties lighting phong, material dull