xiaoyao9184 / awesome-text-deskew

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

awesome-text-deskew

A curated list of awesome projects for image text skew detection/correction.

Let’s categorize according to solutions:

OpenCV rectangle

Get angle from minimum bounding rectangle of text contours.

  1. Detect the contours in the image, which includes text
  2. Obtain the minimum bounding rectangle based on the contours
  3. Retrieve the angle of the bounding rectangle

Hough Transform

Get angle from line by the hough transform.

  1. Calculate Hough lines in the image
  2. Find the angle of the majority of lines

EAST model

Get angle from text regions detected by the EAST model.

  1. Detect the position of text regions,
  2. Retrieve the angle of the region bounding box,
  3. Calculate the average tilt angle.

Projection score

Get angle with the minimum pixel density projection

same like Radon transform

  1. Rotate the image at multiple angles
  2. Calculate the cumulative sum of pixel values along each row
  3. Find the angle with the highest cumulative sum

Radon transform

Get angle with alternating pixel density projection

  1. Rotate the image at multiple angles
  2. Calculate the cumulative sum of pixel values along each row
  3. Find the angle with the highest cumulative sum or alternating cumulative sums

Detecting rotation and line spacing of image of page of text using Radon transform - gist @github

"River" detection in text - question @stackoverflow

Fourier Transform

About

License:MIT License


Languages

Language:Jupyter Notebook 100.0%