Actually, it turned out to be much simpler than I had initially thought!
Click image to activate, hold your head still and blink your eyes. Hit space to toggle motion areas visibility.
In case it's not working, move your head closer/further away from the camera.
The SWF has 2.5 kilobytes, no heavy calculations are needed to detect eyes blinking. Here's how it works:
- Detect all motion areas (hit space to see them)
- Apply blur filter to get rid of the noise
- Apply threshold to get 1 bit image
- Use blob detection algorithm to find blobs
- Reject all blobs that are either too big or too small
- Draw bounding boxes around blobs that meet the size criteria
Currently, the code is a mess (or I would rather call it experimental state) so no source codes yet.
But I am planning to improve this a lot, i.e. make it possible to track the head movement and position and maybe even eyes. There is also an AIR app stopping your eyes drying coming out soon, meanwhile make sure you'll read a few tips on that very subject.10:15 PM | posts | 2 Comments | Tags: as3, tracking, experimental, fx
Adding comments disabled for now.