作者简介:李 东(1982—),男,深圳大学副教授、博士.研究方向:2D和3D视觉信息获取与处理,机器人技术及工程应用,嵌入式系统技术.E-mail:lidong@szu.edu.cn
中文责编:英 子; 英文责编:子 兰
DOI: 10.3724/SP.J.1249.2016.05525
针对通用串行总线(universal serial bus, USB)2.0工业相机传输带宽使用接近满载时,出现图像数据丢失现象进行深入分析,提出一个新的整体解决方案,包括3部分:利用帧校验的方式实现图像数据的帧同步,使系统具备容错校正机制; 添加数据缓存模块克服非实时操作系统轮询工作模式对数据传输的影响; 通过数据钳位的方式消除USB 2.0非归零反向编码方式对传输带宽的影响,保证传输带宽的稳定. 在此基础上,研制一款1 280×1 024@30 帧/s的USB 2.0工业相机. 实验结果表明,该相机传输速率可达39 Mbyte/s,实现了接近USB 2.0实际带宽上限的稳定传输,具备图像帧自动纠错功能,解决了传统方案里图像传输丢帧和图像错乱的问题.
Image data loss occurs when the universal serial bus(USB)2.0 transmission bandwidth is close to full load. In this paper, facts caused data loss are analyzed, and a new solution is put forward to avoid data loss for USB 2.0 industrial cameras. The new method includes three parts. Firstly, a frame check mode is established to guarantee image data frame synchronization, which creates a fault-tolerant correction mechanism in the system. Secondly, in order to overcome the influence of non-realtime operating system polling work mode, a data cache module is designed. Thirdly, a data-clamp mechanism is proposed to eliminate the effect on transmission bandwidth via a no return to zero inverse code transfer protocol of USB 2.0. With these steps, the USB 2.0 industrial camera achieves an image capture of 1 280×1 024@30 frame/s, close to the actual bandwidth limit of USB 2.0 with stability and the transmission rate of 39 Mbyte/s, and the problems of image data loss and disorder during transmission in traditional scheme are solved.