类号:TP39110710-2012232011专业硕士学位论文复杂背景图像中的文字提取算法研究汪波导师姓名职称茹锋教授梁华刚讲师申请学位级别硕士专业学位类别及领域名称控制工程论文提交日期2014年4月20日论文答辩日期2014年6月9日学位授予单位长安大学ResearchonTextExtractionoftheAlgorithmFromImagewithComplexBackgroudADissertationSubmittedfortheDegreeofMasterCandidate:WangBoSupervisor:Prof.RuFengLecturer.LiangHuagangChang’anUniversity,Xi’an,ChinaI摘要随着互联网和计算机技术的发展,图像随处可见。图像中包含着丰富的信息,文字是图像信息中非常重要的一方面,对图像起着说明和诠释的作用。因此,近年来对图像中文字的识别越来越引起人们的重视。提取和识别图像中的文字对图像分析、智能交通、机器视觉、智能控制等方面有非常重要的意义。而图像中的文字通常是叠加在复杂背景上的,一般的OCR软件很难直接对图像中的文字进行识别,从而使图像中的文字信息不能有效的利用。如何从图像中提取文字成为解决该问题的关键,也成为一个重要的研究课题。本文对复杂背景图像的文字提取主要以静态图像为对象,对于复杂背景图像中的文字定位提出了一种基于形态学和连通域标记算法相结合的方法。首先,利用sobel算法提取边缘;然后对图像进行灰度化、二值化、平滑滤波等一系列处理;最后,先利用形态学的腐蚀、膨胀、开运算和闭运算使文字信息连接在一块,然后利用连通域标记获得候选文字块区域并且根据一定的规则筛选、提取出文字块。实验证明,该方法能迅速、准确的定位文字块。在提取出文字块之后,还需将文字块从复杂的背景中分割出来,使用OSTU算法得到自适应的阈值,得获得干净、清晰的二值图像,接着对文字块内的文字进行单个字符的分割。介绍了投影法和回归式字切分的方法,先采用水平投影进行行切分并获得字符的高度信息,用来估计字符的宽度,以预测下一个字符出现的位置,然后利用回归式字切分进行单个字符的分割从而获得可以直接利用OCR软件识别的字符。实验表明,该方法可以达到比较满意的分割结果。关键词:文字提取、形态学、连通域、投影法、回归式字切分IIAbstractWiththedevelopmentofInternetandcomputertechnology,theimagecanbeseeneverywhere.Imagecontainsawealthofinformationandthetextisveryimportantinformationinit.So,thetextrecognitionintheimagedrawnincreasingattentioninrecentyears.Extractionandrecognitionoftextintheimageforimageanalysis,intelligenttransportation,machinevision,intelligentcontrolandotheraspectsofaveryimportantsignificance.However,textintheimageisusuallysuperimposedonacomplexbackground,thegeneralOCRsoftwareisdifficulttodirectlyidentifythetextintheimagesothattheimageofthetextmessagescannotbeusedeffectively.Howtoextracttextfromtheimagebecomesthekeytosolvingtheproblem,hasalsobecomeanimportantresearchtopic.Inthispaper,complexbackgroundimagetextextractionmainlystaticimagesasobjects,complexbackgroundfortextpositioningisproposedbasedonmorphologyandconnecteddomainlabelingalgorithmisacombinationofmethods.First,usesobelalgorithmtoextracttheedge.Second,doaseriesofprocessingtotheimage,suchasgray,binary,smoothingandsoon.Finally,usethemorphologicalerosion,dilation,openingoperationandclosingoperationtoconnectatextmessage,andthenuseconnectedcomponentlabelingtogetthecandidatetextblockareaandscreenedinaccordancewithcertainrules,extractthetextblock.Experimentsshowthatthemethodcanquicklyandaccuratelylocatethetextblock.Afterextractingablockoftext,thetextblockwillneedtosplitoutfromacomplexbackgroundusingOSTUalgorithmtogetadaptivethreshold,haveaccesstoclean,clearbinaryimage,andthenonthetextinthetextblockwillbeasinglecharactersegmentation.Describestheprojectionmethodandregressionwordsegmentationmethods,firstcarriedoutusingthehorizontalprojectionofthelineandcutthecharacterheightinformationobtainedisusedtoestimatethewidthofthecharacterinordertopredictthelocationofthenextcharacterappears,andthencuttheuseofthewordregressionsub-dividedinordertoobtainasinglecharactercanuseOCRsoftwaretorecognizecharacters.Keywords:textextraction;morphology;connecteddomain;projection;regressionwordsegmentationIII目录第一章绪论..............................................................................................................................11.1课题背景....................................................................................................................11.2复杂背景图像中文字提取简介................................................................................21.3国内外研究现状........................................................................................................31.3.1图像中的文字检测............................................................................................31.3.2图像中的文字分割............................................................................................51.3.3图像中的字符分割............................................................................................61.4本文的主要研究内容................................................................................................71.5论文的组织结构........................................................................................................8第二章文字检测的研究..........................................................................................................92.1本章算法介绍............................................................................................................92.2算法流程..................................................................................................................102.2.1预处理..............................................................................................................102.2.2后处理..............................................................................................................302.3实验结果和分析......................................................................................................312.4本章小结..................................................................................................................34第三章文字分割的研究........................................................................................................353.1文字分割............................................................................