Vision Touch Surface Library
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
ProjectiveMapping Class Reference

The ProjectiveMapping class converts the coordinate system from a quadrangle to a rectangle with origen at (0,0) More...

#include <projectivemapping.h>

Public Member Functions

 ProjectiveMapping ()
 
 ProjectiveMapping (int width, int height)
 ProjectiveMapping constructor that sets the rectangle dimensions. More...
 
 ProjectiveMapping (const ProjectiveMapping &param)
 
virtual void calculateMapping (const vector< Point2f > &quadrangle_corners)
 calculateMapping computes the transformation matrix from the space given to the rectangle More...
 
virtual void mapPoints (vector< Point2f > &points, vector< Point2f > &mappedPoints)
 mapPoints converts form quadrangle to rectangle More...
 
virtual void mapPoints (Point2i &point, Point2i &mappedPoint)
 mapPoints converts form quadrangle to rectangle More...
 
virtual void warpMatrix (Mat &matrix, Mat &warpedMatrix, Size &warpedSize)
 warpMatrix transforms a Mat from quadrangle space to a rectangle sapce More...
 

Protected Attributes

Mat transformationMatrix
 

Detailed Description

The ProjectiveMapping class converts the coordinate system from a quadrangle to a rectangle with origen at (0,0)

Constructor & Destructor Documentation

ProjectiveMapping::ProjectiveMapping ( )
ProjectiveMapping::ProjectiveMapping ( int  width,
int  height 
)

ProjectiveMapping constructor that sets the rectangle dimensions.

Parameters
widthof the rectangle
heightof the rectangle
ProjectiveMapping::ProjectiveMapping ( const ProjectiveMapping param)

Member Function Documentation

void ProjectiveMapping::calculateMapping ( const vector< Point2f > &  quadrangle_corners)
virtual

calculateMapping computes the transformation matrix from the space given to the rectangle

Parameters
quadrangle_cornerscontains the quadrangle corners
void ProjectiveMapping::mapPoints ( vector< Point2f > &  points,
vector< Point2f > &  mappedPoints 
)
virtual

mapPoints converts form quadrangle to rectangle

Parameters
pointsinput points in the quadrangle space
mappedPointsoutput points in rectangle space
void ProjectiveMapping::mapPoints ( Point2i &  point,
Point2i &  mappedPoint 
)
virtual

mapPoints converts form quadrangle to rectangle

Parameters
pointsinput point in the quadrangle space
mappedPointsoutput point in rectangle space
void ProjectiveMapping::warpMatrix ( Mat &  matrix,
Mat &  warpedMatrix,
Size &  warpedSize 
)
virtual

warpMatrix transforms a Mat from quadrangle space to a rectangle sapce

Parameters
matrixinput Mat with the data to be warped
warpedMatrixoutput Mat with the warped data
warpedSizesize of the warpedMatrix is going to have

Member Data Documentation

Mat ProjectiveMapping::transformationMatrix
protected

The documentation for this class was generated from the following files: