Source_CaptureProperty

Using of command

This command is use for set or get video file or camera parameters.Option Set setup video file or camera parameters. Option Get read video file or camera parameters and store it in some variables.

Commands parameters

Command has 5 parameters:
  1. Properties: You can select 2 option. The first is Set and the second is Get. If you select option "Set" you will be able set camera or video properties. If yoy compile OPenCV with ffmpeg library (prefered option for eli project), Set option does not work in video files !!! If you select option "Get" you will be able read video or camera parameters and store it in some system variables.
  2. Select capture: You can select capture from parameters will be read or set. You can select Capture_0 to Capture_9.
  3. Property ID: You can select parameter which is read or set from video capture.
    1. CV_CAP_PROP_POS_MSEC:Get option- Film current position in miliseconds or video capture timestamp. Set option-position in miliseconds from video file beginning.
    2. CV_CAP_PROP_POS_FRAMES: Get option-Frame number which will be decode next. Set option-Set position in video file (in number frames).(only for video files)
    3. CV_CAP_PROP_POS_AVI_RATIO: Relative position of video file.(0-start, 1=end of film)
    4. CV_CAP_PROP_FRAME_WIDTH: Width of frame in video file or camera frame. Set option is available only for cameras.
    5. CV_CAP_PROP_FRAME_HEIGHT:Height of frame in video file or camera frame. Set option is available only for cameras.
    6. CV_CAP_PROP_FPS: Frame rate. Number frame per seconds. Set option is available only for cameras.
    7. CV_CAP_PROP_FOURCC: 4-character code of codec. See ffmpeg manual. Set option is available only for cameras.
    8. CV_CAP_PROP_FRAME_COUNT: Available only in "Get" option. Function read total frame count in video file. Vaule depend of using codec. See ffmpeg manual.
    9. CV_CAP_PROP_FORMAT: Format of the Mat objects
    10. CV_CAP_PROP_MODE: Backend-specific value indicating the current capture mode.
    11. CV_CAP_PROP_BRIGHTNESS :Brightness of the image (only for cameras).
    12. CV_CAP_PROP_CONTRAST: Contrast of the image (only for cameras).
    13. CV_CAP_PROP_SATURATION: Saturation of the image (only for cameras).
    14. CV_CAP_PROP_HUE: Hue of the image (only for cameras).
    15. CV_CAP_PROP_GAIN: Gain of the image (only for cameras).
    16. CV_CAP_PROP_EXPOSURE: Exposure (only for cameras).
    17. CV_CAP_PROP_CONVERT_RGB: Boolean flags indicating whether images should be converted to RGB.
    18. CV_CAP_PROP_WHITE_BALANCE_U: The U value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
    19. CV_CAP_PROP_WHITE_BALANCE_V: The V value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
    20. CV_CAP_PROP_RECTIFICATION: Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently)
    21. CV_CAP_PROP_ISO_SPEED : The ISO speed of the camera (note: only supported by DC1394 v 2.x backend currently)
    22. CV_CAP_PROP_BUFFERSIZE : Amount of frames stored in internal buffer memory (note: only supported by DC1394 v 2.x backend currently)
  4. Value From/To: You can celect which Variable is use for set or read capture parameters. For "Set" option you can select parameter "Number". It can be select Variable_0 to Variable_99 or Number.
  5. Value ID number: Available only in "Set" option. This parameter can be use only if parameter "Value From/To" is set to "Number". You can write number which will be set to video capture.

Error codes

  1. Error code -11: Bad capture index.Capture has bad index. Index must be 0 to 9. Check test program file if command has correct format
  2. Error code -12: Bad variable index. Variable index is bad. Index must be 0 to 99. Check test program file if command has correct format.
  3. Error code -13: Selected capture is null. Error means that selected capture was not open before this command.
  4. Error code -100: OpenCV error. Used OpenCV function generated error. Explanation of error will be display in result window. Command use those OPenCV functions:cvSetCaptureProperty and cvGetCaptureProperty.