Public Member Functions

CBlobGetLength Class Reference

Classe per calcular la longitud d'un blob Class to calculate the length of a blob. More...

#include <Blob.h>

Inheritance diagram for CBlobGetLength:
COperadorBlob

Public Member Functions

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

Detailed Description

Classe per calcular la longitud d'un blob Class to calculate the length of a blob.

Definition at line 308 of file Blob.h.


Member Function Documentation

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

Retorna la longitud del blob.

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

Implements COperadorBlob.

Definition at line 876 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 MAX( longitudC , ampladaC );
}


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