Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

RasterImageProcessor Class Reference

A class for image-processing. More...

#include <RasterImageProcessor.h>

Inheritance diagram for RasterImageProcessor:

Inheritance graph
[legend]
Collaboration diagram for RasterImageProcessor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RasterImageProcessor (const ImageProcessorInterfaces &interfaces)
 The consructor.

virtual ~RasterImageProcessor ()
 Destructor.

virtual void execute ()
 Executes the module.

virtual bool handleMessage (InMessage &message)
 Handles messages for this module.

RasterSpecialistgetSpecialist (int type)
 Getter for a specialist.

void setSpecialist (RasterSpecialist *spec)
 Sets a specialist, if there is a specialist of the same type registered, it will be deleted.

void removeSpecialist (int type)
 Removes a specialist from the image-processor.

Geometry::Line getHorizon ()
 Getter for the member horizon.

void addFieldPoint (int x, int y, LinesPercept::LineType type)
 Adds a point to the LinesPercept.

void addObstaclePoints (Vector2< int > &nearPointInImage, Vector2< int > &farPointInImage, ObstaclesPercept::ObstacleType type)
 Adds a point to the ObstaclesPercept.

bool isValidPoint (Vector2< double > &p)
 Tests if the point lies in the valid image area.

void addFlag (Vector2< double > &left, Vector2< double > &right, Vector2< double > &top, Vector2< double > &bottom, Flag::FlagType type)
 Adds a flag to the model.

void changeStrategy (RasterStrategy &newStrategy)
 Changes the strategy.

 DECLARE_DEBUG_COLOR_CLASS_IMAGE (segmentedImage1)
 The color-class image.


Public Attributes

SUSANEdgeDetectionLite edgeDetector
 An edge detector.

ColorCorrector corrector
 The color-corrector.

Geometry::Line horizon
 The calculated horizon.

int minX
 Minimal x-coordinate of the image-raster.

int maxX
 Maximal x-coordinate of the image-raster.

int minY
 Minimal y-coordinate of the image-raster.

int maxY
 Maximal y-coordinate of the image-raster.

int marginX
 The margin between two scanlines.

int marginY
 The margin between two scanlines.


Private Member Functions

void init ()
 Initializes the module.

 DECLARE_DEBUG_IMAGE (imageProcessorGeneral)
 DECLARE_DEBUG_IMAGE (imageProcessorBall)
 DECLARE_DEBUG_IMAGE (imageProcessorObstacles)
 DECLARE_DEBUG_IMAGE (imageProcessorFlagsAndGoals)
 DECLARE_DEBUG_IMAGE (imageProcessorGround)

Private Attributes

RasterSpecialistspecials [maxRasterSpecialists]
 The concurrent specialists.

RasterStrategystrategy
 The active strategy.

RasterStrategywaitingStrategy
 The new strategy in the next frame.


Detailed Description

A class for image-processing.

Author:
Bernd Schmidt

Definition at line 48 of file RasterImageProcessor.h.


Constructor & Destructor Documentation

RasterImageProcessor::RasterImageProcessor const ImageProcessorInterfaces interfaces  ) 
 

The consructor.

Parameters:
interfaces The interfaces for the image-processor.

Definition at line 21 of file RasterImageProcessor.cpp.

References Image::cameraInfo, maxRasterSpecialists, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, specials, and waitingStrategy.

RasterImageProcessor::~RasterImageProcessor  )  [virtual]
 

Destructor.

Definition at line 41 of file RasterImageProcessor.cpp.


Member Function Documentation

void RasterImageProcessor::execute  )  [virtual]
 

Executes the module.

Implements Module.

Definition at line 46 of file RasterImageProcessor.cpp.

References DEBUG_DRAWING_FINISHED, RasterStrategy::execute(), init(), and INIT_DEBUG_IMAGE.

Here is the call graph for this function:

bool RasterImageProcessor::handleMessage InMessage message  )  [virtual]
 

Handles messages for this module.

Parameters:
message Message to handle.
Returns:
Returns if the message had been handled succesfully.

Reimplemented from Module.

Definition at line 83 of file RasterImageProcessor.cpp.

