How to compute tresholded (black) pixels after binarization?
How to compute tresholded (black) pixels after binarization?
Here is a Python code:
img = cv2.imread('imageexperiment.tif',0)
imageone = cv2.threshold(img,127,255,cv2.THRESH_BINARY)
Now i want somehow to compute number of black pixels (stained area)
imageone .rows*imageone .cols-sum(imageone )
This question has already been answered more than once...