MATLAB Answers

How to give Gray color histogram gray shade instead of blue

2 views (last 30 days)
sadiqa ilyas
sadiqa ilyas on 7 Dec 2019
Hi, I want the gray shade histogram for grayscale image. here is my code. Can any one help me
% for red color
figure;
imhist(Image_Data(:,:,2));
myHist = findobj(gca, 'Type', 'Stem');
myHist.Color = [0 1 0]
saveas(gcf,'Hist_Org_B.jpg');
%for green color
figure;
imhist(Image_Data(:,:,3));
myHist = findobj(gca, 'Type', 'Stem');
myHist.Color = [0 0 1]
saveas(gcf,'Hist_Org_G.jpg');

  0 Comments

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!