Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

fl::Transform Class Reference

#include <convolve.h>

Inheritance diagram for fl::Transform:

fl::Filter fl::TransformGauss List of all members.

Public Methods

 Transform (const Matrix< double > &A, bool inverse=false)
 Prefer double format for better inversion (when needed).

 Transform (const Matrix< double > &A, const double scale)
 Assumes A is inverse. Divides first two columns by scale before using A. Just a convenience method.

 Transform (double angle)
 Transform (double scaleX, double scaleY)
void initialize (const Matrix< double > &A, bool inverse=false)
 A should be at least 2x2.

virtual Image filter (const Image &image)
 This could be const, but it is useful to allow filters to collect statistics. Note that such filters are not thread safe.

void setPeg (float centerX=-1, float centerY=-1, int width=-1, int height=-1)
 Set up viewport (of resulting image) so its center hits at a specified point in source image. centerX == -1 means use center of original image. centerY == -1 is similar. width == -1 means use width of original image. height == -1 is similar.

void setWindow (float centerX, float centerY, int width=-1, int height=-1)
 Set up viewport so its center hits a specified point in what would otherwise be the resulting image.

void prepareResult (const Image &image, Image &result, Matrix3x3< float > &H)
 Subroutine of filter (). Finalizes parameters that control fit between source and destination images.

Transform operator * (const Transform &that) const

Public Attributes

Matrix2x2< float > IA
 Inverse of A. Maps coordinates from output image back to input image.

float translateX
float translateY
bool peg
 Indicates that (centerX, centerY) refers to source image rather than resulting image.

bool defaultViewport
 Indicates that viewport parameters are calculated rather than provided by user.

float centerX
float centerY
int width
int height

Constructor & Destructor Documentation

Transform::Transform const Matrix< double > &    A,
bool    inverse = false
 

Prefer double format for better inversion (when needed).

Transform::Transform const Matrix< double > &    A,
const double    scale
 

Assumes A is inverse. Divides first two columns by scale before using A. Just a convenience method.

Transform::Transform double    angle
 

Transform::Transform double    scaleX,
double    scaleY
 


Member Function Documentation

Image Transform::filter const Image   image [virtual]
 

This could be const, but it is useful to allow filters to collect statistics. Note that such filters are not thread safe.

Implements fl::Filter.

Reimplemented in fl::TransformGauss.

void Transform::initialize const Matrix< double > &    A,
bool    inverse = false
 

A should be at least 2x2.

Todo:
Store full homography rather than separating into translation and deformation components. The only thing preventing this before was some programs depending on a hack for scaling. No program does this any more.

Transform Transform::operator * const Transform &    that const
 

void Transform::prepareResult const Image   image,
Image   result,
Matrix3x3< float > &    H
 

Subroutine of filter (). Finalizes parameters that control fit between source and destination images.

void Transform::setPeg float    centerX = -1,
float    centerY = -1,
int    width = -1,
int    height = -1
 

Set up viewport (of resulting image) so its center hits at a specified point in source image. centerX == -1 means use center of original image. centerY == -1 is similar. width == -1 means use width of original image. height == -1 is similar.

void Transform::setWindow float    centerX,
float    centerY,
int    width = -1,
int    height = -1
 

Set up viewport so its center hits a specified point in what would otherwise be the resulting image.


Member Data Documentation

float fl::Transform::centerX
 

float fl::Transform::centerY
 

bool fl::Transform::defaultViewport
 

Indicates that viewport parameters are calculated rather than provided by user.

int fl::Transform::height
 

Matrix2x2<float> fl::Transform::IA
 

Inverse of A. Maps coordinates from output image back to input image.

bool fl::Transform::peg
 

Indicates that (centerX, centerY) refers to source image rather than resulting image.

float fl::Transform::translateX
 

float fl::Transform::translateY
 

int fl::Transform::width
 


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 17:13:27 2004 for fl by doxygen1.2.18