0% found this document useful (0 votes)
60 views2 pages

All All 'Pout - Tif' 'Origine Image' 'Hist de Image ' 'Niveau de Gris ' 'H (I) ' 'Image Apres Histeq' 'Hist de Image ' 'Niveau de Gris ' 'H (I) '

This document contains Matlab code to perform histogram equalization on images. It takes an input grayscale image and color image, applies histogram equalization separately to the red, green, and blue channels of the color image as well as to the grayscale image. It then plots the original and equalized images and histograms to compare the effects of histogram equalization.

Uploaded by

David Salah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views2 pages

All All 'Pout - Tif' 'Origine Image' 'Hist de Image ' 'Niveau de Gris ' 'H (I) ' 'Image Apres Histeq' 'Hist de Image ' 'Niveau de Gris ' 'H (I) '

This document contains Matlab code to perform histogram equalization on images. It takes an input grayscale image and color image, applies histogram equalization separately to the red, green, and blue channels of the color image as well as to the grayscale image. It then plots the original and equalized images and histograms to compare the effects of histogram equalization.

Uploaded by

David Salah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

TP02

close all
clear all
I=imread('pout.tif');
Ieq=histeq(I);
subplot(2,2,1), imshow(I);title('origine image')
subplot(2,2,2), imhist(I); title('hist de image ') ; xlabel('Niveau
De Gris ');ylabel('h(i)')
subplot(2,2,3), imshow(Ieq); title('image apres histeq')
subplot(2,2,4), imhist(Ieq);title('hist de image ') ; xlabel('Niveau
De Gris ');ylabel('h(i)')
clear all
close all
Y=imread('football.jpg')
% Y=rgb2gray(X)
R=Y(:,:,1)
V=Y(:,:,2)
B=Y(:,:,3)

Re=histeq(R)
Be=histeq(B)
Ve=histeq(V)
subplot(2,2,1);imshow(Y);title('original image')
subplot(2,2,2);imhist(Be);title('histeq pour Bleu')
subplot(2,2,3);imhist(Re);title('histeq pour Rouge')
subplot(2,2,4);imhist(Ve);title('histeq pour Vert')

Pour RGB coloré :

You might also like