AURobotServers
4
|
#include <ucalibrate.h>
Public Member Functions | |
void | clear () |
void | clearNSEW () |
void | GetDefaultOffset (int head, int MinSep, float *dx, float *dy) |
float | GetDist (UCalibrationComponent *other) |
float | GetMaxBlockDist (UCalibrationComponent *other, float *dx, float *dy) |
bool | IsInRightQuadrant (UCalibrationComponent *other, int head) |
void | PaintNeighbors (UImage *image, UPixel pix, bool halfWay, UCalibrationComponent *ccHits, float scale=1.0) |
void | SetRc (int r, int c, int head) |
Public Attributes | |
int | col |
int | filter |
UCalibXYStat | NSEW [8] |
int | row |
float | rx |
float | ry |
int | w |
float | x |
float | y |
Class to hold calibration points found in an image
void UCalibrationComponent::clear | ( | void | ) |
Clear component
References UCalibXYStat::x, and UCalibXYStat::y.
void UCalibrationComponent::clearNSEW | ( | ) |
void UCalibrationComponent::GetDefaultOffset | ( | int | head, |
int | MinSep, | ||
float * | dx, | ||
float * | dy | ||
) |
Get offset point, where neighbor in direction head most likely are found. returns position offset in dx and dy
Referenced by UCalibrationComponents::DoFindNSEWHead().
float UCalibrationComponent::GetDist | ( | UCalibrationComponent * | other | ) |
Get distance to another component.
References UCalibXYStat::x, x, UCalibXYStat::y, and y.
float UCalibrationComponent::GetMaxBlockDist | ( | UCalibrationComponent * | other, |
float * | dx, | ||
float * | dy | ||
) |
Get block distance to another component. as the greater of either x or y distance. Returns the distance
References absf(), UCalibXYStat::x, x, UCalibXYStat::y, and y.
Referenced by UCalibrationComponents::GetClosestItems().
bool UCalibrationComponent::IsInRightQuadrant | ( | UCalibrationComponent * | other, |
int | head | ||
) |
Is the other component in the right direction compared to this one? returns true if so.
References absf(), UCalibXYStat::x, x, UCalibXYStat::y, and y.
Referenced by UCalibrationComponents::DoFindNSEWHead().
void UCalibrationComponent::PaintNeighbors | ( | UImage * | image, |
UPixel | pix, | ||
bool | halfWay, | ||
UCalibrationComponent * | ccHits, | ||
float | scale = 1.0 |
||
) |
Paint line to neighbors for this component
References UImage::cvArr(), UPixel::cvRGB(), MAX_CALIBRATION_COMPONENTS, UCalibXYStat::n, roundi(), UPixel::setYUVPix8(), UCalibXYStat::x, x, UCalibXYStat::y, and y.
Referenced by UCalibrationComponents::findClosestNeighbors().
void UCalibrationComponent::SetRc | ( | int | r, |
int | c, | ||
int | head | ||
) |
Set row and column number from the neighbor opposit head direction. e.g if heading is east then column is set to one more than c and row kept the same.
Referenced by UCalibrationComponents::SetRowColFromNeighbor().
int UCalibrationComponent::col |
int UCalibrationComponent::filter |
Source of this component - wich filter
Referenced by UCalibrationComponents::EnumerateCalibrationDetections4().
UCalibXYStat UCalibrationComponent::NSEW[8] |
Link and relation to neighbor in 8 directions. Directions are (N=0,NE=1,E=2,SE=3,S=4,SW=5,W=6,NW=7)
Referenced by UCalibrationComponents::DoFindNSEW4(), UCalibrationComponents::DoFindNSEWHead(), UCalibrationComponents::DoFindRowLength4(), UCalibrationComponents::doMakeCodeGrid(), UCalibrationComponents::doOrderHits4(), UCalibrationComponents::DoRemoveAndRetry(), UCalibrationComponents::DoValidateCandidates(), UCalibrationComponents::findNextInThisDirection4(), UCalibrationComponents::SetRowColForNeighbors(), and UCalibrationComponents::SetRowColFromNeighbor().
int UCalibrationComponent::row |
row position in chess grid
Referenced by UCalibrationMark::copy(), UCalibrationComponents::DoFindCenterCross(), and UCalibrationComponents::SetRowColFromNeighbor().
float UCalibrationComponent::rx |
real position of this corner on chart in meter from bottom left.
Referenced by UCalibrationMark::copy(), UCalibrationComponents::DoFindCenterCross(), and UCalibrationComponents::SaveCalibCoordinates().
float UCalibrationComponent::ry |
int UCalibrationComponent::w |
number of points in centroid calculation (0 == invalid)
Referenced by UCalibrationComponents::doMergeNearHits(), UCalibrationComponents::DoSizeLimit(), UCalibrationComponents::EnumerateCalibrationDetections(), and UCalibrationComponents::EnumerateCalibrationDetections4().
float UCalibrationComponent::x |
pixel position from 0 to image width -1
Referenced by UCalibrationMark::copy(), UCalibrationComponents::DoFindNSEWHead(), UCalibrationComponents::doMakeCodeGrid(), UCalibrationComponents::doMergeNearHits(), UCalibrationComponents::doOrderHits4(), UCalibrationComponents::EnumerateCalibrationDetections(), UCalibrationComponents::EnumerateCalibrationDetections4(), GetDist(), GetMaxBlockDist(), IsInRightQuadrant(), UCalibrationComponents::PaintGridInImage(), PaintNeighbors(), UCalibrationComponents::SaveCalibCoordinates(), and UCalibrationComponents::testForFlatness().
float UCalibrationComponent::y |
Referenced by UCalibrationMark::copy(), UCalibrationComponents::DoFindNSEWHead(), UCalibrationComponents::doMakeCodeGrid(), UCalibrationComponents::doMergeNearHits(), UCalibrationComponents::doOrderHits4(), UCalibrationComponents::EnumerateCalibrationDetections(), UCalibrationComponents::EnumerateCalibrationDetections4(), GetDist(), GetMaxBlockDist(), IsInRightQuadrant(), UCalibrationComponents::PaintGridInImage(), PaintNeighbors(), UCalibrationComponents::SaveCalibCoordinates(), and UCalibrationComponents::testForFlatness().