Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.31 KB

README.md

File metadata and controls

30 lines (21 loc) · 1.31 KB

Perspective Transformation using Line Detector and Optimization

Thien Do-Tieu

Overview

This is the Python implementation of paper for perspective transformation. By using line detector, this approach creates a loss function which contains information of tilt angle of vertical and horizontal lines, and an optimization algorithm tries to minimize loss value, simultaneously update rotate angles in perspective matrix. In this implementation, I used Gradient Descent instead of Levenberg–Marquardt algorithm

Installation

Install line detector package for python 3

pip install pylsd
pip install ocrd-fork-pylsd

Result

Image after rendering

First result

The result after cropping

First result

Reference

Rectification of planar targets using line segments

Perspective transform opencv