UVC still image capture

来源:互联网 发布:android webview优化 编辑:程序博客网 时间:2024/05/23 22:07
摄像头支持的still image capture有三种方式:
still image capture method 1:
当拍照事件触发以后,摄像头直接从当前预览的video pipe中抓一帧图像作为still image,因此hardware不会中断和改变video stream。采用此方式进行静态拍照的话拍出来的图像的resolution和format总是和当前video stream是一致的。

still image capture method 2:
当拍照事件触发以后,驱动程序会停掉当前的video stream,然后重新根据application所选择的静态图片的图像的resolution和format和hardware沟通并重新分配usb带宽,发送VS_STILL_IMAGE_TRIGGER_CONTROL 的命令给hardware,然后准备着接收still image data。Device hardware这边接到命令后将still image data通过通过video pipe送出,并在这一帧的payload header中标记为still。当host driver接收到still image后就会恢复到拍照之前video的alternate setting,重新打开video stream。这种情况下在拍照时候有video 有一个明显停顿的动作。

still image capture method 3:
前两种方式都是只通过从video pipe传输still image data。这种方式的话still image data是通过专用的usb的bulk传输方式的still image pipe传输;因此video stream就不会被中断。
原创粉丝点击