Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
source code for contrast inhancement of image in matlab
#1

source code for contrast inhancement of image in matlab

Contrast enhancement of RGB images is done by processing the intensity component. Firstly convert image from RGB to YIQ, so as to be able to isolate the intensity component. Then apply histogram equalization to the intensity component, and convert back to RGB.

%% START %%
clc;
close all;
img=imread('a.bmp'); % save any color image as 'a.bmp'
x=rgb2ntsc(img);
x(:,:,1)=histeq(x(:,:,1));
c2=ntsc2rgb(x);
imshow(c2)

% apply histogram equalization to each of the RGB components:
% and put them all back into a single 3 dimensional array for use with imshow

rimg=histeq(img(:,:,1));
gimg=histeq(img(:,:,2));
bimg=histeq(img(:,:,3));
img=cat(3,rimg,gimg,bimg);
figure(2)
imshow(img)

%% END %%
Reply

#2
I'm reasearching problem of GMM so that I'm looking for source code for contrast inhancement of image in matlab
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.