Esempio n. 1
0
        /// <summary>
        /// Makes multi-channel array out of several single-channel arrays
        /// </summary>
        ///<param name="gpuMats">
        ///An array of single channel GpuMat where each item
        ///in the array represent a single channel of the GpuMat
        ///</param>
        /// <param name="stream">Use a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).</param>
        public void MergeFrom(GpuMat[] gpuMats, Stream stream = null)
        {
            //If single channel, perform a copy
            if (gpuMats.Length == 1)
            {
                gpuMats[0].CopyTo(this, null, stream);
            }

            //handle multiple channels
            using (VectorOfGpuMat vm = new VectorOfGpuMat(gpuMats))
            {
                CudaInvoke.Merge(vm, this, stream);
            }
        }