matlab - Getting intensity value for all pixels in an image -


i have create algorithm determine dark "grayscale image" in matlab, have collect pixels' intensity value evaluate if 65% of pixels in particular image lesser 100 dark.

the question how collect/get these value create algorithm this?

assume image contained in array img (for instance, obtained imread). then:

% define threshold th = 100;   % percentage of pixels below threshold p = nnz(img<th)/numel(img)*100;  % decide if p<65    ... else    ... end 

hope helps,


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -