http://www.emgu.com
Returns the number of non-zero elements in arr: result = sumI arr(I)!=0 In case of IplImage both ROI and COI are supported.

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.0.1717 (2.4.0.1717)

Syntax

C#
public static int cvCountNonZero(
	IntPtr arr
)
Visual Basic
Public Shared Function cvCountNonZero ( _
	arr As IntPtr _
) As Integer
Visual C++
public:
static int cvCountNonZero(
	IntPtr arr
)

Parameters

arr
Type: System..::..IntPtr
The image

Return Value

the number of non-zero elements in image

See Also