• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2022, Vol. 44 ›› Issue (10): 1795-1803.

• 图形与图像 • 上一篇    下一篇

基于边缘检测的快速纸张检测方法

徐琨,赵启雯,徐源,柳有权   

  1. (长安大学信息工程学院,陕西 西安 710021)
  • 收稿日期:2021-05-12 修回日期:2021-06-24 接受日期:2022-10-25 出版日期:2022-10-25 发布日期:2022-10-28
  • 基金资助:
    中国载人航天工程办公室预研项目(030101)

A fast paper edge detection method based on cross-layer feature fusion

XU Kun,ZHAO Qi-wen,XU Yuan,LIU You-quan   

  1. (School of Information Engineering,Chang’an University,Xi’an 710021,China)
  • Received:2021-05-12 Revised:2021-06-24 Accepted:2022-10-25 Online:2022-10-25 Published:2022-10-28

摘要: 结合普通纸笔交互方式对纸张检测的实时性和鲁棒性的要求,提出了一种基于边缘检测的快速纸张检测方法。在边缘检测阶段,提出了跨层特征融合的快速纸张边缘检测方法。在HED主干网上添加线性瓶颈逆残差块和融入高效通道注意力的B-ECA块,大幅度减少了参数量,增加了显著特征的权重;分阶段融合各阶段各层特征,保留了更多的边缘特征;对高阶段特征上采样,并与低阶段特征进行跨层特征融合,解决了边缘模糊的问题。在自建的MPDS数据集上进行训练和测试,相较于HED方法,提出的纸张边缘检测方法在ODS和OIS指标上分别提高了8.1%和6.6%,检测速度由22.08 fps提高到了39.02 fps。在纸张提取阶段,提出了基于纸张结构约束的纸张提取方法。依次对纸张边缘进行基于非极大值抑制的边缘细化、直线检测与筛选、结构约束的纸张顶点提取,最终提取出只包含纸张的图像。实验结果表明,在各种复杂桌面环境及遮挡情况下,提出的纸张提取方法均可以快速、准确地提取完整的纸张图像,可以为普通纸笔交互方法提供交互基础。

关键词: 纸张边缘检测, HED, 通道注意力, 跨层特征融合, 非极大值抑制

Abstract: Combined with the real-time and robust requirements of paper detection in the common paper-pen interaction, a fast paper detection method based on edge detection is proposed. In the edge detection stage, a fast paper edge detection method based on cross-layer feature fusion is advanced.  The linear bottleneck inverted residual blocks and efficient channel B-ECA blocks are added to the HED backbone, which greatly reduce the numbers of parameters and increase the weight of salient features. The features of all stages and all layers are fused in order to retain the more edge features. The high-level features are upsampled and cross-layer fused with the low-level features to solve the problem of edge blur. Training and testing on the self-made MPDS data set shows that, compared with the original HED method, the proposal increases the ODS and OIS by 8.1% and 6.6% respectively, and improves the detection speed from 22.08 FPs to 39.02 FPS. In the paper extraction stage, a paper extraction method based on the paper structure is proposed. After thinning the paper edge based on non-maximum suppression, detection and filtering the line, and extraction paper vertex based on structural constraints, the image containing only paper is extracted. The experimental results show that the paper extraction method can quickly and accurately extract the entire paper image in various complex desktop environments and occlusion situations, which provides an interaction basis for the common paper-pen interaction method.

Key words: paper edge detection, holistically-nested edge detection(HED), channel attention, cross-layer fusion, non-maximum suppression(NMS) ,