Advertisement
tomaskubala

Histogram of img blocks

Jan 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.21 KB | None | 0 0
  1. img = rgb2gray(imread('img2.jpeg'));
  2. [x, y] = size(img);
  3. imshow(img);
  4. pause(1);
  5.  
  6. for i=32:32:x
  7.    for j=32:32:y
  8.        block = img(i-31:i, j-31:j);
  9.        histogram(block);
  10.        pause(1);
  11.    end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement