Tesseract 4.x is an old and unsupported version. So it would be nice if you could provide an example code with the public API that causes the read-access violation problem. function AdaptiveClassifierIsEmpty is not part of the public API ( https://github.com/tesseract-ocr/tesseract/tree/main/include/tesseract).
Zdenko št 22. 9. 2022 o 8:42 Darren Morby <[email protected]> napísal(a): > This is in Tesseract 4.01. > > I get a read-access violation in this function in classify.h: > > bool AdaptiveClassifierIsEmpty() const { > return AdaptedTemplates->NumPermClasses == 0; > } > > This function does not check that AdaptedTemplates is nullptr or not > nullptr. It is being called by Tesseract::recog_all_words, which in turn > is being called by TessBaseAPI::Recognize. Is there a function that I > should call to make sure that the Tesseract object is being initialized > correctly? > > I notice that only two functions actually make sure that AdaptedTemplates > is not nullptr: InitForAnalysePage and FindLines(). Should I be calling > one of these functions before Recognize? (InitForAnalysePage curiously > says that "Calls that attempt recognition will generate an error" but I > don't see why.) > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tesseract-ocr/19c511d3-0544-469c-add3-a9ecea3efb68n%40googlegroups.com > <https://groups.google.com/d/msgid/tesseract-ocr/19c511d3-0544-469c-add3-a9ecea3efb68n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/CAJbzG8wByCNxhnBmoHLKASWhwHucj9bpnwGcqUFXFXVK-DG50g%40mail.gmail.com.

