1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-27 14:23:04 +04:00

5 Commits

Author SHA1 Message Date
Mansour Moufid a68e8d8289 Merge pull request #21337 from mansourmoufid:videocapture-get-property-return
Make cv::VideoCapture::get return cv::CAP_PROP_UNKNOWN (-1) for unsupported properties #21337

The return value indicating an unsupported property is not consistent across backends.

I stumbled on this issue because my code was determining if a property value is valid if it's non-zero (like the documentation says), which worked fine on macOS, but not on Android.

For example, auto-exposure is not supported on macOS, so get() returns 0. But it is supported on Android and 0 means auto-exposure is off.

I think -1 is the better return value to indicate unsupported properties.

I made changes to all the backends. I think I got every case. This breaks API compatibility for some backends, so I based this on branch 3.4.

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
- [x] The PR is proposed to proper branch
- [ ] There is reference to original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2026-06-02 08:27:24 +03:00
Nicolai Behmann fdaa6ff9e3 Merge pull request #20475 from nibeh:patch-1
* Added exposure and gain props, maximized pixel clk

* removed pixel clock maximization

pixel clock maximization is not suitable for all use cases, so I removed it from PR.
2021-08-24 12:31:54 +03:00
Alexander Alekhin 9e6b7f5dc1 videoio: plugins API versioning 2020-12-06 16:19:13 +00:00
joshdoe 541a09b7ac Merge pull request #18535 from joshdoe:gray16_gstreamer_writing
Add CV_16UC1/GRAY16_LE support to GStreamer backend for VideoWriter

* videoio(backend): add Writer_open_with_params to plugin API

This will allow arbitrary parameters to be passed to plugin backends

* videoio(gstreamer): add GRAY16_LE/CV_16UC1 writing support to GStreamer

This introduces a new property VIDEOWRITER_PROP_DEPTH, which defaults to
CV_8U, but for GStreamer can be set to CV_16U.

Also, fix another test to not fail if plugin isn't found, copying logic
from the read_write test.

* videoio(plugin): fix handling plugins with previous API level

* videoio: coding style

* fix warning
2020-12-05 21:28:07 +00:00
Andreas Franek a3f3fbe05d add rudimentary support for uEye cameras
uEye are cameras from IDS, c.f. https://en.ids-imaging.com/
Supports driver version 4.94 and up currently, since the event system was overhauled there.
Supports setting/getting the properties: fps,width,height
2020-11-13 18:38:51 +01:00