How can I prevent my output from from becoming PINK colored?

1 view (last 30 days)
Intended Output: Hybrid images.
Current Output: This
As you can see the whole image has a very heavy pink tint on it. My simple code is this:
img1 = imread('Dataset\05.jpg');
img2 = imread('Dataset\06.jpg');
%LPF starts
LPF = imgaussfilt(img1, 10);
%LPF ends
%HPF starts
g = fspecial('guassian');
med = img2 - imgaussfilt(img2, 8, 'FilterDomain', 'spatial');
HPF = imfilter(med, g);
%HPF ends
J7 = imresize(HPF, 1.2); %resize image
J8i = imresize(LPF, 1);
J8 = flip(J8i,2); %flip second image
out = imfuse(J7,J8); %overlap images
imshow(out);

Accepted Answer

Walter Roberson
Walter Roberson on 7 Feb 2019
methodAlgorithm used to combine images
'falsecolor' (default) | 'blend' | 'diff' | 'montage'
Algorithm used to combine images, specified as one of the following values.
MethodDescription
'falsecolor'Creates a composite RGB image showing A and B overlaid in different color bands. Gray regions in the composite image show where the two images have the same intensities. Magenta and green regions show where the intensities are different. This is the default method.

More Answers (0)

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!