CBlob Class Reference

#include <blob.h>

List of all members.

Public Types

typedef std::vector< CvPoint > vectorPunts
 Point datatype for plotting (FillBlob).

Public Member Functions

 CBlob ()
 CBlob (const CBlob &src)
 CBlob (const CBlob *src)
 ~CBlob ()
CBloboperator= (const CBlob &src)
bool IsEmpty () const
void ClearEdges ()
void CopyEdges (CBlob &destination) const
bool GetConvexHull (CvSeq **dst) const
CvBox2D GetEllipse () const
void FillBlob (IplImage *imatge, CvScalar color, int offsetX=0, int offsetY=0) const
int Label () const
int Parent () const
double Area () const
double Perimeter () const
double ExternPerimeter () const
int Exterior () const
double Mean () const
double StdDev () const
double MinX () const
double MinY () const
double MaxX () const
double MaxY () const
CvSeq * Edges () const
double SumX () const
double SumY () const
double SumXX () const
double SumYY () const
double SumXY () const

Public Attributes

int etiqueta
int exterior
double area
double perimeter
double externPerimeter
int parent
double sumx
 moments
double sumy
double sumxx
double sumyy
double sumxy
double minx
 Bounding rect.
double maxx
double miny
double maxy
double mean
double stddev
CvMemStorage * m_storage
CvSeq * edges

Classes

struct  comparaCvPoint
 Helper class to compare two CvPoints (for sorting in FillBlob). More...


Detailed Description

Classe que representa un blob, entés com un conjunt de pixels del mateix color contigus en una imatge binaritzada.

Class to represent a blob, a group of connected pixels in a binary image

Definition at line 37 of file blob.h.


Member Typedef Documentation

typedef std::vector<CvPoint> CBlob::vectorPunts

Point datatype for plotting (FillBlob).

Definition at line 148 of file blob.h.


Constructor & Destructor Documentation

CBlob::CBlob (  ) 

Constructor estàndard Standard constructor

Definition at line 44 of file blob.cpp.

References area, edges, etiqueta, exterior, externPerimeter, m_storage, maxx, maxy, mean, minx, miny, parent, perimeter, stddev, sumx, sumxx, sumxy, sumy, and sumyy.

CBlob::CBlob ( const CBlob src  ) 

Constructor de còpia Copy constructor

Definition at line 90 of file blob.cpp.

References Area(), area, Edges(), edges, etiqueta, exterior, externPerimeter, m_storage, maxx, maxy, mean, minx, miny, parent, Perimeter(), perimeter, stddev, sumx, sumxx, sumxy, sumy, and sumyy.

CBlob::CBlob ( const CBlob src  ) 

Definition at line 133 of file blob.cpp.

References Area(), area, Edges(), edges, etiqueta, exterior, externPerimeter, m_storage, maxx, maxy, mean, minx, miny, parent, Perimeter(), perimeter, stddev, sumx, sumxx, sumxy, sumy, and sumyy.

CBlob::~CBlob (  ) 

Destructor estàndard Standard Destructor

Definition at line 197 of file blob.cpp.

References edges, and m_storage.


Member Function Documentation

CBlob & CBlob::operator= ( const CBlob src  ) 

Operador d'assignació Assigment operator

Definition at line 229 of file blob.cpp.

References Area(), area, Edges(), edges, etiqueta, exterior, externPerimeter, m_storage, maxx, maxy, mean, minx, miny, parent, Perimeter(), perimeter, stddev, sumx, sumxx, sumxy, sumy, and sumyy.

bool CBlob::IsEmpty (  )  const [inline]

Indica si el blob està buit ( no té cap info associada ) Shows if the blob has associated information

Definition at line 58 of file blob.h.

References area, and perimeter.

void CBlob::ClearEdges (  ) 

Neteja les cantonades del blob Clears the edges of the blob

Definition at line 429 of file blob.cpp.

References edges.

void CBlob::CopyEdges ( CBlob destination  )  const

Copia les cantonades del blob a un altre (les afegeix al destí) Adds the blob edges to another blob

Definition at line 391 of file blob.cpp.

References Edges(), and edges.

bool CBlob::GetConvexHull ( CvSeq **  dst  )  const

Retorna el poligon convex del blob Calculates the convex hull of the blob

Definition at line 459 of file blob.cpp.

References edges.

CvBox2D CBlob::GetEllipse (  )  const

Calcula l'elipse que s'adapta als vèrtexs del blob Fits an ellipse to the blob edges

Definition at line 491 of file blob.cpp.

References edges.

Referenced by CBlobGetAxisRatio::operator()(), CBlobGetOrientation::operator()(), CBlobGetMinorAxisLength::operator()(), CBlobGetAreaElipseRatio::operator()(), and CBlobGetMajorAxisLength::operator()().

void CBlob::FillBlob ( IplImage *  imatge,
CvScalar  color,
int  offsetX = 0,
int  offsetY = 0 
) const

Pinta l'interior d'un blob d'un color determinat Paints the blob in an image

Definition at line 311 of file blob.cpp.

References edges.

int CBlob::Label (  )  const [inline]

Funcions GET sobre els valors dels blobs Get functions

Definition at line 83 of file blob.h.

References etiqueta.

int CBlob::Parent (  )  const [inline]

Definition at line 84 of file blob.h.

References parent.

double CBlob::Area (  )  const [inline]

Definition at line 85 of file blob.h.

References area.

Referenced by CBlob(), CBlobGetAreaElipseRatio::operator()(), CBlobGetArea::operator()(), CBlobGetBreadth::operator()(), CBlobGetLength::operator()(), CBlobGetCompactness::operator()(), CBlobGetElongation::operator()(), CBlobGetMoment::operator()(), and operator=().

double CBlob::Perimeter (  )  const [inline]

Definition at line 86 of file blob.h.

References perimeter.

Referenced by CBlob(), CBlobGetExternPerimeterRatio::operator()(), CBlobGetPerimeter::operator()(), CBlobGetBreadth::operator()(), CBlobGetLength::operator()(), CBlobGetRoughness::operator()(), CBlobGetCompactness::operator()(), CBlobGetElongation::operator()(), CBlobGetHullArea::operator()(), CBlobGetHullPerimeter::operator()(), and operator=().

double CBlob::ExternPerimeter (  )  const [inline]

Definition at line 87 of file blob.h.

References externPerimeter.

Referenced by CBlobGetExternHullPerimeterRatio::operator()(), CBlobGetExternPerimeterRatio::operator()(), and CBlobGetExternPerimeter::operator()().

int CBlob::Exterior (  )  const [inline]

Definition at line 88 of file blob.h.

References exterior.

Referenced by CBlobGetExterior::operator()().

double CBlob::Mean (  )  const [inline]

Definition at line 89 of file blob.h.

References mean.

Referenced by CBlobGetMean::operator()().

double CBlob::StdDev (  )  const [inline]

Definition at line 90 of file blob.h.

References stddev.

Referenced by CBlobGetStdDev::operator()().

double CBlob::MinX (  )  const [inline]

Definition at line 91 of file blob.h.

References minx.

Referenced by CBlobGetXCenter::operator()(), and CBlobGetMinX::operator()().

double CBlob::MinY (  )  const [inline]

Definition at line 92 of file blob.h.

References miny.

Referenced by CBlobGetYCenter::operator()(), CBlobGetMinY::operator()(), CBlobGetMaxYatMinX::operator()(), and CBlobGetMinXatMinY::operator()().

double CBlob::MaxX (  )  const [inline]

Definition at line 93 of file blob.h.

References maxx.

Referenced by CBlobGetXCenter::operator()(), CBlobGetMaxX::operator()(), and CBlobGetMinYatMaxX::operator()().

double CBlob::MaxY (  )  const [inline]

Definition at line 94 of file blob.h.

References maxy.

Referenced by CBlobGetYCenter::operator()(), CBlobGetMaxY::operator()(), and CBlobGetMaxXatMaxY::operator()().

CvSeq* CBlob::Edges (  )  const [inline]

Definition at line 95 of file blob.h.

References edges.

Referenced by CBlob(), CopyEdges(), CBlobGetXYInside::operator()(), CBlobGetMaxYatMinX::operator()(), CBlobGetMaxXatMaxY::operator()(), CBlobGetMinYatMaxX::operator()(), CBlobGetMinXatMinY::operator()(), CBlobGetHullArea::operator()(), CBlobGetHullPerimeter::operator()(), and operator=().

