MATLAB Answers

Overlay binary image image on contrast stretched image to get the final result

3 views (last 30 days)
Mit desai
Mit desai on 25 May 2020
Commented: Mit desai on 26 May 2020
I have to create a function which should take as input the contrast stretched image and the refined binary mask. The output should be the overlay image.Can anyone help?

  0 Comments

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 25 May 2020
Try imoverlay:
% Read in image.
grayImage = imread('cameraman.tif');
% Read a binary image into the workspace.
BW = imread('text.png');
% Burn the binary image into the grayscale image, specifying the color to be used for the binary mask.
rgbImage = imoverlay(grayImage, BW, 'yellow');
% Display the result.
imshow(rgbImage)

  1 Comment

Mit desai
Mit desai on 26 May 2020
Yeah thanks man i think this is as good as my code which i figured later because imoverlay doesnt work in octave which i am using. But this however does the same task!!
Cheers!!
in1=imread('enhanced.jpg');
in2=imread('refinedpicture.jpg');
var1=uint8(in1);
var2=uint8(in2);
figure;
output=imadd(var1,var2);
imshow(output);

Sign in to comment.

More Answers (0)