Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

the numbers you see all make sense. the FPS module is unfortunately not part of the opencv codebase, but assuming it "just works" --

if you wait for 25 millis in waitKey() you get 1000 / 25 = 40 FPS, minus some for image drawing, so 38.06 looks quite exact.

to play at (about) 24fps, try adjust the wait time to 42 millis, so you get 1000 / 41 = 24.3. (and again, with a bit of additional time spent for drawing, it should get quiite exact)

the numbers you see all make sense. the FPS module is unfortunately not part of the opencv codebase, but assuming it "just works" --

if you wait for 25 millis in waitKey() you get 1000 / 25 = 40 FPS, minus some for image drawing, so 38.06 looks quite exact.

to play at (about) 24fps, try adjust the wait time to 4241 millis, so you get 1000 / 41 = 24.3. (and again, with a bit of additional time spent for drawing, it should get quiite exact) exact)