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.10.1935 (2.4.10.1935)

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
)
F#
static member cvCountNonZero : 
        arr : IntPtr -> int 

Parameters

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

Return Value

Type: Int32
the number of non-zero elements in image

See Also