opencv/modules/videoio
alex-urm 0903061589
Merge pull request #25500 from alex-urm:v4l_default_image_size
V4l default image size #25500

Added ability to set default image width and height for V4L capture.  This is required for cameras that does not support 640x480 resolution because otherwise V4L capture cannot be opened and failed with "Pixel format of incoming image is unsupported by OpenCV" and then with "can't open camera by index" message. Because of the videoio architecture it is not possible to insert actions between CvCaptureCAM_V4L::CvCaptureCAM_V4L and CvCaptureCAM_V4L::open so the only way I found is to use environment variables to preselect the resolution.

Related bug report is [#25499](https://github.com/opencv/opencv/issues/25499)
Maybe (but not confirmed) this is also related to [#24551](https://github.com/opencv/opencv/issues/24551)

This fix was made and verified in my local environment: capture board AVMATRIX VC42, Ubuntu 20, NVidia Jetson Orin.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [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 another license that is incompatible with OpenCV
- [X] The PR is proposed to the proper branch
- [X] There is a reference to the 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
2024-12-20 11:00:30 +03:00
..
cmake Fix path to 3rdparty cmake. 2024-08-02 10:07:36 +02:00
doc Merge pull request #25042 from mshabunin:doc-upgrade 2024-03-05 16:19:45 +03:00
include/opencv2 Merge pull request #26627 from warped-rudi:torch 2024-12-18 12:16:50 +03:00
misc Replace deprecated symbols AVVideoCodecH264 and AVVideoCodecJPEG 2024-01-16 16:49:58 -05:00
perf Merge pull request #15100 from Volskig:cam_multiplexing_function_v 2019-11-15 19:42:12 +03:00
src Merge pull request #25500 from alex-urm:v4l_default_image_size 2024-12-20 11:00:30 +03:00
test Merge pull request #26637 from MaximSmolskiy:fix-VideoCapture-fails-to-read-single-image-with-digits-in-name 2024-12-19 08:17:05 +03:00
CMakeLists.txt Exclude cap_ios.h from installation where it's not needed. 2024-06-28 14:11:25 +03:00