Ejemplo n.º 1
0
        /// <summary>
        /// Creates instance from cv::Ptr&lt;T&gt; .
        /// ptr is disposed when the wrapper disposes.
        /// </summary>
        /// <param name="ptr"></param>
        internal static FarnebackOpticalFlow FromPtr(IntPtr ptr)
        {
            if (ptr == IntPtr.Zero)
            {
                throw new OpenCvSharpException("Invalid pointer");
            }

            var ptrObj = new Ptr(ptr);
            var obj    = new FarnebackOpticalFlow
            {
                detectorPtr = ptrObj,
                ptr         = ptrObj.Get()
            };

            return(obj);
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static DenseOpticalFlowExt CreatePyrLK_CUDA()
        {
            IntPtr ptr = NativeMethods.superres_createOptFlow_PyrLK_CUDA();

            return(FarnebackOpticalFlow.FromPtr(ptr));
        }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static DenseOpticalFlowExt CreatePyrLK_CUDA()
 {
     NativeMethods.HandleException(
         NativeMethods.superres_createOptFlow_PyrLK_CUDA(out var ptr));
     return(FarnebackOpticalFlow.FromPtr(ptr));
 }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static DenseOpticalFlowExt CreateBrox_CUDA()
        {
            var ptr = NativeMethods.superres_createOptFlow_Brox_CUDA();

            return(FarnebackOpticalFlow.FromPtr(ptr));
        }