Ask Your Question
0

cv2.VideoCapture get stride

asked 2014-07-22 09:38:05 -0600

nicosmik gravatar image

updated 2015-09-25 14:37:32 -0600

Hi,

I would like to know how I can retrieve the stride (or line size) value from a python VideoCapture?

I am only able to get width and height from the capabilities like this:

vc = cv2.VideoCapture(args.video)    
# Get capabilities         
width  = vc.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)
height = vc.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)

Stride is always equal to width with VideoCapture?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-07-22 09:54:08 -0600

unxnut gravatar image

The stride or step is defined for Mat objects that are returned by retrieve method for VideoCapture. There is no step defined for VideoCapture objects.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-07-22 09:38:05 -0600

Seen: 1,287 times

Last updated: Jul 22 '14