日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Tesseract-OCR 训练过程 V3.02

發(fā)布時間:2025/5/22 编程问答 70 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Tesseract-OCR 训练过程 V3.02 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
軟件: jTessBoxEditor Version 0.9 (30 April 2013) Tesseract-OCR win32 v3.02 with Leptonica 訓(xùn)練步驟: 1.使用jTessBoxEditor,tools->merge_tif,產(chǎn)生tif文件 2.產(chǎn)生box文件 tesseract.exe eng.arial.01.tif eng.arial.01 batch.nochop makebox 3.使用jTessBoxEditor打開,Insert或Delete,添加刪除字符,并通過xywh調(diào)整對應(yīng)的坐票 4.訓(xùn)練(如果遇到不可識別的字符,couldn t find a matching blob,嘗試換位置或調(diào)坐標(biāo)) tesseract.exe eng.arial.01.tif eng.arial.01 nobatch box.train 5.字體預(yù)處理 unicharset_extractor.exe eng.arial.01.box 6.創(chuàng)建font_properties.txt,內(nèi)容為:arial 0 0 0 0 0 7.字體處理 mftraining.exe -F font_properties.txt -U unicharset eng.arial.01.tr 8.cntraining.exe eng.arial.01.tr 9.把unicharset, inttemp, normproto, pffmtable這四個文件加上前綴“eng.arial.01.” 10.combine_tessdata.exe eng.arial.01. 顯示: Combining tessdata files TessdataManager combined tesseract data files. Offset for type 0 is -1 Offset for type 1 is 108 Offset for type 2 is -1 Offset for type 3 is 1660 Offset for type 4 is 327545 Offset for type 5 is 327781 Offset for type 6 is -1 Offset for type 7 is -1 Offset for type 8 is -1 Offset for type 9 is -1 Offset for type 10 is -1 Offset for type 11 is -1 Offset for type 12 is –1 必須確定的是第2、4、5、6行的數(shù)據(jù)不是-1,那么一個新的字典就算生成了。 11.此時目錄下“eng.arial.01.traineddata”的文件拷貝到tesseract程序目錄下的“tessdata”目錄 12. #tesseract.exe test.jpg result -l eng.arial.01 #tesseract.exe a.bmp result2 -l eng.arial.01 指定布局識別方式 tesseract.exe 42.png result2 -l eng.arial.01 -psm 7 布局參數(shù)描述: -psm N Set Tesseract to only run a subset of layout analysis and assume a certain form of image. The options for N are: 0 = Orientation and script detection (OSD) only. 1 = Automatic page segmentation with OSD. 2 = Automatic page segmentation, but no OSD, or OCR. 3 = Fully automatic page segmentation, but no OSD. (Default) 4 = Assume a single column of text of variable sizes. 5 = Assume a single uniform block of vertically aligned text. 6 = Assume a single uniform block of text. 7 = Treat the image as a single text line. 8 = Treat the image as a single word. 9 = Treat the image as a single word in a circle. 10 = Treat the image as a single character.

總結(jié)

以上是生活随笔為你收集整理的Tesseract-OCR 训练过程 V3.02的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。