Save output picture of Histogram code

Hi,I creat histogram of picture on matlab. Now I wanna save that picture with code like imwrite. Which code is this? Histogram code: Imreade (ghgvhh.png) I=ghgvhh.png figure Imhist (I)

 Accepted Answer

Considering, 'ghgvhh.png' image is a gray image, if not do conversion.
I=imread('ghgvhh.png');
imhist(I);
saveas(gcf,'hist_fig.png')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!