Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use count non-zero function http://docs.opencv.org/2.4/modules/core/doc/operations_on_arrays.html#countnonzero

For white pixels, do the same with inverted version of the image