Package pyvision :: Package analysis :: Package FaceAnalysis :: Module EyesFile :: Class EyesFile
[hide private]
[frames] | no frames]

Class EyesFile

source code

Parses and interfaces with an eyes file. Eyes files can be comma separated (.csv) files or white space separated files.

Each line of the file should have an image name and then the left X, left Y, right X, and right Y. Extensions will be automatically striped from image filenames.

Instance Methods [hide private]
 
__init__(self, filename)
Inits and reads in the data.
source code
 
files(self)
Returns: a list of all image filenames
source code
 
hasFile(self, filename)
Returns: True if filename is in index or False otherwise
source code
 
findFace(self, filename, rect)
Returns the eye coordinates given a face detection rectangle.
source code
 
getFaces(self, filename) source code
 
getEyes(self, filename) source code
 
_readEyesFile(self)
Private: Do not call directly.
source code
 
_parseName(self, fname)
Private: Do not call directly.
source code
Method Details [hide private]

files(self)

source code 
Returns:
a list of all image filenames

hasFile(self, filename)

source code 
Returns:
True if filename is in index or False otherwise

findFace(self, filename, rect)

source code 

Returns the eye coordinates given a face detection rectangle. This is useful if you have a face detector and want to simulate eye detection

Parameters:
  • filename - image filename
  • rect - rectangle that bounds the face that you want eye coordinates.
Returns:
[image_name, leye, reye, face_rect] or None if the rectangle is not near a face.

_readEyesFile(self)

source code 

Private: Do not call directly. Reads the eye file.

_parseName(self, fname)

source code 

Private: Do not call directly. Parses the base filename.