Beispiel #1
0
 public static extern double cvGetCaptureProperty(IntPtr capture, CaptureProperty propertyId);
Beispiel #2
0
 public static extern bool cvSetCaptureProperty(IntPtr capture, CaptureProperty propertyId, double value);
Beispiel #3
0
// ReSharper restore InconsistentNaming
        #endregion
        #endregion

        #region Methods
        #region Get
#if LANG_JP
        /// <summary>
        /// ビデオキャプチャのプロパティを取得する
        /// </summary>
        /// <param name="propertyId">プロパティID</param>
        /// <returns>プロパティの値</returns>
#else
        /// <summary>
        /// Retrieves the specified property of camera or video file. 
        /// </summary>
        /// <param name="propertyId">property identifier.</param>
        /// <returns>property value</returns>
#endif
        public double Get(CaptureProperty propertyId)
        {
            return NativeMethods.videoio_VideoCapture_get(ptr, (int)propertyId);
        }
Beispiel #4
0
        /// <summary>
        /// ビデオキャプチャのプロパティをセットする
        /// </summary>
        /// <param name="propertyId">プロパティID</param>
        /// <param name="value">プロパティの値</param>
        /// <returns></returns>
#else
        /// <summary>
        /// Sets the specified property of video capturing.
        /// </summary>
        /// <param name="propertyId">property identifier. </param>
        /// <param name="value">value of the property. </param>
        /// <returns></returns>
#endif
        public int Set(CaptureProperty propertyId, double value)
        {
            return NativeMethods.videoio_VideoCapture_set(ptr, (int)propertyId, value);
        }
 public static extern double cvGetCaptureProperty(IntPtr capture, CaptureProperty propertyId);
 public static extern bool cvSetCaptureProperty(IntPtr capture, CaptureProperty propertyId, double value);
Beispiel #7
0
 /// <summary>
 /// Sets video capture properties.
 /// </summary>
 /// <param name="propertyId">The property identifier as specified by <see cref="CaptureProperty"/>.</param>
 /// <param name="value">The new value of the specified property.</param>
 public void SetProperty(CaptureProperty propertyId, double value)
 {
     NativeMethods.cvSetCaptureProperty(this, propertyId, value);
 }
Beispiel #8
0
 public void set(CaptureProperty param, double value)
 {
     this.cam.Set(param, value);
 }
Beispiel #9
0
 internal static extern int cvSetCaptureProperty(Capture capture, CaptureProperty property_id, double value);
Beispiel #10
0
 /// <summary>
 /// Gets video capture properties.
 /// </summary>
 /// <param name="propertyId">The property identifier as specified by <see cref="CaptureProperty"/>.</param>
 /// <returns>
 /// The value of the specified property.
 /// </returns>
 public double GetProperty(CaptureProperty propertyId)
 {
     return(NativeMethods.cvGetCaptureProperty(this, propertyId));
 }
Beispiel #11
0
 internal static extern double cvGetCaptureProperty(Capture capture, CaptureProperty property_id);
