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

FindFacesInGWorld.mm File Reference

#import "FindFacesInGWorld.h"

Include dependency graph for FindFacesInGWorld.mm:

Include dependency graph

Go to the source code of this file.

Functions

double difftv (const struct timeval &t1, const struct timeval &t0)
void square (unsigned char *data, Square it, int w)

Variables

RImage< float > grayImg


Function Documentation

double difftv const struct timeval &  t1,
const struct timeval &  t0
[inline, static]
 

Definition at line 25 of file FindFacesInGWorld.mm.

00026 { return( (t1.tv_sec -t0.tv_sec )*1.0 +(t1.tv_usec-t0.tv_usec)*1e-6); }

void square unsigned char *  data,
Square  it,
int  w
[inline, static]
 

Definition at line 28 of file FindFacesInGWorld.mm.

References i, k, p, TSquare::size, Square, TSquare::x, and TSquare::y.

00028                                                                 {
00029     typedef struct{ unsigned char a, r, g, b;} argbPixel;
00030     unsigned char val;
00031     argbPixel *pixeldata = (argbPixel *)data;
00032     for(int k=0; k<3;++k){
00033         val = ((k % 2) ? 0 : 255);
00034         int top = it.y+k;
00035         int bot = it.y+it.size-k;
00036         int left = it.x+k;
00037         int right = it.x+it.size-k;
00038         argbPixel* p = pixeldata + top*w+left;
00039         for(int i=left; i<right; ++i){
00040             p->r = val; p->g=val; p->b=val; p++;
00041         }
00042         p = pixeldata + bot*w+left;
00043         for(int i=left; i<right; ++i){
00044             p->r = val; p->g=val; p->b=val; p++;
00045         }
00046         p = pixeldata + top*w+left;
00047         for(int i=top; i<bot; ++i){
00048             p->r = val; p->g=val; p->b=val; p+=w;
00049         }
00050         p = pixeldata + top*w+right-1;
00051         for(int i=top; i<bot; ++i){
00052             p->r = val; p->g=val; p->b=val; p+=w;
00053         }
00054     }
00055 }


Variable Documentation

RImage<float> grayImg [static]
 

Definition at line 23 of file FindFacesInGWorld.mm.

Referenced by FindFacesInGWorld::FindFaces:, and FindFacesInGWorld::InitializeStreamWithWidth:Height:.


Generated on Mon Nov 8 17:07:59 2004 for MPT by  doxygen 1.3.9.1