Fawkes API  Fawkes Development Version
firevision::MirrorModel Class Referenceabstract

Mirror model interface. More...

#include <>>

Inheritance diagram for firevision::MirrorModel:

Public Member Functions

virtual ~MirrorModel ()
 Virtual empty destructor. More...
 
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. More...
 
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. More...
 
virtual const char * getName ()=0
 Get name of model. More...
 
virtual fawkes::polar_coord_2d_t getWorldPointRelative (unsigned int image_x, unsigned int image_y) const =0
 Get relative coordinate based on image coordinates. More...
 
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. More...
 
virtual void reset ()=0
 Reset model. More...
 
virtual fawkes::upoint_t getCenter () const =0
 Get the image pixel that is the center of the omni-camera. More...
 
virtual void setCenter (unsigned int image_x, unsigned int image_y)=0
 Set center of omni-camera to given image pixel. More...
 
virtual void setOrientation (float angle)=0
 Set orientation of the omni-camera device. More...
 
virtual float getOrientation () const =0
 Get orientation of the omni-camera. More...
 
virtual bool isValidPoint (unsigned int image_x, unsigned int image_y) const =0
 Check if the given point is valid. More...
 

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

◆ ~MirrorModel()

firevision::MirrorModel::~MirrorModel ( )
virtual

Virtual empty destructor.

Definition at line 104 of file mirrormodel.cpp.

Member Function Documentation

◆ getCenter()

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.

◆ getName()

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

Get name of model.

Returns
name of model

Implemented in firevision::Bulb.

◆ getOrientation()

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

Get orientation of the omni-camera.

Returns
angle to forward direction.

Implemented in firevision::Bulb.

◆ getWorldPointGlobal()

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.

Referenced by firevision::OmniGlobal::calc().

◆ getWorldPointRelative()

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.

Referenced by firevision::OmniRelative::calc(), and firevision::OmniRelative::calc_unfiltered().

◆ isValidPoint()

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.

Referenced by firevision::OmniGlobal::calc(), firevision::OmniRelative::calc(), firevision::OmniGlobal::is_pos_valid(), and firevision::OmniRelative::is_pos_valid().

◆ reset()

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

Reset model.

This will reset mirror model.

Implemented in firevision::Bulb.

◆ setCenter()

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.

◆ setOrientation()

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.

◆ unwarp2warp()

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().

◆ warp2unwarp()

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: