Giter Site home page Giter Site logo

srijanmukherjee / image-processing-ocr-assignment Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 118 KB

Performs image smoothening, converting to binary image, generating skeleton of the image for OCR purpose

License: MIT License

Python 100.00%
image-processing opencv

image-processing-ocr-assignment's Introduction

Image processing for OCR

Basic image processing (smoothening, binarizing, skeletonizing) before using image for OCR

Instructions

# start virtual environment
python -m venv env
source ./env/bin/activate

# install dependencies
pip install -r requirements.txt

# run the code
python main.py <image>

# Example
python main.py --blur gaussian -k 7 -v dataset/English/E3.png 

# Run over all examples in the dataset
python experiment.py

NOTE:
Minimum python version requirement: 3.10

Usage

usage: main.py [-h] [-v] [-b {average,gaussian,median,bilateral}] [-k KERNEL] [-o OUTPUT] image

positional arguments:
  image                 path to image

options:
  -h, --help            show this help message and exit
  -v, --verbose         Enable verbose output
  -b {average,gaussian,median,bilateral}, --blur {average,gaussian,median,bilateral}
                        Choose blurring techinque
  -k KERNEL, --kernel KERNEL
                        set kernel size (must be odd), the kernel will be set as (size x size)
  -o OUTPUT, --output OUTPUT
                        output directory

What does it do?

  • Apply image filtering technique to smoothen the image
    • Average blurring
    • Gaussian blurring
    • Median blurring
    • Bilateral blurring
  • Convert into binary image
  • Skeletonize the image
  • Resize into 64x64 image

This example demonstrates some basic image processing techinques to be applied before we use the image for processing techniques like OCR.

References

image-processing-ocr-assignment's People

Contributors

srijanmukherjee 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.