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

# GT2004EdgeDetection Class Reference

Utility-class for edge-detection. More...

`#include <GT2004EdgeDetection.h>`

Collaboration diagram for GT2004EdgeDetection:

[legend]
List of all members.

## Public Member Functions
| GT2004EdgeDetection (ImageProcessor &processor, MSH2004ColorCorrector &corrector)
| Default constructor.
| ~GT2004EdgeDetection ()
bool | scanEast (int &x, int &y)
bool | scanWest (int &x, int &y)
bool | scanNorth (int &x, int &y)
bool | scanSouth (int &x, int &y)
bool | ballScanEast (int &x, int &y)
bool | ballScanWest (int &x, int &y)
bool | scan (int &x, int &y, Vector2< double > direction)
| Follows the given direction, and determines edges by the sum of all three channels.
bool | bufferedScan (int &x, int &y, Vector2< double > direction)
| Follows the given direction, and determines edges by the sum of all three channels.
bool | bufferedScan (int &x, int &y)
| Follows the last given direction.
bool | scanField (int &x, int &y, Vector2< double > direction)
| Follows the given direction,and searches for field-edge-points.
bool | scanField (int &x, int &y)
| Follows the last given direction,and searches for field-edge-points.
bool | scan (int &x, int &y)
| Follows the last given direction, and determines edges by the sum of all three channels.
bool | colorScan (int &x, int &y, Vector2< double > direction, colorClass &lastColor)
bool | colorScan (int &x, int &y, colorClass &lastColor)
bool | susanScan (int &x, int &y, Vector2< double > direction)
bool | scan (int &x, int &y, int x1, int y1)
bool | colorScan (int &x, int &y, int x1, int y1, colorClass &lastColor)
void | setDirection (Vector2< double > dir)
colorClass | getColor (int index)
int | getRange (int index)
bool | isHorizontalEdge (int x, int y)
int | horizontalEdgeVote (int x, int y)
bool | isVerticalEdge (int x, int y)
int | verticalEdgeVote (int x, int y)
int | ballEdgeVote (int x, int y)
int | crossEdgeVote (int x, int y)
int | fieldEdgeVote (int x, int y)
colorClass | getColor (int x, int y)
void | skip (int &x, int &y)
| Gives the next pixel of last scan.
bool | findStart (Vector2< int > &start, const Vector2< double > &dir)
int | getBufferSize ()
## Public Attributes
int | threshold
int | tempX
int | tempY
## Private Member Functions
int | fastCrossEdgeVote (int x, int y)
void | addColor ()
bool | insideImage (int x, int y)
int | susanVote (int x, int y)
## Private Attributes
ImageProcessor & | ip
SUSANEdgeDetectionLite | susanDetector
MSH2004ColorCorrector | corrector
Vector2< double > | direction
int | e
int | f
int | g
int | dx
int | dy
int | cx
int | cy
int | bufferSize
colorClass | currentColor
colorClass | lastColor
int | colorRange
colorClass | colorBuffer [20]
| This buffer is used to store the colors passed by a buffered scan-method during the last scan.
int | ranges [20]
| This buffer is used to store the ranges of the colors.

## Detailed Description

Utility-class for edge-detection.

Definition at line 21 of file GT2004EdgeDetection.h.

## Constructor & Destructor Documentation

GT2004EdgeDetection::GT2004EdgeDetection | ( | ImageProcessor & | processor,
|  | MSH2004ColorCorrector & | corrector
| ) |

| Default constructor. Definition at line 15 of file GT2004EdgeDetection.cpp. References DEFAULT_EDGE_THRESHOLD.

GT2004EdgeDetection::~GT2004EdgeDetection | ( |  | ) |

| Definition at line 26 of file GT2004EdgeDetection.cpp.

## Member Function Documentation

bool GT2004EdgeDetection::scanEast | ( | int & | x,
|  | int & | y
| ) |

| Definition at line 30 of file GT2004EdgeDetection.cpp. References Image::cameraInfo, fastCrossEdgeVote(), ImageProcessorInterfaces::image, insideImage(), and CameraInfo::resolutionWidth.

Here is the call graph for this function:

bool GT2004EdgeDetection::scanWest | ( | int & | x,
|  | int & | y
| ) |

| Definition at line 55 of file GT2004EdgeDetection.cpp. References fastCrossEdgeVote(), and insideImage().

Here is the call graph for this function:

bool GT2004EdgeDetection::scanNorth | ( | int & | x,
|  | int & | y
| ) |

| Definition at line 79 of file GT2004EdgeDetection.cpp. References fastCrossEdgeVote(), and insideImage().

Here is the call graph for this function:

bool GT2004EdgeDetection::scanSouth | ( | int & | x,
|  | int & | y
| ) |

