Need help in the Color image fusion based on Pixel Average method
Afficher commentaires plus anciens
Dear all, Here I added My Script on Color Image fusion based on Pixel Average method. I took an image for contrast enhancement purpose, there I apply CLAHE on R plane oof the image, also convert the same RGB image to HSV and apply CLAHE on S & V Planes. Then again merge modified R plane with G & B planes as RGB image, modified S & V planes with H plane as HSV image. Pixel Average based fusion applied on those RGB & HSV images, but I could not get the color image as expected. Your Kind suggestions are Welcome and Appreciated
clc
clear all;
close all;
rgbImage=imread('greens.jpg');
% Separate image into RGB
r = rgbImage(:, :, 1); % Red image.
g = rgbImage(:, :, 2); % Green image.
b = rgbImage(:, :, 3); % Blue image.
% Apply CLAHE to R Plane
Rmod = adapthisteq(r);
rgbImage_out = cat(3,Rmod,g,b);
rgbImage_out = double(rgbImage_out );
[m,n]=size(r);
figure(1)
imshow(rgbImage_out);
title('RGB Enhanced')
%%
% RGB to HSV Conversion
hsv = rgb2hsv(rgbImage);
h = hsv(:, :, 1); % Hue image.
s = hsv(:, :, 2); % Saturation image.
v = hsv(:, :, 3); % Value (intensity) image.
%%
% Apply CLAHE to S & V Planes
Smod = adapthisteq(s);
Vmod = adapthisteq(v);
hsv_out = cat(3,h,Smod,Vmod);
figure(2)
imshow(uint8(hsv_out));
title('HSV Enhanced')
%%
% Convert HSV to RGB again
rgb_hsv = hsv2rgb(hsv);
figure(3)
imshow(rgb_hsv);
title('rgb_hsv Enhanced')
%%
% Fusion of Two Images
for i=1:m
for j=1:n
y1(i,j)=0.5*rgbImage_out(i,j)+0.5*rgb_hsv(i,j); % Simple image fusion method based on weighted average
end
end
figure(4)
imshow(uint8(y1));
title('Color image Contrast Enhanced')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Blue dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!







