Jump to content

OpenCV: Difference between revisions

126 bytes added ,  28 February 2020
Line 59: Line 59:
</syntaxhighlight>
</syntaxhighlight>


;Getting the resolution
;Parameters
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
# Resolution
width = int(video_capture.get(cv2.CAP_PROP_FRAME_WIDTH))
width = int(video_capture.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(video_capture.get(cv2.CAP_PROP_FRAME_HEIGHT))
height = int(video_capture.get(cv2.CAP_PROP_FRAME_HEIGHT))
total_frames = int(video_capture.get(cv2.CAP_PROP_FRAME_COUNT))
frame_pos = int(video_capture.get(cv2.CAP_PROP_POS_FRAMES))
</syntaxhighlight>
</syntaxhighlight>