ScanlineGrid Class Reference
Scanline Grid. More...
#include <models/scanlines/grid.h>

Public Member Functions | |
| ScanlineGrid (unsigned int width, unsigned int height, unsigned int offset_x, unsigned int offset_y, ROI *roi=NULL, bool horizontal_grid=true) | |
| Constructor. | |
| virtual | ~ScanlineGrid () |
| Destructor. | |
| fawkes::point_t | operator* () |
| Get the current coordinate. | |
| fawkes::point_t * | operator-> () |
| Get pointer to current point. | |
| fawkes::point_t * | operator++ () |
| Postfix ++ operator. | |
| fawkes::point_t * | operator++ (int) |
| Prefix ++ operator. | |
| bool | finished () |
| Check if all desired points have been processed. | |
| void | reset () |
| Reset model. | |
| const char * | get_name () |
| Get name of scanline model. | |
| unsigned int | get_margin () |
| Get margin around points. | |
| virtual void | set_robot_pose (float x, float y, float ori) |
| Set the robot's pose. | |
| virtual void | set_pan_tilt (float pan, float tilt) |
| Set camera's pan/tilt values. | |
| virtual void | set_roi (ROI *roi=NULL) |
| Set the region-of-interest. | |
| void | setDimensions (unsigned int width, unsigned int height, ROI *roi=NULL) |
| Set dimensions. | |
| void | setOffset (unsigned int offset_x, unsigned int offset_y) |
| Set offset. | |
| void | setGridParams (unsigned int width, unsigned int height, unsigned int offset_x, unsigned int offset_y, ROI *roi=NULL, bool horizontal_grid=true) |
| Set all grid parameters. | |
Detailed Description
Scanline Grid.A grid as scanline points. The crossings of the lines are the scanline points.
Definition at line 31 of file grid.h.
Constructor & Destructor Documentation
| ScanlineGrid::ScanlineGrid | ( | unsigned int | width, | |
| unsigned int | height, | |||
| unsigned int | offset_x, | |||
| unsigned int | offset_y, | |||
| ROI * | roi = NULL, |
|||
| bool | horizontal_grid = true | |||
| ) |
Constructor.
- Parameters:
-
width width of grid height height of grid offset_x x offset between lines offset_y y offset between lines roi the grid will only be calculated within the roi (if NULL the roi will be from 0,0 to width,height). The object will be deleted by ScanlineGrid! horizontal_grid if true x will be increased before y
Definition at line 47 of file grid.cpp.
References setGridParams().
Member Function Documentation
| bool ScanlineGrid::finished | ( | ) | [virtual] |
Check if all desired points have been processed.
- Returns:
- true if all pixels that the model defines have been iterated.
Implements ScanlineModel.
Definition at line 142 of file grid.cpp.
Referenced by GradientClassifier::classify().
| unsigned int ScanlineGrid::get_margin | ( | ) | [virtual] |
Get margin around points.
Models that do not use margins shall return zero. It shall be guaranteed that in this margin region around a point there is no other point that has been or will be returned in a full iteration.
- Returns:
- margin around a point.
Implements ScanlineModel.
| const char * ScanlineGrid::get_name | ( | ) | [virtual] |
| point_t ScanlineGrid::operator* | ( | ) | [virtual] |
Get the current coordinate.
- Returns:
- current point in image that is shall be processed.
Implements ScanlineModel.
| point_t * ScanlineGrid::operator++ | ( | int | ) | [virtual] |
| point_t * ScanlineGrid::operator++ | ( | ) | [virtual] |
Postfix ++ operator.
Advances to the next point and returns the new point.
- Returns:
- pointer to new point
Implements ScanlineModel.
| point_t * ScanlineGrid::operator-> | ( | ) | [virtual] |
Get pointer to current point.
- Returns:
- pointer to current point
- See also:
- operator*()
Implements ScanlineModel.
| void ScanlineGrid::reset | ( | ) | [virtual] |
Reset model.
Resets the set of processed points.
Implements ScanlineModel.
Definition at line 148 of file grid.cpp.
References ROI::start, fawkes::point_t::x, and fawkes::point_t::y.
Referenced by GradientClassifier::classify(), set_roi(), and setOffset().
| void ScanlineGrid::set_pan_tilt | ( | float | pan, | |
| float | tilt | |||
| ) | [virtual] |
Set camera's pan/tilt values.
- Parameters:
-
pan camera's current pan tilt camera's current tilt
Implements ScanlineModel.
| void ScanlineGrid::set_robot_pose | ( | float | x, | |
| float | y, | |||
| float | ori | |||
| ) | [virtual] |
Set the robot's pose.
- Parameters:
-
x robot's x coordinate on field in meters y robot's y coordinate on field in meters ori robot's orientation. Looking towards the opponent goal is zero rad, with positive values pointing to the right, negative to the left.
Implements ScanlineModel.
| void ScanlineGrid::set_roi | ( | ROI * | roi = NULL |
) | [virtual] |
Set the region-of-interest.
If not NULL the scanlines gets only calculated within the ROI
- Parameters:
-
roi the region where scanlines should be calculated
Reimplemented from ScanlineModel.
Definition at line 184 of file grid.cpp.
References ROI::height, ROI::image_height, ROI::image_width, reset(), ROI::start, ROI::width, fawkes::point_t::x, and fawkes::point_t::y.
Referenced by setDimensions().
| void ScanlineGrid::setDimensions | ( | unsigned int | width, | |
| unsigned int | height, | |||
| ROI * | roi = NULL | |||
| ) |
Set dimensions.
Set width and height of scanline grid. Implicitly resets the grid.
- Parameters:
-
width width height height roi the grid will only be calculated within the roi (if NULL the roi will be from 0,0 to width,height). The object will be deleted by ScanlineGrid!
Definition at line 214 of file grid.cpp.
References set_roi().
Referenced by setGridParams().
| void ScanlineGrid::setGridParams | ( | unsigned int | width, | |
| unsigned int | height, | |||
| unsigned int | offset_x, | |||
| unsigned int | offset_y, | |||
| ROI * | roi = NULL, |
|||
| bool | horizontal_grid = true | |||
| ) |
Set all grid parameters.
Set width, height, X and Y offset by which the pointer in the grid is advanced. Implicitly resets the grid.
- Parameters:
-
width width height height offset_x offset_x offset_y offset_y roi the grid will only be calculated within the roi (if NULL the roi will be from 0,0 to width,height). The object will be deleted by ScanlineGrid! horizontal_grid if true x will be increased before y
Definition at line 251 of file grid.cpp.
References setDimensions(), and setOffset().
Referenced by ScanlineGrid().
| void ScanlineGrid::setOffset | ( | unsigned int | offset_x, | |
| unsigned int | offset_y | |||
| ) |
Set offset.
Set X and Y offset by which the pointer in the grid is advanced. Implicitly resets the grid.
- Parameters:
-
offset_x offset_x offset_y offset_y
Definition at line 229 of file grid.cpp.
References reset().
Referenced by setGridParams().
The documentation for this class was generated from the following files:

