Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srijanmukherjee/image-processing-ocr-assignment
Performs image smoothening, converting to binary image, generating skeleton of the image for OCR purpose
https://github.com/srijanmukherjee/image-processing-ocr-assignment
image-processing opencv
Last synced: 9 days ago
JSON representation
Performs image smoothening, converting to binary image, generating skeleton of the image for OCR purpose
- Host: GitHub
- URL: https://github.com/srijanmukherjee/image-processing-ocr-assignment
- Owner: srijanmukherjee
- License: mit
- Created: 2023-10-20T11:47:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-23T12:22:39.000Z (about 1 year ago)
- Last Synced: 2023-10-24T12:35:17.163Z (about 1 year ago)
- Topics: image-processing, opencv
- Language: Python
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image processing for OCR
Basic image processing (smoothening, binarizing, skeletonizing) before using image for OCR
## Instructions
```bash
# start virtual environment
python -m venv env
source ./env/bin/activate# install dependencies
pip install -r requirements.txt# run the code
python main.py# 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] imagepositional arguments:
image path to imageoptions:
-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 imageThis example demonstrates some basic image processing techinques to be applied before we use the image for processing techniques like OCR.
## References
- https://pyimagesearch.com/2021/04/28/opencv-smoothing-and-blurring
- https://scikit-image.org/docs/stable/auto_examples/edges/plot_skeleton.html