Пример #1
0
        /// <summary>
        /// Create a GpuMat of the specified size
        /// </summary>
        /// <param name="rows">The number of rows (height)</param>
        /// <param name="cols">The number of columns (width)</param>
        /// <param name="channels">The number of channels</param>
        /// <param name="continuous">Indicates if the data should be continuous</param>
        public GpuMat(int rows, int cols, int channels, bool continuous)
        {
            int matType = CvInvoke.CV_MAKETYPE((int)CvToolbox.GetMatrixDepth(typeof(TDepth)), channels);

            if (continuous)
            {
                _ptr = GpuInvoke.GpuMatCreateContinuous(rows, cols, matType);
            }
            else
            {
                _ptr = GpuInvoke.GpuMatCreate(rows, cols, matType);
            }
        }