摘要
针对监控系统中由于摄像机与监控画面不垂直导致显示画面梯形畸变的问题,提出一种自适应实时视频梯形矫正系统的硬件结构设计方案。首先,对每帧画面依次进行灰度变换、边缘检测、形态学开运算等一系列预处理;接着,基于Hough变换提取画面中梯形畸变的轮廓;然后,根据梯形畸变轮廓确定四对映射点坐标,并运用连接点法计算矫正参数;最后,运用灰度插值法得到矫正图像。整个过程利用流水线和乒乓缓存结构对算法进行了优化,利用视频时序中的场消隐时间进行计算,在大幅减少硬件资源消耗的同时提高了算法效率,并在ALINX AX7103 FPGA硬件开发平台上加以实现。实验结果表明在视频分辨率为640×480、刷新率为60 Hz的情况下,系统能够很好地矫正梯形畸变范围在±30°以内的监控画面,矫正精度为1°,基本满足监控系统的自适应性、实时性等要求。
Aiming at the problem of trapezoidal distortion of the displayed picture due to the fact that the camera is not perpendicular to the monitoring picture in the monitoring system,a hardware structure design of an adaptive real-time video keystone correction system is proposed.Firstly,a series of preprocessing such as gray scale transformation,edge detection,and morphological opening operation are carried out in sequence for each frame.Then,based on the Hough transform,the outline of the trapezoid distortion in the picture is extracted.After that,four pairs of mapping point coordinates are determined according to the trapezoidal distortion contour and the connection point method is used to calculate the correction parameters.Finally,the gray-scale interpolation method is used to obtain the corrected image.The whole process uses pipeline and ping-pong buffer structure to optimize the algorithm,and uses the vertical blanking time in the video sequence to calculate,which greatly reduces the hardware resource consumption and improves the algorithm efficiency.It is implemented on the ALINX AX7103 FPGA hardware development platform.The experimental results show that when the video resolution is 640×480 and the refresh rate is 60 Hz,the system can correct the monitoring picture with the trapezoidal distortion range within±30°,and the correction accuracy is 1°.Basically,the system can meet the self-adaptability and real-time requirements of the monitoring system.
作者
索军红
张冠茂
乔鑫
赵汉卿
SUO Jun-hong;ZHANG Guan-mao;QIAO Xin;ZHAO Han-qing(Institute of Optoelectronics and Electromagnetic Information, School of Information Science and Engineering, Lanzhou University, Lanzhou 730000, China)
出处
《液晶与显示》
CAS
CSCD
北大核心
2022年第1期97-105,共9页
Chinese Journal of Liquid Crystals and Displays
基金
国家重点研发计划(No.2019YFA0405403)
中央高校基本科研基金(No.lzujbky-2019-ct06)
兰州大学创新创业计划项目(No.cxcy202002)。