Exemplo n.º 1
0
        /// <summary>
        /// Copy asynchronously
        /// </summary>
        /// <param name="src"></param>
        /// <param name="dst"></param>
        public void EnqueueCopy(GpuMat src, GpuMat dst)
        {
            ThrowIfDisposed();
            if (src == null)
            {
                throw new ArgumentNullException(nameof(src));
            }
            if (dst == null)
            {
                throw new ArgumentNullException(nameof(dst));
            }
            src.ThrowIfDisposed();
            dst.ThrowIfDisposed();

            NativeMethods.cuda_Stream_enqueueCopy(ptr, src.CvPtr, dst.CvPtr);
        }
Exemplo n.º 2
0
        /// <summary>
        /// converts matrix type, ex from float to uchar depending on type
        /// </summary>
        /// <param name="src"></param>
        /// <param name="dst"></param>
        /// <param name="dtype"></param>
        /// <param name="a"></param>
        /// <param name="b"></param>
        public void EnqueueConvert(GpuMat src, GpuMat dst, int dtype, double a = 1, double b = 0)
        {
            ThrowIfDisposed();
            if (src == null)
            {
                throw new ArgumentNullException(nameof(src));
            }
            if (dst == null)
            {
                throw new ArgumentNullException(nameof(dst));
            }
            src.ThrowIfDisposed();
            dst.ThrowIfDisposed();

            NativeMethods.cuda_Stream_enqueueConvert(ptr, src.CvPtr, dst.CvPtr, dtype, a, b);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Uploads asynchronously.
        /// Warning! cv::Mat must point to page locked memory (i.e. to CudaMem data or to its ROI)
        /// </summary>
        /// <param name="src"></param>
        /// <param name="dst"></param>
        public void EnqueueUpload(Mat src, GpuMat dst)
        {
            ThrowIfDisposed();
            if (src == null)
            {
                throw new ArgumentNullException("src");
            }
            if (dst == null)
            {
                throw new ArgumentNullException("dst");
            }
            src.ThrowIfDisposed();
            dst.ThrowIfDisposed();

            NativeMethods.cuda_Stream_enqueueUpload_Mat(ptr, src.CvPtr, dst.CvPtr);
        }