Face detection with opencv & webassembly

4/2/2022

Here is a demo of using the opencv library and webassembly to put face & eye detection on the web. To do this you need to first load in the web assembly Module via async and once loaded, it calls the main function in javascript. In the main function, it collects the camera media to get the frames from the camera, and process each frame pixel by pixel. Whenn a group of pixels are matched to a feature that is based on the trained haarcascade file, it draws a rectagle showing that this is a face, or this is an eye.

Opencv is built for vision processig tools for various languages. I have worked with opencv with C++, python, java and even C# .NET with the opencv emgu library wrapper. Opencv was first built in 1999 by intel for research into high intense CPU based applicatins. Later was designed for vision processing as an open source project, OpeCV Home Page. Recently with my OLED glasses page, I am making a version 2.0 of the glasses that uses OpenCV and a neural network model called Yolov4, which was built be darknet DarkNet Website.