상속: OpenCvSharp.DenseOpticalFlow
예제 #1
0
 /// <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;
 }
예제 #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);
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static DenseOpticalFlow CreateOptFlow_DualTVL1()
        {
            IntPtr ptr = NativeMethods.video_createOptFlow_DualTVL1();

            return(DenseOpticalFlowImpl.FromPtr(ptr));
        }