Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my project,we need use OCR ,so I download some traineddata files from googole'code.But the result which they callback for me almost wrong.So I think I need do my traineddata.Why this traineddata which was created by myself does not work on android?Thx your help.
Add:
Thx to Richard MacCutchan'help first.Let me show more details about my question.
step one,I debug my app on OCR'project.Do it like this:
Java
TessBaseAPI baseApi = new TessBaseAPI();
  baseApi.init(getSDPath(), language)

Here, the field of 'language' is 'chi_sim',and I'm sure that I replace the file of chi_sim.traineddata to my
chi_sim.traineddata.However the result is so bad -my app crash.
My chi_sim.traineddata was produced step by step like this :
1.Create chi_sim.font.exp0.tif file.
2.Execute tesseract.exe chi_sim.font.exp0.tif chi_sim.font.exp0 batch.nochop makebox ,then get chi_sim.font.exp0.box file.
3.create font_properties file.include :
font 0 0 0 0 0
4.create a bat about :
JavaScript
rem font_properties

echo Run Tesseract for Training..
tesseract.exe chi_sim.font.exp0.tif chi_sim.font.exp0 nobatch box.train

echo Compute the Character Set..
unicharset_extractor.exe chi_sim.font.exp0.box
mftraining -F font_properties -U unicharset -O chi_sim.unicharset chi_sim.font.exp0.tr

echo Clustering..
cntraining.exe chi_sim.font.exp0.tr

echo Rename Files..
rename normproto chi_sim.normproto
rename inttemp chi_sim.inttemp
rename pffmtable chi_sim.pffmtable
rename shapetable chi_sim.shapetable

echo Create Tessdata..
combine_tessdata.exe chi_sim.
pause

5.execute this bat step 4,and I'm sure there no any mistake where this bat execute .
In the end,my engilish is not good . If grammar was wrong ,please point it.Thx your help.
Posted
Updated 12-Aug-14 3:31am
v3
Comments
HanMoLingfeng 11-Aug-14 5:50am    
Sorry,this is the link;https://drive.google.com/file/d/0B-vhfZpi-_TtTUxVc251dGlsMVU/edit?usp=sharing
Richard MacCutchan 11-Aug-14 6:33am    
You need to provide much more detail if you want help. And please do not expect people to download your project and try to figure out what is wrong.
HanMoLingfeng 11-Aug-14 23:38pm    
Sorry,should I upload some pictures about the steps which I create this file?Thx your help.
Richard MacCutchan 12-Aug-14 2:54am    
No, you need to provide a detailed explanation of your problem. Please use the Improve question link and explain what your code is doing and what errors you are seeing.
HanMoLingfeng 12-Aug-14 6:43am    
Hi,guy . Could you give me some E-mails which maybe help me about this question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900