Public Member Functions

CBlobGetBreadth Class Reference

Classe per calcular l'amplada d'un blob Class to calculate the breadth of a blob. More...

#include <Blob.h>

Inheritance diagram for CBlobGetBreadth:
COperadorBlob

Public Member Functions

double operator() (const CBlob &blob) const
 Retorna l'amplada del blob.
const char * GetNom () const
 Obt�el nom de l'operador.
 operator COperadorBlob * () const

Detailed Description

Classe per calcular l'amplada d'un blob Class to calculate the breadth of a blob.

Definition at line 320 of file Blob.h.


Member Function Documentation

double CBlobGetBreadth::operator() ( const CBlob blob  )  const [virtual]

Retorna l'amplada del blob.

  • FUNCTION: CBlobGetBreadth
  • FUNCTIONALITY: Calculates the breadth of the blob (the smallest axis of the blob)
  • PARAMETERS:
  • RESULT:
  • RESTRICTIONS:
    • The breadth is an aproximation to the real breadth
  • AUTHOR: Ricard Borr�
  • CREATION DATE: 25-05-2005.
  • MODIFICATION: Date. Author. Description.

Implements COperadorBlob.

Definition at line 909 of file Blob.cpp.

{
        double ampladaC,longitudC;
        double tmp;

        tmp = blob.Perimeter()*blob.Perimeter() - 16*blob.Area();

        if( tmp > 0.0 )
                ampladaC = (double) (blob.Perimeter()+sqrt(tmp))/4;
        // error intr�sec en els c�culs de l'�ea i el per�etre 
        else
                ampladaC = (double) (blob.Perimeter())/4;

        if(ampladaC<=0.0) return 0;
        longitudC = (double) blob.Area()/ampladaC;

        return MIN( longitudC , ampladaC );
}


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Friends Defines