Beispiel #12
0
        /*
         #region Properties
         *
         #region Basic
         * /// <summary>
         * /// Gets the capture type (File or Camera)
         * /// </summary>
         * public CaptureType CaptureType
         * {
         *  get { return captureType; }
         * }
         *
         * /// <summary>
         * /// Gets or sets film current position in milliseconds or video capture timestamp
         * /// </summary>
         * public int PosMsec
         * {
         *  get => (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.PosMsec);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.PosMsec, value);
         * }
         *
         * /// <summary>
         * /// Gets or sets 0-based index of the frame to be decoded/captured next
         * /// </summary>
         * public int PosFrames
         * {
         *  get => (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.PosFrames);
         *  set
         *  {
         *      if (captureType == CaptureType.Camera)
         *          throw new NotSupportedException("Only for video files");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.PosFrames, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets relative position of video file
         * /// </summary>
         * public CapturePosAviRatio PosAviRatio
         * {
         *  get => (CapturePosAviRatio)(int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.PosAviRatio);
         *  set
         *  {
         *      if (captureType == CaptureType.Camera)
         *          throw new NotSupportedException("Only for video files");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.PosAviRatio, (int)value);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets width of frames in the video stream
         * /// </summary>
         * public int FrameWidth
         * {
         *  get => (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.FrameWidth);
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.FrameWidth, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets height of frames in the video stream
         * /// </summary>
         * public int FrameHeight
         * {
         *  get => (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.FrameHeight);
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.FrameHeight, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets frame rate
         * /// </summary>
         * public double Fps
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Fps);
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Fps, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets 4-character code of codec
         * /// </summary>
         * public string FourCC
         * {
         *  get
         *  {
         *      int src = (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.FourCC);
         *      IntBytes bytes = new IntBytes { Value = src };
         *      char[] fourcc = {
         *          Convert.ToChar(bytes.B1),
         *          Convert.ToChar(bytes.B2),
         *          Convert.ToChar(bytes.B3),
         *          Convert.ToChar(bytes.B4)
         *      };
         *      return new string(fourcc);
         *  }
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      if (value.Length != 4)
         *          throw new ArgumentException("Length of the argument string must be 4");
         *
         *      byte c1 = Convert.ToByte(value[0]);
         *      byte c2 = Convert.ToByte(value[1]);
         *      byte c3 = Convert.ToByte(value[2]);
         *      byte c4 = Convert.ToByte(value[3]);
         *      int v = FourCCCalcurator.Run(c1, c2, c3, c4);
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.FourCC, v);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets number of frames in video file
         * /// </summary>
         * public int FrameCount
         * {
         *  get
         *  {
         *      return (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.FrameCount);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets brightness of image (only for cameras)
         * /// </summary>
         * public double Brightness
         * {
         *  get
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      return (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Brightness);
         *  }
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Brightness, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets contrast of image (only for cameras)
         * /// </summary>
         * public double Contrast
         * {
         *  get
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      return (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Contrast);
         *  }
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Contrast, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets saturation of image (only for cameras)
         * /// </summary>
         * public double Saturation
         * {
         *  get
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      return (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Saturation);
         *  }
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Saturation, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Gets or sets hue of image (only for cameras)
         * /// </summary>
         * public double Hue
         * {
         *  get
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      return (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Hue);
         *  }
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Hue, value);
         *  }
         * }
         *
         * /// <summary>
         * /// The format of the Mat objects returned by retrieve()
         * /// </summary>
         * public int Format
         * {
         *  get => (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Format);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Format, value);
         * }
         *
         * /// <summary>
         * /// A backend-specific value indicating the current capture mode
         * /// </summary>
         * public int Mode
         * {
         *  get => (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Mode);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Mode, value);
         * }
         *
         * /// <summary>
         * /// Gain of the image (only for cameras)
         * /// </summary>
         * public double Gain
         * {
         *  get
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      return NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Gain);
         *  }
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Gain, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Exposure (only for cameras)
         * /// </summary>
         * public double Exposure
         * {
         *  get
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      return NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Exposure);
         *  }
         *  set
         *  {
         *      if (captureType == CaptureType.File)
         *          throw new NotSupportedException("Only for cameras");
         *      NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Exposure, value);
         *  }
         * }
         *
         * /// <summary>
         * /// Boolean flags indicating whether images should be converted to RGB
         * /// </summary>
         * public bool ConvertRgb
         * {
         *  get => (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.ConvertRgb) != 0;
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.ConvertRgb, value ? 0 : 1);
         * }
         *
         * /// <summary>
         * ///
         * /// </summary>
         * public double WhiteBalanceBlueU
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.WhiteBalanceBlueU);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.WhiteBalanceBlueU, value);
         * }
         *
         * /// <summary>
         * /// TOWRITE (note: only supported by DC1394 v 2.x backend currently)
         * /// </summary>
         * public double Rectification
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Rectification);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Rectification, value);
         * }
         *
         * public double Monocrome
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Monocrome);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Monocrome, value);
         * }
         *
         * public double Sharpness
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Sharpness);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Sharpness, value);
         * }
         *
         * /// <summary>
         * /// exposure control done by camera,
         * /// user can adjust refernce level using this feature
         * /// [CV_CAP_PROP_AUTO_EXPOSURE]
         * /// </summary>
         * public double AutoExposure
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.AutoExposure);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.AutoExposure, value);
         * }
         *
         * public double Gamma
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Gamma);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Gamma, value);
         * }
         *
         * /// <summary>
         * /// [CV_CAP_PROP_TEMPERATURE]
         * /// </summary>
         * public double Temperature
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Temperature);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Temperature, value);
         * }
         *
         * public double Trigger
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Trigger);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Trigger, value);
         * }
         *
         * public double TriggerDelay
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.TriggerDelay);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.TriggerDelay, value);
         * }
         *
         * public double WhiteBalanceRedV
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.WhiteBalanceRedV);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.WhiteBalanceRedV, value);
         * }
         *
         * public double Zoom
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Zoom);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Zoom, value);
         * }
         *
         * public double Focus
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Focus);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Focus, value);
         * }
         *
         * public double Guid
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Guid);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Guid, value);
         * }
         *
         * public double IsoSpeed
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.IsoSpeed);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.IsoSpeed, value);
         * }
         *
         * public double BackLight
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.BackLight);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.BackLight, value);
         * }
         *
         * public double Pan
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Pan);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Pan, value);
         * }
         *
         * public double Tilt
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Tilt);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Tilt, value);
         * }
         *
         * public double Roll
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Roll);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Roll, value);
         * }
         *
         * public double Iris
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Iris);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Iris, value);
         * }
         *
         * public double Settings
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.Settings);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.Settings, value);
         * }
         *
         * public double BufferSize
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.BufferSize);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.BufferSize, value);
         * }
         *
         * public bool AutoFocus
         * {
         *  get => (int)NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.AutoFocus) != 0;
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.AutoFocus, value ? 1 : 0);
         * }
         #endregion
         *
         #region OpenNI
         * /// <summary>
         * /// [CV_CAP_PROP_OPENNI_OUTPUT_MODE]
         * /// </summary>
         * public double OpenNI_OutputMode
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_OutputMode);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_OutputMode, value);
         * }
         *
         * /// <summary>
         * /// in mm
         * /// [CV_CAP_PROP_OPENNI_FRAME_MAX_DEPTH]
         * /// </summary>
         * public double OpenNI_FrameMaxDepth
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_FrameMaxDepth);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_FrameMaxDepth, value);
         * }
         *
         * /// <summary>
         * /// in mm
         * /// [CV_CAP_PROP_OPENNI_BASELINE]
         * /// </summary>
         * public double OpenNI_Baseline
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_Baseline);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_Baseline, value);
         * }
         *
         * /// <summary>
         * /// in pixels
         * /// [CV_CAP_PROP_OPENNI_FOCAL_LENGTH]
         * /// </summary>
         * public double OpenNI_FocalLength
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_FocalLength);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_FocalLength, value);
         * }
         *
         * /// <summary>
         * /// flag that synchronizes the remapping depth map to image map
         * /// by changing depth generator's view point (if the flag is "on") or
         * /// sets this view point to its normal one (if the flag is "off").
         * /// [CV_CAP_PROP_OPENNI_REGISTRATION]
         * /// </summary>
         * public double OpenNI_Registration
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_Registration);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_Registration, value);
         * }
         *
         * /// <summary>
         * /// [CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE]
         * /// </summary>
         * public double OpenNI_ImageGeneratorOutputMode
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_ImageGeneratorOutputMode);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_ImageGeneratorOutputMode, value);
         * }
         *
         * /// <summary>
         * /// [CV_CAP_OPENNI_DEPTH_GENERATOR_BASELINE]
         * /// </summary>
         * public double OpenNI_DepthGeneratorBaseline
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_DepthGeneratorBaseline);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_DepthGeneratorBaseline, value);
         * }
         *
         * /// <summary>
         * /// [CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH]
         * /// </summary>
         * public double OpenNI_DepthGeneratorFocalLength
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_DepthGeneratorFocalLength);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_DepthGeneratorFocalLength, value);
         * }
         *
         * /// <summary>
         * /// [CV_CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON]
         * /// </summary>
         * public double OpenNI_DepthGeneratorRegistrationON
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.OpenNI_DepthGeneratorRegistrationON);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.OpenNI_DepthGeneratorRegistrationON, value);
         * }
         *
         #endregion
         *
         #region GStreamer
         *
         * /// <summary>
         * /// default is 1
         * /// [CV_CAP_GSTREAMER_QUEUE_LENGTH]
         * /// </summary>
         * public double GStreamerQueueLength
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.GStreamerQueueLength);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.GStreamerQueueLength, value);
         * }
         *
         * /// <summary>
         * /// ip for anable multicast master mode. 0 for disable multicast
         * /// [CV_CAP_PROP_PVAPI_MULTICASTIP]
         * /// </summary>
         * public double PvAPIMulticastIP
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.PvAPIMulticastIP);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.PvAPIMulticastIP, value);
         * }
         #endregion
         *
         #region XI
         * /// <summary>
         * /// Change image resolution by binning or skipping.
         * /// [CV_CAP_PROP_XI_DOWNSAMPLING]
         * /// </summary>
         * public double XI_Downsampling
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_Downsampling);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_Downsampling, value);
         * }
         *
         * /// <summary>
         * /// Output data format.
         * /// [CV_CAP_PROP_XI_DATA_FORMAT]
         * /// </summary>
         * public double XI_DataFormat
         * {
         *  get
         *  {
         *      return NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_DataFormat);
         *  }
         * }
         *
         * /// <summary>
         * /// Horizontal offset from the origin to the area of interest (in pixels).
         * /// [CV_CAP_PROP_XI_OFFSET_X]
         * /// </summary>
         * public double XI_OffsetX
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_OffsetX);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_OffsetX, value);
         * }
         *
         * /// <summary>
         * /// Vertical offset from the origin to the area of interest (in pixels).
         * /// [CV_CAP_PROP_XI_OFFSET_Y]
         * /// </summary>
         * public double XI_OffsetY
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_OffsetY);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_OffsetY, value);
         * }
         *
         * /// <summary>
         * /// Defines source of trigger.
         * /// [CV_CAP_PROP_XI_TRG_SOURCE]
         * /// </summary>
         * public double XI_TrgSource
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_TrgSource);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_TrgSource, value);
         * }
         *
         * /// <summary>
         * /// Generates an internal trigger. PRM_TRG_SOURCE must be set to TRG_SOFTWARE.
         * /// [CV_CAP_PROP_XI_TRG_SOFTWARE]
         * /// </summary>
         * public double XI_TrgSoftware
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_TrgSoftware);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_TrgSoftware, value);
         * }
         *
         * /// <summary>
         * /// Selects general purpose input
         * /// [CV_CAP_PROP_XI_GPI_SELECTOR]
         * /// </summary>
         * public double XI_GpiSelector
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_GpiSelector);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_GpiSelector, value);
         * }
         *
         * /// <summary>
         * /// Set general purpose input mode
         * /// [CV_CAP_PROP_XI_GPI_MODE]
         * /// </summary>
         * public double XI_GpiMode
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_GpiMode);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_GpiMode, value);
         * }
         *
         * /// <summary>
         * /// Get general purpose level
         * /// [CV_CAP_PROP_XI_GPI_LEVEL]
         * /// </summary>
         * public double XI_GpiLevel
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_GpiLevel);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_GpiLevel, value);
         * }
         *
         * /// <summary>
         * /// Selects general purpose output
         * /// [CV_CAP_PROP_XI_GPO_SELECTOR]
         * /// </summary>
         * public double XI_GpoSelector
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_GpoSelector);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_GpoSelector, value);
         * }
         *
         * /// <summary>
         * /// Set general purpose output mode
         * /// [CV_CAP_PROP_XI_GPO_MODE]
         * /// </summary>
         * public double XI_GpoMode
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_GpoMode);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_GpoMode, value);
         * }
         *
         * /// <summary>
         * /// Selects camera signalling LED
         * /// [CV_CAP_PROP_XI_LED_SELECTOR]
         * /// </summary>
         * public double XI_LedSelector
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_LedSelector);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_LedSelector, value);
         * }
         *
         * /// <summary>
         * /// Define camera signalling LED functionality
         * /// [CV_CAP_PROP_XI_LED_MODE]
         * /// </summary>
         * public double XI_LedMode
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_LedMode);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_LedMode, value);
         * }
         *
         * /// <summary>
         * /// Calculates White Balance(must be called during acquisition)
         * /// [CV_CAP_PROP_XI_MANUAL_WB]
         * /// </summary>
         * public double XI_ManualWB
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_ManualWB);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_ManualWB, value);
         * }
         *
         * /// <summary>
         * /// Automatic white balance
         * /// [CV_CAP_PROP_XI_AUTO_WB]
         * /// </summary>
         * public double XI_AutoWB
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_AutoWB);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_AutoWB, value);
         * }
         *
         * /// <summary>
         * /// Automatic exposure/gain
         * /// [CV_CAP_PROP_XI_AEAG]
         * /// </summary>
         * public double XI_AEAG
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_AEAG);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_AEAG, value);
         * }
         *
         * /// <summary>
         * /// Exposure priority (0.5 - exposure 50%, gain 50%).
         * /// [CV_CAP_PROP_XI_EXP_PRIORITY]
         * /// </summary>
         * public double XI_ExpPriority
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_ExpPriority);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_ExpPriority, value);
         * }
         *
         * /// <summary>
         * /// Maximum limit of exposure in AEAG procedure
         * /// [CV_CAP_PROP_XI_AE_MAX_LIMIT]
         * /// </summary>
         * public double XI_AEMaxLimit
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_AEMaxLimit);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_AEMaxLimit, value);
         * }
         *
         * /// <summary>
         * /// Maximum limit of gain in AEAG procedure
         * /// [CV_CAP_PROP_XI_AG_MAX_LIMIT]
         * /// </summary>
         * public double XI_AGMaxLimit
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_AGMaxLimit);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_AGMaxLimit, value);
         * }
         *
         * /// <summary>
         * /// default is 1
         * /// [CV_CAP_PROP_XI_AEAG_LEVEL]
         * /// </summary>
         * public double XI_AEAGLevel
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_AEAGLevel);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_AEAGLevel, value);
         * }
         *
         * /// <summary>
         * /// default is 1
         * /// [CV_CAP_PROP_XI_TIMEOUT]
         * /// </summary>
         * public double XI_Timeout
         * {
         *  get => NativeMethods.videoio_VideoCapture_get(ptr, (int)CaptureProperty.XI_Timeout);
         *  set => NativeMethods.videoio_VideoCapture_set(ptr, (int)CaptureProperty.XI_Timeout, value);
         * }
         #endregion
         *
         #endregion
         */

        #region Methods
        /// <summary>
        /// Retrieves the specified property of camera or video file.
        /// </summary>
        /// <param name="propertyId">property identifier.</param>
        /// <returns>property value</returns>
        public double Get(CaptureProperty propertyId)
        {
            return(NativeMethods.videoio_VideoCapture_get(ptr, (int)propertyId));
        }
