CV_CAP_PROP_FPS returns always 0 (Bug #227)


Added by philip milev almost 15 years ago. Updated over 12 years ago.


Status:Done Start date:
Priority:Normal Due date:
Assignee:Alexander Shishkov % Done:

0%

Category:highgui-camera
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

I tried to find bug reports about this and answers from the yahoo group but there were no answers and no tickets so I decided to ask here. I'm beginner, so please forgive me for my incompetences.
I think that there is a serious problem with "cvSetCaptureProperty". I tried to give it various type of arguments (int,double) but it still returns null, whatever the code. I work with DevCpp 4.9.9.2 with camera AVT Marlin F033C. I have tried both the windows generic driver and the AVT DirectStream 1.0.5.0 but CV_CAP_PROP_FPS always returns 0 and the camera is stuck on 15fps. I managed to check that using the generic driver and ffdshow. Thank you for your support.


opit1.c (3.6 kB) philip milev, 2010-03-26 11:55 am


Related issues

duplicated by Bug #1356: OpenCV webcam frame rate Cancelled

Associated revisions

Revision e04cd1b0
Added by Alexander Shishkov almost 13 years ago

fixed #227, added support I420 format

Revision 5c885771
Added by Vadim Pisarevsky about 12 years ago

Merge pull request #227 from taka-no-me:sanity_MatND

History

Updated by Filipe Almeida almost 15 years ago

What's the operating system you're using? (there are issues with libv4l)

Updated by Jerry Fetcher almost 15 years ago

Did someone find a solution for the ineffectiveness of cvSetCaptureProperty? I am using it but it does not change teh dimensions of the frames I grab from camera. Thank you very much in advance.

Updated by Filipe Almeida almost 15 years ago

This is solved in the SVN trunk version.
There are a lot of issues which will be handled in newer versions of this hook with v4l2.

Updated by Filipe Almeida almost 15 years ago

Correction: On the FPS problem, this is still under revision.
Nonetheless, some of the problems with the definition or setting v4l2 properties other than brightness/contrast is possible.
Please let me know which webcam (model and ID) you're working with.

Updated by Victor Eruhimov over 14 years ago

  • Status deleted (Open)

Updated by pjac - about 13 years ago

I'm also seeing FPS returned as zero.

OS: Mac OS X 10.7.2 Lion
Camera: Microsoft Xbox Live Vision (for Xbox 360), a UVC type USB webcam
OpenCV: Version 2.3.1

Sample code in Python using cv and cv2,

 1import cv
 2import cv2
 3vidcap = cv2.VideoCapture()
 4assert vidcap.open(0)
 5retval, image = vidcap.retrieve()
 6assert retval, retval
 7assert image is not None, image
 8#TODO - Where do these constants live under cv2?
 9print "FPS",  vidcap.get(cv.CV_CAP_PROP_FPS)
10vidcap.release()
11assert cv2.imwrite("test.png", image)
12print "Done" 

Output shows FPS is 0.0, which according to the documentation means unavailable.
http://www.opencv.org.cn/opencvdoc/2.3.1/html/modules/highgui/doc/reading_and_writing_images_and_video.html

Updated by Alexander Shishkov about 13 years ago

  • Description changed from I tried to find bug reports about this and answers from the yahoo group but t... to I tried to find bug reports about this and answers from the yahoo group but t... More

Updated by Alexander Shishkov almost 13 years ago

  • Target version deleted ()

Updated by Alexander Shishkov almost 13 years ago

  • Status set to Open

Updated by Alexander Shishkov almost 13 years ago

  • Assignee deleted (Vadim Pisarevsky)

Updated by Carlos M. almost 13 years ago

This problem -- like anything related to CV_CAP_PROP_* -- gives newcomers a very bad impression of the quality of OpenCV. Having people get stuck within the first few pages of the O'Reilly Book will not facilitate adoption of OpenCV. It does not matter whose fault this is, it just needs to get fixed.

Updated by Alexander Shishkov almost 13 years ago

Thanks for the report! It is fixed in r7842

  • Status changed from Open to Done
  • Assignee set to Alexander Shishkov

Updated by Carlos M. almost 13 years ago

Sincere thanks to Alexander for this much-needed fix!
(Not sure this is the best place, but it's important to acknowledge this progress.)

Updated by Alexander Shishkov almost 13 years ago

  • Target version set to 2.4.0

Updated by Andrey Kamaev over 12 years ago

  • Category changed from highgui-images to highgui-camera

Also available in: Atom PDF