SourceForge has been redesigned. Learn more.
Close

Blink modification

General
Anonymous
2011-02-12
2012-11-20
  • Anonymous

    Anonymous - 2011-02-12

    Hi my name is Luka and I have a question. I am studying computing (third year) and for my final project my mentor suggested contributing to this project. I agreed, and we decided to merge eviacam with blink detection. Code for blink detection is open source and available on null .  Blink idea is partially implemented, but my concern lies with merging modified version with the original code. I used eviacam version 1.4 for my base version because I couldn't afford catching up to changes, do to deadlines. I think the idea is great, but this is my first large project and I need some advice.
    1) I've encountered the problem of maintaining framerate  high because of additional computational cost of blink detection.
    2) Next step would be implementing face detection and eye-restriction box, ergo additional computational cost of working thread.

    There is more, but the first two problems are pain, so my question is :
    - Is additional modification of worker thread desirable, and if not what do you suggest?
    - Will this project of my see daylight because of incompatibility with the current version?

    I apologise if my English is not very good.
    Advices are most welcome.

     
  • Cesar Mauri-Loba

    Hi Luka,

    Thanks for your efforts and interest in contributing to eViacam.

    > 2) Next step would be implementing face detection and eye-restriction box, ergo additional computational cost of working thread.
    > Is additional modification of worker thread desirable, and if not what do you suggest?

    Current development version (1.5) does include a face detection based on Haar-like cascade of features (see here  for instance). Although it still needs some tweaking, it is a costly operation so we added another thread (lets call it the third thread) to perform face detection and an option to throttle CPU consumption (which basically reduces the number of executions per second of this operation). We could do this way because we detect the face only to centre the tracking box (so it is not needed to run it for every single frame).

    So, given this scenario, you basically have two options:

    1.- Try detecting eye blinks in the working thread but only inside the tracking box. As you don't need to process the whole frame, might be this frees enough CPU to let run eViacam at the maximum frame rate. Even more, you could detect the eye region inside the third thread and then use this smaller region to detect blinking.

    2.- Try detecting eye blinks in the third thread. Therefore, reducing the number of executions and so the CPU load. However, when it comes to use blink detection to trigger mouse actions, might be this approach won't work (i.e. it will miss some blinks).

    > but my concern lies with merging modified version with the original code. I used eviacam version 1.4 for my base version because I couldn't afford catching up to changes

    Use git .

    I suggest you to:

    1) clone the latest 1.5 development version (it is fairly stable and compiles fine on linux)
    2) manually add your changes to the relevant files
    3) commit (locally) your changes

    Doing this way, a possible merge on the official tree will be far easier, and you could be always up to date with the development version by simply pulling changes from time to time while developing and committing your own changes.

    > Will this project of my see daylight because of incompatibility with the current version?

    I hope so, but what most eViacam users appreciate is robustness and stability. So, if the blinking detection performs reasonably well I see no problems.

    http://opencv.willowgarage.com/documentation/c/objdetect_cascade_classification.html
    https://sourceforge.net/scm/?type=git&group_id=248049

    César

     
  • Anonymous

    Anonymous - 2011-05-03

    Hello,

    Your advices were very helpful and I would like to thank you once more.
    The project is finished and tested. Tests were made by my mentor and me. I would like to send you the solution for further testing and feedback but I'm not sure how should I send it?
    If the project passes the required tests, or if you see any kind of potential in it I would really appreciate if you could open a new branch or merge it with an existing one.

    Sincerely,

    Luka Krapic

     
  • Cesar Mauri-Loba

    Hi Luka,

    I'm happy to hear your good news :-)

    The easiest way to share your changes for revision is by generating and sending your commits as patches. I think that (I haven't used it yet) the tool git-format-patch  can be used for this purpose.

    http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html

    César

     

Log in to post a comment.