Wikinaut / Perspective-Transformation

Perspective Transformation for Indoor Image Aesthetic Enhancement

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Perspective Transformation using Line Detector and Optimization

Thien Do-Tieu

Overview

This is the Python implementation of paper

An, J., Koo, H.I. & Cho, N.I.
Rectification of planar targets using line segments
Machine Vision and Applications 28, 91–100 (2017).
https://doi.org/10.1007/s00138-016-0807-1

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

About

Perspective Transformation for Indoor Image Aesthetic Enhancement


Languages

Language:Python 100.0%