param | define |
---|---|
cv2.VideoCapture.get(0) | 視頻文件的當前位置(播放)以毫秒為單位 |
cv2.VideoCapture.get(1) | 基于以0開始的被捕獲或解碼的幀索引 |
cv2.VideoCapture.get(2) | 視頻文件的相對位置(播放):0=電影開始呀伙,1=影片的結(jié)尾。 |
cv2.VideoCapture.get(3) | 在視頻流的幀的寬度 |
cv2.VideoCapture.get(4) | 在視頻流的幀的高度 |
cv2.VideoCapture.get(5) | 幀速率 |
cv2.VideoCapture.get(6) | 編解碼的4字-字符代碼 |
cv2.VideoCapture.get(7) | 視頻文件中的幀數(shù) |
cv2.VideoCapture.get(8) | 返回對象的格式 |
cv2.VideoCapture.get(9) | 返回后端特定的值,該值指示當前捕獲模式 |
cv2.VideoCapture.get(10) | 圖像的亮度(僅適用于照相機) |
cv2.VideoCapture.get(11) | 圖像的對比度(僅適用于照相機) |
cv2.VideoCapture.get(12) | 圖像的飽和度(僅適用于照相機) |
cv2.VideoCapture.get(13) | 色調(diào)圖像(僅適用于照相機) |
cv2.VideoCapture.get(14) | 圖像增益(僅適用于照相機)(Gain在攝影中表示白平衡提升) |
cv2.VideoCapture.get(15) | 曝光(僅適用于照相機) |
cv2.VideoCapture.get(16) | 指示是否應將圖像轉(zhuǎn)換為RGB布爾標志 |
cv2.VideoCapture.get(17) | × 暫時不支持 |
cv2.VideoCapture.get(18) | 立體攝像機的矯正標注(目前只有DC1394 v.2.x后端支持這個功能) |
具體屬性名及英文說明按順序如下:
CV_CAP_PROP_POS_MSEC Current position of the video file in milliseconds or video capture timestamp.
CV_CAP_PROP_POS_FRAMES 0-based index of the frame to be decoded/captured next.
CV_CAP_PROP_POS_AVI_RATIO Relative position of the video file: 0 - start of the film, 1 - end of the film.
CV_CAP_PROP_FRAME_WIDTH Width of the frames in the video stream.
CV_CAP_PROP_FRAME_HEIGHT Height of the frames in the video stream.
CV_CAP_PROP_FPS Frame rate.
CV_CAP_PROP_FOURCC 4-character code of codec.
CV_CAP_PROP_FRAME_COUNT Number of frames in the video file.
CV_CAP_PROP_FORMAT Format of the Mat objects returned by retrieve() .
CV_CAP_PROP_MODE Backend-specific value indicating the current capture mode.
CV_CAP_PROP_BRIGHTNESS Brightness of the image (only for cameras).
CV_CAP_PROP_CONTRAST Contrast of the image (only for cameras).
CV_CAP_PROP_SATURATION Saturation of the image (only for cameras).
CV_CAP_PROP_HUE Hue of the image (only for cameras).
CV_CAP_PROP_GAIN Gain of the image (only for cameras).
CV_CAP_PROP_EXPOSURE Exposure (only for cameras).
CV_CAP_PROP_CONVERT_RGB Boolean flags indicating whether images should be converted to RGB.
CV_CAP_PROP_WHITE_BALANCE Currently not supported
CV_CAP_PROP_RECTIFICATION Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently)
Note: 如果查詢的視頻屬性是VideoCapture類不支持的填大,將會返回0