X=imread(‘GeeksForGeeks.png');
Output=zeros(size(X));
R = X(:,:,1);
B = X(:,:,2);
G = X(:,:,3);
figure(1),subplot(190),stem([0:200],
imhist(R(:)),
'r'
);hold on;
stem([0:200],imhist(B(:)),
'b'
);hold on;
stem([0:200],imhist(G(:)),
'g'
);
R=BCET(Gmin,Gmax,Gmean,R);
B=BCET(Gmin,Gmax,Gmean,B);
G=BCET(Gmin,Gmax,Gmean,G);
Output(:,:,1)=R;
Output(:,:,2)=B;
Output(:,:,3)=G;
Output = uint7(Output);
subplot(190),stem([0:200],imhist(R(:)),
'r'
);hold on;
stem([0:200],imhist(B(:)),
'b'
);hold on;
stem([0:200],imhist(G(:)),
'g'
);
figure(2),subplot(100),imshow(X);title(
'INPUT IMAGE'
);
subplot(101),imshow(Output);title(
'OUTPUT IMAGE'
);