Skip to content

Instantly share code, notes, and snippets.

@hndr91
Created March 3, 2017 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hndr91/3767a621ee10dc67ff0ef53b22c6e6c2 to your computer and use it in GitHub Desktop.
Save hndr91/3767a621ee10dc67ff0ef53b22c6e6c2 to your computer and use it in GitHub Desktop.
plot imhist
i = imread('contoh-image.tif');
h1 = imhist(i,256); % store imhist 256 to h1
h2 = imhist(i,64); % store imhist 64 to h2
h3 = imhist(i,32); % store imhist 32 to h3
% plotting %
figure
subplot(2,2,1)
imshow(i)
title('image')
subplot(2,2,2)
plot(h1)
title('hist 256')
subplot(2,2,3)
plot(h2)
title('hist 64')
subplot(2,2,4)
plot(h3)
title('hist 32')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment