I have 4.jpg as image.1st i am converting it into grayscale to apply imhist(). I am getting grayscale enhanced image as output but I need the enhanced colored image as output. How to do that? I tried using colormap as shown in code below. But its not working
I = imread('4.jpg');imshow(I)R = rgb2gray(I);figureimshow(R)in = histeq(R);figure;imshow(in);figure;imhist(in);y=colormap(hot(110)); imwrite(R,y,'4.jpg','jpg'); imshow('4.jpg');% I=imread('4.jpg');
% R=rgb2gray(I); % It is gray now
% % y=colormap(hot(110));
% % imwrite(R,y,'rgb.jpg','jpg'); % Re-change it to colored one
% % T=imread('rgb.jpg');
%
% imshow(T);
% imshow('4.jpg');
Best Answer