Beispiel #13
0
 /// <summary>
 /// Sets the specified property of video capturing.
 /// </summary>
 /// <param name="propertyId">property identifier. </param>
 /// <param name="value">value of the property. </param>
 /// <returns></returns>
 public int Set(CaptureProperty propertyId, double value)
 {
     return(NativeMethods.videoio_VideoCapture_set(ptr, (int)propertyId, value));
 }
Beispiel #14
0
        /// <summary>
        /// ビデオキャプチャのプロパティを取得する
        /// </summary>
        /// <param name="property_id">プロパティID</param>
        /// <returns>プロパティの値</returns>
#else
        /// <summary>
        /// Retrieves the specified property of camera or video file. 
        /// </summary>
        /// <param name="property_id">property identifier.</param>
        /// <returns>property value</returns>
#endif
        public double GetCaptureProperty(CaptureProperty property_id)
        {
            return Cv.GetCaptureProperty(this, property_id);
        }
Beispiel #15
0
 private bool WriteProperty(CaptureProperty PropertyType, System.Object PropertyValue)
 {
     if (m_bag == null)
     {
         return false;
     }
     return m_bag.Write(CapturePropertyStrings[(int)PropertyType],PropertyValue);
 }
Beispiel #16
0
        /// <summary>
        /// ビデオキャプチャのプロパティをセットする
        /// </summary>
        /// <param name="property_id">プロパティID</param>
        /// <param name="value">プロパティの値</param>
        /// <returns></returns>
#else
        /// <summary>
        /// Sets the specified property of video capturing.
        /// </summary>
        /// <param name="property_id">property identifier. </param>
        /// <param name="value">value of the property. </param>
        /// <returns></returns>
#endif
        public int SetCaptureProperty(CaptureProperty property_id, double value)
        {
            return Cv.SetCaptureProperty(this, property_id, value);
        }
Beispiel #17
0
 public void get(CaptureProperty param)
 {
     this.cam.Get(param);
 }