Cv2CountNonZero 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 static int CountNonZero(
	InputArray mtx
)

Parameters

mtx
Type: OpenCvSharp.CPlusPlusInputArray
Single-channel array

Return Value

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

Reference