IMOVERLAY allows you to easily display one image in color on top of another grayscale image. You can independently control the clim of each image, the colormap used for the top image, and the transparency. Resulting image can be displayed in a separate figure or in a supplied axis.
IMOVERLAY_TOOL is an interface to graphically overlay one image on top of another and manipulate colormap, thresholding, and transparency.
- Allows independent control of both images
- Workspace variables are selected via a dropdown menu
- Easily adjust colormap
- Adjustable transparency
- Load 3D or 4D datasets
- Export figure for saving
- Accelerator keys for quick selections
% Overlay one image transparently onto another
imB = phantom(256); % Background image
imF = rgb2gray(imread('ngc6543a.jpg')); % Foreground image
[hf,hb] = imoverlay(imB,imF,[40,180],[0,0.6],'jet',0.6);
colormap('hot'); % figure colormap still applies
% Use the interface for flexibility
Matt Smith (2021). imoverlay (https://www.mathworks.com/matlabcentral/fileexchange/42904-imoverlay), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired by: Overlay two datasets or indexed images
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!