cd D:\Courses\Image\Website
a=imread('copter.jpg');
imshow(a);
pause
ha=imhist(a);
figure(2)
imhist(a);
pause
b=histeq(a,256);
hb=imhist(b);
le=imread('lenna.jpg');
figure(3);
leh=imhist(le);
imshow(le);
pause
figure(4);
imhist(le)
pause;
r=imread('rocket.jpg');
rg = rgb2gray(r);
hrg=imhist(rg);
figure(5);
imshow(rg);
pause
figure(6)
imhist(hrg)
pause
bb=histeq(a,leh);
hbb=imhist(bb);
bbb=histeq(a,hrg);
hbbb=imhist(bbb);
hv1=linspace(255,1,128);
hv2=linspace(1,255,128);
figure(9);
hv=[hv1 0 hv2];
plot(hv);
pause
figure(10)
vv=histeq(a,hv);
subplot(1,5,1), imshow(a)
subplot(1,5,2), imshow(b)
subplot(1,5,3), imshow(bb)
subplot(1,5,4), imshow(bbb)
subplot(1,5,5), imshow(vv)
pause
figure(11)
subplot(2,2,1), plot(ha)
subplot(2,2,2), plot(hb)
subplot(2,2,3), plot(hbb)
subplot(2,2,4), plot(hbbb);