Similar question asked that looks helpful: How to extract text from image using openCV or OCR tesseract
The fastest way (maybe not the ideal) is to implement the following steps:
- Use OpenCV to detect the paper sheet or the text area;
- Perform any processing necessary to deskew the image (if necessary);
- Save the image to disk as TIFF;
- and finally, call Tesseract cmd-line application passing the TIFF image as parameter to start the text recognition process.