I can extract the text from an image from tesseract using the Python binding PyTesseract as follows:
tesseract
Python
PyTesseract
import cv2 import