mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-07 09:52:40 +08:00
Fixed crash on debugging classifier with a shapetable present
This commit is contained in:
parent
4598061324
commit
d91df9856b
@ -69,8 +69,9 @@ int TessClassifier::DisplayClassifyAs(
|
|||||||
const TrainingSample& sample, Pix* page_pix, int unichar_id, int index,
|
const TrainingSample& sample, Pix* page_pix, int unichar_id, int index,
|
||||||
PointerVector<ScrollView>* windows) {
|
PointerVector<ScrollView>* windows) {
|
||||||
int shape_id = unichar_id;
|
int shape_id = unichar_id;
|
||||||
if (GetShapeTable() != NULL)
|
// TODO(rays) Fix this so it works with both flat and real shapetables.
|
||||||
shape_id = BestShapeForUnichar(sample, page_pix, unichar_id, NULL);
|
// if (GetShapeTable() != NULL)
|
||||||
|
// shape_id = BestShapeForUnichar(sample, page_pix, unichar_id, NULL);
|
||||||
if (shape_id < 0) return index;
|
if (shape_id < 0) return index;
|
||||||
if (UnusedClassIdIn(classify_->PreTrainedTemplates, shape_id)) {
|
if (UnusedClassIdIn(classify_->PreTrainedTemplates, shape_id)) {
|
||||||
tprintf("No built-in templates for class/shape %d\n", shape_id);
|
tprintf("No built-in templates for class/shape %d\n", shape_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user