2 Write a Matlab code to calculate a histogram of an image o

2. Write a Matlab code to calculate a histogram of an image of 256 gray levels and size h w?

Solution

i=imread(\'pout.tiff\');

i=rgb2gray(i);

i=imresize(i,(256,256));

j=imhist(i);

imshow(j);

h=hist(reshape(j,[],size(i,3)),0:255);

figure,imshow(h);

2. Write a Matlab code to calculate a histogram of an image of 256 gray levels and size h w?Solutioni=imread(\'pout.tiff\'); i=rgb2gray(i); i=imresize(i,(256,25

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site