What hardware/platform were you working on?-Debian, DietPi
Instructions you have followed. (link/manual/etc.)
Problems you were having?
This camera is advertised as having multiple resolutions available. Running v4l2-ctl --list-formats-ext -d 4 lists all formats available, but this camera only ever runs at 1280x800. All attempts to change the resolution via OpenCV and command line v4l2 commands do not change the resolution. Is this camera capable of changing it’s resolution as advertised or not. If so, how?
The dmesg log from your hardware?
Troubleshooting attempts you’ve made?
In therminal I entered v4l2-ctl -d 4 --set-fmt-video=width=640,height=480,pixelformat=MJPG , no change. In a python script I entered cam.set(cv2.CAP_PROP_FRAME_WIDTH, 640) and cam.set(cv2.CAP_PROP_FRAME_HEIGHT, 480). Again, no change, just 1280x800.
What help do you need?
Confirm whether this camera operates as advertised, and explain how.
Thanks Dion,
Running that command makes no difference.
If I check the configuration immediately after running it, I see the changes were made.
root@DietPi:~# v4l2-ctl -d 4 --get-fmt-video
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'MJPG' (Motion-JPEG)
Field : None
Bytes per Line : 0
Size Image : 614989
Colorspace : Default
Transfer Function : Default (maps to Rec. 709)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
But as soon as I run my Python script to actually start acquiring the stream, it reverts back to YUYV at 1280x720.
root@DietPi:~# v4l2-ctl -d 4 --get-fmt-video
Format Video Capture:
Width/Height : 1280/720
Pixel Format : 'YUYV' (YUYV 4:2:2)
Field : None
Bytes per Line : 2560
Size Image : 1843200
Colorspace : sRGB
Transfer Function : Rec. 709
YCbCr/HSV Encoding: ITU-R 601
Quantization : Default (maps to Limited Range)
Flags :
That is where I am having difficulty.
I even made a .sh that I call as a subprocess right before acquireing the stream in my script, but still no joy, it reverts back to YUYV at 1280x720. The configuration doesn’t stick.