libface 0.2
Classes | Public Member Functions

libface::Haarcascades Class Reference

List of all members.

Classes

class  HaarcascadesPriv

Public Member Functions

 Haarcascades (const std::string &path)
 ~Haarcascades ()
void addCascade (const Cascade &newCascade, int newWeight)
void addCascade (const std::string &name, int weight)
void removeCascade (const std::string &name)
void removeCascade (int index)
void setWeight (const std::string &name, int weight)
void setWeight (int index, int weight)
int getWeight (const std::string &name) const
int getWeight (int index) const
bool hasCascade (const std::string &name) const
const CascadegetCascade (const std::string &name) const
const CascadegetCascade (int index) const
int getSize () const
void clear ()

Constructor & Destructor Documentation

libface::Haarcascades::Haarcascades ( const std::string &  path)

Constructor which initializes the cascade directory's path

Parameters:
pathThe path to the directory containing the cascade
libface::Haarcascades::~Haarcascades ( )

Destructor for Haarcascades


Member Function Documentation

void libface::Haarcascades::addCascade ( const Cascade newCascade,
int  newWeight 
)

Adds a new cascade with a specified d->weights

Parameters:
newCascadeA Cascade object
newWeightThe weight of the cascade
void libface::Haarcascades::addCascade ( const std::string &  name,
int  weight 
)

Adds a new cascade with a specified d->weights

Parameters:
nameThe filename of the cascade
weightThe weight of the cascade
void libface::Haarcascades::clear ( )

Clears the entire set of cascades

const Cascade& libface::Haarcascades::getCascade ( const std::string &  name) const

Returns the Cascade object for the Cascade with the specified name

Parameters:
nameThe name of the desired cascade
Returns:
The Cascade object with the name
const Cascade & libface::Haarcascades::getCascade ( int  index) const

Returns the Cascade object for the Cascade with the specified index

Parameters:
indexThe index of the desired cascade
Returns:
The Cascade object with the index
int libface::Haarcascades::getSize ( ) const

Returns the number of cascades loaded into the set

Returns:
The number of cascades
int libface::Haarcascades::getWeight ( int  index) const

Returns the weight of the cascade with the specified index

Parameters:
indexThe index of the cascade whose weight is desired
Returns:
The weight of the cascade
int libface::Haarcascades::getWeight ( const std::string &  name) const

Returns the weight of the cascade with the specified name

Parameters:
nameThe name of the cascade whose weight is desired
Returns:
The weight of the cascade
bool libface::Haarcascades::hasCascade ( const std::string &  name) const

Checks whether the cascade is in the set

Parameters:
nameThe name of the cascade whose presence is to be checked
Returns:
Whether the cascade exists in the set or not
void libface::Haarcascades::removeCascade ( int  index)

Removes a cascade with the specified index

Parameters:
indexThe index of the cascade to be removed
void libface::Haarcascades::removeCascade ( const std::string &  name)

Removes a cascade with the specified name

Parameters:
nameThe name of the cascade to be removed
void libface::Haarcascades::setWeight ( const std::string &  name,
int  weight 
)

Sets the weight of the cascade with the specified name

Parameters:
nameThe name of the cascade whose weight is to be set
weightThe new weight
void libface::Haarcascades::setWeight ( int  index,
int  weight 
)

Sets the weight of the cascade with the specified index

Parameters:
indexThe index of the cascade whose weight is to be set
weightThe new weight

The documentation for this class was generated from the following files:
 All Classes Files Functions