iRoCS Toolbox  1.1.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
iRoCS::Features Class Reference

#include <iRoCSFeatures.hh>

Collaboration diagram for iRoCS::Features:

Public Types

enum  NormalizationType {
  None = 0x0000, FeatureZeroMeanStddev = 0x0001, UnitNorm = 0x0002, Combined = 0x0003,
  Invalid = 0xffff
}
 

Public Member Functions

 Features (blitz::TinyVector< double, 3 > const &featureElementSizeUm=1.0, iRoCS::ProgressReporter *progress=NULL)
 
 ~Features ()
 
void addFeatureToGroup (std::string const &groupName, std::string const &featureName)
 Adds a new feature name to the specified group. More...
 
void classifyMultiClassSVM (std::vector< svt::BasicFV > &testVectors, std::string const &modelFileName)
 
void classifyTwoClassSVM (std::vector< svt::BasicFV > &testVectors, std::string const &modelFileName)
 
template<typename DataT >
atb::Array< double, 3 > & dataScaled (atb::Array< DataT, 3 > const &data, std::string const &cacheFileName)
 
void deleteFeature (atb::SDMagFeatureIndex const &index)
 
void deleteFeature (const int state)
 
blitz::TinyVector< double, 3 > const & elementSizeUm () const
 
void generateRandomSamples (std::vector< blitz::TinyVector< double, 3 > > &markers, blitz::TinyVector< double, 3 > const &upperBoundUm, int nInRootSamples, int nOutRootSamples)
 
template<typename DataT >
atb::Array< double, 3 > & houghFeature (atb::Array< DataT, 3 > const &data, const int state, std::string const &cacheFileName)
 
std::string houghFeatureName (const int state) const
 
template<typename DataT >
atb::Array< blitz::TinyVector< double, 3 >, 3 > & intrinsicCoordinates (atb::Array< DataT, 3 > const &data, atb::IRoCS const &rct, std::string const &cacheFileName)
 
void loadNormalizationParameters (std::string const &modelFileName)
 
void normalizeFeatures (std::vector< svt::BasicFV > &samples)
 
void saveNormalizationParameters (std::string const &modelFileName)
 
template<typename DataT >
atb::Array< double, 3 > & sdFeature (atb::Array< DataT, 3 > const &data, atb::SDMagFeatureIndex const &index, const int maxBand, std::string const &cacheFileName)
 
std::string sdFeatureName (atb::SDMagFeatureIndex const &index) const
 
void setGroupNormalization (std::string const &groupName, NormalizationType normType)
 
void trainMultiClassSVM (std::vector< svt::BasicFV > &trainVectors, std::string const &modelFileName, float cost, float gamma)
 
void trainTwoClassSVM (std::vector< svt::BasicFV > &trainVectors, std::string const &modelFileName, float cost, float gamma)
 

Static Public Member Functions

static std::string h5GroupName (const std::string &rawGroup)
 
static std::string normalizationTypeToString (NormalizationType type)
 
static NormalizationType stringToNormalizationType (std::string const &normTypeString)
 

Static Public Attributes

static const int NegativeMagnitude
 
static const int NegativeRadius
 
static const int PositiveMagnitude
 
static const int PositiveRadius
 

Detailed Description

Definition at line 43 of file iRoCSFeatures.hh.

Member Enumeration Documentation

◆ NormalizationType

Enumerator
None 
FeatureZeroMeanStddev 
UnitNorm 
Combined 
Invalid 

Definition at line 48 of file iRoCSFeatures.hh.

Constructor & Destructor Documentation

◆ Features()

iRoCS::Features::Features ( blitz::TinyVector< double, 3 > const &  featureElementSizeUm = 1.0,
iRoCS::ProgressReporter progress = NULL 
)

◆ ~Features()

iRoCS::Features::~Features ( )

Member Function Documentation

◆ normalizationTypeToString()

static std::string iRoCS::Features::normalizationTypeToString ( NormalizationType  type)
static

◆ stringToNormalizationType()

static NormalizationType iRoCS::Features::stringToNormalizationType ( std::string const &  normTypeString)
static

◆ elementSizeUm()

blitz::TinyVector<double,3> const& iRoCS::Features::elementSizeUm ( ) const

◆ addFeatureToGroup()

