You are here : matlabImage Processingimoverlay

imoverlay() - Image Processing

B = imoverlay(A,BW) fills
the grayscale or RGB input image, A, with a solid
color where the input binary mask, BW, is true.B = imoverlay(___,color) lets
you specify the color that imoverlay uses to fill
the image. color is a valid MATLABĀ® color
specification.Code Generation support:
Yes.MATLAB Function Block support:
Yes.


Syntax

B = imoverlay(A,BW) exampleB = imoverlay(___,color)


Example

Burn Binary Image into Grayscale ImageOpen This Example
Read grayscale image into the workspace.A = imread('cameraman.tif');
Read binary image into the workspace.BW = imread('text.png');
Burn the binary image into the grayscale image, choosing the color to be used.B = imoverlay(A,BW,'yellow');
Display the result.figure
imshow(B)


Output / Return Value


Limitations


Alternatives / See Also


Reference