latest version v1.9 - last update 10 Apr 2010 |
The location class specifies a small region in an image or channel. More...
#include <ltiLocation.h>
Public Member Functions | |
location () | |
location (const point &pos, const float &ang, const float &rad) | |
location (const tpoint< float > &pos, const float &ang, const float &rad) | |
location (const location &other) | |
location & | copy (const location &other) |
location & | operator= (const location &other) |
bool | operator== (const location &p) const |
bool | operator!= (const location &p) const |
bool | operator< (const location &other) |
bool | operator> (const location &other) |
location & | scale (const float &factor) |
location & | scale (const location &other, const float &factor) |
location & | shift (const point &shft) |
location & | shift (const tpoint< float > &shft) |
location & | shift (const location &other, const point &shft) |
location & | shift (const location &other, const tpoint< float > &shft) |
location & | rotate (const float &factor) |
location & | rotate (const location &other, const float &factor) |
bool | contains (const point &p) const |
bool | contains (const tpoint< float > &p) const |
float | distance (const location &other) |
Public Attributes | |
tpoint< float > | position |
float | angle |
float | radius |
The location class specifies a small region in an image or channel.
It is mainly used in the extraction of local features. There are some functors to extract the important or salient locations in an image, for example lti::axLocalRegions.
The locations are represented by its position in an image or channel, an orientation and a radius.
lti::location::location | ( | ) |
default constructor
lti::location::location | ( | const point & | pos, | |
const float & | ang, | |||
const float & | rad | |||
) |
lti::location::location | ( | const tpoint< float > & | pos, | |
const float & | ang, | |||
const float & | rad | |||
) |
lti::location::location | ( | const location & | other | ) |
copy constructor
bool lti::location::contains | ( | const tpoint< float > & | p | ) | const |
Check if the given point can be considered within the location, i.e.
if ||p-position|| < radius
bool lti::location::contains | ( | const point & | p | ) | const |
Check if the given point can be considered within the location, i.e.
if ||p-position|| < radius
float lti::location::distance | ( | const location & | other | ) |
returns the distance between the borders of two locations or zero if they overlap or if one of the locations lies inside the other one.
bool lti::location::operator!= | ( | const location & | p | ) | const |
operator !=
bool lti::location::operator< | ( | const location & | other | ) |
Comparition operator.
A location is smaller than another one if its radius is smaller, or in case of equal radii, if the position is smaller, i.e. if it has smaller y-coordinate, or in case of equal y-position, if it has smaller x-coordinate.
bool lti::location::operator== | ( | const location & | p | ) | const |
operator ==
bool lti::location::operator> | ( | const location & | other | ) |
Comparition operator.
A location is greater than another one if its radius is greater, or in case of equal radii, if the position is greater, i.e. if it has greater y-coordinate, or in case of equal y-position, if it has greater x-coordinate.
Add the given angle in radius to the angle of the other location and leave the result here.
location& lti::location::rotate | ( | const float & | factor | ) |
Add the given angle in radius to the actual angle.
Multiply the other location's radius and position with the given factor and leave the result here.
location& lti::location::scale | ( | const float & | factor | ) |
Multiply the radius and position with the given factor.
Shift the other location by the given point and leave the result here.
Shift the other location by the given point and leave the result here.
Shift the location by the given point.
float lti::location::angle |
tpoint<float> lti::location::position |
Position of the location.
float lti::location::radius |
Radius or size of the location.