| Definition at line 103 of file GT2004EdgeDetection.cpp. References Image::cameraInfo, fastCrossEdgeVote(), ImageProcessorInterfaces::image, insideImage(), and CameraInfo::resolutionHeight.

Here is the call graph for this function:

bool GT2004EdgeDetection::ballScanEast | ( | int & | x,
|  | int & | y
| ) |

| Definition at line 128 of file GT2004EdgeDetection.cpp. References ballEdgeVote().

Here is the call graph for this function:

bool GT2004EdgeDetection::ballScanWest | ( | int & | x,
|  | int & | y
| ) |

| Definition at line 151 of file GT2004EdgeDetection.cpp. References ballEdgeVote().

Here is the call graph for this function:

bool GT2004EdgeDetection::scan | ( | int & | x,
|  | int & | y,
|  | Vector2< double > | direction
| ) |

  | Follows the given direction, and determines edges by the sum of all three channels. The position of the edge is stored in x and y. Parameters:
  x | The starting x-value.
  y | The starting y-value.
  direction | The direction followed.
Returns: edge was found Definition at line 174 of file GT2004EdgeDetection.cpp. References crossEdgeVote(), cx, cy, dx, dy, e, f, g, tempX, tempY, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

bool GT2004EdgeDetection::bufferedScan | ( | int & | x,
|  | int & | y,
|  | Vector2< double > | direction
| ) |

  | Follows the given direction, and determines edges by the sum of all three channels. The position of the edge is stored in x and y. Fills the colorBuffer while scanning, so the client can determine with the colorBuffer-Array what kind of object was found. Parameters:
  x | The starting x-value.
  y | The starting y-value.
  direction | The direction followed.
Returns: edge was found Definition at line 268 of file GT2004EdgeDetection.cpp. References addColor(), bufferSize, colorRange, crossEdgeVote(), currentColor, cx, cy, dx, dy, e, f, g, getColor(), lastColor, tempX, tempY, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

bool GT2004EdgeDetection::bufferedScan | ( | int & | x,
|  | int & | y
| ) |

| Follows the last given direction. Skips 3 pixels at the beginning of each scan, while filling the buffer. Definition at line 396 of file GT2004EdgeDetection.cpp. References addColor(), bufferSize, colorRange, crossEdgeVote(), currentColor, cx, cy, dx, dy, e, f, g, getColor(), lastColor, skip(), tempX, and tempY.

Here is the call graph for this function:

bool GT2004EdgeDetection::scanField | ( | int & | x,
|  | int & | y,
|  | Vector2< double > | direction
| ) |

  | Follows the given direction,and searches for field-edge-points. Determines edges by the sum of the first two channels. The position of the edge is stored in x and y. Parameters:
  x | The starting x-value.
  y | The starting y-value.
  direction | The direction followed.
Returns: edge was found Definition at line 512 of file GT2004EdgeDetection.cpp. References cx, cy, dx, dy, e, f, fieldEdgeVote(), g, tempX, tempY, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

bool GT2004EdgeDetection::scanField | ( | int & | x,
|  | int & | y
| ) |

  | Follows the last given direction,and searches for field-edge-points. Determines edges by the sum of the first two channels. The position of the edge is stored in x and y. Parameters:
  x | The starting x-value.
  y | The starting y-value.
Returns: edge was found Definition at line 606 of file GT2004EdgeDetection.cpp. References cx, cy, dx, dy, e, f, fieldEdgeVote(), g, tempX, and tempY.

Here is the call graph for this function:

bool GT2004EdgeDetection::scan | ( | int & | x,
|  | int & | y
| ) |

| Follows the last given direction, and determines edges by the sum of all three channels. Definition at line 1050 of file GT2004EdgeDetection.cpp. References crossEdgeVote(), cx, cy, dx, dy, e, f, g, tempX, and tempY.

Here is the call graph for this function:

bool GT2004EdgeDetection::colorScan | ( | int & | x,
|  | int & | y,
|  | Vector2< double > | direction,
|  | colorClass & | lastColor
| ) |

| Definition at line 841 of file GT2004EdgeDetection.cpp. References cx, cy, dx, dy, e, f, g, getColor(), noColor, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

bool GT2004EdgeDetection::colorScan | ( | int & | x,
|  | int & | y,
|  | colorClass & | lastColor
| ) |

| Definition at line 909 of file GT2004EdgeDetection.cpp. References cx, cy, dx, dy, e, f, g, getColor(), and noColor.

Here is the call graph for this function:

bool GT2004EdgeDetection::susanScan | ( | int & | x,
|  | int & | y,
|  | Vector2< double > | direction
| ) |

| Definition at line 956 of file GT2004EdgeDetection.cpp. References cx, cy, dx, dy, e, f, g, susanVote(), tempX, tempY, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

bool GT2004EdgeDetection::scan | ( | int & | x,
|  | int & | y,
|  | int | x1,
|  | int | y1
| ) |

| Definition at line 679 of file GT2004EdgeDetection.cpp. References crossEdgeVote(), cx, cy, dx, dy, e, f, fastCrossEdgeVote(), g, tempX, and tempY.

Here is the call graph for this function:

bool GT2004EdgeDetection::colorScan | ( | int & | x,
|  | int & | y,
|  | int | x1,
|  | int | y1,
|  | colorClass & | lastColor
| ) |

| Definition at line 772 of file GT2004EdgeDetection.cpp. References cx, cy, dx, dy, e, f, g, getColor(), and noColor.

Here is the call graph for this function:

void GT2004EdgeDetection::setDirection | ( | Vector2< double > | dir | ) | `[inline]`

| Definition at line 109 of file GT2004EdgeDetection.h. References cx, cy, dx, dy, e, f, g, Vector2< V >::x, and Vector2< V >::y.

colorClass GT2004EdgeDetection::getColor | ( | int | index | ) | `[inline]`

| Definition at line 127 of file GT2004EdgeDetection.h. References colorBuffer. Referenced by bufferedScan(), and colorScan().

int GT2004EdgeDetection::getRange | ( | int | index | ) | `[inline]`

| Definition at line 131 of file GT2004EdgeDetection.h. References ranges.

bool GT2004EdgeDetection::isHorizontalEdge | ( | int | x,
|  | int | y
| ) | `[inline]`

| Definition at line 135 of file GT2004EdgeDetection.h. References horizontalEdgeVote().

Here is the call graph for this function:

int GT2004EdgeDetection::horizontalEdgeVote | ( | int | x,
|  | int | y
| ) | `[inline]`

| Definition at line 139 of file GT2004EdgeDetection.h. References Image::cameraInfo, Image::image, ImageProcessorInterfaces::image, and CameraInfo::resolutionWidth. Referenced by isHorizontalEdge().

bool GT2004EdgeDetection::isVerticalEdge | ( | int | x,
|  | int | y
| ) | `[inline]`

| Definition at line 153 of file GT2004EdgeDetection.h. References verticalEdgeVote().

Here is the call graph for this function:

int GT2004EdgeDetection::verticalEdgeVote | ( | int | x,
|  | int | y
| ) | `[inline]`

| Definition at line 157 of file GT2004EdgeDetection.h. References Image::cameraInfo, Image::image, ImageProcessorInterfaces::image, and CameraInfo::resolutionHeight. Referenced by isVerticalEdge().

int GT2004EdgeDetection::ballEdgeVote | ( | int | x,
|  | int | y
| ) | `[inline]`

| Definition at line 171 of file GT2004EdgeDetection.h. References Image::cameraInfo, Image::image, ImageProcessorInterfaces::image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth. Referenced by ballScanEast(), and ballScanWest().

int GT2004EdgeDetection::crossEdgeVote | ( | int | x,
|  | int | y
| ) | `[inline]`

| Definition at line 202 of file GT2004EdgeDetection.h. References Image::cameraInfo, Image::image, ImageProcessorInterfaces::image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth. Referenced by bufferedScan(), and scan().

int GT2004EdgeDetection::fieldEdgeVote | ( | int | x,
|  | int | y
| ) | `[inline]`

| Definition at line 231 of file GT2004EdgeDetection.h. References Image::cameraInfo, Image::image, ImageProcessorInterfaces::image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth. Referenced by scanField().

colorClass GT2004EdgeDetection::getColor | ( | int | x,
|  | int | y
| ) | `[inline]`

| Definition at line 258 of file GT2004EdgeDetection.h. References Image::cameraInfo, ImageProcessorInterfaces::colorTable, cy, ColorTable::getColorClass(), MSH2004ColorCorrector::getCorrectedPixel(), Image::image, ImageProcessorInterfaces::image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.

Here is the call graph for this function:

void GT2004EdgeDetection::skip | ( | int & | x,
|  | int & | y
| ) | `[inline]`

| Gives the next pixel of last scan. This is only for the scans that use Bresenham's algorithm. Definition at line 272 of file GT2004EdgeDetection.h. References cx, cy, dx, dy, e, f, and g. Referenced by bufferedScan().

bool GT2004EdgeDetection::findStart | ( | Vector2< int > & | start,
|  | const Vector2< double > & | dir
| ) | `[inline]`

| Definition at line 295 of file GT2004EdgeDetection.h. References Image::cameraInfo, Geometry::clipLineWithRectangleCohenSutherland(), dx, dy, ImageProcessorInterfaces::image, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y.

Here is the call graph for this function:

int GT2004EdgeDetection::getBufferSize | ( |  | ) | `[inline]`

| Definition at line 309 of file GT2004EdgeDetection.h. References bufferSize.

