Superclass for all possible FeatureImages. More...
#include <FeatureImage.h>
Public Member Functions | |
FeatureImage (int x=0, int y=0) | |
Default constructor. | |
FeatureImage (int x, int y, FeatureImage *m, int xo, int yo) | |
Subimage constructor. | |
std::vector< Feature< T > > | getGlobalMaxima (int n) |
Returns the n maxima of the given image. | |
Feature< T > | getGlobalMaximum () |
Returns the maximum feature value. | |
std::vector< Feature< T > > | getGlobalMinima (int n) |
Returns the n minima of the actual image. | |
Feature< T > | getGlobalMinimum () |
Returns the minimum feature value of the actual image. | |
virtual GrayLevelImage8 | getGrayLevelImageRepresentation ()=0 |
Returns a GrayLevelImage of the actual FeatureImage. | |
std::vector< Feature< T > > | getLocalMaxima (int n, T threshold, int radius) |
Returns a vector of n local maxima of the actual image. | |
std::vector< Feature< T > > | getLocalMaxima (T threshold, int radius) |
Returns a vector of all local maxima of the actual image. | |
std::vector< Feature< T > > | getLocalMinima (int n, T threhold, int radius) |
Returns a vector of n local minima of the actual image. | |
std::vector< Feature< T > > | getLocalMinima (T thresh, int radius) |
Returns a vector of all local minima of the actual image. | |
virtual | ~FeatureImage () |
Private Member Functions | |
void | createMask (int radius, bool **(&mask)) |
Creates a binary mask for defining a local neighborhood. |
Superclass for all possible FeatureImages.
This class provides a superclass for all possible feature images as edge images etc. Although this class is a template class, it is abstract. So for using this class, a subclass has always to be implemented. The reason for this is an abstract method that cannot be generalized for all types of features. For scalar featuare types use the class ScalarFeatureImage instead.
Some methods of this class provide the computing of maxima and minima. These methods require the implementation of the operator <. for the features that are used. All of these methods return instances of the class Feature.
Definition at line 48 of file FeatureImage.h.
puma2::FeatureImage< T >::FeatureImage | ( | int | x = 0 , |
int | y = 0 |
||
) | [inline] |
Default constructor.
Default constructor. Creates a new image of the given size. The size is specified by the parameters x
and y
. The default values for both parameters are 0.
x
The horizontal size of the image. y
The vertical size of the image.
Definition at line 77 of file FeatureImage.h.
puma2::FeatureImage< T >::FeatureImage | ( | int | x, |
int | y, | ||
FeatureImage< T > * | m, | ||
int | xo, | ||
int | yo | ||
) | [inline] |
Subimage constructor.
This is the subimage constructor. It creates a subimage of the given base image m
. The size is given by the parameters x
and y
, the position of the subimage in the original image is given by the offsets xo
and yo
. The subimage will be created as a reference to the base image. The constructor will do all required checks on the sizes of the images during the creation process.
x,: | Horizontal size of the subimage. |
y,: | Vertical size of the subimage. |
m,: | Pointer to master image of which the image becomes a subimage. |
xo,: | offset for horizontal position of subimage in master image. |
yo,: | offset for vertical position of subimage in master image. |
Definition at line 98 of file FeatureImage.h.
virtual puma2::FeatureImage< T >::~FeatureImage | ( | ) | [inline, virtual] |
Destructor
Definition at line 104 of file FeatureImage.h.
void puma2::FeatureImage< T >::createMask | ( | int | radius, |
bool **& | mask | ||
) | [private] |
Creates a binary mask for defining a local neighborhood.
This method is just used for creating a radial binary mask of boolean values. The mask itself is used for searching local optima. The size of the mask is specified by the parameter radius
. The created mask will be returned via call by reference, using the paramter mask
.
radius | The radius of the mask. |
mask | The resulting binary mask. |
Definition at line 640 of file FeatureImage.h.
std::vector< Feature< T > > puma2::FeatureImage< T >::getGlobalMaxima | ( | int | n | ) |
Returns the n maxima of the given image.
Returns the n
maxima of the given image. The maxima will be returnded as a vector of Features. For using this method, the current feature type T has to implement the operator <. Beware of using arrays as the feature type T! The operator <. will only compare the memory addresses and NOT the values.
n | The number of maximum values that have to be returned. |
return | A vector of Features. |
Definition at line 283 of file FeatureImage.h.
Feature< T > puma2::FeatureImage< T >::getGlobalMaximum | ( | ) |
Returns the maximum feature value.
Returns the maximum value of the image, returned as a Feature. For using this method, the current feature type T has to implement the operator <. Beware of using arrays as the feature type T! The operator <. will only compare the memory addresses and NOT the values.
Definition at line 251 of file FeatureImage.h.
std::vector< Feature< T > > puma2::FeatureImage< T >::getGlobalMinima | ( | int | n | ) |
Returns the n minima of the actual image.
Returns the n
minima of the actual image. The minima will be returnded as a vector of Features. For using this method, the current feature type T has to implement the operator <. Beware of using arrays as the feature type T! The operator <. will only compare the memory addresses and NOT the values.
n | The number of minimum values that have to be returned. |
Definition at line 360 of file FeatureImage.h.
Feature< T > puma2::FeatureImage< T >::getGlobalMinimum | ( | ) |
Returns the minimum feature value of the actual image.
Returns the minimum feature value of the actual image. For using this method, the current feature type T has to implement the operator <. Beware of using arrays as the feature type T! The operator <. will only compare the memory addresses and NOT the values.
Definition at line 330 of file FeatureImage.h.
virtual GrayLevelImage8 puma2::FeatureImage< T >::getGrayLevelImageRepresentation | ( | ) | [pure virtual] |
Returns a GrayLevelImage of the actual FeatureImage.
std::vector< Feature< T > > puma2::FeatureImage< T >::getLocalMaxima | ( | int | n, |
T | threshold, | ||
int | radius | ||
) |
Returns a vector of n local maxima of the actual image.
Returns a vector of n
local maxima of the actual image. The maxima are located within a specified range. The range itself is defined by a given radius
. A value is a maximum value iff there is no other value within the range that is greater than this value. Furthermore, every maximum has to be greater than a given threhold
.
n | The number of local maximum values that have to be returned. |
threshold | The minimum feature value that has to be reached for defining a feature as a local maximum. |
radius | The radius of the range that will be used for defining 'local'. |
Definition at line 407 of file FeatureImage.h.
std::vector< Feature< T > > puma2::FeatureImage< T >::getLocalMaxima | ( | T | threshold, |
int | radius | ||
) |
Returns a vector of all local maxima of the actual image.
Returns a vector of all local maxima of the actual image. The maxima are located within a specified range. The range itself is defined by a given radius
. A value is a maximum value iff there is no other value within the range that is greater than this value. Furthermore, every maximum has to be greater than a given threhold
.
threshold | The minimum feature value that has to be reached for defining a feature as a local maximum. |
radius | The radius of the range that will be used for defining 'local'. |
Definition at line 477 of file FeatureImage.h.
std::vector< Feature< T > > puma2::FeatureImage< T >::getLocalMinima | ( | int | n, |
T | threhold, | ||
int | radius | ||
) |
Returns a vector of n local minima of the actual image.
Returns a vector of n
local minima of the actual image. The minima are located within a specified range. The range itself is defined by a given radius
. A value is a minimum value iff there is no other value within the range that is lower than this value. Furthermore, every minimum has to be lower than a given threhold
.
n | The number of local minimum values that have to be returned. |
threshold | The maximum feature value that has to be reached for defining a feature as a local minimum. |
radius | The radius of the range that will be used for defining 'local'. |
Definition at line 525 of file FeatureImage.h.
std::vector< Feature< T > > puma2::FeatureImage< T >::getLocalMinima | ( | T | thresh, |
int | radius | ||
) |
Returns a vector of all local minima of the actual image.
Returns a vector of all local minima of the actual image. The minima are located within a specified range. The range itself is defined by a given radius
. A value is a minimum value iff there is no other value within the range that is lower than this value. Furthermore, every minimum has to be lower than a given threhold
.
threshold | The maximum feature value that has to be reached for defining a feature as a local minimum. |
radius | The radius of the range that will be used for defining 'local'. |
Definition at line 594 of file FeatureImage.h.