The invention discloses a method for layout analysis and character recognition of full convolution neural network. Firstly, the image is preprocessed by using image graying, binarization, corrosion and expansion, and detection of connected domain, and then the result is post-processed by using threshold segmentation to detect the text area of the image. Secondly, the gray projection method and threshold segmentation are used to carry out text segmentation. Finally, the full convolution neural network character recognition model is used for character recognition. The recognition rate of the character recognition model disclosed by the invention can reach 90%94%, the accuracy rate is superior to the traditional single character recognition model, and the recognition speed is superior to the CRNN character recognition model. The method of the invention effectively improves the layout recognition and character recognition algorithm for architectural drawings, improves the efficiency of expert examination of drawings, and increases the use value of architectural drawings.
【技术实现步骤摘要】
一种全卷积神经网络的图纸版面分析与文字识别方法
本专利技术属于文字识别领域,特别涉及一种全卷积神经网络的图纸版面分析与文字识别方法。
技术介绍
本专利技术中的基于全卷积神经网络的针对建筑图纸图像的文字识别方法对建筑图纸审图专家的图纸审查有重要的作用和意义。在面对一个建筑图纸进行文字识别的时候,需要解决图像预处理、版面分析、识别模型搭建等工作。冯万利,朱全银等人已有的研究基础包括:WanliFeng.Researchofthemestatementextractionforchineseliteraturebasedonlexicalchain.InternationalJournalofMultimediaandUbiquitousEngineering,Vol.11,No.6(2016),pp.379-388;WanliFeng,YingLi,ShangbingGao,YunyangYan,JianxunXue.Anovelflameedgedetectionalgorithmviaanovelactivecontourmodel.InternationalJournalofHybridInformationTechnology,Vol.9,No.9(2016),pp.275-282;刘金岭,冯万利.基于属性依赖关系的模式匹配方法[J].微电子学与计算机,2011,28(12):167-170;刘金岭,冯万利,张亚红.初始化簇类中心和重构标度函数的文本聚类[J].计算机应用研究,2011,28(11):4115-4117;刘金岭,冯万利,张亚红.基于重新 ...
【技术保护点】
1.一种全卷积神经网络的图纸版面分析与文字识别方法,其特征在于,所述方法包括:(1)定义图纸图像为image,对image进行缩放、滤波、二值化、腐蚀与膨胀、连通域检测以及阈值过滤来进行文字区域切分,得到文字区域图像集result_boxes={box_image1,box_image2,...}中,其中box_image={box_x,box_y,box_width,box_height};(2)定义循环变量box_image用来遍历result_boxes,对box_image进行灰度图投影来进行文字区域行切分,得到行切分结果集result_lines={line_image1,line_image2,...},其中line_image={line_x,line_y,line_width,line_height};(3)定义循环变量line_image用来遍历result_boxes,对line_image使用基于全卷积神经网络的文字识别模型进行文字识别并将结果整合为文字结果集result_word_arr={line1,line2,...},其中的line={word1,word ...
【技术特征摘要】
1.一种全卷积神经网络的图纸版面分析与文字识别方法,其特征在于,所述方法包括:(1)定义图纸图像为image,对image进行缩放、滤波、二值化、腐蚀与膨胀、连通域检测以及阈值过滤来进行文字区域切分,得到文字区域图像集result_boxes={box_image1,box_image2,...}中,其中box_image={box_x,box_y,box_width,box_height};(2)定义循环变量box_image用来遍历result_boxes,对box_image进行灰度图投影来进行文字区域行切分,得到行切分结果集result_lines={line_image1,line_image2,...},其中line_image={line_x,line_y,line_width,line_height};(3)定义循环变量line_image用来遍历result_boxes,对line_image使用基于全卷积神经网络的文字识别模型进行文字识别并将结果整合为文字结果集result_word_arr={line1,line2,...},其中的line={word1,word2,...},其中word为字符。2.根据权利要求1所述的一种全卷积神经网络的图纸版面分析与文字识别方法,其特征在于,所述步骤(1)中对图纸图像进行文字识别的具体步骤如下:(1.1)定义图纸像素集image={C1,C2,...},其中C={R,G,B},使用平均法GC=avg(R,G,B)进行灰度化得到灰度化像素集gray_image={GC1,GC2,...};(1.2)对gray_image进行中值滤波,得到滤波像素集blur_image={BC1,BC2,...};(1.3)对blur_image使用OTSU方法进行二值化,以127为分割,前景为0,背景为255,得到二值化像素集threshold_image={TC1,TC2,...},其中TC∈{0,255};(1.4)对threshold_image依次进行滤波核分别为[11,11]、[5,5]、[15,15]的全一矩阵的4次膨胀、3次腐蚀、4次膨胀后得到形态处理后像素集erode_image={EC1,EC2,...};(1.5)对erode_image进行连通域检测,得到检测结果集boxes={box_image1,box_image2,...},其中box_image={box_x,box_y,box_width,box_height};(1.6)定义循环变量box_image用来遍历boxes;(1.7)定义文字区域切分结果集result_boxes={box1,box2,...};(1.8)对boxes中的每一图像块box进行检测,如果box的宽度大于1800,则转到步骤(1.9)以处理粘在一起的文字图像块,否则直接放入result_boxes;(1.9)将box_image膨胀3次,滤波核为形状为[4,4]的全一矩阵,得到像素集erode_box_image={EBC1,EBC2,...};(1.10)对erode_box_imge的x轴方向进行灰度图投影得到投影集x_arr={x_sum1,x_sum2,...};(1.11)输出文字区域结果集result_boxes。3.根据权利要求1所述的一种全卷积神经网络的图纸版面分析与文字识别方法,其特征在于,所述步骤(2)中对文字图像块进行文字区域行切分的具体步骤如下:(2.1)定义循环变量line_image对result_lines进行遍历,对line_image进行灰度化,得到灰度化像素集g...
【专利技术属性】
技术研发人员:朱全银,许梦杰,冯万利,高尚兵,周泓,范家宽,潘阳,
申请(专利权)人:淮阴工学院,
类型:发明
国别省市:江苏,32
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。