Inheritance: OpenCvSharp.DenseOpticalFlow
 /// <summary>
 /// Creates instance from raw pointer T*
 /// </summary>
 /// <param name="ptr"></param>
 internal static DenseOpticalFlowImpl FromRawPtr(IntPtr ptr)
 {
     if (ptr == IntPtr.Zero)
         throw new OpenCvSharpException("Invalid DenseOpticalFlow pointer");
     var obj = new DenseOpticalFlowImpl
     {
         detectorPtr = null,
         ptr = ptr
     };
     return obj;
 }
Beispiel #2
0
        /// <summary>
        /// Creates instance from cv::Ptr&lt;T&gt; .
        /// ptr is disposed when the wrapper disposes.
        /// </summary>
        /// <param name="ptr"></param>
        internal static DenseOpticalFlowImpl FromPtr(IntPtr ptr)
        {
            if (ptr == IntPtr.Zero)
            {
                throw new OpenCvSharpException("Invalid DenseOpticalFlow pointer");
            }

            var ptrObj = new Ptr <DenseOpticalFlow>(ptr);
            var obj    = new DenseOpticalFlowImpl
            {
                detectorPtr = ptrObj,
                ptr         = ptrObj.Get()
            };

            return(obj);
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static DenseOpticalFlow CreateOptFlow_DualTVL1()
        {
            IntPtr ptr = NativeMethods.video_createOptFlow_DualTVL1();

            return(DenseOpticalFlowImpl.FromPtr(ptr));
        }