GithubHelp home page GithubHelp logo

extracting-text-from-images-with-tesseract-ocr's Introduction

Extracting-text-from-images-with-Tesseract-OCR

Tesseract OCR using Python for Extracting text from images

Overview

extracting text from image using Tesseract ocr image can be like -screenshot -printed page photo -scanned image -camera capture image -window or any other application error message popup screenshot etc (NOTE:input image should not blurry or noisy) for recognize or read text you need to follow these steps -first you should have knowledge of python if not then you need to first watch our video “Python install and helloworld program Tutorial” url : https://youtu.be/oTEf-fij-9g

-download and install tesseract Ocr Library https://github.com/UB-Mannheim/tesseract/wiki

and add tesseract installation dir path into Environment variables } PATH } New

or use below line on start of your script pytesseract.pytesseract.tesseract_cmd = r”C:\Program Files (x86)\Tesseract-OCR\tesseract.exe”

then install 2 python libraries pip install pytesseract & pip install pillow

Example Code (example.py)* from PIL import Image

import pytesseract

#uncomment below line if you dont want to set "Environment variables" path #pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe"

im = Image.open("sample1.jpg")

text = pytesseract.image_to_string(im, lang = 'eng')

print(text)


Summary

To using Tesseract ocr we can extract text from image like screenshot,printed page photo,scanned image,camera capture image,error message screenshot etc

for more detail go to https://hzonesp.com/programming/recognize-read-text-image-python-window/ go step by step video https://www.youtube.com/watch?v=3QISfjLdS8U

extracting-text-from-images-with-tesseract-ocr's People

Contributors

ch-hassansaeed avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.