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

RBridgeSpecialist Class Reference

#include <RBridgeSpecialist.h>

Inheritance diagram for RBridgeSpecialist:

Inheritance graph
[legend]
Collaboration diagram for RBridgeSpecialist:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Geometry::Line Line
typedef vector< list< RasterSpecialist::LinePair > > SVector

Public Member Functions

 RBridgeSpecialist (RasterImageProcessor &processor, RasterStrategy &strategy)
 Constructor.

virtual ~RBridgeSpecialist ()
 Destructor.

void invokeOnPostScan (int x, int y)
 Invokes the specialist in the second scan stage at position (x,y) (this member should be replaced later).

void executePostProcessing ()
 Executes the detection algorithm.

void invokeOnPreScan (int x, int y)
 Invokes the specialist in the first scan stage at position (x,y) (this member should be replaced later).

virtual int getType ()
 Returns the type of specialist.

virtual void init ()
 Initializes the specialist.


Private Member Functions

void createBBox ()
 Builds the bounding boxes of the calculated regions.

void countColors (SegmentInfo &si, list< LinePair > &segment)
 Counts the colors of segment si.

void findBridgeMark (SegmentInfo &si)
 Detects a bridgeMark, if the region is one.

BitePoint::Position getPosition (SegmentInfo &mark)
 Calculates the position of a mark, depending on its colors.

void calculateAnglesForPoint (const Vector2< double > &point, const CameraMatrix &cameraMatrix, const CameraInfo &cameraInfo, Vector2< double > &angles)
bool calculatePointOnField (const double x, const double y, const CameraMatrix &cameraMatrix, const CameraInfo &cameraInfo, Vector2< int > &pointOnField)
void createValidities (SegmentInfo &info)
 Calculates the validities for the several kinds of marks.


Private Attributes

colorClass lineColor
 The color of the line behind the bite-marks.

RasterStrategystrategy
 The strategy.

REdgeDetection edgeScanner
 The edge scanner.

std::list< LinePairlst_pts
 The runs, which are the input data.

Geometry::Line horizon
 The calculated horizon.

Geometry::Line pHorizon
 A perpendicular to the horizon.

Vector2< int > left_border
 A Temporary variable.

std::vector< list< LinePair > > segments_img
 The regions, the runs are clustered to.

std::vector< SegmentInfoinfos_img
 Additional data to the regions.


Member Typedef Documentation

typedef Geometry::Line RBridgeSpecialist::Line
 

Definition at line 77 of file RBridgeSpecialist.h.

typedef vector<list<RasterSpecialist::LinePair> > RBridgeSpecialist::SVector
 

Definition at line 78 of file RBridgeSpecialist.h.


Constructor & Destructor Documentation

RBridgeSpecialist::RBridgeSpecialist RasterImageProcessor processor,
RasterStrategy strategy
 

Constructor.

Parameters:
processor The image processor interfaces.
strategy The strategy.

Definition at line 25 of file RBridgeSpecialist.cpp.

RBridgeSpecialist::~RBridgeSpecialist  )  [virtual]
 

Destructor.

Definition at line 36 of file RBridgeSpecialist.cpp.


Member Function Documentation

void RBridgeSpecialist::invokeOnPostScan int  x,
int  y
[virtual]
 

Invokes the specialist in the second scan stage at position (x,y) (this member should be replaced later).

Parameters:
x The x coordinate.
y The y coordinate.

Reimplemented from RasterSpecialist.

Definition at line 180 of file RBridgeSpecialist.cpp.

void RBridgeSpecialist::executePostProcessing  )  [virtual]
 

Executes the detection algorithm.

Reimplemented from RasterSpecialist.

Definition at line 184 of file RBridgeSpecialist.cpp.

References Geometry::Line::base, createBBox(), RasterSpecialist::createSegmentsFromLines2(), Geometry::Line::direction, findBridgeMark(), RasterImageProcessor::getHorizon(), LINE, and Vector2< double >::rotateLeft().

Referenced by RDefaultStrategy::postProcessing().

Here is the call graph for this function:

void RBridgeSpecialist::invokeOnPreScan int  x,
int  y
[virtual]
 

Invokes the specialist in the first scan stage at position (x,y) (this member should be replaced later).

Parameters:
x The x coordinate.
y The y coordinate.

Reimplemented from RasterSpecialist.

Definition at line 151 of file RBridgeSpecialist.cpp.

References RasterSpecialist::getColor(), RasterStrategy::insideBridge, LINE, REdgeDetection::scanEast(), RasterSpecialist::scanEast(), REdgeDetection::scanWest(), and RasterSpecialist::scanWest().

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

Here is the call graph for this function:

int RBridgeSpecialist::getType  )  [virtual]
 

Returns the type of specialist.

Returns:
Type of specialist.

Implements RasterSpecialist.

Definition at line 39 of file RBridgeSpecialist.cpp.

References __RBridgeSpecialist.

void RBridgeSpecialist::init  )  [virtual]
 

Initializes the specialist.

Implements RasterSpecialist.

Definition at line 43 of file RBridgeSpecialist.cpp.

References REdgeDetection::threshold.

Referenced by RDefaultStrategy::init().

void RBridgeSpecialist::createBBox  )  [private]
 

Builds the bounding boxes of the calculated regions.

Definition at line 52 of file RBridgeSpecialist.cpp.

References Geometry::Line::base, RBridgeSpecialist::Rectangle::bottomLeft, RBridgeSpecialist::Rectangle::bottomRight, RBridgeSpecialist::Rectangle::center, countColors(), createValidities(), Geometry::Line::direction, RasterSpecialist::getDistanceToLine(), Geometry::getIntersectionOfLines(), RBridgeSpecialist::SegmentInfo::rect, RBridgeSpecialist::SegmentInfo::segment, RBridgeSpecialist::SegmentInfo::size, RBridgeSpecialist::Rectangle::upperLeft, RBridgeSpecialist::Rectangle::upperRight, Vector2< V >::x, and Vector2< V >::y.

Referenced by executePostProcessing().

Here is the call graph for this function:

void RBridgeSpecialist::countColors SegmentInfo si,
list< LinePair > &  segment
[private]
 

Counts the colors of segment si.

And stores the result in si.

Parameters:
si SegmentInfo of the region.
segment List of runs.

Definition at line 234 of file RBridgeSpecialist.cpp.

References max, min, RBridgeSpecialist::SegmentInfo::orange, RBridgeSpecialist::SegmentInfo::skyblue, and RBridgeSpecialist::SegmentInfo::yellow.

Referenced by createBBox().

void RBridgeSpecialist::findBridgeMark SegmentInfo si  )  [private]
 

Detects a bridgeMark, if the region is one.

And stores it in the bite-point percept.

Parameters:
si Additional data to the segment.

Definition at line 339 of file RBridgeSpecialist.cpp.

References Vector2< V >::abs(), BitePoint::addPercept(), Geometry::Line::base, OCBridge::bitePoint, RBridgeSpecialist::Rectangle::bottomLeft, RBridgeSpecialist::Rectangle::bottomRight, calculateAnglesForPoint(), Image::cameraInfo, ImageProcessorInterfaces::cameraMatrix, colorClass, REdgeDetection::colorScan(), Geometry::Line::direction, DOT, RasterSpecialist::getColor(), Geometry::getDistanceBySize(), RasterSpecialist::getDistanceToLine(), getPosition(), idText, ImageProcessorInterfaces::image, RasterSpecialist::Box::inside(), RBridgeSpecialist::SegmentInfo::lmValidityOrange, RBridgeSpecialist::SegmentInfo::lmValidityYellow, noColor, SpecialPercept::ocBridge, OUTPUT, RBridgeSpecialist::SegmentInfo::rect, RBridgeSpecialist::SegmentInfo::rightColor, REdgeDetection::scan(), REdgeDetection::setDirection(), REdgeDetection::skip(), ImageProcessorInterfaces::specialPercept, RBridgeSpecialist::Rectangle::upperLeft, RBridgeSpecialist::Rectangle::upperRight, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y.

Referenced by executePostProcessing().

Here is the call graph for this function:

BitePoint::Position RBridgeSpecialist::getPosition SegmentInfo mark  )  [private]
 

Calculates the position of a mark, depending on its colors.

Parameters:
mark 
Returns:
The position of the mark.

Definition at line 485 of file RBridgeSpecialist.cpp.

References RBridgeSpecialist::Rectangle::bottomLeft, colorClass, REdgeDetection::colorScan(), Geometry::Line::direction, DOT, RasterSpecialist::getColor(), idText, RBridgeSpecialist::SegmentInfo::leftColor, RBridgeSpecialist::SegmentInfo::lmValidityOrange, RBridgeSpecialist::SegmentInfo::lmValidityYellow, noColor, OUTPUT, RBridgeSpecialist::SegmentInfo::rect, RBridgeSpecialist::SegmentInfo::rightColor, REdgeDetection::setDirection(), RBridgeSpecialist::Rectangle::upperLeft, RBridgeSpecialist::Rectangle::upperRight, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y.

Referenced by findBridgeMark().

Here is the call graph for this function:

void RBridgeSpecialist::calculateAnglesForPoint const Vector2< double > &  point,
const CameraMatrix cameraMatrix,
const CameraInfo cameraInfo,
Vector2< double > &  angles
[private]
 

Definition at line 267 of file RBridgeSpecialist.cpp.

References point, sqr, Vector2< int >::x, and Vector2< int >::y.

Referenced by findBridgeMark().

bool RBridgeSpecialist::calculatePointOnField const double  x,
const double  y,
const CameraMatrix cameraMatrix,
const CameraInfo cameraInfo,
Vector2< int > &  pointOnField
[private]
 

Definition at line 295 of file RBridgeSpecialist.cpp.

References Vector3< V >::x, Vector3< V >::y, and Vector3< V >::z.

void RBridgeSpecialist::createValidities SegmentInfo info  )  [private]
 

Calculates the validities for the several kinds of marks.

The result is stored in info.

Parameters:
info input

Definition at line 330 of file RBridgeSpecialist.cpp.

References RBridgeSpecialist::SegmentInfo::lmValidityOrange, RBridgeSpecialist::SegmentInfo::lmValidityYellow, RBridgeSpecialist::SegmentInfo::orange, RBridgeSpecialist::SegmentInfo::skyblue, and RBridgeSpecialist::SegmentInfo::yellow.

Referenced by createBBox().


Member Data Documentation

colorClass RBridgeSpecialist::lineColor [private]
 

The color of the line behind the bite-marks.

Definition at line 112 of file RBridgeSpecialist.h.

RasterStrategy* RBridgeSpecialist::strategy [private]
 

The strategy.

Definition at line 114 of file RBridgeSpecialist.h.

REdgeDetection RBridgeSpecialist::edgeScanner [private]
 

The edge scanner.

Definition at line 116 of file RBridgeSpecialist.h.

std::list<LinePair> RBridgeSpecialist::lst_pts [private]
 

The runs, which are the input data.

Definition at line 118 of file RBridgeSpecialist.h.

Geometry::Line RBridgeSpecialist::horizon [private]
 

The calculated horizon.

Definition at line 120 of file RBridgeSpecialist.h.

Geometry::Line RBridgeSpecialist::pHorizon [private]
 

A perpendicular to the horizon.

Definition at line 122 of file RBridgeSpecialist.h.

Vector2<int> RBridgeSpecialist::left_border [private]
 

A Temporary variable.

Definition at line 124 of file RBridgeSpecialist.h.

std::vector<list<LinePair> > RBridgeSpecialist::segments_img [private]
 

The regions, the runs are clustered to.

Definition at line 126 of file RBridgeSpecialist.h.

std::vector<SegmentInfo> RBridgeSpecialist::infos_img [private]
 

Additional data to the regions.

Definition at line 128 of file RBridgeSpecialist.h.


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