Git Product home page Git Product logo

de-skew-scanned-pdf's Introduction

De-skew Scanned pdf

This repository includes basic python scripts to correct skewed pdf documents, written in ipynb notebooks. Here, I have used two different approaches to de-skew pdf documents:

  • Using Hough Line Transform

Here, I have used Hough Line Transform after OTSU binary thresholding for skewed angle detection. Hough Line Transfrom is computationally sound and various libraries provide optimized functions to perform Hough Transform. Finally, I corrected the image reversing the skewed angle.

  • Using Fourier Transfrom + Hough Transform

Here, I first applied fourier transfrom to the image. In the Fourier domain image, each point represents a particular frequency contained in the spatial domain image. Then I used edge detection to extract edge feature (which is usually like white strip of light showing the orientation). Last, I applied hough tansform to detect the line and its orientation and corrected it.


Original Image >>>> De-skewed Image


References:

https://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm https://plus.maths.org/content/fourier-transforms-images https://www.researchgate.net/publication/221472741_A_New_Algorithm_for_Skew_Detection_in_Images_of_Documents https://www.researchgate.net/publication/295256106_An_approach_for_Skew_Detection_using_Hough_Transform https://www.researchgate.net/publication/287217803_A_Survey_on_Document_Image_Skew_Detection https://www.researchgate.net/publication/294578383_A_Novel_Skew_Detection_and_Correction_Approach_for_Scanned_Documents http://scikit-image.org/docs/dev/api/skimage.transform.html#skimage.transform.hough_line_peaks http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=52D3EF125E41240A6C364B2E32721F2B?doi=10.1.1.105.3741&rep=rep1&type=pdf

de-skew-scanned-pdf's People

Contributors

bidur-khanal avatar

Stargazers

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