Subject: Sears: Kitchen-Remodel in about 4-6 days

From: Your Kitchen Upgrade <[email-masked]>
Date: Tue, 20 May 2014 10:22:51 -0700

From: Sears 7be667cca81266f912f4da63067737ce ----

http://www.sears.com/tools/b-1020000

http://www.sears.com/lawn-garden/b-1020001

Thank you for being part of our publications. As a special thank you we would like to extend to you:

(1) New Kitchen Remodeling

OR-

(1) Cabinet Refacing Upgrade

Exclusively For: [email-masked]

(Activate By: May 31, 2014)

Activate Remodel Package

Sears Home Improvement solutions

This expires May 31, 2014. Offer not valid on prior sales or in combination with any other offer. Offer valid to US homeowners only. Ask your Sears specialist for offer details. Subject to applicant creditworthiness.

You're receiving-this because you signed up for special-offers
from EDE Turner Media. P.O-Box 227_Moran, TX, 76464 (Communication-settings-prefs)

Im developing an android application for face recognition, using JavaCV which is unofficial wrapper of OpenCV. After importing (com.googlecode.javacv.cpp.opencv_contrib.FaceRecognizer) I apply and test the following known methods:

LBPH using createLBPHFaceRecognizer() method
FisherFace using createFisherFaceRecognizer() method
EigenFace using createEigenFaceRecognizer() method
Before I recognize the detected face, I correct the rotated face and crop the proper zone, inspiring from this method

In general when I pass on camera a face already exist in the database, the recognition is ok. But this is not always correct. Sometimes it recognizes the unknown face (not found in Database of trained samples) with a high probability. When we have in the DB two or more faces of similar features (beard, mustache, glasses...) the recognition may be highly mistaken between those faces!

To predict the result using the test face image, I apply the following code:

public String predict(Mat m) {

int n[] = new int[1];
double p[] = new double[1];
IplImage ipl = MatToIplImage(m,WIDTH, HEIGHT);

faceRecognizer.predict(ipl, n, p);

if (n[0]!=-1)
mProb=(int)p[0];
else
mProb=-1;
if (n[0] != -1)
return labelsFile.get(n[0]);
else
return "Unkown";
}
I cant control the threshold of the probability p, because:

Small p < 50 could predict a correct result.
High p > 70 could predict a false result.
Middle p could predict a correct or false.
As well, I dont understand why predict() function gives sometime a probability greater than 100 in case of using LBPH??? and in case of Fisher and Eigen it gives very big values (>2000) ?? Can someone help in finding a solution for these bizarre problems? Is there any suggestion to improve robustness of recognition? especially in case of similarity of two different faces.

The following is the entire class using Facerecognizer:

package org.opencv.javacv.facerecognition;

import static com.googlecode.javacv.cpp.opencv_highgui.*;
import static com.googlecode.javacv.cpp.opencv_core.*;

import static com.googlecode.javacv.cpp.opencv_imgproc.*;
import static com.googlecode.javacv.cpp.opencv_contrib.*;

import java.io.File;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.util.ArrayList;

import org.opencv.android.Utils;
import org.opencv.core.Mat;

import com.googlecode.javacv.cpp.opencv_imgproc;
import com.googlecode.javacv.cpp.opencv_contrib.FaceRecognizer;
import com.googlecode.javacv.cpp.opencv_core.IplImage;
import com.googlecode.javacv.cpp.opencv_core.MatVector;

yes, you'll need 3 different threshold values, one for each method, since the feature-space for all of them differ. also, your 'p' value in the prediction is not a probability, http://www.sears.com/en_us/bed-bath-home.html but the distance from your test image to the closest found match in the db (so, kinda the inverse of it), so that's not at all in the [0..100] range.