Weblog / Blog article: Marilena : source code of the Glasses Demo
-->

Marilena : source code of the Glasses Demo

Posted by François On May - 25 - 2009

Somebody remind me that I forgot to share the project of my demo using the Marilena project (OpenCV port).

So here is the source code, nothing fancy, nothing complicated, just a real basic use, but I guess it will help some of you who are interested.

This code is compiled with free tools as Flex SDK, Flash Develop , the optimized version of Marilena by Mario Klingemann and the AS3 Tweenlite class. If you never setup this kind of IDE before I highly recommend this tutorial which will help you with all the settings !

I’m not a programmer so this code is way too simple and not optimized at all, so feel free to re-use it as you want :)

Related Link :

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • StumbleUpon
  • Posterous
  • Tumblr
  • Digg
  • FriendFeed
  • del.icio.us
  • Netvibes
  • RSS
  • email
  • Print
  • PDF
  • Google Bookmarks
  • Blogplay

18 Responses to “Marilena : source code of the Glasses Demo”

  1. clongleung says:

    HI Dear,

    I have try the coding but got a error:[1046: Type was not found or was not a compile-time constant: ObjectDetectorEvent.]

    may I know what am I missing? thanks a lot

    Clongleung

  2. admin says:

    Hum, that’s weird.

    Are you using Flex SDK to compile it ? did you download all the library and stuff ?
    which line is the error ?

  3. clongleung says:

    Hi admin,

    I have tried to setup Flash developer and setup the Flex DSK already. but still have a error with:

    C:\Users\admin\Desktop\face\gs\ObjectDetectorEvent.as:1: 5001: The name of package ‘jp.maaash.ObjectDetection’ does not reflect the location of this file. Please change the package definition’s name inside this file, or move the file. C:\Users\admin\Desktop\face\gs\ObjectDetectorEvent.as

    May I know how can I fix this error, many thanks =D

  4. clongleung says:

    Sorry, my last question problem and error is [1067: Implicit coercion of a value of type flash.display:BitmapData to an unrelated type flash.display:Bitmap.]

    thanks a lot.

    clongleung

  5. admin says:

    sorry I didn’t answer you before, I was busy, could if you find the solution though ;)

  6. [...] – Marilena.  W tym celu warto zapoznać się z kodem z dema Mario Klingemanna albo z kodem z dema Francois [...]

  7. Ilya says:

    This code is not full, its just one of the packeges. Need the gs packeg to run it as well as the main file

  8. Ilya says:

    I am more then curious to know how you did that?

  9. admin says:

    yes as I said, you have to download the AS3 Tweenlite here : http://blog.greensock.com/tweenliteas3/

    @Ilya : what do you want to know ? the code is pretty simple. I’m just using functions of the Marilena Lib. I start it from Mario Klingemann examples (see the link above)

  10. eomer says:

    hi,
    i am writing the same project but not using flash (opencv + C)
    i detect face & eyes and put a jpeg image in detected eye
    i encountered some problems: first the detection works with very low performance detection stops when i move my head
    the second problem is eye detection work only when i look directly to CAM.
    your program works even i dont look directly to CAM

    how can i solve these problems pls help

  11. admin says:

    what are you using ? which cascade file are you using ?

  12. eomer says:

    haarcascade_mcs_eyepair_big.xml for eyes (takes both eyes in one rect)
    and haarcascade_frontalface_alt_tree2.xml for face

  13. admin says:

    are you always looking for eyes or only when you get the face ?
    Isn’t there another cascade file for just one eyes ? the issue you encounter is that if it just miss one eyes, then it won’t show any at all. But this is not exactly how it works.
    Do you know how the cascade file is working ? it’s pretty much like a tree with patches. each time it valids a patch it goes to the next one, and so on. so first it looks for a big patch and go smaller and smaller, but if it miss one step, you restart from beginning. Still not exactly how it works but give you the big picture. (there is a nice scheme explanation about haar feature here : http://www.emeraldinsight.com/Insight/ViewContentServlet?Filename=Published/EmeraldFullTextArticle/Articles/0490340109.html)

    but if you are using openCV and C, I recommand you take a look at ASM (active shape modeling) & AAM (active Apparence Model) which is so much better. (the approach of faceapi by the way)

  14. eomer says:

    yes i wrote an if statement if the eyes rect coordinates are not in face rect coordinates it wont continue

    i also used eye cascade for detecting the eyes seperately it didnt change

    i will take a look at ASM and AAM right now
    if its ok for you can i asked my futher questions with email it wiil be easier

  15. admin says:

    sure, use the form to contact me the first time, I’ll respond to your mail then
    http://www.francois-tarlier.com/blog/index.php/contact/

  16. eomer says:

    soory
    i cant see the picture and i cant download anything to this computer

Leave a Reply

VIDEO

TAG CLOUD

About Me

about me..

Twitter

    Photos

    very 1rst 3d render (2002)Old tractorOld tractorDépotoirMoi tchou-tchouJulia tchou-tchouQuai gare de MauriacGare de MauriacLumière de Noël à Mauriacbuche de noelMamanDad & MeSaint CucufaJulia au lac de Saint-cucufaJulia PiscineJulia summer