Code Monkey home page Code Monkey logo

ocr-text-extractor's Introduction

OCR-Image Text Extracting

Downloads License

This is simple PHP Code using Tesseract-OCR to read and extract Text in any Image.

Installation

First, install the package through Composer.

composer create-project shababsoftwares/ocr-text-extractor

How to Install Tesseract-OCR

You need to have Tesseract-OCR installed and set Environment.

On Window 10,11

Installation guide on this link How to install tesseract ocr on window

Install Tesseract-OCR Edit Path under Environment System variables add new path %InstalationPath%/Tesseract-OCR like C:\Program Files (x86)\Tesseract-OCR

Add New Variable under System variables Variable Name: TESSDATA_PREFIX Variable Value: %InstalledPath%/Tesseract-OCR // C:\Program Files (x86)\Tesseract-OCR\

On Linux / ubuntu

Step 1 : Update your system Begin the installation process by updating the APT Index.

    sudo apt update

Step 2 : Add Tesseract OCR 5 PPA to your system. To add the Tesseract OCR 5 PPA to your system, run the command below

    sudo add-apt-repository ppa:alex-p/tesseract-ocr-devel

Step 3 : Install Tesseract on Ubuntu Run the command :

    sudo apt install -y tesseract-ocr

Once installation is complete update your system

    sudo apt update 

Confirm the Tesseract version installed.

    $ tesseract --version

Set Path of Image and Output text file.

shell_exec('"C:\\Program Files (x86)\\Tesseract-OCR\\tesseract" "C:\\xampp\\htdocs\\OCR-Text-Recognition\\images\\'.$file_name.'" out');

License

The MIT License (MIT). Please see LICENSE for more information.

Shabab Softwares

www.shababsoftwares.com

Shabab Softwares (c) 2024

ocr-text-extractor's People

Contributors

ml-arifshabab avatar

Stargazers

 avatar

Watchers

 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.