MatCountNonZero Method OpenCvSharp Class Library
computes the number of nonzero array elements

Namespace:  OpenCvSharp.CPlusPlus
Assembly:  OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public int CountNonZero()

Return Value

Type: Int32
number of non-zero elements in mtx
See Also

Reference