Code covered by the BSD License  

Highlights from
meshCanopy

5.0

5.0 | 1 rating Rate this file 8 Downloads (last 30 days) File Size: 2.66 KB File ID: #29485
image thumbnail

meshCanopy

by Sean de

 

22 Nov 2010

Display a mesh above a grayscale image

| Watch this File

File Information
Description

This function makes it easy to display a mesh directly above a grayscale image. The mesh can use any colormap and can be at variable heights above the image. The example, which requires the IPT, is the screenshot.

help meshCanopy
  function meshCanopy: display a mesh above a grayscale image
 SCd 11/18/2010
 
 Updates:
    -11/22/2010: Added example (requires IPT)
                 Added height input argument
 
 Input Arguments:
    -I: 2-dimensional grayscale image slice. The values are expected to
        range from 0 to 255. If the maximum value is greater than 255 or
        the minimum value is less than 0, it will be scaled to 0:255. Else
        it will remain unchanged.
    -Mdata: 2-dimensional mesh data (Z for a meshplot).
        NOTE: the mesh command will be called with:
        >>[ii jj] = meshgrid(ceil(cumsum(diff([0 linspace(1,size(I,2),size(Mdata,2))]))),ceil(cumsum(diff([0 linspace(1,size(I,1),size(Mdata,1))]))));
        >>mesh(ii,jj,Mdata);
        and thus does not need to be the same size as the image!
    -Mmap: string, function_handle or nx3, mesh color map. See:
        >>doc colormap
        for valid options. The argument is optional and defaults to 'jet'
        Examples: 'jet', @jet, [0 0 1; 0.5 0;.1 .1 .1]
    -height: scalar height of the mesh above the image so you can see both.
        Optional defaults to 80.
 
 Output Arguments:
    -None!
 
 Example: (Requires the Image Processing Toolbox)
    %Display a Mesh Canopy of a standard deviation image, above the original image
    I = imread('cameraman.tif');
    M = stdfilt(I);
    meshCanopy(I,M,@spring)
 
 See also: mesh colormap

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
09 Dec 2010 Michael Chan

beautiful.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
mesh Sean de 22 Nov 2010 14:01:48
slice Sean de 22 Nov 2010 14:01:48
colormap Sean de 22 Nov 2010 14:01:48
image Sean de 22 Nov 2010 14:01:48
grayscale Sean de 22 Nov 2010 14:01:48
image processing Sean de 22 Nov 2010 16:12:00
visualization Sean de 22 Nov 2010 16:43:11

Contact us at files@mathworks.com