RasterSpecialist * RasterImageProcessor::getSpecialist int  type  ) 
 

Getter for a specialist.

Parameters:
type Type of the requested specialist.
Returns:
The specialist of the given type or null if no specialist is registered.

Definition at line 90 of file RasterImageProcessor.cpp.

References specials.

void RasterImageProcessor::setSpecialist RasterSpecialist spec  ) 
 

Sets a specialist, if there is a specialist of the same type registered, it will be deleted.

Parameters:
spec The specialist to be registered.

Definition at line 95 of file RasterImageProcessor.cpp.

References RasterSpecialist::getType(), and specials.

Referenced by RDefaultStrategy::RDefaultStrategy().

Here is the call graph for this function:

void RasterImageProcessor::removeSpecialist int  type  ) 
 

Removes a specialist from the image-processor.

Afterwards getSpecialist(type) is NULL.

Parameters:
type Type of the specialist.

Definition at line 103 of file RasterImageProcessor.cpp.

References specials.

Geometry::Line RasterImageProcessor::getHorizon  )  [inline]
 

Getter for the member horizon.

Returns:
the horizon-line for the current image

Definition at line 95 of file RasterImageProcessor.h.

Referenced by RBallSpecialist2::addBallPercept(), REnemySpecialist::calculateFarestPoint(), REnemySpecialist::calculateFarestPointCOG(), REnemySpecialist::calculateFarestPointFastCOG(), RBridgeSpecialist::executePostProcessing(), and BoxSpecialist::executePostProcessing().

void RasterImageProcessor::addFieldPoint int  x,
int  y,
LinesPercept::LineType  type
[inline]
 

Adds a point to the LinesPercept.

Parameters:
x x-coordinate
y y-coordinate
type Type for this point of interest.

Definition at line 101 of file RasterImageProcessor.h.

References LinesPercept::add(), Geometry::calculatePointOnField(), and Image::cameraInfo.

Referenced by RDefaultStrategy::postScan().

Here is the call graph for this function:

void RasterImageProcessor::addObstaclePoints Vector2< int > &  nearPointInImage,
Vector2< int > &  farPointInImage,
ObstaclesPercept::ObstacleType  type
[inline]
 

Adds a point to the ObstaclesPercept.

Parameters:
nearPointInImage near Point of the seen area
farPointInImage far Point of the seen area
type Type of the free "obstacle"-area

Definition at line 112 of file RasterImageProcessor.h.

References ObstaclesPercept::add(), Geometry::calculatePointOnField(), Image::cameraInfo, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y.

Referenced by RDefaultStrategy::postScan().

Here is the call graph for this function:

bool RasterImageProcessor::isValidPoint Vector2< double > &  p  )  [inline]
 

Tests if the point lies in the valid image area.

Parameters:
p input.
Returns:
True if the point is valid.

Definition at line 136 of file RasterImageProcessor.h.

References Image::cameraInfo, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y.

Referenced by addFlag().

void RasterImageProcessor::addFlag Vector2< double > &  left,
Vector2< double > &  right,
Vector2< double > &  top,
Vector2< double > &  bottom,
Flag::FlagType  type
 

Adds a flag to the model.

Parameters:
left Center of the left edge.
right Center of the right edge.
top Center of the top edge.
bottom Center of the bottom edge.
type Type of the Flag.

Definition at line 152 of file RasterImageProcessor.cpp.

References LandmarksPercept::addFlag(), ConditionalBoundary::addX(), ConditionalBoundary::addY(), Image::cameraInfo, DOT, getPlayer(), Player::getTeamColor(), isValidPoint(), CameraInfo::openingAngleWidth, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Pose3D::rotation, sqr, Vector3< V >::x, Vector2< V >::x, Vector3< V >::y, and Vector2< V >::y.

Referenced by BoxSpecialist::searchLandmark().

Here is the call graph for this function:

void RasterImageProcessor::changeStrategy RasterStrategy newStrategy  ) 
 

Changes the strategy.

the old one will be deleted !

Parameters:
newStrategy The new strategy.

Definition at line 110 of file RasterImageProcessor.cpp.

