From cab699b70840112f2b54441b3e85b00387ff6e25 Mon Sep 17 00:00:00 2001 From: elerac Date: Tue, 5 Oct 2021 19:33:47 +0900 Subject: [PATCH] Fix `get(cv2.CAP_PROP_FPS)`; #8 --- EasyPySpin/videocapture.py | 2 +- README.md | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EasyPySpin/videocapture.py b/EasyPySpin/videocapture.py index e95561a..2a5a145 100644 --- a/EasyPySpin/videocapture.py +++ b/EasyPySpin/videocapture.py @@ -377,7 +377,7 @@ def get(self, propId: "cv2.VideoCaptureProperties") -> any: if propId == cv2.CAP_PROP_FPS: # If this does not equal the AcquisitionFrameRate # it is because the ExposureTime is greater than the frame time. - return self.get_pyspin_value("ResultingFrameRate") + return self.get_pyspin_value("AcquisitionResultingFrameRate") # Brightness if propId == cv2.CAP_PROP_BRIGHTNESS: diff --git a/README.md b/README.md index edcd1e1..941adac 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ In `set(propId, value)` and `get(propId)`, PySpin is used to set and get the cam | ---- | ---- | ---- | ---- | | cv2.CAP_PROP_FRAME_WIDTH | int | `Width` = value | value = `Width` | | cv2.CAP_PROP_FRAME_HEIGHT | int | `Height` = value | value = `Height` | -| cv2.CAP_PROP_FPS | float | `AcquisitionFrameRateEnable` = `True`
`AcquisitionFrameRate` = value | value = `ResultingFrameRate`| +| cv2.CAP_PROP_FPS | float | `AcquisitionFrameRateEnable` = `True`
`AcquisitionFrameRate` = value | value = `AcquisitionResultingFrameRate`| | cv2.CAP_PROP_BRIGHTNESS | float | `AutoExposureEVCompensation` = value | value = `AutoExposureEVCompensation` | | cv2.CAP_PROP_GAIN | float | if value != -1
  `GainAuto` = `Off`
  `Gain` = value
else
  `GainAuto` = `Continuous` | value = `Gain` | | cv2.CAP_PROP_EXPOSURE | float | if value != -1
  `ExposureAuto` = `Off`
  `ExposureTime` = value
else
  `ExposureAuto` = `Continuous` | value = `ExposureTime` | diff --git a/setup.py b/setup.py index 5954154..c252591 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="EasyPySpin", - version="2.0.0", + version="2.0.1", description="cv2.VideoCapture like wrapper for FLIR Spinnaker SDK", long_description=long_description, long_description_content_type="text/markdown",