latest version v1.9 - last update 10 Apr 2010 |
The local feature extractors are functors which extract information from the given images or channels at the given locations. More...
#include <ltiLocalFeatureExtractor.h>
Classes | |
class | parameters |
The parameters for the class localFeatureExtractor. More... | |
Public Member Functions | |
localFeatureExtractor () | |
localFeatureExtractor (const parameters &par) | |
localFeatureExtractor (const localFeatureExtractor &other) | |
virtual | ~localFeatureExtractor () |
virtual const char * | getTypeName () const |
localFeatureExtractor & | copy (const localFeatureExtractor &other) |
localFeatureExtractor & | operator= (const localFeatureExtractor &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
virtual bool | apply (const lti::channel &src, const std::list< location > &locs, std::list< dvector > &dest) const |
virtual bool | apply (const lti::channel8 &src, const std::list< location > &locs, std::list< dvector > &dest) const |
virtual bool | apply (const std::list< channel > &src, const std::list< location > &locs, std::list< dvector > &dest) const |
virtual bool | apply (const lti::image &src, const std::list< location > &locs, std::list< dvector > &dest) const |
virtual bool | apply (const lti::image &src, const location &locs, dvector &dest) const |
virtual bool | apply (const lti::channel &src, const location &locs, dvector &dest) const |
Protected Member Functions | |
bool | fixedRaySampling (const channel &chan, const location &loc, fvector &dest, int numRays, int numCircles, float scale=1.0f, bool useOrientation=true, bool includeCenter=true, bool useCircleOrder=true) const |
bool | fixedRaySampling (const channel &chan, const std::list< location > &locs, std::list< fvector > &dests, int numRays, int numCircles, float scale=1.0f, bool useOrientation=true, bool includeCenter=true, bool useCircleOrder=true) const |
bool | fixedGridSampling (const channel &chan, const location &loc, fvector &dest, const array< int > &circPoints, float scale=1.0f, bool useOrientation=true) const |
bool | fixedGridSampling (const channel &chan, const std::list< location > &locs, std::list< fvector > &dests, const array< int > &circPoints, float scale=1.0f, bool useOrientation=true) const |
bool | initCircle (int radius, array< int > &circPoints) const |
Protected Attributes | |
bilinearInterpolator< float > | interpol |
The local feature extractors are functors which extract information from the given images or channels at the given locations.
This class is parent class for all implemented localfeature extractors.
lti::localFeatureExtractor::localFeatureExtractor | ( | ) |
Default constructor.
lti::localFeatureExtractor::localFeatureExtractor | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::localFeatureExtractor::localFeatureExtractor | ( | const localFeatureExtractor & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::localFeatureExtractor::~localFeatureExtractor | ( | ) | [virtual] |
Destructor.
virtual bool lti::localFeatureExtractor::apply | ( | const lti::channel & | src, | |
const location & | locs, | |||
dvector & | dest | |||
) | const [virtual] |
Compute the local feature for the given location.
Not implemented.
src | original channel to be analyzed. | |
locs | location that need to be analyzed. | |
dest | feature vector. |
Reimplemented in lti::localMoments.
virtual bool lti::localFeatureExtractor::apply | ( | const lti::image & | src, | |
const location & | locs, | |||
dvector & | dest | |||
) | const [virtual] |
Compute the local feature for the given location.
The standard implementation splits the image in three channels red,green,blue and concatenates the resulting vectors of each apply(channel&,const location, devector) in this order.
src | original image to be analyzed. | |
locs | location that need to be analyzed. | |
dest | feature vector. |
Reimplemented in lti::localMoments.
virtual bool lti::localFeatureExtractor::apply | ( | const lti::image & | src, | |
const std::list< location > & | locs, | |||
std::list< dvector > & | dest | |||
) | const [virtual] |
Compute the local feature for each location.
The standard implementation iterates through the lists and invokes apply(image&,const location,dvector) for each location.
src | original image to be analyzed. | |
locs | locations that need to be analyzed. | |
dest | list of feature vectors. |
Reimplemented in lti::localMoments.
virtual bool lti::localFeatureExtractor::apply | ( | const std::list< channel > & | src, | |
const std::list< location > & | locs, | |||
std::list< dvector > & | dest | |||
) | const [virtual] |
Compute the local feature for each location.
Not implemented.
src | list of channels be analyzed. | |
locs | locations that need to be analyzed. | |
dest | list of feature vectors. |
virtual bool lti::localFeatureExtractor::apply | ( | const lti::channel8 & | src, | |
const std::list< location > & | locs, | |||
std::list< dvector > & | dest | |||
) | const [virtual] |
Compute the local feature for each location.
The stanard implementation casts the channel8 to a channel and invokes the apply for channel.
src | original channel8 to be analyzed. | |
locs | locations that need to be analyzed. | |
dest | list of feature vectors. |
virtual bool lti::localFeatureExtractor::apply | ( | const lti::channel & | src, | |
const std::list< location > & | locs, | |||
std::list< dvector > & | dest | |||
) | const [virtual] |
Compute the local feature for each location.
The standard implementation iterates through the lists and invokes apply(channel&,const location,dvector) for each location.
src | original channel to be analyzed. | |
locs | locations that need to be analyzed. | |
dest | list of feature vectors. |
Reimplemented in lti::localMoments, and lti::schieleCrowley6DFeature.
virtual functor* lti::localFeatureExtractor::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Reimplemented from lti::featureExtractor.
Reimplemented in lti::axOGDFeature, lti::localColorFeature, lti::localMoments, and lti::schieleCrowley6DFeature.
localFeatureExtractor& lti::localFeatureExtractor::copy | ( | const localFeatureExtractor & | other | ) |
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::featureExtractor.
Reimplemented in lti::axOGDFeature, lti::localColorFeature, lti::localMoments, and lti::schieleCrowley6DFeature.
bool lti::localFeatureExtractor::fixedGridSampling | ( | const channel & | chan, | |
const std::list< location > & | locs, | |||
std::list< fvector > & | dests, | |||
const array< int > & | circPoints, | |||
float | scale = 1.0f , |
|||
bool | useOrientation = true | |||
) | const [protected] |
This helper function extracts pixels from a given channel.
The coordinates of this pixels are calculated from the given circPoints. (see initCircle())
chan | the input channel | |
locs | the locations where extraction should start (center of the circle) | |
dests | the output vectors | |
circPoints | mask used to calculate pixel coordinates | |
scale | the radius will be scaled by this factor (Default: 1) | |
useOrientation | whether the angle of the location is used as orientation (Default: true) |
bool lti::localFeatureExtractor::fixedGridSampling | ( | const channel & | chan, | |
const location & | loc, | |||
fvector & | dest, | |||
const array< int > & | circPoints, | |||
float | scale = 1.0f , |
|||
bool | useOrientation = true | |||
) | const [protected] |
This helper function extracts pixels from a given channel.
The coordinates of this pixels are calculated from the given circPoints. (see initCircle())
chan | the input channel | |
loc | the location where extraction should start (center of the circle) | |
dest | the output vector | |
circPoints | mask used to calculate pixel coordinates | |
scale | the radius will be scaled by this factor (Default: 1) | |
useOrientation | whether the angle of the location is used as orientation (Default: true) |
bool lti::localFeatureExtractor::fixedRaySampling | ( | const channel & | chan, | |
const std::list< location > & | locs, | |||
std::list< fvector > & | dests, | |||
int | numRays, | |||
int | numCircles, | |||
float | scale = 1.0f , |
|||
bool | useOrientation = true , |
|||
bool | includeCenter = true , |
|||
bool | useCircleOrder = true | |||
) | const [protected] |
This helper function extracts a sequence of circles around the given locations.
The order of the points in the output vectors is from the center to the outer and each circle is sampled clockwise.
chan | the input channel | |
locs | the locations where extraction should start | |
dests | the output vectors | |
numRays | how many points are extracted from each circle | |
numCircles | how many circles are used | |
scale | the radius will be scaled with this factor (Default: 1) | |
useOrientation | whether the angle of the location is used as orientation (Default: true) | |
includeCenter | wheter the location itself should be in the results (Default: 1) | |
useCircleOrder | wheter the order of the points is along the circles or along the rays. The data in the output vector is from the center to the outer and each circle is sampled clockwise. (Default: true) |
bool lti::localFeatureExtractor::fixedRaySampling | ( | const channel & | chan, | |
const location & | loc, | |||
fvector & | dest, | |||
int | numRays, | |||
int | numCircles, | |||
float | scale = 1.0f , |
|||
bool | useOrientation = true , |
|||
bool | includeCenter = true , |
|||
bool | useCircleOrder = true | |||
) | const [protected] |
This helper function extracts a sequence of circles around the given location.
chan | the input channel | |
loc | the location where extraction should start | |
dest | the output vector | |
numRays | how many points are extracted from each circle | |
numCircles | how many circles are used | |
scale | the radius will be scaled with this factor (Default: 1) | |
useOrientation | whether the angle of the location is used (Default: true) | |
includeCenter | wheter the location itself should be in the results (Default: 1) | |
useCircleOrder | wheter the order of the points is along the circles or along the rays. The data in the output vector is from the center to the outer and each circle is sampled clockwise. (Default: true) |
const parameters& lti::localFeatureExtractor::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::featureExtractor.
Reimplemented in lti::axOGDFeature, lti::localColorFeature, lti::localMoments, and lti::schieleCrowley6DFeature.
virtual const char* lti::localFeatureExtractor::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("localFeatureExtractor").
Reimplemented from lti::featureExtractor.
Reimplemented in lti::axOGDFeature, lti::localColorFeature, lti::localMoments, and lti::schieleCrowley6DFeature.
bool lti::localFeatureExtractor::initCircle | ( | int | radius, | |
array< int > & | circPoints | |||
) | const [protected] |
This helper function creates a circular mask with the specified radius to use with fixedGridSampling.
radius | which is used for the computed circle | |
circPoints | the resulting mask will be left here |
localFeatureExtractor& lti::localFeatureExtractor::operator= | ( | const localFeatureExtractor & | other | ) |
Alias for copy member.
other | the functor to be copied |
Reimplemented from lti::functor.
Reimplemented in lti::localColorFeature, lti::localMoments, and lti::schieleCrowley6DFeature.
bilinearInterpolator<float> lti::localFeatureExtractor::interpol [protected] |
Interpolater which can be used in child classes.