Skip to content
Snippets Groups Projects
Commit 1183fccc authored by MichaelK's avatar MichaelK
Browse files

Change: histogramGrayscale converted to .m file

parent bec13b84
No related branches found
No related tags found
1 merge request!2Merge: Hog feature extraction Added
%Returns histogram in grayscale
function [out] = histogramGrayscale(image)
%image ideally is already grayscaled rbg2gray() if needed
[x,y] = size(image);
out = zeros(1,255);
for i = 1:x
for j = 1:y
pixel = image(i,j);
if pixel ~= 0
out(pixel) = out(pixel)+1;
end
end
end
end
\ No newline at end of file
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment