There are many libraries for extracting text from images. You can check my answer
To limit OCR to numbers only, the Tesseract SDK provides a method of both blacklisting and whitelisting .
_tesseract->SetVariable("tessedit_char_whitelist", "0123456789");
Using this method, you can restrict the recognition of only numbers.
Hope this helps.
Nishant tyagi
source share