I am using tesseract for OCR, mainly on invoices. However, tesseract requires to specify the language before it starts processing a file.
I thought I am going to perform ocr based on a predefined default language. Then I'd like use the resulting text to check which language is used. If it is not the default language, I process it again in order to get a better result from tesseract.
But how can I implement a language detection algorithm? Is there a C++ library I could use?