double CBlob::SumX (  )  const [inline]

Definition at line 96 of file blob.h.

References sumx.

Referenced by CBlobGetMoment::operator()().

double CBlob::SumY (  )  const [inline]

Definition at line 97 of file blob.h.

References sumy.

Referenced by CBlobGetMoment::operator()().

double CBlob::SumXX (  )  const [inline]

Definition at line 98 of file blob.h.

References sumxx.

Referenced by CBlobGetMoment::operator()().

double CBlob::SumYY (  )  const [inline]

Definition at line 99 of file blob.h.

References sumyy.

Referenced by CBlobGetMoment::operator()().

double CBlob::SumXY (  )  const [inline]

Definition at line 100 of file blob.h.

References sumxy.


Member Data Documentation

int CBlob::etiqueta

etiqueta del blob label of the blob

Definition at line 104 of file blob.h.

Referenced by CBlob(), Label(), and operator=().

int CBlob::exterior

flag per indicar si es exterior o no true for extern blobs

Definition at line 107 of file blob.h.

Referenced by CBlob(), Exterior(), and operator=().

double CBlob::area

area del blob Blob area

Definition at line 110 of file blob.h.

Referenced by Area(), CBlob(), IsEmpty(), and operator=().

double CBlob::perimeter

perimetre del blob Blob perimeter

Definition at line 113 of file blob.h.

Referenced by CBlob(), IsEmpty(), operator=(), and Perimeter().

double CBlob::externPerimeter

quantitat de perimetre del blob extern amount of blob perimeter which is exterior

Definition at line 116 of file blob.h.

Referenced by CBlob(), ExternPerimeter(), and operator=().

int CBlob::parent

etiqueta del blob pare label of the parent blob

Definition at line 119 of file blob.h.

Referenced by CBlob(), operator=(), and Parent().

double CBlob::sumx

moments

Definition at line 121 of file blob.h.

Referenced by CBlob(), operator=(), and SumX().

double CBlob::sumy

Definition at line 122 of file blob.h.

Referenced by CBlob(), operator=(), and SumY().

double CBlob::sumxx

Definition at line 123 of file blob.h.

Referenced by CBlob(), operator=(), and SumXX().

double CBlob::sumyy

Definition at line 124 of file blob.h.

Referenced by CBlob(), operator=(), and SumYY().

double CBlob::sumxy

Definition at line 125 of file blob.h.

Referenced by CBlob(), operator=(), and SumXY().

double CBlob::minx

Bounding rect.

Definition at line 127 of file blob.h.

Referenced by CBlob(), MinX(), CBlobGetDiffX::operator()(), and operator=().

double CBlob::maxx

Definition at line 128 of file blob.h.

Referenced by CBlob(), MaxX(), CBlobGetDiffX::operator()(), and operator=().

double CBlob::miny

Definition at line 129 of file blob.h.

Referenced by CBlob(), MinY(), CBlobGetDiffY::operator()(), and operator=().

double CBlob::maxy

Definition at line 130 of file blob.h.

Referenced by CBlob(), MaxY(), CBlobGetDiffY::operator()(), and operator=().

double CBlob::mean

mitjana mean of the grey scale values of the blob pixels

Definition at line 134 of file blob.h.

Referenced by CBlob(), Mean(), and operator=().

double CBlob::stddev

desviació standard standard deviation of the grey scale values of the blob pixels

Definition at line 137 of file blob.h.

Referenced by CBlob(), operator=(), and StdDev().

CvMemStorage* CBlob::m_storage

àrea de memòria on es desaran els punts de contorn del blob storage which contains the edges of the blob

Definition at line 141 of file blob.h.

Referenced by CBlob(), operator=(), and ~CBlob().

CvSeq* CBlob::edges

Sequència de punts del contorn del blob Sequence with the edges of the blob

Definition at line 144 of file blob.h.

Referenced by CBlob(), ClearEdges(), CopyEdges(), Edges(), FillBlob(), GetConvexHull(), GetEllipse(), operator=(), and ~CBlob().


Generated on Mon Nov 13 13:32:49 2006 for cvBlobsLib by  doxygen 1.5.1-p1