void iRoCS::Features::addFeatureToGroup ( std::string const &  groupName,
std::string const &  featureName 
)

Adds a new feature name to the specified group.

If the group does not exist it is created on the fly. On group creation its normalization flag will be set to no normalization. The mean and stddev Arrays will be left unchanged! This is necessary for the normalizeFeatures() method which decides based on the length of those Arrays whether the feature normalization parameters are loaded or have to be computed.

Parameters
groupNameThe name of the group to append a feature to
featureNameThe name of the feature to append

◆ setGroupNormalization()

void iRoCS::Features::setGroupNormalization ( std::string const &  groupName,
NormalizationType  normType 
)

◆ dataScaled()

template<typename DataT >
atb::Array<double,3>& iRoCS::Features::dataScaled ( atb::Array< DataT, 3 > const &  data,
std::string const &  cacheFileName 
)

◆ sdFeatureName()

std::string iRoCS::Features::sdFeatureName ( atb::SDMagFeatureIndex const &  index) const

◆ sdFeature()

template<typename DataT >
atb::Array<double,3>& iRoCS::Features::sdFeature ( atb::Array< DataT, 3 > const &  data,
atb::SDMagFeatureIndex const &  index,
const int  maxBand,
std::string const &  cacheFileName 
)

◆ houghFeatureName()

std::string iRoCS::Features::houghFeatureName ( const int  state) const

◆ houghFeature()

template<typename DataT >
atb::Array<double,3>& iRoCS::Features::houghFeature ( atb::Array< DataT, 3 > const &  data,
const int  state,
std::string const &  cacheFileName 
)

◆ intrinsicCoordinates()

template<typename DataT >
atb::Array<blitz::TinyVector<double,3>,3>& iRoCS::Features::intrinsicCoordinates ( atb::Array< DataT, 3 > const &  data,
atb::IRoCS const &  rct,
std::string const &  cacheFileName 
)

◆ deleteFeature() [1/2]

void iRoCS::Features::deleteFeature ( atb::SDMagFeatureIndex const &  index)

◆ deleteFeature() [2/2]

void iRoCS::Features::deleteFeature ( const int  state)

◆ generateRandomSamples()

void iRoCS::Features::generateRandomSamples ( std::vector< blitz::TinyVector< double, 3 > > &  markers,
blitz::TinyVector< double, 3 > const &  upperBoundUm,
int  nInRootSamples,
int  nOutRootSamples 
)

◆ normalizeFeatures()

void iRoCS::Features::normalizeFeatures ( std::vector< svt::BasicFV > &  samples)

◆ saveNormalizationParameters()

void iRoCS::Features::saveNormalizationParameters ( std::string const &  modelFileName)

◆ loadNormalizationParameters()

void iRoCS::Features::loadNormalizationParameters ( std::string const &  modelFileName)

◆ trainTwoClassSVM()

void iRoCS::Features::trainTwoClassSVM ( std::vector< svt::BasicFV > &  trainVectors,
std::string const &  modelFileName,
float  cost,
float  gamma 
)

◆ classifyTwoClassSVM()

void iRoCS::Features::classifyTwoClassSVM ( std::vector< svt::BasicFV > &  testVectors,
std::string const &  modelFileName 
)

◆ trainMultiClassSVM()

void iRoCS::Features::trainMultiClassSVM ( std::vector< svt::BasicFV > &  trainVectors,
std::string const &  modelFileName,
float  cost,
float  gamma 
)

◆ classifyMultiClassSVM()

void iRoCS::Features::classifyMultiClassSVM ( std::vector< svt::BasicFV > &  testVectors,
std::string const &  modelFileName 
)

◆ h5GroupName()

static std::string iRoCS::Features::h5GroupName ( const std::string &  rawGroup)
static

Field Documentation

◆ PositiveMagnitude

const int iRoCS::Features::PositiveMagnitude
static

Definition at line 61 of file iRoCSFeatures.hh.

◆ NegativeMagnitude

const int iRoCS::Features::NegativeMagnitude
static

Definition at line 62 of file iRoCSFeatures.hh.

◆ PositiveRadius

const int iRoCS::Features::PositiveRadius
static

Definition at line 63 of file iRoCSFeatures.hh.

◆ NegativeRadius

const int iRoCS::Features::NegativeRadius
static

Definition at line 64 of file iRoCSFeatures.hh.


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