raffaeldantas / tesseract-ocr

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

stats_.doc_char_quality is not always initialized in control.cpp #1450

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Using tesseract as a library and in specific input conditions, Valgrind 
indicates that stats_.doc_char_quality is not initialized in control.cpp, Pass 
5:

BOOL8 good_quality_doc =
    ((page_res->rej_count / static_cast<float>(page_res->char_count)) <=
     quality_rej_pc) &&
    (stats_.doc_blob_quality / static_cast<float>(page_res->char_count) >=
     quality_blob_pc) &&
    (stats_.doc_outline_errs / static_cast<float>(page_res->char_count) <=
     quality_outline_pc) &&
    (stats_.doc_char_quality / static_cast<float>(page_res->char_count) >=
     quality_char_pc);

Original issue reported on code.google.com by joao.m.s...@gmail.com on 15 Apr 2015 at 3:19

GoogleCodeExporter commented 8 years ago
Can you please create test case to demonstrate "specific input conditions"?

Original comment by zde...@gmail.com on 17 Apr 2015 at 6:06

GoogleCodeExporter commented 8 years ago
That would be quite complicated, involving closed-source code, etc. Unless I'm 
not seeing another way to do this.

I can however make some experiments on my side.

Original comment by joao.m.s...@gmail.com on 17 Apr 2015 at 6:19