libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
crn::FeatureSet Class Reference

Feature vector class. More...

#include <CRNFeatureSet.h>

+ Inheritance diagram for crn::FeatureSet:
+ Collaboration diagram for crn::FeatureSet:

Public Member Functions

 FeatureSet ()=default
 Default constructor. More...
 
 FeatureSet (const FeatureSet &)=delete
 
 FeatureSet (FeatureSet &&)=default
 
FeatureSetoperator= (const FeatureSet &)=delete
 
FeatureSetoperator= (FeatureSet &&)=default
 
virtual ~FeatureSet () override=default
 
SVector Extract (Block &b)
 Extracts all the features of the set from a block. More...
 
SVector ExtractWithMask (Block &b, ImageIntGray &mask)
 Extracts all the features of the set from a block. More...
 
 FeatureSet (xml::Element &el)
 
- Public Member Functions inherited from crn::Vector
 Vector ()
 Default constructor. More...
 
virtual ~Vector () override
 Destructor. More...
 
 Vector (const Vector &)
 
 Vector (Vector &&)=default
 
Vectoroperator= (const Vector &)
 
Vectoroperator= (Vector &&)=default
 
size_t Size () const noexcept
 Returns the number of data objects in the vector. More...
 
bool IsEmpty () const noexcept
 Tests if the vector is empty. More...
 
SObject & operator[] (size_t i)
 Returns an object from index (unsafe) More...
 
SCObject operator[] (size_t i) const
 Returns an object from index (unsafe) More...
 
SObject & At (size_t i)
 Returns an object from index (unsafe) More...
 
SCObject At (size_t i) const
 Returns an object from index (unsafe) More...
 
SObject & Front ()
 Returns a reference to the first element. More...
 
SCObject Front () const
 Returns a reference to the first element. More...
 
SObject & Back ()
 Returns a reference to the last element. More...
 
SCObject Back () const
 Returns a reference to the last element. More...
 
bool Contains (const SCObject &o) const
 Checks of the object is in the vector. More...
 
void PushBack (const SObject &d)
 Adds an object at the end of the vector. More...
 
void Insert (const SObject &d, size_t pos)
 Inserts an object at a given position. More...
 
void ReorderFrom (const std::vector< size_t > &from)
 Reorders the elements. More...
 
void ReorderTo (const std::vector< size_t > &to)
 Reorders the elements. More...
 
void PopBack ()
 Removes the last element. More...
 
void Remove (size_t index)
 Removes an element (safe) More...
 
void Remove (const SCObject &obj)
 Removes an element (safe) More...
 
void Clear () noexcept
 Empties the vector. More...
 
iterator begin ()
 Returns an iterator to the first element. More...
 
iterator end ()
 Returns a iterator to the end of the list. More...
 
const_iterator begin () const
 Returns a const iterator to the first element. More...
 
const_iterator end () const
 Returns a const iterator to the end of the list. More...
 
const_iterator cbegin () const
 Returns a const iterator to the first element. More...
 
const_iterator cend () const
 Returns a const iterator to the end of the list. More...
 
void Remove (iterator it)
 Removes element. More...
 
void Remove (iterator begin, iterator end)
 Removes elements. More...
 
template<class Predicate >
void RemoveIf (Predicate pred)
 Removes elements if predicate is true. More...
 
const_iterator Find (const SCObject &o) const
 Finds an object in the container. More...
 
iterator Find (const SCObject &o)
 Finds an object in the container. More...
 
template<typename T >
std::vector< std::shared_ptr< T > > ToStd ()
 Converts to a std::vector of pointers. More...
 
template<typename T >
std::vector< std::shared_ptr
< const T > > 
ToStd () const
 Converts to a std::vector of pointers. More...
 
std::vector< SObject > Std ()&&
 Gets the inner data. More...
 
void Swap (Vector &other) noexcept
 Swaps contents with another vector. More...
 
void ShrinkToFit ()
 Optimizes the memory usage. More...
 
void Deserialize (xml::Element &el)
 Reads from an XML node if applicable. More...
 
xml::Element Serialize (xml::Element &parent) const
 Dumps to an XML node if applicable. More...
 
 Vector (xml::Element &el)
 
- Public Member Functions inherited from crn::Object
virtual ~Object ()=default
 

Detailed Description

Feature vector class.

Author
Yann LEYDIER
Date
October 2007
Version
0.2

Definition at line 39 of file CRNFeatureSet.h.

Constructor & Destructor Documentation

crn::FeatureSet::FeatureSet ( )
default

Default constructor.

crn::FeatureSet::FeatureSet ( const FeatureSet )
delete
crn::FeatureSet::FeatureSet ( FeatureSet &&  )
default
virtual crn::FeatureSet::~FeatureSet ( )
overridevirtualdefault
crn::FeatureSet::FeatureSet ( xml::Element el)
inline

Definition at line 56 of file CRNFeatureSet.h.

Member Function Documentation

SVector FeatureSet::Extract ( Block b)

Extracts all the features of the set from a block.

Extracts all the features of the set from a block.

Parameters
[in]bthe block to process
Returns
the newly create feature vector, or nullptr if failed

Definition at line 38 of file CRNFeatureSet.cpp.

SVector FeatureSet::ExtractWithMask ( Block b,
ImageIntGray mask 
)

Extracts all the features of the set from a block.

Extracts all the features of the set from a block.

Parameters
[in]bthe block to process
[in]maskthe block mask image
Returns
the newly create feature vector, or nullptr if failed

Definition at line 54 of file CRNFeatureSet.cpp.

FeatureSet& crn::FeatureSet::operator= ( const FeatureSet )
delete
FeatureSet& crn::FeatureSet::operator= ( FeatureSet &&  )
default

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