我将一个AMG88xx红外摄像机附加到一个覆盆子PI 4上,我使用的是linux 视频-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但是,输出像素格式(Y12)似乎不受openCV的支持。
>>> 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?或者以某种方式转换像素格式?
发布于 2020-02-28 21:49:55
问题与OpenCV中缺少像素格式有关(见问题#16620),由#16626修复。
通过比较video4linux像素格式和openCV在v4l.cpp中支持的
https://stackoverflow.com/questions/60214197
复制相似问题