Hey I wanted to spend some time talking about what I did during this stream, but more importantly the logic of what I did. I think as we program some things become intuitive to us that aren't to the casual beginner, and since it's intuitive it's hard to explain using words.
I had a camera class. Towards the beginning of the stream, I mentioned that the camera class was too "smart". What I meant by that was it was responsible for too many things. My camera class at the beginning of this stream was responsible for not only handling the camera feed (whether it be from a webcam or a video file) but also for handling the face detection logic. For what I'm trying to do these are two large pieces of functionality that should not be in the same class. For a smaller project that is scoped narrowly, this would be fine. But because I plan to use this code base to explore the OpenCV libraray, I need all of my classes to be as extensible (which means able to be added to/built upon) as possible.
The problem with having too many large pieces of functionality in the same class is they become intertwined in weird ways that make a lot of sense at the time, but eventually become a chore to add on top of or to swap pieces out. So knowing that the haarcascade method for facial recognition is inherently slow and I'll want to look at different methods for doing the facial recognition, it becomes imperative to isolate the facial recognition logic in it's own class so that I don't have to untangle that logic out of a bloated camera class later down the road.
This doesn't make sense all the time. If you're writing a quick script, or a program that is going to do one thing and one thing only, you're better off not breaking up your program because it's only going to make the logic harder to follow. So keep that in mind!
I fixed all of the bugs and added in a very basic camera selection methodolgy. I'll only promise that it'll be slightly functional on linux.
I spent some time looking at the facebook api in hopes that it would be able to grab your friends photos in order to train a haarcascade. This is apparently not a thing. The best you can do is grab all of your photos and maybe make sure that it recognizes you. That is the next plan.
I hope to eventually incorporate openBR into this project but could not get it to play with Qt 5.4 and openCV 3.0 beta.
So I spent six hours working on this with the viewers from the subreddit /r/WatchPeopleCode.
I got to the stage where the GUI that I'm building to test out some OpenCV features will compile, but the functionality isn't working. Plans for the next stream will be to get the ability to select camera sources dynamically as well as fixing the file path loading for the haarcascade files. Browse the current code as of this post can be browsed here: