#include <RFieldSpecialist.h>
Inheritance diagram for RFieldSpecialist:
Public Types | |
typedef slist< LinePair2 > | lstLinePair |
typedef slist< figure > | lstFig |
Public Member Functions | |
RFieldSpecialist (RasterImageProcessor &processor, RasterStrategy &strategy) | |
The default constructor and destructor. | |
virtual | ~RFieldSpecialist () |
virtual int | getType () |
Returns the id of the specialist. | |
virtual void | init () |
Clears the buffers of points. | |
void | invokeOnPreScan (int x, int y) |
Function called by a given Strategy class Calling it one time stores the given coordinates in a temporar vector Calling it a second time creates an horizontal linepair and stores it in the linepair buffer. | |
void | invokeOnPostScan (int x, int y) |
unused in this specialist | |
void | addLinePoint (LinesPercept::LineType type, point &pt, int &id) |
Function called in the post scan section of the RDefaultStrategy when a line has been recognized. | |
void | executePostProcessing () |
Processing phase of the points. | |
Private Types | |
enum | goal_line { NONE = 0, YELLOW, SKYBLUE } |
id of the incoming goal line More... | |
Private Member Functions | |
int | id (LinesPercept::LineType) |
id of the incoming line | |
LinesPercept::LineType | id (int i) |
bool | makeLines (lstFig &inputList, lstLinePair &linePairList, const processParam *param) |
line recognition | |
void | fusionLines (lstLinePair &lst) |
fusion spaced lines having the same angle value | |
unsigned int | analyzeLines () |
Computes the intersction of the lines and shows the result. | |
void | checkRamp (lstLinePair &ramp) |
open challenge related function computes the angle of the ramp (must be a red line) and generate the corresponding line percept | |
void | drawCross (goal_line g, point &v) |
debug related functions | |
void | drawCircle (goal_line g, point &v) |
void | drawLine (goal_line g, LinePair2 &lp) |
Private Attributes | |
RasterStrategy * | strategy |
a pointer to the strategy tha scan the image | |
REdgeDetection | edgeScanner |
the scanner for adjusting the incoming point coordinates | |
processParam * | defaultParam |
the default parameter set | |
lstFig | lst_pts |
List of points stored during the horizontal scan. | |
point | temp |
Temporar points. | |
LinesPercept::LineType | lineInside |
vector< lstLinePair > | vecLines |
The resulting lines. | |
vector< lstFig > | segments_img |
The edges coming from the post scan method. |
The most important points are shown: corners, goal points ...
Definition at line 30 of file RFieldSpecialist.h.
|
Definition at line 34 of file RFieldSpecialist.h. Referenced by analyzeLines(), checkRamp(), executePostProcessing(), fusionLines(), and makeLines(). |
|
Definition at line 35 of file RFieldSpecialist.h. Referenced by makeLines(). |
|
id of the incoming goal line
Definition at line 153 of file RFieldSpecialist.h. Referenced by analyzeLines(). |
|
The default constructor and destructor.
Definition at line 13 of file RFieldSpecialist.cpp. References defaultParam, and lineInside. |
|
Definition at line 26 of file RFieldSpecialist.cpp. References defaultParam. |
|
Returns the id of the specialist.
Implements RasterSpecialist. Definition at line 31 of file RFieldSpecialist.cpp. References __RFieldSpecialist. |
|
Clears the buffers of points.
Implements RasterSpecialist. Definition at line 36 of file RFieldSpecialist.cpp. References slist< T >::clear(). Referenced by RDefaultStrategy::init(). |
Here is the call graph for this function:
|
Function called by a given Strategy class Calling it one time stores the given coordinates in a temporar vector Calling it a second time creates an horizontal linepair and stores it in the linepair buffer.
Reimplemented from RasterSpecialist. Definition at line 48 of file RFieldSpecialist.cpp. References RasterStrategy::insideField, LINE, point, horLinePair::pt1(), horLinePair::pt2(), slist< T >::push_front(), REdgeDetection::scanEast(), REdgeDetection::scanWest(), REdgeDetection::threshold, Vector2< V >::x, and Vector2< V >::y. Referenced by RDefaultStrategy::checkField(), RDefaultStrategy::checkRedLine(), and RDefaultStrategy::preScan(). |
Here is the call graph for this function:
|
unused in this specialist
Reimplemented from RasterSpecialist. Definition at line 94 of file RFieldSpecialist.cpp. Referenced by RDefaultStrategy::checkField(). |
|
Function called in the post scan section of the RDefaultStrategy when a line has been recognized.
Definition at line 97 of file RFieldSpecialist.cpp. |
Here is the call graph for this function:
|
Processing phase of the points.
Reimplemented from RasterSpecialist. Definition at line 242 of file RFieldSpecialist.cpp. References checkRamp(), slist< T >::clear(), createLinearSegment(), defaultParam, slist< T >::front(), fusionLines(), slist< T >::getSize(), LINE, lstLinePair, and makeLines(). Referenced by RDefaultStrategy::postProcessing(). |
Here is the call graph for this function:
|
id of the incoming line
Definition at line 74 of file RFieldSpecialist.cpp. Referenced by addLinePoint(). |
|
Definition at line 84 of file RFieldSpecialist.cpp. |
|
line recognition
Definition at line 154 of file RFieldSpecialist.cpp. References slist< T >::front(), slist< T >::getSize(), isEqual(), lstFig, lstLinePair, RFieldSpecialist::processParam::min_size, LinePair2::p2, point, slist< T >::push_front(), RFieldSpecialist::processParam::step_alpha, theta2(), and RFieldSpecialist::processParam::tol_alpha. Referenced by executePostProcessing(). |
Here is the call graph for this function:
|
fusion spaced lines having the same angle value
Definition at line 109 of file RFieldSpecialist.cpp. References Geometry::distance(), slist< T >::erase(), slist< T >::front(), Geometry::getDistanceToLine(), lstLinePair, makeLine(), mil(), point, and theta2(). Referenced by executePostProcessing(). |
Here is the call graph for this function:
|
Computes the intersction of the lines and shows the result.
Definition at line 334 of file RFieldSpecialist.cpp. References drawCircle(), drawCross(), drawLine(), slist< T >::front(), Geometry::getIntersectionOfLines(), LinePair2::getLength(), goal_line, idText, LINE, lstLinePair, makeLine(), NONE, NONE, OUTPUT, LinePair2::p1, LinePair2::p2, point, SKYBLUE, theta2(), vecLines, Vector2< V >::x, Vector2< V >::y, and YELLOW. |
Here is the call graph for this function:
|
open challenge related function computes the angle of the ramp (must be a red line) and generate the corresponding line percept
Definition at line 441 of file RFieldSpecialist.cpp. References OCRedLine::addPercept(), Geometry::calculatePointOnField(), Image::cameraInfo, ImageProcessorInterfaces::cameraMatrix, slist< T >::front(), idText, ImageProcessorInterfaces::image, LINE, lstLinePair, RasterImageProcessor::maxX, SpecialPercept::ocRedLine, OUTPUT, LinePair2::p1, LinePair2::p2, point, ImageProcessorInterfaces::specialPercept, theta2(), Vector2< V >::x, and Vector2< V >::y. Referenced by executePostProcessing(). |
Here is the call graph for this function:
|
debug related functions
Definition at line 273 of file RFieldSpecialist.cpp. References LINE, point, SKYBLUE, Vector2< V >::x, Vector2< V >::y, and YELLOW. Referenced by analyzeLines(). |
|
Definition at line 302 of file RFieldSpecialist.cpp. References CIRCLE, point, SKYBLUE, Vector2< V >::x, Vector2< V >::y, and YELLOW. Referenced by analyzeLines(). |
|
Definition at line 318 of file RFieldSpecialist.cpp. References LINE, LinePair2::p1, LinePair2::p2, SKYBLUE, Vector2< V >::x, Vector2< V >::y, and YELLOW. Referenced by analyzeLines(). |
|
a pointer to the strategy tha scan the image
Definition at line 85 of file RFieldSpecialist.h. |
|
the scanner for adjusting the incoming point coordinates
Definition at line 88 of file RFieldSpecialist.h. |
|
the default parameter set
Definition at line 106 of file RFieldSpecialist.h. Referenced by executePostProcessing(), RFieldSpecialist(), and ~RFieldSpecialist(). |
|
List of points stored during the horizontal scan.
Definition at line 111 of file RFieldSpecialist.h. |
|
Temporar points.
Definition at line 116 of file RFieldSpecialist.h. |
|
Definition at line 117 of file RFieldSpecialist.h. Referenced by RFieldSpecialist(). |
|
The resulting lines.
Definition at line 137 of file RFieldSpecialist.h. Referenced by analyzeLines(). |
|
The edges coming from the post scan method.
Definition at line 143 of file RFieldSpecialist.h. |