MATLAB: Find the histogram of the image(cameraman)without using the matlab built-in functions for histogram calculations.compare your result with the with those obtained using the functions imhist().display the input image,the two histograms-(yours and mat

histogramimage processingImage Processing Toolboxmatlab function

if true
% code
end

Best Answer

%By Marwa Ahmeid
function [y]=myimhist(img)
[r,c]=size(img);
y=zeros(1,256);
for i=1:r
for j=1:c
z=img(i,j);
y(z+1)=y(z+1)+1;
end
end