int GT2004EdgeDetection::fastCrossEdgeVote | ( | int | x,
|  | int | y
| ) | `[inline, private]`

| Definition at line 367 of file GT2004EdgeDetection.h. References Image::image, and ImageProcessorInterfaces::image. Referenced by scan(), scanEast(), scanNorth(), scanSouth(), and scanWest().

void GT2004EdgeDetection::addColor | ( |  | ) | `[inline, private]`

| Definition at line 395 of file GT2004EdgeDetection.h. References bufferSize, colorBuffer, colorRange, lastColor, and ranges. Referenced by bufferedScan().

bool GT2004EdgeDetection::insideImage | ( | int | x,
|  | int | y
| ) | `[inline, private]`

| Definition at line 407 of file GT2004EdgeDetection.h. References Image::cameraInfo, ImageProcessorInterfaces::image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth. Referenced by scanEast(), scanNorth(), scanSouth(), and scanWest().

int GT2004EdgeDetection::susanVote | ( | int | x,
|  | int | y
| ) | `[inline, private]`

| Definition at line 413 of file GT2004EdgeDetection.h. References Image::cameraInfo, ImageProcessorInterfaces::image, SUSANEdgeDetectionLite::isEdgePoint(), CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and susanDetector. Referenced by susanScan().

Here is the call graph for this function:

## Member Data Documentation

int GT2004EdgeDetection::threshold

| Definition at line 34 of file GT2004EdgeDetection.h.

int GT2004EdgeDetection::tempX

| Definition at line 36 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), scan(), scanField(), and susanScan().

int GT2004EdgeDetection::tempY

| Definition at line 38 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), scan(), scanField(), and susanScan().

ImageProcessor& GT2004EdgeDetection::ip`[private]`

| Definition at line 329 of file GT2004EdgeDetection.h.

SUSANEdgeDetectionLite GT2004EdgeDetection::susanDetector`[private]`

| Definition at line 331 of file GT2004EdgeDetection.h. Referenced by susanVote().

MSH2004ColorCorrector GT2004EdgeDetection::corrector`[private]`

| Definition at line 333 of file GT2004EdgeDetection.h.

Vector2<double> GT2004EdgeDetection::direction`[private]`

| Definition at line 335 of file GT2004EdgeDetection.h.

int GT2004EdgeDetection::e`[private]`

| Definition at line 337 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), colorScan(), scan(), scanField(), setDirection(), skip(), and susanScan().

int GT2004EdgeDetection::f`[private]`

| Definition at line 339 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), colorScan(), scan(), scanField(), setDirection(), skip(), and susanScan().

int GT2004EdgeDetection::g`[private]`

| Definition at line 341 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), colorScan(), scan(), scanField(), setDirection(), skip(), and susanScan().

int GT2004EdgeDetection::dx`[private]`

| Definition at line 343 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), colorScan(), findStart(), scan(), scanField(), setDirection(), skip(), and susanScan().

int GT2004EdgeDetection::dy`[private]`

| Definition at line 345 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), colorScan(), findStart(), scan(), scanField(), setDirection(), skip(), and susanScan().

int GT2004EdgeDetection::cx`[private]`

| Definition at line 347 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), colorScan(), scan(), scanField(), setDirection(), skip(), and susanScan().

int GT2004EdgeDetection::cy`[private]`

| Definition at line 349 of file GT2004EdgeDetection.h. Referenced by bufferedScan(), colorScan(), getColor(), scan(), scanField(), setDirection(), skip(), and susanScan().

int GT2004EdgeDetection::bufferSize`[private]`

| Definition at line 351 of file GT2004EdgeDetection.h. Referenced by addColor(), bufferedScan(), and getBufferSize().

colorClass GT2004EdgeDetection::currentColor`[private]`

| Definition at line 353 of file GT2004EdgeDetection.h. Referenced by bufferedScan().

colorClass GT2004EdgeDetection::lastColor`[private]`

| Definition at line 355 of file GT2004EdgeDetection.h. Referenced by addColor(), and bufferedScan().

int GT2004EdgeDetection::colorRange`[private]`

| Definition at line 357 of file GT2004EdgeDetection.h. Referenced by addColor(), and bufferedScan().

colorClass GT2004EdgeDetection::colorBuffer[20]`[private]`

| This buffer is used to store the colors passed by a buffered scan-method during the last scan. Definition at line 362 of file GT2004EdgeDetection.h. Referenced by addColor(), and getColor().

int GT2004EdgeDetection::ranges[20]`[private]`

| This buffer is used to store the ranges of the colors. Definition at line 365 of file GT2004EdgeDetection.h. Referenced by addColor(), and getRange().

The documentation for this class was generated from the following files:

- Modules/ImageProcessor/ImageProcessorTools/GT2004EdgeDetection.h
- Modules/ImageProcessor/ImageProcessorTools/GT2004EdgeDetection.cpp