上海交通大学硕士学位论文钢厂钢坯批次号识别系统设计姓名:张小军申请学位级别:硕士专业:模式识别与智能系统指导教师:胡福乔20090101IOCRotsuNiblackIIZoneBPIIIBatchNumberofBilletsRecognitionSystemDesignAbstractionCharacterrecognitionisoneofthemostimportantapplicationincomputervision.CharacterrecognitionplayagreatroleinvariousOCRsystems,LPRsystemsandsoon.Batchnumberofbilletsrecognitionsystemisyetanotherapplicationofcharacterrecognition.Batchnumberofbilletsrecognitionreferstoautomaticacquisitionofbilletimagesandrecognitionofbatchnumberusingrelatedtechniquesincomputervision.Toincreasethedegreeofautomationandreducethelaborintensityofworkerinrollingmills,itisnecessarytoestablishbathnumberofbilletsrecognitionsystem.Batchesofsteelbilletareusedtoindentifyfurnace,productiondateandsoon.Thebatchnumbercanbeusedtotrackthebilletinthewholeprocessofproductionandtransportation.Thisarticlewasbasedontheapplicationdescribedabove.Somesimilarapplicationsarenoticedinthecomputervision.Thisarticlefirstcomparedtheautomaticlicenseplaterecognitionsystemandbatchnumberofbilletsrecognitionsystem,andthengaveanoverallframeworkofbatchesIVrecognitionsystem.Threetechniquesareconsideredimportantinthebatchesnumberrecognitionsystem:binarization,charactersegmentationandcharacterrecognition.Thisarticlefirstdiscussedvariousglobalthresholdbinarizationalgorithmsandlocaladaptivethresholdbinarizationalgorithms,andthenacombinationofOtsuglobalthresholdbinarizationandNiblacklocaladaptivethresholdbinarizationwasproposed.Thenthisarticlediscussedtwocommonlyusedcharactersegmentationalgorithm:projectionanalysisandconnectedcomponentsanalysis.Basedonresearchofthosetwosegmentationalgorithms,anewsegmentationalgorithmwasproposed,whichcombinedprojectionanalysisandconnectedcomponentsanalysistogethertogetabetterresult.Inthefollowingchapter,thisarticlediscussedtwowidelyusedcharacterrecognitionalgorithm:templatematchandneuralnetwork.Thenthisarticlefocusedonhowtochoosethebestfeaturetodescribethosecharacterstoberecognized.Atlast,projectionfeaturewaschosenastheglobalfeatureandZonefeatureasthelocalfeature.AthreelayerBPartificialneuralnetworkwastrainedtorecognizecharactersdescribedbythosetwokindoffeatures.Inthelastpartofthisarticle,testresultandsometestresultanalysiswerepresentedtodemonstratethealgorithmproposedabove,whichprovedtohavepracticalutility.VKeywords:batchnumberofbilletrecognition,binarization,charactersegmentation,BPneuralnetwork,characterrecognition2009115200911520091151AOI[6]ERPERPERPERP[1]OSDI[2][3][4][5]2[1]NOtsu[7]Niblack[9]BP342.1ERPERPERPERPOSDIERPERPa)b)c)d)e)52.22-1EthernetERPDIERPERPEthernet2-1Fig2-1Logicstructureofbatchnumberofbilletsrecognitionsystem62-221Ethernet1324SwichImageProcessorWorkstationERPworkstationConverteru1x2x1*/*P-282-2Fig2-2Physicalstructureofbatchnumberofbilletsrecognitionsystem2-21IP661/4''CCD123.8-46mm1000M21.72.3.4.5.ERP34ERP5ERP2.32-38ERP2-3Fig2-3Flowchartofbatchesrecognition2.492.4.1[2][5]2.4.2102.4.3[2][3][4][5]12312313112.4.4knn[23][17][18][19]svm[21][22]GoogleOCRTesseractBP123.11.2.3.Niblack3.2Otsu[7]0110Bernsen[8]ChowandKaneko[11]Niblack[9]133.2.1OtsuOtsu[7]NL)1,,2,1,0(−LLiin∑−==10LiinN(3.1)NnPii=(3.2)0P1Pi1L0ii≥=∑−=(3.3)t0C1C()t2Bσt*t()t2Bσ()(){}ttBLtB210*2maxσσ−≤≤=(3.4)()()()[]()()[]2T112T002Btttttµµωµµωσ−+−=(3.5)∑−==1L1iiTiPµ(3.6)()∑==t0iiiPtµ(3.7)()∑==t0ii0Ptω(3.8)()()t1t01ωω−=(3.9)14()()()ttt00ωµµ=(3.10)()()()t1tt0T1ωµµµ−−=(3.11)()t0ω()t1ω0C1C()t0µ()t1µ0C1COtsu3-1(b)Otsu3-1(a)3-1(a)2*123-2(a)Otsu3-2(b)N8(a)(b)3-1(a)(b)OtsuFig3-1(a)Originalimage(b)Otsubinarizationresult15(a)(b)3-2(a)(b)OtsuFig3-2(a)Enhancedimage(b)Otsubinarizationresult3.2.2BernsenBernsen[8]()y,xf()y,x()y,xb()y,xWxyP()y,x()()1W21W2+×+Bernsen1()()()()()2y,xfminy,xfmaxy,xTxyxyPy,xPy,x+=∈∈(3.12)2()()()()()≥=y,xTy,xf1y,xTy,xf0y,xb(3.13)Bernsenghost3-3b3-3aBernsenBernsen163-3(b)Bernsen3-3(a)Bernsen3-4(b)3-4(a)BernsenBernsen(a)(b)3-3(a)(b)BernsenFig3-3(a)Originalimage(b)Bernsenbinarizationresult17(a)(b)3-4(a)(b)BernsenFig3-4(a)Enhancedimage(b)Bernsenbinarizationresult3.2.3NiblackNiblack[9]()y,xf()y,x()y,xb()y,xWxyP()y,x()()1W21W2+×+Niblack1)(),(,)(,)Txymxyksxy=+⋅(3.14)(,)mxy(,)sxy2)18()()()()()≥=y,xTy,xf1y,xTy,xf0y,xb(3.15)WW15*150.2k=3-5(b)Niblack3-5(a)NiblackBernsen3-6(b)3-6(a)Niblack(a)(b)3-5(a)(b)BernsenFig3-5(a)Originalimage(b)Bernsenbinarizationresult19(a)(b)3-6(a)(b)BernsenFig3-6(a)Enhancedimage(b)Bernsenbinarizationresult3.3[13]AB(StructureElement)BA(dilation)⊕(erosion)ABnEAB20{|,,}nABcEcabaAbB⊕=∈=+∈∈(4.1):ABnnEABA,}{|nEBccBbAb+∈∀∈=∈(4.2)()()()OpeningfBf=oBB⊕(4.3)ClosingBfBf⊕=•B(4.3)()()3*33-7(b)3-7(a)21(a)(b)3-7(a)(b)Fig3-7(a)Binarizedimage(b)Morphedimage3.422NiblackOtsu3-8Fig3-8Flowchartofbinarization3-8Niblack1otsu2123-93-103-113-9(e)3-10(e)3-11(e)3-10(e)43-9(e)2233-9(a)(b)(c)Otsu(d)Niblack(e)Fig3-9(a)Originalimage(b)Enhancedimage(c)Otsubinarizationresult(d)Niblackbinarizationresult(e)Finalresult243-10(a)(b)(c)Otsu(d)Niblack(e)Fig3-10(a)Originalimage(b)Enhancedimage(c)Otsubinarizationresult(d)Niblackbinarizationresult(e)Finalresult253-11(a)(b)(c)Otsu(d)Niblack(e)Fig3-11(a)Originalimage(b)Enhancedimag