Click or drag to resize
CvInvokeCvArrToMat Method
Converts CvMat, IplImage , or CvMatND to Mat.

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: (
public static Mat CvArrToMat(
	IntPtr arr,
	bool copyData = false,
	bool allowND = true,
	int coiMode = 0


Type: SystemIntPtr
Input CvMat, IplImage , or CvMatND.
copyData (Optional)
Type: SystemBoolean
When false (default value), no data is copied and only the new header is created, in this case, the original array should not be deallocated while the new matrix header is used; if the parameter is true, all the data is copied and you may deallocate the original array right after the conversion.
allowND (Optional)
Type: SystemBoolean
When true (default value), CvMatND is converted to 2-dimensional Mat, if it is possible (see the discussion below); if it is not possible, or when the parameter is false, the function will report an error
coiMode (Optional)
Type: SystemInt32
Parameter specifying how the IplImage COI (when set) is handled. If coiMode=0 and COI is set, the function reports an error. If coiMode=1 , the function never reports an error. Instead, it returns the header to the whole original image and you will have to check and process COI manually.

Return Value

Type: Mat
The Mat header
See Also