mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-01 07:59:05 +08:00
Merge pull request #1964 from stweil/fix
Avoid crash with --psm 0 and LSTM traineddata
This commit is contained in:
commit
ab39adbcab
@ -1541,6 +1541,10 @@ void Classify::DoAdaptiveMatch(TBLOB *Blob, ADAPT_RESULTS *Results) {
|
||||
&bl_features);
|
||||
if (sample == nullptr) return;
|
||||
|
||||
// TODO: With LSTM, static_classifier_ is nullptr.
|
||||
// Return to avoid crash in CharNormClassifier.
|
||||
if (static_classifier_ == nullptr) return;
|
||||
|
||||
if (AdaptedTemplates->NumPermClasses < matcher_permanent_classes_min ||
|
||||
tess_cn_matching) {
|
||||
CharNormClassifier(Blob, *sample, Results);
|
||||
|
Loading…
Reference in New Issue
Block a user