cvCreateFileCapture() private method

private cvCreateFileCapture ( [ filename ) : IntPtr
filename [
return IntPtr
コード例 #1
0
ファイル: Capture.cs プロジェクト: zliu100/emgu_openCV
 /// <summary>
 /// Create a capture from file or a video stream
 /// </summary>
 /// <param name="fileName">The name of a file, or an url pointed to a stream.</param>
 public Capture(String fileName)
 {
     _ptr = CvInvoke.cvCreateFileCapture(fileName);
     if (_ptr == IntPtr.Zero)
     {
         throw new NullReferenceException(String.Format("Unable to create capture from {0}", fileName));
     }
 }
コード例 #2
0
        /// <summary>
        /// Create a capture from file or a video stream
        /// </summary>
        /// <param name="fileName">The name of a file, or an url pointed to a stream.</param>
        public Capture(String fileName)
        {
            /*
             * if (Util.CvToolbox.HasFFMPEG)
             * {
             * _captureModuleType = CaptureModuleType.FFMPEG;
             * _ptr = CvInvoke.cvCreateFileCapture_FFMPEG(fileName);
             * }
             * else*/
            {
                _captureModuleType = CaptureModuleType.Highgui;
                _ptr = CvInvoke.cvCreateFileCapture(fileName);
            }

            if (_ptr == IntPtr.Zero)
            {
                throw new NullReferenceException(String.Format("Unable to create capture from {0}", fileName));
            }
        }