

浏览全部资源
扫码关注微信
兰州大学 信息科学与工程学院 光电子与电磁信息研究所, 甘肃 兰州 730000
Received:25 June 2021,
Revised:01 October 2021,
Published:2022-01
移动端阅览
Jun-hong SUO, Guan-mao ZHANG, Xin QIAO, et al. Adaptive real-time video trapezoidal correction system design and implementation based on FPGA[J]. Chinese journal of liquid crystals and displays, 2022, 37(1): 97-105.
Jun-hong SUO, Guan-mao ZHANG, Xin QIAO, et al. Adaptive real-time video trapezoidal correction system design and implementation based on FPGA[J]. Chinese journal of liquid crystals and displays, 2022, 37(1): 97-105. DOI: 10.37188/CJLCD.2021-0170.
针对监控系统中由于摄像机与监控画面不垂直导致显示画面梯形畸变的问题,提出一种自适应实时视频梯形矫正系统的硬件结构设计方案。首先,对每帧画面依次进行灰度变换、边缘检测、形态学开运算等一系列预处理;接着,基于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.
张 铮 , 徐 超 , 任 淑霞 , 等 . 数字图像处理与机器视觉——Visual C++与Matlab实现 , : 2版.北京 人民邮电出版社 , 2014 .
Z ZHANG , C XU , S X REN , 等 . Digital Image Processing and Machine Vision——V isual C++ and Realization of Matlab , : 2nd ed. Beijing Posts & Telecom Press , 2014 .
王 正家 , 钱 峰 , 柯 楠 , 等 . 两步式鱼眼图像畸变校正方法研究 . 现代电子技术 , 2020 . 43 ( 18 ): 146 - 149 . https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202018039.htm https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202018039.htm , .
Z J WANG , F QIAN , N KE , 等 . Research on two-step distortion correction method for fisheye image . Modern Electronics Technique , 2020 . 43 ( 18 ): 146 - 149 . https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202018039.htm https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202018039.htm , .
陈 忠辉 , 唐 晓颖 , 林 志权 , 等 . 畸变图像自适应校正及质量增强算法研究与实现 . 计算机应用 , 2020 . 40 ( S1 ): 180 - 184 . https://www.cnki.com.cn/Article/CJFDTOTAL-JSJY2020S1036.htm https://www.cnki.com.cn/Article/CJFDTOTAL-JSJY2020S1036.htm , .
Z H CHEN , X Y TANG , Z Q LIN , 等 . Research and implementation of adaptive distortion image correction and quality enhancement algorithm . Journal of Computer Applications , 2020 . 40 ( S1 ): 180 - 184 . https://www.cnki.com.cn/Article/CJFDTOTAL-JSJY2020S1036.htm https://www.cnki.com.cn/Article/CJFDTOTAL-JSJY2020S1036.htm , .
彭 金柱 , 孙 贝贝 . 基于低秩特性的鱼眼图像畸变矫正方法 . 现代电子技术 , 2020 . 43 ( 10 ): 148 - 152 . https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202010040.htm https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202010040.htm , .
J Z PENG , B B SUN . Fisheye image distortion correction method based on low-rank characteristic . Modern Electronics Technique , 2020 . 43 ( 10 ): 148 - 152 . https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202010040.htm https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202010040.htm , .
李 华军 , 刘 光宇 , 余 善恩 . 微小管道两相流流动图像畸变校正研究 . 仪器仪表学报 , 2020 . 41 ( 4 ): 239 - 245 . https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202004026.htm https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202004026.htm , .
H J LI , G Y LIU , S E YU . Flow image distortion correction for two-phase flow in micro/mini pipes . Chinese Journal of Scientific Instrument , 2020 . 41 ( 4 ): 239 - 245 . https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202004026.htm https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202004026.htm , .
吴 开兴 , 段 马丽 , 张 惠民 , 等 . 广角图像畸变校正算法的研究与实现 . 计算机应用与软件 , 2014 . 31 ( 11 ): 237 - 240 . DOI: 10.3969/j.issn.1000-386x.2014.11.060 http://doi.org/10.3969/j.issn.1000-386x.2014.11.060 .
K X WU , M L DUAN , H M ZHANG , 等 . Research and implementation of correction algorithm for wide-angle image distortion . Computer Applications and Software , 2014 . 31 ( 11 ): 237 - 240 . DOI: 10.3969/j.issn.1000-386x.2014.11.060 http://doi.org/10.3969/j.issn.1000-386x.2014.11.060 .
张 浩 , 凌 朝东 , 陈 虎 , 等 . 一种基于FPGA的视频几何校正系统设计方案 . 液晶与显示 , 2015 . 30 ( 3 ): 459 - 466 . DOI: 10.3788/YJYXS20153003.0459 http://doi.org/10.3788/YJYXS20153003.0459 .
H ZHANG , C D LING , H CHEN , 等 . Design of video geometric calibration system based on FPGA . Chinese Journal of Liquid Crystals and Displays , 2015 . 30 ( 3 ): 459 - 466 . DOI: 10.3788/YJYXS20153003.0459 http://doi.org/10.3788/YJYXS20153003.0459 .
罗 杰超 , 郭 俊达 , 米 凤文 , 等 . 基于变形目镜和OLED的全景周视成像与显示技术 . 中国光学 , 2020 . 13 ( 4 ): 752 - 759 . https://www.cnki.com.cn/Article/CJFDTOTAL-ZGGA202004014.htm https://www.cnki.com.cn/Article/CJFDTOTAL-ZGGA202004014.htm , .
J C LUO , J D GUO , F W MI , 等 . Panoramic peripheral vision imaging and display technology based on a deformation eyepiece and OLED . Chinese Optics , 2020 . 13 ( 4 ): 752 - 759 . https://www.cnki.com.cn/Article/CJFDTOTAL-ZGGA202004014.htm https://www.cnki.com.cn/Article/CJFDTOTAL-ZGGA202004014.htm , .
杨 帆 , 刘 连圣 , 翟 祚盼 , 等 . 发散扫描模式下OCT图像畸变分析与矫正 . 光学 精密工程 , 2021 . 29 ( 8 ): 1968 - 1975 . https://www.cnki.com.cn/Article/CJFDTOTAL-GXJM202108022.htm https://www.cnki.com.cn/Article/CJFDTOTAL-GXJM202108022.htm , .
F YANG , L S LIU , Z P ZHAI , 等 . Distortion analysis and reconstruction of OCT image in sector scan mode . Optics and Precision Engineering , 2021 . 29 ( 8 ): 1968 - 1975 . https://www.cnki.com.cn/Article/CJFDTOTAL-GXJM202108022.htm https://www.cnki.com.cn/Article/CJFDTOTAL-GXJM202108022.htm , .
向芝慧. 基于Harris算法的梯形畸变校正快速视频拼接技术研究[D]. 成都: 西南交通大学, 2018.
XIANG Z H. Research on fast video splicing with trapezoidal distortion correction based on Harris algorithm[D]. Chengdu: Southwest Jiaotong University, 2018. (in Chinese)
张宇. 数字图像梯形畸变校正算法研究与视频实时校正应用[D]. 合肥: 安徽大学, 2014.
ZHANG Y. The research on digital image keystone correction algorithm and application of video real-time correction[D]. Hefei: Anhui University, 2014. (in Chinese)
陈 虎 , 凌 朝东 , 张 浩 , 等 . 基于FPGA的实时彩色图像边缘检测算法的实现 . 液晶与显示 , 2015 . 30 ( 1 ): 143 - 150 . DOI: 10.3788/YJYXS20153001.0143 http://doi.org/10.3788/YJYXS20153001.0143 .
H ZHANG , C D LING , H ZHANG , 等 . Real-time FPGA-based implementation of color image edge detection algorithm . Chinese Journal of Liquid Crystals and Displays , 2015 . 30 ( 1 ): 143 - 150 . DOI: 10.3788/YJYXS20153001.0143 http://doi.org/10.3788/YJYXS20153001.0143 .
商 尔科 , 李 健 , 安 向京 , 等 . 基于FPGA的实时Hough变换 . 计算机工程 , 2010 . 36 ( 16 ): 161 - 163 . DOI: 10.3969/j.issn.1000-3428.2010.16.058 http://doi.org/10.3969/j.issn.1000-3428.2010.16.058 .
E K SHANG , J LI , X J AN , 等 . Real-time Hough transform based on FPGA . Computer Engineering , 2010 . 36 ( 16 ): 161 - 163 . DOI: 10.3969/j.issn.1000-3428.2010.16.058 http://doi.org/10.3969/j.issn.1000-3428.2010.16.058 .
杨 春勇 , 徐 杰 , 杨 继成 , 等 . 基于时间编码结构光的投影自动校正方法 . 黑龙江大学自然科学学报 , 2011 . 28 ( 6 ): 858 - 862 . DOI: 10.3969/j.issn.1001-7011.2011.06.023 http://doi.org/10.3969/j.issn.1001-7011.2011.06.023 .
C Y YANG , J XU , J C YANG , 等 . An automatic correction method for projection based on time encoding structured light . Journal of Natural Science of Heilongjiang University , 2011 . 28 ( 6 ): 858 - 862 . DOI: 10.3969/j.issn.1001-7011.2011.06.023 http://doi.org/10.3969/j.issn.1001-7011.2011.06.023 .
0
Views
103
下载量
1
CSCD
Publicity Resources
Related Articles
Related Author
Related Institution
京公网安备11010802024621