Ask Your Question

Revision history [back]

You want to compute the number of pixels not null, there is a function for that: [countNonZero] (http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=countnonzero#cv2.countNonZero)