コード例 #1
0
ファイル: Mat.cs プロジェクト: formylover/emgucv-1
 /// <summary>
 /// Create a Mat header from existing data
 /// </summary>
 /// <param name="rows">Number of rows in a 2D array.</param>
 /// <param name="cols">Number of columns in a 2D array.</param>
 /// <param name="type">Mat element type</param>
 /// <param name="channels">Number of channels</param>
 /// <param name="data">Pointer to the user data. Matrix constructors that take data and step parameters do not allocate matrix data. Instead, they just initialize the matrix header that points to the specified data, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it.</param>
 /// <param name="step">Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any.</param>
 public Mat(int rows, int cols, CvEnum.DepthType type, int channels, IntPtr data, int step)
     : this(MatInvoke.cveMatCreateWithData(rows, cols, CvInvoke.MakeType(type, channels), data, new IntPtr(step)), true, true)
 {
 }