The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

avg_object Class Reference

#include <faceboxlist.h>

List of all members.

Public Member Functions

 avg_object (const avg_object &v)
 avg_object ()
 avg_object (const avg_object &v)
 avg_object ()
 avg_object (const avg_object &v)
 avg_object ()
 avg_object (const avg_object &v)
 avg_object ()
void normalize ()
void normalize ()
void normalize ()
void normalize ()
avg_object operator+ (const avg_object &v) const
avg_object operator+ (const avg_object &v) const
avg_object operator+ (const avg_object &v) const
avg_object operator+ (const avg_object &v) const
avg_objectoperator+= (const avg_object &v)
avg_objectoperator+= (const avg_object &v)
avg_objectoperator+= (const avg_object &v)
avg_objectoperator+= (const avg_object &v)
void unnormalize ()
void unnormalize ()
void unnormalize ()
void unnormalize ()
 ~avg_object ()
 ~avg_object ()
 ~avg_object ()
 ~avg_object ()

Public Attributes

float b
float l
int nB
int nL
bool normalized
int nR
int nScale
int nT
float r
float scale
float t


Constructor & Destructor Documentation

avg_object  ) 
 

Definition at line 20 of file faceboxlist.cc.

References r.

00020                       :l(0),r(0),t(0),b(0),scale(0),
00021 nL(1),nR(1),nT(1),nB(1),nScale(1),normalized(false){}

avg_object const avg_object v  ) 
 

Definition at line 23 of file faceboxlist.cc.

References r, and v.

00023                                          :l(v.l),r(v.r),t(v.t),b(v.b),scale(v.scale),
00024 nL(v.nL),nR(v.nR),nT(v.nT),nB(v.nB),nScale(v.nScale),normalized(v.normalized){}

~avg_object  ) 
 

Definition at line 26 of file faceboxlist.cc.

00026 {}

avg_object  ) 
 

avg_object const avg_object v  ) 
 

~avg_object  ) 
 

avg_object  ) 
 

avg_object const avg_object v  ) 
 

~avg_object  ) 
 

avg_object  ) 
 

avg_object const avg_object v  ) 
 

~avg_object  ) 
 


Member Function Documentation

void normalize  ) 
 

void normalize  ) 
 

void normalize  ) 
 

void normalize  ) 
 

Definition at line 87 of file faceboxlist.cc.

References b, l, normalized, r, scale, and t.

Referenced by ObjectList::simplify().

00087                           {
00088   t*=1.0f/nT; b*=1.0f/nB; l*=1.0f/nL; r*=1.0f/nR; scale*=1.0f/nScale;
00089   normalized = true;
00090 }

avg_object operator+ const avg_object v  )  const
 

avg_object operator+ const avg_object v  )  const
 

avg_object operator+ const avg_object v  )  const
 

avg_object operator+ const avg_object v  )  const
 

Definition at line 28 of file faceboxlist.cc.

References b, l, nB, nL, normalized, nR, nScale, nT, r, scale, t, unnormalize(), and v.

00028                                                          {
00029   avg_object tmp = *this;
00030   if(tmp.normalized) tmp.unnormalize();
00031   if(!v.normalized){
00032           if(tmp.l > 0){
00033                   tmp.l += v.l; tmp.nL += v.nL;}
00034           if(tmp.r > 0){
00035                   tmp.r += v.r; tmp.nR += v.nR;}
00036           if(tmp.t > 0){
00037                   tmp.t += v.t; tmp.nT += v.nT;}
00038           if(tmp.b > 0){
00039                   tmp.b += v.b; tmp.nB += v.nB;}
00040           if(tmp.scale > 0){
00041                   tmp.scale += v.scale; tmp.nScale += v.nScale;}
00042   }
00043   else{
00044           if(tmp.l > 0){
00045                   tmp.l += v.l*v.nL; tmp.nL += v.nL;}
00046           if(tmp.r > 0){
00047                   tmp.r += v.r*v.nR; tmp.nR += v.nR;}
00048           if(tmp.t > 0){
00049                   tmp.t += v.t*v.nT; tmp.nT += v.nT;}
00050           if(tmp.b > 0){
00051                   tmp.b += v.b*v.nB; tmp.nB += v.nB;}
00052           if(tmp.scale > 0){
00053                   tmp.scale += v.scale*v.nScale; tmp.nScale += v.nScale;}
00054   }
00055   return tmp;
00056 }

