File Exchange

image thumbnail

imshade

version 1.3 (1.76 KB) by

Plot shaded relief, optionally using simulated lighting direction

2 Downloads

Updated

View License

IMSHADE will plot a matrix representing topography as a 3-component color image, with intensity proportional to the magnitude of the topographic slope of each pixel. Optionally, it can take an argument for lighting angle to use the directional slope.

The current colormap will be used, but future changes in the colormap will not alter the image, since it is now displayed as RGB derived from the colormap and shading.

Nondirectional shading usually scales well, though it is not very robust to spikes in the topographic gradient. The normalization used for directional shading does not always yield satisfactory results and may benefit from some tweaking.

Attached screenshot shows a seamount plotted with IMAGESC (no shaded relief) and with IMSHADE.

Comments and Ratings (2)

Jody Klymak

Jody Klymak (view profile)

Looks nice! A more general implementation of something similar can be seen in my submission: http://www.mathworks.com/matlabcentral/fileexchange/14157-shaded-pseudo-color

Gary

Gary (view profile)

 "IMSHADE will plot a matrix representing topography as a 3-component color image, with intensity proportional to the magnitude of the topographic slope of each pixel. Optionally, it can take an argument for lighting angle to use the directional slope."

In this case, a picture is worth a thousand words. You should include an example output, as many other File Exchange submissions have done.

Updates

1.3

Attach corrected screenshot (previous version had incorrect latitude and longitude labels)

1.2

Add a screenshot

MATLAB Release
MATLAB 7.7 (R2008b)
Acknowledgements

Inspired: shadem

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video