Public Member Functions | Private Types | Private Member Functions | Private Attributes
CBlob Class Reference

Blob class. More...

#include <Blob.h>

List of all members.

Public Member Functions

void AddInternalContour (const CBlobContour &newContour)
 Adds a new internal contour to the blob.
double Area ()
 Compute blob's area.
 CBlob ()
 CBlob (t_labelType id, CvPoint startPoint, CvSize originalImageSize)
 CBlob (const CBlob &src)
 Copy constructor.
 CBlob (const CBlob *src)
int Exterior (IplImage *mask, bool xBorder=true, bool yBorder=true)
 > 0 for extern blobs, 0 if not
double ExternPerimeter (IplImage *mask, bool xBorder=true, bool yBorder=true)
 Compute extern perimeter.
void FillBlob (IplImage *imatge, CvScalar color, int offsetX=0, int offsetY=0)
CvRect GetBoundingBox ()
 Get bounding box.
t_PointList GetConvexHull ()
CvBox2D GetEllipse ()
 Get bounding ellipse.
CBlobContourGetExternalContour ()
 Retrieves contour in Freeman's chain code.
t_labelType GetID ()
 Get label ID.
CvMemStorage * GetStorage ()
 Retrieves blob storage.
bool IsEmpty ()
void JoinBlob (CBlob *blob)
 Join a blob to current one (add's contour.
double MaxX ()
 Maximun X.
double MaxY ()
 Maximun Y.
double Mean (IplImage *image)
 Get mean grey color.
double MinX ()
 Minimun X.
double MinY ()
 Minimun Y.
double Moment (int p, int q)
 Compute blob's moment (p,q up to MAX_CALCULATED_MOMENTS)
CBloboperator= (const CBlob &src)
double Perimeter ()
 Compute blob's perimeter.
double StdDev (IplImage *image)
 Get standard deviation grey color.
 ~CBlob ()

Private Types

typedef std::list< CBlobContourt_contourList

Private Member Functions

void ClearContours ()
 Deallocates all contours.

Private Attributes

double m_area
 Area.
CvRect m_boundingBox
 Bounding box.
CvBox2D m_ellipse
 Bounding ellipse.
CBlobContour m_externalContour
 External contour of the blob (crack codes)
double m_externPerimeter
 Extern perimeter from blob.
t_labelType m_id
 Label number.
t_contourList m_internalContours
 Internal contours (crack codes)
double m_meanGray
 Mean gray color.
CvSize m_originalImageSize
 Sizes from image where blob is extracted.
double m_perimeter
 Perimeter.
double m_stdDevGray
 Standard deviation from gray color blob distribution.
CvMemStorage * m_storage
 Contour storage memory.

Detailed Description

Blob class.

Definition at line 37 of file Blob.h.


Member Typedef Documentation

Definition at line 39 of file Blob.h.


Constructor & Destructor Documentation

Definition at line 20 of file Blob.cpp.

CBlob::CBlob ( t_labelType  id,
CvPoint  startPoint,
CvSize  originalImageSize 
)

Definition at line 29 of file Blob.cpp.

Definition at line 108 of file Blob.cpp.

CBlob::CBlob ( const CBlob src)

Copy constructor.

Definition at line 41 of file Blob.cpp.

CBlob::CBlob ( const CBlob src)

Definition at line 47 of file Blob.cpp.


Member Function Documentation

void CBlob::AddInternalContour ( const CBlobContour newContour)

Adds a new internal contour to the blob.

Definition at line 132 of file Blob.cpp.

double CBlob::Area ( )

Compute blob's area.

  • FUNCIÓ: Area
  • FUNCIONALITAT: Get blob area, ie. external contour area minus internal contours area
  • PARÀMETRES:
  • RESULTAT:
  • RESTRICCIONS:
  • AUTOR: rborras
  • DATA DE CREACIÓ: 2008/04/30
  • MODIFICACIÓ: Data. Autor. Descripció.

Definition at line 157 of file Blob.cpp.

void CBlob::ClearContours ( ) [private]

Deallocates all contours.

Definition at line 116 of file Blob.cpp.

int CBlob::Exterior ( IplImage *  mask,
bool  xBorder = true,
bool  yBorder = true 
)

> 0 for extern blobs, 0 if not

  • FUNCIÓ: Exterior
  • FUNCIONALITAT: Return true for extern blobs
  • PARÀMETRES:
    • xBorder: true to consider blobs touching horizontal borders as extern
    • yBorder: true to consider blobs touching vertical borders as extern
  • RESULTAT:
  • RESTRICCIONS:
  • AUTOR: rborras
  • DATA DE CREACIÓ: 2008/05/06
  • MODIFICACIÓ: Data. Autor. Descripció.

Definition at line 219 of file Blob.cpp.

double CBlob::ExternPerimeter ( IplImage *  maskImage,
bool  xBorder = true,
bool  yBorder = true 
)

Compute extern perimeter.

  • FUNCIÓ: ExternPerimeter
  • FUNCIONALITAT: Get extern perimeter (perimeter touching image borders)
  • PARÀMETRES:
    • maskImage: if != NULL, counts maskImage black pixels as external pixels and contour points touching them are counted as external contour points.
    • xBorder: true to consider blobs touching horizontal borders as extern
    • yBorder: true to consider blobs touching vertical borders as extern
  • RESULTAT:
  • RESTRICCIONS:
  • AUTOR: rborras
  • DATA DE CREACIÓ: 2008/05/05
  • MODIFICACIÓ: Data. Autor. Descripció.
  • NOTA: If CBlobContour::GetContourPoints aproximates contours with a method different that NONE, this function will not give correct results

Definition at line 246 of file Blob.cpp.

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

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

  • FUNCTION: FillBlob
  • FUNCTIONALITY:
    • Fills the blob with a specified colour
  • PARAMETERS:
    • imatge: where to paint
    • color: colour to paint the blob
  • RESULT:
    • modifies input image and returns the seed point used to fill the blob
  • RESTRICTIONS:
  • AUTHOR: Ricard Borràs
  • CREATION DATE: 25-05-2005.
  • MODIFICATION: Date. Author. Description.

Definition at line 649 of file Blob.cpp.

Get bounding box.

  • FUNCIÓ: GetBoundingBox
  • FUNCIONALITAT: Get bounding box (without rotation) of a blob
  • PARÀMETRES:
  • RESULTAT:
  • RESTRICCIONS:
  • AUTOR: rborras
  • DATA DE CREACIÓ: 2008/05/06
  • MODIFICACIÓ: Data. Autor. Descripció.

Definition at line 488 of file Blob.cpp.

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

  • FUNCTION: GetConvexHull
  • FUNCTIONALITY: Calculates the convex hull polygon of the blob
  • PARAMETERS:
    • dst: where to store the result
  • RESULT:
    • true if no error ocurred
  • RESTRICTIONS:
  • AUTHOR: Ricard Borràs
  • CREATION DATE: 25-05-2005.
  • MODIFICATION: Date. Author. Description.

Definition at line 667 of file Blob.cpp.

CvBox2D CBlob::GetEllipse ( )

Get bounding ellipse.

  • FUNCIÓ: GetEllipse
  • FUNCIONALITAT: Calculates bounding ellipse of external contour points
  • PARÀMETRES:
  • RESULTAT:
  • RESTRICCIONS:
  • AUTOR: rborras
  • DATA DE CREACIÓ: 2008/05/06
  • MODIFICACIÓ: Data. Autor. Descripció.
  • NOTA: Calculation is made using second order moment aproximation

Definition at line 555 of file Blob.cpp.

Retrieves contour in Freeman's chain code.

Definition at line 58 of file Blob.h.

t_labelType CBlob::GetID ( ) [inline]

Get label ID.

Definition at line 70 of file Blob.h.

CvMemStorage* CBlob::GetStorage ( ) [inline]

Retrieves blob storage.

Definition at line 64 of file Blob.h.

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

Definition at line 139 of file Blob.cpp.

void CBlob::JoinBlob ( CBlob blob)

Join a blob to current one (add's contour.

  • FUNCTION: JoinBlob
  • FUNCTIONALITY: Add's external contour to current external contour
  • PARAMETERS:
    • blob: blob from which extract the added external contour
  • RESULT:
    • true if no error ocurred
  • RESTRICTIONS: Only external contours are added
  • AUTHOR: Ricard Borràs
  • CREATION DATE: 25-05-2005.
  • MODIFICATION: Date. Author. Description.

Definition at line 690 of file Blob.cpp.

double CBlob::MaxX ( ) [inline]

Maximun X.

Definition at line 123 of file Blob.h.

double CBlob::MaxY ( ) [inline]

Maximun Y.

Definition at line 128 of file Blob.h.

double CBlob::Mean ( IplImage *  image)

Get mean grey color.

  • FUNCIÓ: Mean
  • FUNCIONALITAT: Get blob mean color in input image
  • PARÀMETRES:
    • image: image from gray color are extracted
  • RESULTAT:
  • RESTRICCIONS:
  • AUTOR: rborras
  • DATA DE CREACIÓ: 2008/05/06
  • MODIFICACIÓ: Data. Autor. Descripció.

Definition at line 409 of file Blob.cpp.

double CBlob::MinX ( ) [inline]

Minimun X.

Definition at line 113 of file Blob.h.

double CBlob::MinY ( ) [inline]

Minimun Y.

Definition at line 118 of file Blob.h.

double CBlob::Moment ( int  p,
int  q 
)

Compute blob's moment (p,q up to MAX_CALCULATED_MOMENTS)

Definition at line 379 of file Blob.cpp.

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

Operador d'assignació Assigment operator

Definition at line 56 of file Blob.cpp.

double CBlob::Perimeter ( )

Compute blob's perimeter.

  • FUNCIÓ: Perimeter
  • FUNCIONALITAT: Get blob perimeter, ie. sum of the lenght of all the contours
  • PARÀMETRES:
  • RESULTAT:
  • RESTRICCIONS:
  • AUTOR: rborras
  • DATA DE CREACIÓ: 2008/04/30
  • MODIFICACIÓ: Data. Autor. Descripció.

Definition at line 187 of file Blob.cpp.

double CBlob::StdDev ( IplImage *  image)

Get standard deviation grey color.

Definition at line 462 of file Blob.cpp.


Member Data Documentation

double CBlob::m_area [private]

Area.

Definition at line 155 of file Blob.h.

CvRect CBlob::m_boundingBox [private]

Bounding box.

Definition at line 165 of file Blob.h.

CvBox2D CBlob::m_ellipse [private]

Bounding ellipse.

Definition at line 167 of file Blob.h.

External contour of the blob (crack codes)

Definition at line 144 of file Blob.h.

double CBlob::m_externPerimeter [private]

Extern perimeter from blob.

Definition at line 159 of file Blob.h.

Label number.

Definition at line 153 of file Blob.h.

Internal contours (crack codes)

Definition at line 146 of file Blob.h.

double CBlob::m_meanGray [private]

Mean gray color.

Definition at line 161 of file Blob.h.

CvSize CBlob::m_originalImageSize [private]

Sizes from image where blob is extracted.

Definition at line 169 of file Blob.h.

double CBlob::m_perimeter [private]

Perimeter.

Definition at line 157 of file Blob.h.

double CBlob::m_stdDevGray [private]

Standard deviation from gray color blob distribution.

Definition at line 163 of file Blob.h.

CvMemStorage* CBlob::m_storage [private]

Contour storage memory.

Definition at line 142 of file Blob.h.


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


hrl_cvblobslib
Author(s): kelsey
autogenerated on Wed Nov 27 2013 11:32:58