Fawkes API Fawkes Development Version

firevision::MirrorModel Class Reference

Mirror model interface. More...

#include <>>

Inheritance diagram for firevision::MirrorModel:

List of all members.

Public Member Functions

virtual ~MirrorModel ()
 Virtual empty destructor.
virtual void warp2unwarp (unsigned int warp_x, unsigned int warp_y, unsigned int *unwarp_x, unsigned int *unwarp_y)=0
 Transform warped to unwarped point.
virtual void unwarp2warp (unsigned int unwarp_x, unsigned int unwarp_y, unsigned int *warp_x, unsigned int *warp_y)=0
 Transform unwarped to warped point.
virtual const char * getName ()=0
 Get name of model.
virtual fawkes::polar_coord_2d_t getWorldPointRelative (unsigned int image_x, unsigned int image_y) const =0
 Get relative coordinate based on image coordinates.
virtual fawkes::cart_coord_2d_t getWorldPointGlobal (unsigned int image_x, unsigned int image_y, float pose_x, float pose_y, float pose_ori) const =0
 Get global coordinate based on image coordinates.
virtual void reset ()=0
 Reset model.
virtual fawkes::point_t getCenter () const =0
 Get the image pixel that is the center of the omni-camera.
virtual void setCenter (unsigned int image_x, unsigned int image_y)=0
 Set center of omni-camera to given image pixel.
virtual void setOrientation (float angle)=0
 Set orientation of the omni-camera device.
virtual float getOrientation () const =0
 Get orientation of the omni-camera.
virtual bool isValidPoint (unsigned int image_x, unsigned int image_y) const =0
 Check if the given point is valid.

Detailed Description

Mirror model interface.

This interface defines the API for a mirror model.

Definition at line 34 of file mirrormodel.h.


Constructor & Destructor Documentation

firevision::MirrorModel::~MirrorModel ( ) [virtual]

Virtual empty destructor.

Definition at line 104 of file mirrormodel.cpp.


Member Function Documentation

cart_coord_t firevision::MirrorModel::getCenter ( ) const [pure virtual]

Get the image pixel that is the center of the omni-camera.

Returns:
pixel coordinates of mirror center in image.

Implemented in firevision::Bulb.

const char * firevision::MirrorModel::getName ( ) [pure virtual]

Get name of model.

Returns:
name of model

Implemented in firevision::Bulb.

float firevision::MirrorModel::getOrientation ( ) const [pure virtual]

Get orientation of the omni-camera.

Returns:
angle to forward direction.

Implemented in firevision::Bulb.

f_point_t firevision::MirrorModel::getWorldPointGlobal ( unsigned int  image_x,
unsigned int  image_y,
float  pose_x,
float  pose_y,
float  pose_ori 
) const [pure virtual]

Get global coordinate based on image coordinates.

Parameters:
image_xx coordinate in image in pixels
image_yy coordinate in image in pixels
pose_xrobot pose global x coordinate
pose_yrobot pose global y coordinate
pose_orirobot pose global orientation
Returns:
cartesian coordinates relative to the base system in metric global system

Implemented in firevision::Bulb.

polar_coord_t firevision::MirrorModel::getWorldPointRelative ( unsigned int  image_x,
unsigned int  image_y 
) const [pure virtual]

Get relative coordinate based on image coordinates.

Parameters:
image_xx coordinate in image in pixels
image_yy coordinate in image in pixels
Returns:
polar coordinates relative to the base system in metric local system

Implemented in firevision::Bulb.

bool firevision::MirrorModel::isValidPoint ( unsigned int  image_x,
unsigned int  image_y 
) const [pure virtual]

Check if the given point is valid.

Parameters:
image_xx coordinate of queried pixel in image
image_yy coordinate of queried pixel in image
Returns:
true, if pixel is valid, false otherwise.

Implemented in firevision::Bulb.

void firevision::MirrorModel::reset ( ) [pure virtual]

Reset model.

This will reset mirror model.

Implemented in firevision::Bulb.

void firevision::MirrorModel::setCenter ( unsigned int  image_x,
unsigned int  image_y 
) [pure virtual]

Set center of omni-camera to given image pixel.

Parameters:
image_xx coordinate in image in pixels
image_yy coordinate in image in pixels

Implemented in firevision::Bulb.

void firevision::MirrorModel::setOrientation ( float  angle) [pure virtual]

Set orientation of the omni-camera device.

Parameters:
angleangle to the forward direction.

Implemented in firevision::Bulb.

void firevision::MirrorModel::unwarp2warp ( unsigned int  unwarp_x,
unsigned int  unwarp_y,
unsigned int *  warp_x,
unsigned int *  warp_y 
) [pure virtual]

Transform unwarped to warped point.

Given a point in the unwarped image it returns the coordinates of the corresponding pixel in the warped image Useful for: You want to generate the unwarped image and ask the model for every point of the unwarped image which warped pixel to copy

Parameters:
unwarp_xunwarped x coordinate
unwarp_yunwarped y coordinate
warp_xcontains the warped x coordinate upon return
warp_ycontains the warped y coordinate upon return

Implemented in firevision::Bulb.

Referenced by firevision::FilterUnwarp::apply().

void firevision::MirrorModel::warp2unwarp ( unsigned int  warp_x,
unsigned int  warp_y,
unsigned int *  unwarp_x,
unsigned int *  unwarp_y 
) [pure virtual]

Transform warped to unwarped point.

Given a point in the warped image it returns the coordinates of the corresponding pixel in the unwarped image Useful for: You found the ball center in the image and want to get the position this pixel would have in an unwarped image

Parameters:
warp_xwarped x coordinate
warp_ywarped y coordinate
unwarp_xcontains unwarped x coordinate upon return
unwarp_ycontains unwarped y coordinate upon return

Implemented in firevision::Bulb.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends