AVMATRIX VC42 capture board: Pixel format of incoming image is unsupported by OpenCV #25499
Open
4 tasks done
Labels
Milestone
System Information
OpenCV 4.9.0
NVidia Jetson Orin
Operating System / Platform: Ubuntu 20.04
Camera model: capture board AVMATRIX VC42
Detailed description
When I try to initialize OpenCV capture with V4L I got the following error:
I'm doing this from C# with OpenCVSharp library.
Exactly the same error is happened when I reproducing it with the following Python code:
Here is the complete logs with all tracing options turning on:
After investigation I found the cause of the issue and raising the bug report only to propose a way to fix it.
The cause is that V4L capture is trying to initialize camera with fixed resolution 640x480 and set the real resolution only after the initialization. This works for most cameras. But the AVMATRIX VC42 board driver does not support this resolution so it is failed.
Proposed fix is to allow setting resolution for camera initialization beforehand.
The only way how it could be implemented without affecting internal architecture is to use environment variables. I already did it in my local copy and it does work so I'd like to share the solution.
Steps to reproduce
Run the python code from the description.
Note that the issue is specific to the board and will not be reproduced on most cameras!
Issue submission checklist
The text was updated successfully, but these errors were encountered: