#include <BlobResult.h>
Public Member Functions | |
CBlobResult () | |
CBlobResult (IplImage *source, IplImage *mask, int threshold, bool findmoments) | |
CBlobResult (const CBlobResult &source) | |
virtual | ~CBlobResult () |
Destructor. | |
CBlobResult & | operator= (const CBlobResult &source) |
CBlobResult | operator+ (const CBlobResult &source) |
void | AddBlob (CBlob *blob) |
double_vector | GetResult (funcio_calculBlob *evaluador) const |
double_stl_vector | GetSTLResult (funcio_calculBlob *evaluador) const |
double | GetNumber (int indexblob, funcio_calculBlob *evaluador) const |
void | Filter (CBlobResult &dst, int filterAction, funcio_calculBlob *evaluador, int condition, double lowLimit, double highLimit=0) |
void | GetNthBlob (funcio_calculBlob *criteri, int nBlob, CBlob &dst) const |
CBlob | GetBlob (int indexblob) const |
CBlob * | GetBlob (int indexblob) |
void | ClearBlobs () |
void | PrintBlobs (char *nom_fitxer) const |
int | GetNumBlobs () const |
Protected Attributes | |
blob_vector | m_blobs |
Private Member Functions | |
void | RaiseError (const int errorCode) const |
Definition at line 81 of file BlobResult.h.
CBlobResult::CBlobResult | ( | ) |
constructor estandard, crea un conjunt buit de blobs Standard constructor, it creates an empty set of blobs
Definition at line 48 of file BlobResult.cpp.
References m_blobs.
CBlobResult::CBlobResult | ( | IplImage * | source, | |
IplImage * | mask, | |||
int | threshold, | |||
bool | findmoments | |||
) |
constructor a partir d'una imatge Image constructor, it creates an object with the blobs of the image
Definition at line 89 of file BlobResult.cpp.
References BlobAnalysis(), EXCEPCIO_CALCUL_BLOBS, and m_blobs.
CBlobResult::CBlobResult | ( | const CBlobResult & | source | ) |
constructor de cōpia Copy constructor
Definition at line 130 of file BlobResult.cpp.
References GetNumBlobs(), and m_blobs.
CBlobResult::~CBlobResult | ( | ) | [virtual] |
Destructor.
Definition at line 174 of file BlobResult.cpp.
References ClearBlobs().
CBlobResult & CBlobResult::operator= | ( | const CBlobResult & | source | ) |
operador = per a fer assignacions entre CBlobResult Assigment operator
Definition at line 206 of file BlobResult.cpp.
References GetNumBlobs(), and m_blobs.
CBlobResult CBlobResult::operator+ | ( | const CBlobResult & | source | ) |
operador + per concatenar dos CBlobResult Addition operator to concatenate two sets of blobs
Definition at line 262 of file BlobResult.cpp.
References GetNumBlobs(), and m_blobs.
void CBlobResult::AddBlob | ( | CBlob * | blob | ) |
Afegeix un blob al conjunt Adds a blob to the set of blobs
Definition at line 301 of file BlobResult.cpp.
References m_blobs.
double_vector CBlobResult::GetResult | ( | funcio_calculBlob * | evaluador | ) | const |
Calcula un valor sobre tots els blobs de la classe retornant una MatrixCV Computes some property on all the blobs of the class
Definition at line 336 of file BlobResult.cpp.
References GetNumBlobs(), and m_blobs.
Referenced by PrintBlobs().
double_stl_vector CBlobResult::GetSTLResult | ( | funcio_calculBlob * | evaluador | ) | const |
Calcula un valor sobre tots els blobs de la classe retornant un std::vector<double> Computes some property on all the blobs of the class
Definition at line 386 of file BlobResult.cpp.
References GetNumBlobs(), and m_blobs.
Referenced by Filter(), GetNthBlob(), and PrintBlobs().
double CBlobResult::GetNumber | ( | int | indexblob, | |
funcio_calculBlob * | evaluador | |||
) | const |
Calcula un valor sobre un blob de la classe Computes some property on one blob of the class
Definition at line 435 of file BlobResult.cpp.
References EXCEPTION_BLOB_OUT_OF_BOUNDS, GetNumBlobs(), m_blobs, and RaiseError().
void CBlobResult::Filter | ( | CBlobResult & | dst, | |
int | filterAction, | |||
funcio_calculBlob * | evaluador, | |||
int | condition, | |||
double | lowLimit, | |||
double | highLimit = 0 | |||
) |
Retorna aquells blobs que compleixen les condicions del filtre en el destination Filters the blobs of the class using some property
Definition at line 495 of file BlobResult.cpp.
References B_EQUAL, B_EXCLUDE, B_GREATER, B_GREATER_OR_EQUAL, B_INCLUDE, B_INSIDE, B_LESS, B_LESS_OR_EQUAL, B_NOT_EQUAL, B_OUTSIDE, GetBlob(), GetNumBlobs(), GetSTLResult(), and m_blobs.
void CBlobResult::GetNthBlob | ( | funcio_calculBlob * | criteri, | |
int | nBlob, | |||
CBlob & | dst | |||
) | const |
Retorna l'enčssim blob segons un determinat criteri Sorts the blobs of the class acording to some criteria and returns the n-th blob
Definition at line 690 of file BlobResult.cpp.
References GetBlob(), GetNumBlobs(), and GetSTLResult().
CBlob CBlobResult::GetBlob | ( | int | indexblob | ) | const |
Retorna el blob enčssim Gets the n-th blob of the class ( without sorting )
Definition at line 645 of file BlobResult.cpp.
References EXCEPTION_BLOB_OUT_OF_BOUNDS, GetNumBlobs(), m_blobs, and RaiseError().
Referenced by Filter(), and GetNthBlob().
CBlob * CBlobResult::GetBlob | ( | int | indexblob | ) |
Definition at line 652 of file BlobResult.cpp.
References EXCEPTION_BLOB_OUT_OF_BOUNDS, GetNumBlobs(), m_blobs, and RaiseError().
void CBlobResult::ClearBlobs | ( | ) |
Elimina tots els blobs de l'objecte Clears all the blobs of the class
Definition at line 755 of file BlobResult.cpp.
References m_blobs.
Referenced by ~CBlobResult().
void CBlobResult::PrintBlobs | ( | char * | nom_fitxer | ) | const |
Escriu els blobs a un fitxer Prints some features of all the blobs in a file
Definition at line 849 of file BlobResult.cpp.
References GetNumBlobs(), GetResult(), and GetSTLResult().
int CBlobResult::GetNumBlobs | ( | ) | const [inline] |
Retorna el total de blobs Gets the total number of blobs
Definition at line 149 of file BlobResult.h.
References m_blobs.
Referenced by CBlobResult(), Filter(), GetBlob(), GetNthBlob(), GetNumber(), GetResult(), GetSTLResult(), operator+(), operator=(), and PrintBlobs().
void CBlobResult::RaiseError | ( | const int | errorCode | ) | const [private] |
Funciķ per gestionar els errors Function to manage the errors
Definition at line 797 of file BlobResult.cpp.
References EXCEPTION_BLOB_OUT_OF_BOUNDS.
Referenced by GetBlob(), and GetNumber().
blob_vector CBlobResult::m_blobs [protected] |
Vector amb els blobs Vector with all the blobs
Definition at line 165 of file BlobResult.h.
Referenced by AddBlob(), CBlobResult(), ClearBlobs(), Filter(), GetBlob(), GetNumber(), GetNumBlobs(), GetResult(), GetSTLResult(), operator+(), and operator=().