Skip to content

Implementation of document skew detection and correction using multiple methods with voting system, based on academic research paper.

License

Notifications You must be signed in to change notification settings

arezyhs/document-skew-corrector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Skew Corrector

Smart document skew detection and correction tool using multiple algorithms with voting system, based on academic research paper.

Python License Streamlit

Overview

This project implements document image skew detection algorithms based on the research paper:

Boiangiu, C.-A., Dinu, O.-A., Popescu, C., Constantin, N., & Petrescu, C. (2020).
Voting-Based Document Image Skew Detection.
Applied Sciences, 10(7), 2236.

The implementation combines three detection methods:

  • FFT (Fast Fourier Transform): Frequency domain analysis with Hough line detection
  • Projection Profiling: Connected components analysis with variance optimization
  • Hough Transform: Spatial domain line detection with parallel grouping

Results are combined using a confidence-based voting system to select the most reliable skew angle.

Project Structure

document-skew-corrector/
├── notebooks/                     # Original Jupyter implementations
│   ├── PCD-Voting-Based-Documents.ipynb
│   └── project_digital_image_processing.ipynb
├── sample_images/                 # Test dataset (95+ documents)
├── streamlit_app.py              # Web application interface
├── skew_detector.py              # Command-line version
├── requirements.txt              # Python dependencies
├── README.md                     # Project documentation
└── LICENSE                       # MIT license

Usage

Web Application

streamlit run streamlit_app.py
  • Upload document images (JPG, PNG)
  • Real-time skew detection and correction
  • Visual comparison of results
  • Download corrected images

Command Line

python skew_detector.py path/to/image.jpg

Output displays detection results from all three methods and final voting decision.

Installation

git clone https://github.com/arezyhs/document-skew-corrector.git
cd document-skew-corrector
pip install -r requirements.txt

Dependencies

  • Core: numpy, scipy, matplotlib, scikit-image, opencv-python, Pillow
  • Web App: streamlit
  • Notebooks: jupyter

Authors

Reference

Boiangiu, C.-A., Dinu, O.-A., Popescu, C., Constantin, N., & Petrescu, C. (2020). Voting-Based Document Image Skew Detection. Applied Sciences, 10(7), 2236. https://doi.org/10.3390/app10072236

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Implementation of document skew detection and correction using multiple methods with voting system, based on academic research paper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published