fasadmma.blogg.se

Eye tracking with webcam
Eye tracking with webcam











Let’s see all the steps of this algorithm. This is where the Viola-Jones algorithm kicks in: It extracts a much simpler representations of the image, and combine those simple representations into more high-level representations in a hierarchical way, making the problem in the highest level of representation much more simpler and easier than it would be using the original image. Wow! Estimate probability distribuitions with some many variables is not feasible. So that’s 255 784 number of possible values. Each pixel can assume 255 values (if the image is using 8-bits grayscale representation). Even a small 28x28 image is composed by 784 pixels. But here’s the thing: A regular image is composed by thousands of pixels. And it’s the role of a classifier to build those probability distribuitions. So, given that matrix, how can it predict if it represents or not a face? Answer: Building probability distribuitions through thousands of samples of faces and non-faces. When an image is prompted to the computer, all that it “sees” is a matrix of numbers. Here’s a bit of theory (you can skip it and go to the next section if you are just not interested): Humans can detect a face very easily, but computers do not. Now let’s get into the computer vision stuff! Face and eye detection with Viola-Jones algorithm (Theory) Now you can see that it’s displaying the webcam image. cpp g++ $(CPP_FLAGS ) $^ -o $(LD_FLAGS ) clean : rm -f EyeDetector OPENCV_LIBS : - lopencv_core - lopencv_highgui - lopencv_imgproc - lopencv_objdetect - lopencv_imgcodecs - lopencv_videoio LD_FLAGS = $(OPENCV_LIBS ) default : EyeDetector EyeDetector : eye_detector.













Eye tracking with webcam