Skip to content

Compute Vanishing points using RANSAC and rectify the image

License

Notifications You must be signed in to change notification settings

SajjadAemmi/PyVPD

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyVPD: Vanishing Point Detector

Upload Python Package Downloads

This is a Python + Scikit-Image implementation of the Vanishing point detection in images

Installation

pip install pyvpd

Usage

import cv2
from pyvpd import VPDetector

image = cv2.imread("io/input/1.jpg")
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

vp_detector = VPDetector()
vps_3d, vps_2d = vp_detector.detect(image)
print("vps_3d:", vps_3d)
print("vps_2d:", vps_2d)

Results

Input image:

Input image

First vanishing point:

First vanishing point

Second vanishing point:

Second vanishing point

Acknowledgments

We made necessary changes on top of Automated Rectification of Image to fit our design. Many thanks to Sasank Chilamkurthy for releasing the code.

Implements the modified version of the following paper:

Chaudhury, Krishnendu, Stephen DiVerdi, and Sergey Ioffe. "Auto-rectification of user photos." 2014 IEEE International Conference on Image Processing (ICIP). IEEE, 2014.

About

Compute Vanishing points using RANSAC and rectify the image

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%