Code covered by the BSD License  

Highlights from
ALPHAMASK: semi-transparent image overlay

5.0

5.0 | 1 rating Rate this file 28 Downloads (last 30 days) File Size: 1.77 KB File ID: #34936
image thumbnail

ALPHAMASK: semi-transparent image overlay

by Andrew Davis

 

06 Feb 2012

Overlay image with semi-transparent mask and return handle

| Watch this File

File Information
Description

ALPHAMASK: Overlay image with semi-transparent mask

Overlays a semi-transparent mask over an image. By default the
  currently displayed figure is overlain.
Options include overlay colour and opacity.
Returns a handle to the overlay mask.

Usage:
  hOVM = alphaMask(bwMask, [colour, transparency, axHandle])
          bwMask: logical matrix representing mask
          colour: vector of three rgb values in range [0, 1] (optional; default [0 0 1])
    transparency: scalar in range [0, 1] representing overlay opacity (optional; default 0.6)
        axHandle: handle to axes on which to operate (optional; default current axes)
            hOVM: handle to overlay image is returned

Example:
  figure;
  I = peaks(200);
  bwMask = eye(200);
  imshow(I, [], 'Colormap', hot);
  alphamask(bwMask, [0 0 1], 0.5);

See also IMSHOW, CREATEMASK

Acknowledgements

Image Overlay inspired this file.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.12 (R2011a)
Tags for This File  
Everyone's Tags
image processing, mask, visualization
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
10 Feb 2012 Lili  

Contact us