×

Discussion Board

Results 1 to 10 of 10

Thread: Traking faces

  1. #1
    Registered User
    Join Date
    Sep 2013
    Posts
    45

    Tracking faces

    I need something that helps me tracking faces from a camera live stream.

    I've tried with Microsoft's Face SDK and it works quite fine (even if it doesn't always work for no apparent reason).

    Now, reading this article, I found out that I can't use that SDK for a WP8 app.
    The article talks about an OpenCV based library which I already tried, and I don't like it that much (success rate is way too lower than the Microsoft's one).

    So here's the question:
    is there any GOOD library that will allow me to detect and track a face starting from a PhotoCamera stream?

    And, as a little bonus, is there any of this libraries that does the multiple tracking?
    Last edited by StepTNT; 2013-10-28 at 18:12. Reason: typo in the title

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    475

    Re: Tracking faces

    Hi.
    What is the problem with the wiki article?

  3. #3
    Registered User
    Join Date
    Sep 2013
    Posts
    45

    Re: Tracking faces

    No problem with the article, but the library that has been used there is doesn't work as I'd like.

    Face detection fails a lot of times, even more than the Microsoft's library.

    That's why I'm asking for some library which may be used on WP8 and, maybe, works better thant those 2

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    475

    Re: Tracking faces

    Maybe you could try to improve picture with Imaging SDK to improve tracking?

  5. #5
    Registered User
    Join Date
    Sep 2013
    Posts
    45

    Re: Tracking faces

    This is really a cool idea!

    Do you have any idea on how to use the Imaging SDK to improve the picture?

  6. #6

  7. #7
    Registered User
    Join Date
    Sep 2013
    Posts
    45

    Re: Tracking faces

    This is a little part of my code:

    Code:
    phCam.GetPreviewBufferY(input.Buffer);
                    // NOKIA IMAGING SDK
                    var esf = await EditingSessionFactory.CreateEditingSessionAsync(new MemoryStream(input.Buffer));        
                    esf.AddFilter(FilterFactory.CreateAutoEnhanceFilter(new AutoEnhanceConfiguration().ApplyAutomaticContrastAndBrightness().ApplyAutomaticLocalBoost()));
                    var we = new WriteableBitmap(input.Width, input.Height);
                    using (var ms = new MemoryStream())
                    {
                        we.SaveJpeg(ms, we.PixelWidth, we.PixelHeight, 0, 100);
                        ms.Write(input.Buffer, 0, (int)ms.Length);
                    }                
    
                    var rc = _tracker.Track(input);
    the GetPreviewBufferY method is required by Microsoft's Face SDK (which takes the result in the the _tracker.Track line).

    I've tried using your suggestion to improve the image and increase my success rate, but this code throws an exception in the CreateEditingSessionAsync method.

    The exception just says:
    The parameter is incorrect.

  8. #8
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    475

    Re: Tracking faces

    EditingSessionFactory.CreateEditingSessionAsyn use a jpg stream not the data.

    To use the pixel buffer, you need to create a bitmap : http://developer.nokia.com/Resources...2-ibuffer.html
    and use it as input of a editingsession.
    You can look how real time filter sample works : http://developer.nokia.com/Resources...lter-demo.html

  9. #9
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    475

    Re: Tracking faces


  10. #10
    Registered User
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    2,571

    Re: Tracking faces

    Great job Yan. FYI, this was made our featured post.

    StepTNT, if this works, it would be great if you could provide some benchmarking and provide either a wiki article or enhance the one already there???? If not, it would still be great if you could let us know here.

Similar Threads

  1. Draw two faces of a Polygon in OpenGL ES!!
    By abolfoooud in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2008-05-13, 21:51
  2. How do I edit the mask for the clock faces.
    By stevewaring in forum Streaming and Video
    Replies: 1
    Last Post: 2006-09-06, 22:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×