摘要
针对传统相机采用USB2.0或者图像采集卡(CameraLink卡)等接口技术传输图像数据,存在的传输速度慢、应用不方便及应用局限性大等问题,提出一种基于USB3.0的接口技术,实现相机实时图像采集和实时显示。该方法对USB3.0内核的GPIF接口状态机进行编程设计,实现GPIF接口识别帧同步和行同步信号,采用两个Socket Ping-Pong切换来搬运图像数据,再经过DMA通道将数据传送到USB3.0端口,上位机通过多线程和并行排队等候数据包的方法快速取出端口数据,实现图像实时采集和显示。实际证明,该方法可以对不同帧频、不同图像大小的相机实时图像进行采集和显示,且不丢帧和数据,最高数据传输速度可达300MB/s。
For traditional camera which using USB2.0 or image acquisition card(CameraLink card)interface technologies for image data transfer,there are many problems such as slow transfer speed and application limitations.An interface technology based on USB3.0is presented,by which camera image real-time acquisition and real-time display can be achieved.In this method state machine of GPIF interface of USB3.0is programmed,by which frame synchronization and horizontal synchronization signals can be identified by GPIF interface.Then two Sockets are switched by Ping-Pong method to carry image data,and this data will be sent to USB3.0 port through DMA channel.Finally by using multi-threading and parallel waiting method,the port data can be quickly got so as to realize real-time display of images.Experiments show that this method can be used for cameras with different frame rates and different image sizes to make real-time acquirement and display of images without frame or data lost,and the maximum transfer speed can be up to 300Mb/s.
出处
《半导体光电》
CAS
北大核心
2015年第5期824-827,852,共5页
Semiconductor Optoelectronics