Face Detection Approach


Last Updated:

  1. jammacz22

    jammacz22 New Member This Topic's Starter

    Joined:
    Oct 28, 2010
    Messages:
    2
    Likes Received:
    0
    Hey,

    I am currently working on an experimental camera app. I'm looking into implementing face detection at the moment and am currently weighing up my options.

    I have considered the OpenCV port available for android and using their face detection functions, but from demos I have seen of previous implementations the camera seems to lag a lot.

    Considering the camera on the HTC desire has face detecting, I know it must be possible to get at least a semi decent face detection system in place. I was just wondering if anyone had an opinion on how I could get the best results... Using an available library? Implementing a particular algorithm myself?

    Thanks,

    james
     

    Advertisement
  2. mohitjaitly

    mohitjaitly Active Member

    Joined:
    Oct 18, 2010
    Messages:
    34
    Likes Received:
    0
  3. JamesBurnstone

    JamesBurnstone Member

    Joined:
    Nov 22, 2010
    Messages:
    9
    Likes Received:
    0
    The face detection used in the native camera app, using the facedetection API, is slow quite terrible, it only uses eye detection and then creates a rectangle around this area using the distance between eyes, no great if the person is not looking straight at the camera. I'm currently developing a skin filter for face detection but its very slow due to the way android gets and uses frames from the camera. There are many memory issues as well due to android copying camera frames each time one is collected from a callback.

    Porting the openCV software has the some of the best detection rates but again you have to work around the lag and memory issue, personally me and my group are looking at writing native code to implement our own camera app and thus stop copying to many frames.

    I have just finshed building a real time face detection app using the Face Detection API and it's actually not bad at all. A bit of resize and you can easily process every frame, I'm using a Desire HD. The only problem I have is when you use Camera.PreviewCallback the frames are displayed separately to the frames used for processing so there is a 2 second delay between the frame being displayed and the processing finishing and dispaly a circle/rect around the face region. I'm currently looking for a way to get the frame via the callbak but stop them being displayed separately and simply display them myself after all the processing is done and draw on the cirlce instead of using a canvas on top of the camera surface view which is useless really as you can't undo undo or delete stuff you have drawn.
     
  4. cjayant

    cjayant New Member

    Joined:
    Apr 4, 2011
    Messages:
    1
    Likes Received:
    0
    I have written the same type of app re: JamesBurnstone, and wondering if you ever figured out how to avoid such a bad 2 second delay because of the camera preview frame issue? Thanks.
     
  5. George Stam

    George Stam Member

    Joined:
    Nov 14, 2010
    Messages:
    12
    Likes Received:
    0
    I'm guessing you all have tried
    Code (Text):
    1. camera.setPreviewCallbackWithBuffer([...])
    right?
     

Share This Page

Loading...