One of the most commonly used objects in TLIB is the tlRect object. The tlRect object contains simple rectangular data (position, size) and routines to duplicate, move and resize it. It is used mostly to define a ROI (Region Of Interest, i.e. to limit the image processing to a given portion of an image), leading to shorter execution times.
Public Member Functions | |
tlRect () | |
tlRect (int x, int y, int width, int height) | |
virtual | ~tlRect () |
int | set (int x, int y, int width, int height) |
int | collapse (int dsize) |
int | expand (int dsize) |
int | setCenter (int x, int y) |
int | copy (tlRect *rect) |
int | copyTo (tlRect *rect) |
tlRect * | copy () |
int | intersect (tlRect *rect) |
int | setSize (int width, int height, int depth=255) |
int | setLocation (int x, int y, int disp=0) |
int | setLocation (tlPoint *point) |
int | shift (int dx, int dy, int ddisp=0) |
int | setWorldLocation (float wx, float wy, float wz) |
tlLocation * | toLocation () |
int | toLocation (tlLocation *location) |
Public Attributes | |
int | width |
int | height |
int | depth |
int | x |
int | y |
int | disp |
float | wx |
float | wy |
float | wz |
tlRect::tlRect | ( | ) |
tlRect::tlRect | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
Constructor, initialize all members to the desired value.
x | rectangle upper-left corner x position [pix] | |
y | rectangle upper-left corner y position [pix] | |
width | rectangle width [pix] | |
height | rectangle height [pix] |
tlRect::~tlRect | ( | ) | [virtual] |
int tlRect::set | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
Set rectangle member values.
x | rectangle upper-left corner x position [pix] | |
y | rectangle upper-left corner y position [pix] | |
width | rectangle width [pix] | |
height | rectangle height [pix] |
int tlRect::collapse | ( | int | dsize | ) |
Evenly shrinks the rectangle around its center.
dsize | width/height decrease [pix] |
int tlRect::expand | ( | int | dsize | ) |
Evenly expands the rectangle around its center
dsize | width/height decrease [pix] |
int tlRect::setCenter | ( | int | x, | |
int | y | |||
) |
Set the location of the rectangle center.
x | rectangle center x position [pix] | |
y | rectangle center corner y position [pix] |
Reimplemented in tlMask.
int tlRect::copy | ( | tlRect * | rect | ) |
Copy the rectangle parameters from another tlRect object.
rect | the rectangle that should be copied |
int tlRect::copyTo | ( | tlRect * | rect | ) |
Copy rectangle parameters to another rect object
rect | the rectangle that should contained copied parameters |
tlRect * tlRect::copy | ( | ) |
Create a copy of the rectangle.
delete
when done with it.int tlRect::intersect | ( | tlRect * | rect | ) |
Check if a given rectangle intesects with the current object.
rect | the rectangle to check for intersection |
int tlSize::setSize | ( | int | width, | |
int | height, | |||
int | depth = 255 | |||
) | [inherited] |
Set the size object parameters.
width | object width | |
height | object height | |
depth | object disparity range size |
int tlLocation::setLocation | ( | int | x, | |
int | y, | |||
int | disp = 0 | |||
) | [inherited] |
Set the location object parameters.
x | x location of the object [pix] | |
y | y location of the object [pix] | |
disp | disparity of the object [disp] |
int tlLocation::setLocation | ( | tlPoint * | point | ) | [inherited] |
Set the location object parameters.
point | tlPoint object |
int tlLocation::shift | ( | int | dx, | |
int | dy, | |||
int | ddisp = 0 | |||
) | [inherited] |
Shift the object location.
dx | shift along x axis [pix] | |
dy | shift along y axis [pix] | |
ddisp | disparity shift [disp] |
int tlLocation::setWorldLocation | ( | float | wx, | |
float | wy, | |||
float | wz | |||
) | [inherited] |
Set the world location object parameters.
wx | world X location | |
wy | world Y location | |
wz | world Z location |
tlLocation * tlLocation::toLocation | ( | ) | [inherited] |
Get a copy of the location of the object.
int tlLocation::toLocation | ( | tlLocation * | location | ) | [inherited] |
Get the location of the object.
location | [out] tlLocation object that will receive the data |
int tlSize::width [inherited] |
width of the object inheriting from tlSize.
int tlSize::height [inherited] |
height of the object inheriting from tlSize.
int tlSize::depth [inherited] |
disparity range size of the object inheriting from tlSize.
int tlLocation::x [inherited] |
X location of the object [pix].
int tlLocation::y [inherited] |
Y location of the object [pix].
int tlLocation::disp [inherited] |
Disparity of the object [disp].
int tlLocation::wx [inherited] |
X location of the object in real-world coordonates [m].
int tlLocation::wy [inherited] |
Y location of the object in real-world coordonates [m].
int tlLocation::wz [inherited] |
Z location of the object in real-world coordonates [m].