File Exchange

image thumbnail

imoverlay

version 1.1.0.0 (341 KB) by Jing Lou
IMOVERLAY Create Label Matrix MAP based Image Overlay with specified Properties.

3 Downloads

Updated 27 Dec 2015

View License

%IMOVERLAY Create Label Matrix MAP based Image Overlay with specified Properties.
% RGB = IMOVERLAY(X,MAP) generates an output image RGB by overlaying a
% label matrix MAP onto the input image X with default parameter values.
%
% RGB = IMOVERLAY(X,MAP,PARAM1,VAL1,PARAM2,VAL2,___) overlays a label
% matrix MAP onto the input image X, specifying parameters and
% corresponding values that control various aspects of the output image
% RGB.
%
% Class Support
% -------------
% The input image X and label matrix MAP can be uint8, uint16, or double.
% The label matrix MAP must contain finite nonnegative integers.
% The output RGB is an M-by-N-by-3 array of class uint8.
%
% PROPERTIES can be a comma-separated list of strings
% 'ColorMap' - colormap (default 'jet')
% 'FaceAlpha' - MAP transparency (range [0,1], default 1 denotes opacity)
% if equals to -1, the following five properties will be ignored
% 'ZeroColor' - background color (uint8/double, default black)
% 'ZeroAlpha' - background transparency (range [0,1], default 1 denotes opacity)
% 'EdgeColor' - edge color (uint8/double, default white)
% 'EdgeAlpha' - edge transparency (range [0,1], default 1 denotes opacity)
% 'EdgeWidth' - edge width (default 1)
%
% Example 1
% ---------
% RGB = imoverlay(X,map);
%
% Example 2
% ---------
% RGB = imoverlay(X,map,'colormap',cmap,'facealpha',0.5,'zerocolor',[255 0 0],'zeroalpha',0.3,'edgewidth',5,'edgecolor',[1 1 0],'edgealpha',0.7);
%
% Example 3
% ---------
% RGB = imoverlay(X,map,'facealpha',-1,'colormap','jet');
%
%
% Reference ('FaceAlpha' equals to -1):
% --------------------------------------------
% http://www.vision.caltech.edu/~harel/share/gbvs.php
%
%
% 25/12/2015, ver 1.00
% 26/12/2015, ver 1.01, bug fix for custom ColorMap
%
% Jing Lou (楼竞), http://www.loujing.com
%

Comments and Ratings (1)

prasanth s

Updates

1.1.0.0

update screenshot

1.1.0.0

bug fix for custom ColorMap

1.0.0.0

add demo

1.0.0.0

add demo

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux