ingenuitas/SimpleCV — pull request #398 by jayrambhia (2013-04-13 19:47:11+00:00)
Title: FisherFaceRecognizer added

Fisher Face Recognizer added in FaceRecognizer class.

Usage:

f = FaceRecognizer()
imgs1 = ImageSet(path/to/images_of_type1)
labels1 = [0]*len(imgs1)
imgs2 = ImageSet(path/to/images_of_type2)
labels2 = [1]*len(imgs2)
imgs3 = ImageSet(path/to/images_of_type3)
labels3 = [2]*len(imgs3)
imgs = imgs1 + imgs2 + imgs3
labels = labels1 + labels2 + labels3
f.train(imgs, labels)
img = Image("some_image_of_any_of_the_above_type")
print f.predict(img)

Save Fisher Training Data
f.save("trainingdata.xml")

Load Fisher Training Data and directly use without trainging
f1 = FaceRecognizer()
f1.load("trainingdata.xml")
img = Image("some_image_of_any_of_the_above_type")
print f1.predict(img)

Use CSV files for training
f = FaceRecognizer()
f.train(csvfile="CSV_file_name", delimiter=";")
img = Image("some_image_of_any_of_the_type_in_csv_file")
print f.predict(img)