Here is the call graph for this function:

avg_object& operator+= const avg_object v  ) 
 

avg_object& operator+= const avg_object v  ) 
 

avg_object& operator+= const avg_object v  ) 
 

avg_object & operator+= const avg_object v  ) 
 

Definition at line 58 of file faceboxlist.cc.

References b, l, nB, nL, normalized, nR, nScale, nT, r, scale, t, unnormalize(), and v.

00058                                                       {
00059   if(normalized) unnormalize();
00060   if(!v.normalized){
00061           if(l > 0){
00062                   l += v.l; nL += v.nL;}
00063           if(r > 0){
00064                   r += v.r; nR += v.nR;}
00065           if(t > 0){
00066                   t += v.t; nT += v.nT;}
00067           if(b > 0){
00068                   b += v.b; nB += v.nB;}
00069           if(scale > 0){
00070                   scale += v.scale; nScale += v.nScale;}
00071   }
00072   else{
00073           if(l > 0){
00074                   l += v.l*v.nL; nL += v.nL;}
00075           if(r > 0){
00076                   r += v.r*v.nR; nR += v.nR;}
00077           if(t > 0){
00078                   t += v.t*v.nT; nT += v.nT;}
00079           if(b > 0){
00080                   b += v.b*v.nB; nB += v.nB;}
00081           if(scale > 0){
00082                   scale += v.scale*v.nScale; nScale += v.nScale;}
00083   }
00084   return *this;
00085 }

Here is the call graph for this function:

void unnormalize  ) 
 

void unnormalize  ) 
 

void unnormalize  ) 
 

void unnormalize  ) 
 

Definition at line 92 of file faceboxlist.cc.

References b, l, normalized, r, scale, and t.

Referenced by operator+(), and operator+=().

00092                             {
00093   t*=nT; b*=nB; l*=nL; r*=nR; scale*=nScale;
00094   normalized = false;
00095 }


Member Data Documentation

float b
 

Definition at line 28 of file src/faceboxlist.h.

Referenced by normalize(), operator+(), operator+=(), ObjectList::overlap(), ObjectList::simplify(), and unnormalize().

float l
 

Definition at line 28 of file src/faceboxlist.h.

Referenced by normalize(), operator+(), operator+=(), ObjectList::overlap(), ObjectList::simplify(), and unnormalize().

int nB
 

Definition at line 30 of file src/faceboxlist.h.

Referenced by operator+(), and operator+=().

int nL
 

Definition at line 30 of file src/faceboxlist.h.

Referenced by operator+(), and operator+=().

bool normalized
 

Definition at line 31 of file src/faceboxlist.h.

Referenced by normalize(), operator+(), operator+=(), and unnormalize().

int nR
 

Definition at line 30 of file src/faceboxlist.h.

Referenced by operator+(), and operator+=().

int nScale
 

Definition at line 30 of file src/faceboxlist.h.

Referenced by operator+(), and operator+=().

int nT
 

Definition at line 30 of file src/faceboxlist.h.

Referenced by operator+(), and operator+=().

float r
 

Definition at line 28 of file src/faceboxlist.h.

Referenced by normalize(), operator+(), operator+=(), ObjectList::overlap(), ObjectList::simplify(), and unnormalize().

float scale
 

Definition at line 29 of file src/faceboxlist.h.

Referenced by normalize(), operator+(), operator+=(), ObjectList::simplify(), and unnormalize().

float t
 

Definition at line 28 of file src/faceboxlist.h.

Referenced by normalize(), operator+(), operator+=(), ObjectList::overlap(), ObjectList::simplify(), and unnormalize().


The documentation for this class was generated from the following files:
Generated on Mon Nov 8 17:08:29 2004 for MPT by  doxygen 1.3.9.1