Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

locator.cpp File Reference

#include "common.h"
#include "locator.h"
#include <dirent.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

Functions

void getNNinputData (GrayImage &image, int x, int y, double *input_pixels)
bool training_done (annie::TrainingSet &ts, annie::TwoLayerNetwork &other_net)
void newTrain (annie::TrainingSet &ts, unsigned int hidden)
void trainNN (string NonFaceDir, annie::TrainingSet &all, annie::TrainingSet &ts, string fileName, int hidden)
bool training_set_guess (string FaceDir, string NonFaceDir, string fileName, int num_images)
bool add_non_training_set (string NonFaceDir, annie::TrainingSet &T)
annie::TrainingSetmake_face_training_set (string FaceDir, string fileName)

Variables

unsigned int start_stop [INPUT_HEIGHT *2]

Function Documentation

bool add_non_training_set string    NonFaceDir,
annie::TrainingSet   T
 

void getNNinputData GrayImage   image,
int    x,
int    y,
double *    input_pixels
 

this is a special function that will do all of the nessisary image preprocessing for the neural network face locator.
This is based off of ImageMagick`s histogram equalization code

Parameters:
image  the image to get this info from
x  the x value of the upper left hand corner of the image to be processed
y  the y value of the upper left hand corner of the image to be processed
input_pixels  a pointer to the array of input values to the neural network, note that this is how values are returned

annie::TrainingSet* make_face_training_set string    FaceDir,
string    fileName
 

the first step in training the network is to compile all of the faces into a training set to train the network with

Parameters:
FaceDir  a directory containing image files of faces. the faces should be INPUT_WIDTH by INPUT_HEIGHT
fileName  the name of the file to save the training set data to
Returns:
true if no errors were encountered else false

void newTrain annie::TrainingSet   ts,
unsigned int    hidden
 

bool training_done annie::TrainingSet   ts,
annie::TwoLayerNetwork   other_net
 

bool training_set_guess string    FaceDir,
string    NonFaceDir,
string    fileName,
int    num_images
 

the first step in training the network is to compile all of the images into a training set to train the network with, this is a tool that will guess at a subset of the complete set to start training with

Parameters:
FaceDir  a directory containing image files of faces. the faces should be INPUT_WIDTH by INPUT_HEIGHT
NonFaceDir  the directory containing images with no faces at all in them.
fileName  the name of the file to save the training set data to
num_images, the  maximum number of images to be added into the training set
Returns:
true if no errors were encountered else false

void trainNN string    NonFaceDir,
annie::TrainingSet   all,
annie::TrainingSet   ts,
string    fileName,
int    hidden
 

train the network in an interesting way


Variable Documentation

unsigned int start_stop[INPUT_HEIGHT*2]
 

Initial value:

{8,10   
 ,5,13  
 ,4,14  
 ,3,15  
 ,2,16  
 ,2,16  
 ,1,17  
 ,1,17  
 ,0,18  
 ,0,18  
 ,0,18  
 ,0,18  
 ,0,18  
 ,0,18  
 ,0,18  
 ,1,17  
 ,1,17  
 ,1,17  
 ,2,16  
 ,2,16  
 ,3,15  
 ,4,14  
 ,6,12}
this is an array that holds the start and stop values for each line in a face image. as a function looks fo pixles that are part of a face it will only take those that inclusively fall within the numbers that this array holds


Generated on Wed Apr 23 10:42:34 2003 for BioFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002