curfil  ..
 All Classes Functions Variables Typedefs Friends Groups Pages
Public Member Functions | List of all members
curfil::ImageFeatureFunction Class Reference

Parametrized visual image feature. More...

#include <random_tree_image.h>

Public Member Functions

 ImageFeatureFunction (FeatureType featureType, const Offset &offset1, const Region &region1, const uint8_t channel1, const Offset &offset2, const Region &region2, const uint8_t channel2)
int getSortKey () const
FeatureType getType () const
std::string getTypeString () const
bool isValid () const
FeatureResponseType calculateFeatureResponse (const PixelInstance &instance, bool flipRegion=false) const
const OffsetgetOffset1 () const
const RegiongetRegion1 () const
uint8_t getChannel1 () const
const OffsetgetOffset2 () const
const RegiongetRegion2 () const
uint8_t getChannel2 () const
bool operator!= (const ImageFeatureFunction &other) const
bool operator== (const ImageFeatureFunction &other) const

Detailed Description

Parametrized visual image feature.

See https://github.com/deeplearningais/curfil/wiki/Visual-Features for details.

Definition at line 377 of file random_tree_image.h.

Constructor & Destructor Documentation

curfil::ImageFeatureFunction::ImageFeatureFunction ( FeatureType  featureType,
const Offset offset1,
const Region region1,
const uint8_t  channel1,
const Offset offset2,
const Region region2,
const uint8_t  channel2 
)
inline
Parameters
featureTypeeither COLOR of DEPTH
offset1the offset of the first region
region1the extent size of the first region
channel1the image channel that the first region belongs to. Only used for COLOR features.
offset2the offset of the second region
region2the extent size of the second region
channel2the image channel that the second region belongs to. Only used for COLOR features.

Definition at line 390 of file random_tree_image.h.

Member Function Documentation

FeatureResponseType curfil::ImageFeatureFunction::calculateFeatureResponse ( const PixelInstance instance,
bool  flipRegion = false 
) const
inline
Returns
the feature response as documented on https://github.com/deeplearningais/curfil/wiki/Visual-Features.

Definition at line 458 of file random_tree_image.h.

uint8_t curfil::ImageFeatureFunction::getChannel1 ( ) const
inline
Returns
the channel that is used for the first region. only used for color featurse.

Definition at line 489 of file random_tree_image.h.

uint8_t curfil::ImageFeatureFunction::getChannel2 ( ) const
inline
Returns
the channel that is used for the second region. only used for color featurse.

Definition at line 510 of file random_tree_image.h.

const Offset& curfil::ImageFeatureFunction::getOffset1 ( ) const
inline
Returns
the x/y offset in pixels of the first region.

Definition at line 475 of file random_tree_image.h.

const Offset& curfil::ImageFeatureFunction::getOffset2 ( ) const
inline
Returns
the x/y offset in pixels of the second region.

Definition at line 496 of file random_tree_image.h.

const Region& curfil::ImageFeatureFunction::getRegion1 ( ) const
inline
Returns
the x/y size (extent) in pixels of the first region.

Definition at line 482 of file random_tree_image.h.

const Region& curfil::ImageFeatureFunction::getRegion2 ( ) const
inline
Returns
the x/y size (extent) in pixels of the second region.

Definition at line 503 of file random_tree_image.h.

int curfil::ImageFeatureFunction::getSortKey ( ) const
inline
Returns
a 32-bit key that is used to sort the features for performance reasons (improve cache-hit rate).

Definition at line 417 of file random_tree_image.h.

FeatureType curfil::ImageFeatureFunction::getType ( ) const
inline
Returns
the feature type. e.g. COLOR or DEPTH

Definition at line 430 of file random_tree_image.h.

std::string curfil::ImageFeatureFunction::getTypeString ( ) const
inline
Returns
the feature type as string in lowercase. e.g. "color" or "depth".

Definition at line 437 of file random_tree_image.h.

bool curfil::ImageFeatureFunction::isValid ( ) const
inline
Returns
true if and only if the parameters of this feature are valid

Definition at line 451 of file random_tree_image.h.

bool curfil::ImageFeatureFunction::operator!= ( const ImageFeatureFunction other) const
inline
Returns
whether this image feature is not equal to another

Definition at line 517 of file random_tree_image.h.

bool curfil::ImageFeatureFunction::operator== ( const ImageFeatureFunction other) const
Returns
whether this image feature is equal to another

The documentation for this class was generated from the following file: