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

bEyesObject Class Reference

#include <beyesobject.h>

List of all members.

Public Member Functions

 bEyesObject (bEyesObject &thelist)
 bEyesObject (float xLeft_in, float yLeft_in, float xRight_in, float yRight_in)
 bEyesObject ()
int findBox ()
double findEucDis ()
 ~bEyesObject ()

Public Attributes

double degrees
bool leftEye
float leftScale
bool rightEye
float rightScale
float scale
float x
float xLeft
float xRight
float xSize
float y
float yLeft
float yRight
float ySize

Private Member Functions

float getAbs (float x)


Constructor & Destructor Documentation

bEyesObject  ) 
 

Definition at line 23 of file beyesobject.cpp.

00023                          : xLeft(0), yLeft(0), xRight(0), yRight(0), 
00024                    leftScale(0), rightScale(0), leftEye(false), rightEye(false){}

bEyesObject float  xLeft_in,
float  yLeft_in,
float  xRight_in,
float  yRight_in
 

Definition at line 26 of file beyesobject.cpp.

References xLeft, xRight, yLeft, and yRight.

00026                                                                                         {
00027         xLeft = xLeft_in;
00028         yLeft = yLeft_in;
00029         xRight = xRight_in; 
00030         yRight = yRight_in;
00031 }

bEyesObject bEyesObject thelist  ) 
 

Definition at line 33 of file beyesobject.cpp.

References degrees, leftEye, rightEye, scale, x, xLeft, xRight, xSize, y, yLeft, yRight, and ySize.

00034 {
00035         x = thelist.x;
00036         y = thelist.y;
00037         xSize = thelist.xSize;
00038         ySize = thelist.ySize;
00039         xLeft = thelist.xLeft;
00040         yLeft = thelist.yLeft;
00041         xRight = thelist.xRight;
00042         yRight = thelist.yRight;
00043         degrees = thelist.degrees;
00044         leftEye = thelist.leftEye;
00045         rightEye = thelist.rightEye;
00046         scale = thelist.scale;
00047 }

~bEyesObject  ) 
 

Definition at line 50 of file beyesobject.cpp.

00050 {}


Member Function Documentation

int findBox  ) 
 

Definition at line 52 of file beyesobject.cpp.

References degrees, findEucDis(), leftEye, x, xfactor, xLeft, xRight, xSize, y, yLeft, yRight, and ySize.

00053 {
00054         if(!leftEye || !rightEye)
00055                 return 0;
00056         xSize = static_cast<float>(floor(findEucDis()*xfactor));
00057         ySize = static_cast<float>(floor(xSize/2));
00058         degrees = atan2((yRight-yLeft),(xLeft-xRight));
00059     float width = xLeft-xRight;
00060         float midpointx = xRight + static_cast<float>(floor(width/2));
00061         float midpointy = yRight + static_cast<float>(floor((yLeft-yRight)/2)); 
00062         x = midpointx - static_cast<float>(floor(cos(degrees)*(xSize*.5) + sin(degrees)*(ySize*.5)));
00063         y = midpointy + static_cast<float>(floor(sin(degrees)*(xSize*.5) - cos(degrees)*(ySize*.5)));
00064         return 1;
00065 }

Here is the call graph for this function:

double findEucDis  ) 
 

Definition at line 76 of file beyesobject.cpp.

References getAbs(), xLeft, xRight, yLeft, and yRight.

Referenced by findBox().

00077 {
00078         double xSquare = getAbs(xLeft-xRight) * getAbs(xLeft-xRight);
00079         double ySquare = getAbs(yLeft-yRight) * getAbs(yLeft-yRight);
00080         double EucDis = sqrt(xSquare + ySquare);
00081         return EucDis;
00082 }

Here is the call graph for this function:

float getAbs float  x  )  [private]
 

Definition at line 67 of file beyesobject.cpp.

Referenced by findEucDis().

00067                                 {
00068         float rtn = x;
00069         if(x < 0){
00070                 float temp = x * 2;
00071                 rtn = x - temp;
00072         }
00073         return rtn;
00074 }               


Member Data Documentation

double degrees
 

Definition at line 37 of file beyesobject.h.

Referenced by bEyesObject(), and findBox().

bool leftEye
 

Definition at line 35 of file beyesobject.h.

Referenced by bEyesObject(), findBox(), FaceObject::findMax(), MPBlink::get_eyes(), and FaceObject::posterior().

float leftScale
 

Definition at line 33 of file beyesobject.h.

Referenced by FaceObject::findMax(), and FaceObject::posterior().

bool rightEye
 

Definition at line 36 of file beyesobject.h.

Referenced by bEyesObject(), FaceObject::findMax(), MPBlink::get_eyes(), and FaceObject::posterior().

float rightScale
 

Definition at line 34 of file beyesobject.h.

Referenced by FaceObject::findMax(), and FaceObject::posterior().

float scale
 

Definition at line 27 of file beyesobject.h.

Referenced by bEyesObject(), FaceObject::findMax(), and FaceObject::posterior().

float x
 

Definition at line 23 of file beyesobject.h.

Referenced by bEyesObject(), findBox(), FaceObject::findMax(), and FaceObject::posterior().

float xLeft
 

Definition at line 29 of file beyesobject.h.

Referenced by bEyesObject(), FilterInterface::DrawBoxes(), findBox(), findEucDis(), FaceObject::findMax(), MPBlink::get_eyes(), main(), mexFunction(), and FaceObject::posterior().

float xRight
 

Definition at line 31 of file beyesobject.h.

Referenced by bEyesObject(), FilterInterface::DrawBoxes(), findBox(), findEucDis(), FaceObject::findMax(), MPBlink::get_eyes(), main(), mexFunction(), and FaceObject::posterior().

float xSize
 

Definition at line 25 of file beyesobject.h.

Referenced by bEyesObject(), and findBox().

float y
 

Definition at line 24 of file beyesobject.h.

Referenced by bEyesObject(), findBox(), FaceObject::findMax(), and FaceObject::posterior().

float yLeft
 

Definition at line 30 of file beyesobject.h.

Referenced by bEyesObject(), FilterInterface::DrawBoxes(), findBox(), findEucDis(), FaceObject::findMax(), MPBlink::get_eyes(), main(), mexFunction(), and FaceObject::posterior().

float yRight
 

Definition at line 32 of file beyesobject.h.

Referenced by bEyesObject(), FilterInterface::DrawBoxes(), findBox(), findEucDis(), FaceObject::findMax(), MPBlink::get_eyes(), main(), mexFunction(), and FaceObject::posterior().

float ySize
 

Definition at line 26 of file beyesobject.h.

Referenced by bEyesObject(), and findBox().


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