I m looking for a library of C algorithms which:

  • can get an input video from a video camera
  • can realize a software that can detect when eyes blink
  • can be embedded to altium 3000 nanoboard
  • is free or cheap
  • 2
    You should mention that you have tried OpenCV and it does not match your requirements. Please also explain why not. Nov 21 '15 at 21:58
  • I am sure that many of us would be curious to know what you are trying to achieve. I realize that it is not necessary to know what you want to do in order to answer the question, but it just sounds so interesting :-) Nov 23 '15 at 15:40
  • Both eyes blinking together, or do you want to be able to distinguish a wink/blink from a single eye? Does duration matter? Nov 23 '15 at 15:42
  • Actually i want to do the oposite thing. I need to output a sound when the eyes are blinking so, firstly i need to implement an algorithm who can detect first when i blink (if i am not blinking for 3 seconds i will output a sound)
    – JGF1994
    Nov 24 '15 at 17:11

That is a easy set of specifications: OpenCV should - with a little effort do the job nicely:

  • Free - both Gratis & Open Source
  • Things like face detection & blink detection are well within the scope
  • Altium 3000 Nano - OpenCV is cross platform,
    • older versions, V2.x are still available that were written in pure C and the source code is still available,
    • but while the newer algorithms are written in C++ the Altium 3000 tool chain now supports C++, (as shown in this example, so you have the choice, (but they still provide the C library interface along with python & Java).

The "some work" that you will have to do for your self, possibly with some help from the Altium & OpenCV communities, is to build the OpenCV library either the older C only version. as you have asked, or the current C++ version where you will probably get more help from the OpenCV comunity, or at least the parts of it that you need, for the Altium.

You cannot expect to just link the existing library, for say the windows OS, and have it work but that is true of any library when porting to an embedded target.

It is also standard practice when porting to such a target to take an existing library, such as OpenCV, and follow the following process:

  1. List the core features & utilities, i.e. those that have to be there for everything, and the matching tests
  2. List the non-core features that you expect to need on the current project and the matching tests
  3. List the remaining features and the matching tests
  4. Get everything on the first list compiling and tested
  5. Get the key items on the second list compiling and tested
  6. Start to implement the current project with what you have so far, going back to lists 2 and sometimes 3 when you find something that you need is missing
  7. If you get time start to hit some of the things on list 3

The best way to go about this with an Open Source Library is to, with the original implementers knowledge & permission if possible, create a branch or fork from the Original code, named so that it is clear what is happening, and do your work on the library on that branch or fork in public github fork. Try to not break compatibility with other platforms as you work. You may find that you get some clustering with other developers contributing towards what you are looking for.

  • 1
    Given this original question, he's looking for an OpenCV alternative. Nov 21 '15 at 21:57
  • 2
    @ThomasWeller - That is probably the case but the OP doesn't specify so in this question and I felt that this one was worth answering if only for other people. Nov 22 '15 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.