我有一个连接到树莓派 4 的AMG88xx 红外摄像头,我正在使用 linux video-i2c驱动程序,该驱动程序似乎可以正常工作
v4l2-ctl -d /dev/video0 --all
Driver Info:
Driver name : video-i2c
Card type : I2C 1-104 Transport Video
Bus info : I2C:1-104
Driver version : 4.19.102
Capabilities : 0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera: ok)
Format Video Capture:
Width/Height : 8/8
Pixel Format : 'Y12 ' (12-bit Greyscale)
Field : None
Bytes per Line : 16
Size Image : 128
Colorspace : Raw
Transfer Function : Default (maps to None)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 10.000 (10/1)
Read buffers : 1
但是,openCV 似乎不支持输出像素格式(Y12)
>>> import cv2
>>> capture = cv2.VideoCapture(0)
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
VIDEOIO ERROR: V4L: can't open camera by index 0
我是否需要构建带有额外支持的 OpenCV?或以某种方式转换像素格式?