Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get complete FaceDetect-Android project and use it? #11

Open
GoogleCodeExporter opened this issue Apr 22, 2015 · 4 comments
Open

Comments

@GoogleCodeExporter
Copy link

Hello

I don't know how I get complete FaceDetect-Android project. I try to copy
the source code in the project that created by myself, but it can't build
swimmingly.

I install the apk file that gets from here to my google phone. It is
success and showing the camera preview on the screen. But, I don't know how
it used. When I press the capture button to get a front face image. It
always show a red cross. Does it mean no face detected?

I don't know how make contact with you as soon as possible. Please send
E-mail to me.

My E-mail address is g9612748@yuntech.edu.tw.

Thank you very much.


Shih, Hao-Chung

Original issue reported on code.google.com by cmusic...@gmail.com on 18 May 2009 at 2:28

@GoogleCodeExporter
Copy link
Author

After some hassle I was able to make FactDetect-Android work on my Samsung 
Galaxy S, now I face the same problem that was reported here. No matter what I 
take picture of it just doesn't detect any faces and shows a red cross over the 
entire picture. It looks like DetectHaarParam.push just doesn't work. I'm going 
to try the method itself on a standalone picture and report back.

Original comment by mogore...@gmail.com on 3 Jan 2011 at 4:02

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

It seems to me that the code is actually broken :( I've tried the standalone 
code below and it does not detect faces even on the example image provided with 
FaceDetect-Android. It looked so good though ...

Actual Result: 0 (zero)
Expected Result: 1 face from lena.png file

public static void main(String[] args) {
    System.out.println("hello world");

    try {
        FileInputStream in = new FileInputStream("D:\\svn\\JJIL\\FaceDetect-Android\\res\\raw\\hcsb_ser");
        InputStream is = in;
        ObjectInputStream ios = new ObjectInputStream(is);
        Object o = ios.readObject();
        DetectHaarParam.setCascade((HaarClassifierCascade) o);
        ios.close();
        is.close();
    } catch (Exception ex) {
        ex.printStackTrace();
        System.err.print("Exception: " + ex.toString()); //$NON-NLS-1$ //$NON-NLS-2$        
    }


    Image img = Toolkit.getDefaultToolkit().createImage("D:\\svn\\JJIL\\FaceDetect-Android\\res\\raw\\lena.png");
    boolean b = Toolkit.getDefaultToolkit().prepareImage(img, -1, -1, null);

    int nFaces = 0;
    DetectHaarParam mDhp = new DetectHaarParam();

    RgbImage mRgbCurrent = RgbImageJ2se.toRgbImage(img);

    mDhp.push(mRgbCurrent);
    for (Enumeration<jjil.core.Rect> e = mDhp.getResult(); e.hasMoreElements();) {
        ++nFaces;
    };
    mRgbCurrent = null;
    System.out.println(nFaces);
}

Original comment by mogore...@gmail.com on 3 Jan 2011 at 6:24

@GoogleCodeExporter
Copy link
Author

Hi,
try check this:
http://www.richardnichols.net/2011/01/java-facial-recognition-haar-cascade-with-
jjil-guide/

I tested it and it works well.

Bye.
Denis

Original comment by denpe...@gmail.com on 26 May 2011 at 9:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant