jacklicn / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

Assert failed:in file ..\training\mftraining.cpp, line 281 #586

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
mftraining is crashing when executed like this below with tesseract301. Full 
set of files https://github.com/ssbarnea/tesseract-sample

mftraining -F font_properties -U unicharset -O eng.unicharset 
eng.counter.exp0.tr eng.counter.exp1.tr                           
Failed to load font_properties                                                  

Reading eng.counter.exp0.tr ...                                                 

counter has no defined properties.                                              

!"Missing font_properties entry is a fatal error!":Error:Assert failed:in file 
..\training\mftraining.cpp, line 281  

Original issue reported on code.google.com by sorin.sb...@gmail.com on 24 Nov 2011 at 6:39

GoogleCodeExporter commented 9 years ago
Yes, font_properties is missing but this is not an excuse for a crash.

Original comment by sorin.sb...@gmail.com on 24 Nov 2011 at 6:46

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3#font_properties_(
new_in_3.01)

Original comment by zde...@gmail.com on 24 Nov 2011 at 8:12

GoogleCodeExporter commented 9 years ago
Do I have to repeat that this gives a CRASH ! .... on Windows it will open the 
Close/Debug dialog and block  the process. This is something unacceptable, 
especially for automation.

Original comment by sorin.sb...@gmail.com on 24 Nov 2011 at 9:30

GoogleCodeExporter commented 9 years ago
Unacceptable is not following instruction ;-).

There is reason why there is assert [1]. If you do not like it - read that 
article there are an instructions how to avoid it. But than do not post issues, 
that tesseract produced wrong output, not working language data etc...

If you do not like CRASH you should call to Microsoft or compiler developers 
(because on linux there will be crash too).

[1] http://msdn.microsoft.com/en-us/library/9sb57dw4(v=VS.90).aspx

Original comment by zde...@gmail.com on 25 Nov 2011 at 7:35

GoogleCodeExporter commented 9 years ago
did you create the font_properties file ?
if yes
so the solution is 
you have to rename your eng. counter.exp0.tr in to <font>.tr
and it work for me (i do have 1 tr file in my folder such as 
handwritten.pich.01.tr)

ex.
handwritten.pich.01.tr -> pich.tr

and the font_properties file is 
pich 1 0 0 0 0

in your case , you have 2 tr files right ?
and i didn't know how to combine it too - -''

best regard
pich

Original comment by fchopin....@gmail.com on 17 Dec 2011 at 9:43

GoogleCodeExporter commented 9 years ago
Someone resolved this problem? I met this error too, and I used the full name, 
error msg is as below:

Reading test.kkk.001.tr ...
test.kkk.001 has no defined properties.
!"Missing font_properties entry is a fatal error!":Error:Assert failed:in file 
..\training\mftraining.cpp, line 281

And I had read the source code, but can't get that well, maybe this section 
code can not work as the normal way:

    if (font_dot != NULL && exp_dot != NULL && font_dot != exp_dot) {
      short_name = new_dup(font_dot + 1);
      short_name[exp_dot - font_dot - 1] = '\0';
    }

Could somebody help ?

thanks very much!

Original comment by mchun.w...@gmail.com on 9 Apr 2012 at 7:47

GoogleCodeExporter commented 9 years ago
I'm facing this problem too. Anybody resolve it? This is holding up a project 
of mine. I've basically been trying to use mftrainig with the sample arial file 
they have posted in the downloads.

Is the font_properties  file supposed to have a single line in it? The 
documentation would suggest multiple, perhaps one line per tr file? Or is it 
per character entry in the tr file? What is it exactly?

Original comment by Jaime.X....@gmail.com on 20 Apr 2012 at 4:55

GoogleCodeExporter commented 9 years ago
Well if you do not post your files - nobody will help you.
If you do not follow instruction than it is your problem ;-)

Original comment by zde...@gmail.com on 20 Apr 2012 at 6:49

GoogleCodeExporter commented 9 years ago
Comment 5 worked for me finally

Original comment by Sandeep....@gmail.com on 9 Jul 2012 at 9:49

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/tesseract-ocr/issues/detail?id=586#c5 
helps

Original comment by straltes...@gmail.com on 7 Jan 2013 at 9:28