Skip to content

Let P be a 2D point expressed in a plane area defined by four 2D points A,B,C,D. The aim of our C++ class is to express the coordinates of P in order to match when A,B,C,D is rectified as a rectangle. A demo application shows the use of the C++ class.

License

GPL-2.0, GPL-2.0 licenses found

Licenses found

GPL-2.0
LICENSE
GPL-2.0
COPYING

gurivier/rectify-coords

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rectify Points Coordinates (rectify-coords)

This program demonstrates the use of the C++ class called "Cadre" that can be used to rectify coordinates from a deformed quadrilateral shape to a rectangular shape.

This class is useful, for example, in vision-projection tabletops. When the projected image is deformed into a trapezoid, the coordinates of the points captured in the video must be recalculated to match the initial data model (i.e. before projection). This class then allows to find the coordinates relative to the pre-projection model.

Principle

Let P be a 2D point expressed in a plane area defined by four 2D points A,B,C,D. The aim of our C++ class is to express the coordinates of P in order to match when A,B,C,D is rectified as a rectangle. A demo application in GTKmm shows the use of the C++ class.

Calculation from distorted to corrected coordinates

The demo application shows the use of the "Cadre" C++ class. The window is divided in two parts. On the left, a drawing area shows the source quadrilateral, which can be modified using four handles. On the right, a drawing area shows the destination rectangle. The position of the mouse cursor on the left area is mapped on the right view after rectification to match with the rectangle.

The window shows the rectified point on the right corresponding to the mouse cursor on the left

Source code

The source code was writen in C++ under Debian GNU/Linux, using g++ and GTKmm 2.2.

References

This project was first hosted on sourceforge: https://sourceforge.net/projects/rectify-coords/

This work has been published in Chapter 5 of: Guillaume Rivière, Tangible Interaction on Tabletops: applied in geoscience. Ph.D. thesis, Bordeaux University, September 9th, 2009. https://tel.archives-ouvertes.fr/tel-01086092

Author

Guillaume Rivière, 2007.

About

Let P be a 2D point expressed in a plane area defined by four 2D points A,B,C,D. The aim of our C++ class is to express the coordinates of P in order to match when A,B,C,D is rectified as a rectangle. A demo application shows the use of the C++ class.

Resources

License

GPL-2.0, GPL-2.0 licenses found

Licenses found

GPL-2.0
LICENSE
GPL-2.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published