References waitingStrategy.

RasterImageProcessor::DECLARE_DEBUG_COLOR_CLASS_IMAGE segmentedImage1   ) 
 

The color-class image.

void RasterImageProcessor::init  )  [private]
 

Initializes the module.

Definition at line 116 of file RasterImageProcessor.cpp.

References Geometry::Line::base, Geometry::calculateHorizon(), Image::cameraInfo, LandmarksPercept::cameraOffset, Geometry::Line::direction, Image::frameNumber, GENERATE_DEBUG_IMAGE, ColorTable::generateColorClassImage(), RasterStrategy::init(), LINE, ObstaclesPercept::reset(), PlayersPercept::reset(), BallPercept::reset(), LinesPercept::reset(), LandmarksPercept::reset(), SEND_DEBUG_COLOR_CLASS_IMAGE, Pose3D::translation, waitingStrategy, Vector2< double >::x, and Vector2< double >::y.

Referenced by execute().

Here is the call graph for this function:

RasterImageProcessor::DECLARE_DEBUG_IMAGE imageProcessorGeneral   )  [private]
 

RasterImageProcessor::DECLARE_DEBUG_IMAGE imageProcessorBall   )  [private]
 

RasterImageProcessor::DECLARE_DEBUG_IMAGE imageProcessorObstacles   )  [private]
 

RasterImageProcessor::DECLARE_DEBUG_IMAGE imageProcessorFlagsAndGoals   )  [private]
 

RasterImageProcessor::DECLARE_DEBUG_IMAGE imageProcessorGround   )  [private]
 


Member Data Documentation

SUSANEdgeDetectionLite RasterImageProcessor::edgeDetector
 

An edge detector.

Definition at line 52 of file RasterImageProcessor.h.

ColorCorrector RasterImageProcessor::corrector
 

The color-corrector.

Definition at line 54 of file RasterImageProcessor.h.

Geometry::Line RasterImageProcessor::horizon
 

The calculated horizon.

Definition at line 56 of file RasterImageProcessor.h.

Referenced by RDefaultStrategy::postScan(), and RDefaultStrategy::preScan().

int RasterImageProcessor::minX
 

Minimal x-coordinate of the image-raster.

Definition at line 158 of file RasterImageProcessor.h.

int RasterImageProcessor::maxX
 

Maximal x-coordinate of the image-raster.

Definition at line 160 of file RasterImageProcessor.h.

Referenced by RFieldSpecialist::checkRamp().

int RasterImageProcessor::minY
 

Minimal y-coordinate of the image-raster.

Definition at line 162 of file RasterImageProcessor.h.

int RasterImageProcessor::maxY
 

Maximal y-coordinate of the image-raster.

Definition at line 164 of file RasterImageProcessor.h.

int RasterImageProcessor::marginX
 

The margin between two scanlines.

Definition at line 166 of file RasterImageProcessor.h.

Referenced by RDefaultStrategy::checkBall(), RDefaultStrategy::checkBox(), RDefaultStrategy::checkBridge(), RDefaultStrategy::checkPlayer(), RDefaultStrategy::preScan(), and RDefaultStrategy::RDefaultStrategy().

int RasterImageProcessor::marginY
 

The margin between two scanlines.

Definition at line 168 of file RasterImageProcessor.h.

Referenced by RDefaultStrategy::preScan(), and RDefaultStrategy::RDefaultStrategy().

RasterSpecialist* RasterImageProcessor::specials[maxRasterSpecialists] [private]
 

The concurrent specialists.

Definition at line 176 of file RasterImageProcessor.h.

Referenced by getSpecialist(), RasterImageProcessor(), removeSpecialist(), and setSpecialist().

RasterStrategy* RasterImageProcessor::strategy [private]
 

The active strategy.

Definition at line 178 of file RasterImageProcessor.h.

RasterStrategy* RasterImageProcessor::waitingStrategy [private]
 

The new strategy in the next frame.

Definition at line 180 of file RasterImageProcessor.h.

Referenced by changeStrategy(), init(), and RasterImageProcessor().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:10:58 2004 for GT2004 by doxygen 1.3.6