VideoCapture.get(cv2.CAP_PROR_FPS) return None
Umblife opened this issue · 1 comments
Umblife commented
Hello, thanks for your great job.
When I used the get() method of the VideoCapture class with a FLIR camera, I got unexpected value.
>> vc = EasyPySpin.VideoCapture(0)
>> vc.set(cv2.CAP_PROP_FPS, 20)
True
# 20 is expected. But actually None is back
>> vc.get(cv2.CAP_PROR_FPS)
None
I found this,
EasyPySpin/EasyPySpin/videocapture.py
Lines 377 to 380 in ea1aa5b
so debugged "AcquisitionFrameRate" and "ExposureTime", but the exposure time is less than the frame time.
# debug
>> self.get_pyspin_value("AcquisitionFrameRate")
19.999350421098324 # 20fps -> frame time: 0.05sec
>> self.get_pyspin_value("ExposureTime")
15002.0 # micro sec -> 0.015 sec
I checked self.cam of VideoCapture class, but self.cam doesn't have an attribute "ResultingFrameRate". In fact, this get_pyspin_value() method called here also returns None by the following processing.
EasyPySpin/EasyPySpin/videocapture.py
Lines 632 to 635 in ea1aa5b
However, self.cam has "AcquisitionResultingFrameRate". Is this considered the same as the "ResultingFrameRate" in the original code ?
# debug
>> self.get_pyspin_value("AcquisitionFrameRate")
19.999350421098324
>> self.get_pyspin_value("AcquisitionResultingFrameRate")
19.999350401098972 # Approximately the same value as "AcquisitionFrameRate" is returned
Thanks for your helping