MATLAB: How count the number of occurence beyond a threshoold value in a matrix

digital image processingimageimage acquisitionimage analysisimage processingimage segmentation

Suppose there is a matrix of a = 512*512 elements. What is the count of the elements having more than 255 in the matrix? Kindly suggest.?

Best Answer

sum(a(:)>255)
Related Question