This project is my initial attempt at making sense of the world of OpenCV and how I might use it in hardware applications. I cannot stress enough that so much of the code here comes from others who have published amazing tutorials on the topic and without whom I would still be working my way thru the very basic code.
I will upload several basic projects that were built following others' tutorials and some mish-mash of stuff I have done myself. This is *very* 'stream of consciousness' so don't judge too harshly. My goal is simply to experiment with detecting motion, differentiating people from objects, understanding how to manage depth of objects in a 2D space, learn some basic facial recognition, color recognition, pattern matching and of course, build some of this into hardware projects that I'm doing in the IoT, Music, Video, and other spaces.
This project took shape thanks to the hard work of Kyle Hounslow. It attempts to track multiple objects (Shapes) by color and the mode is toggled by way of the calibrationMode bool variable. In calibrationMode, the HSV sliders are avail. If not, the color uses a series of preset min / max values for the Shapes objects, each defined by RGB.
This project implements a number of the basic matrix operations discussing in Bernát Gábor's introductory tutorials found on OpenCV.org. I have consolidated a number of the code snippets into a single cpp file and built a VS2010 project that loads an image file from the project directory and performs some basic matrix operations on the loaded image. I copy, clone, take a subsection of an image, also create a matrix 'by hand', dump a matrix the console as CSV and other formats, etc. and do some other basic stuff with the simple methods associated with the Mat class.
This example starts *very* small, performing no image recognition but instead loading video from the the closest webcam (on a laptop, usually the integrated camera) and displaying the video in two windows using the OpenCV resources built-in for displaying video to the screen. One window is BGR (standard colorspace for video of this sort in OpenCV) and the others is a grayscale conversion performed using the cvtColor() function and the CV_BGR2GRAY specifier.
The beauty is just how bloody easy this is to do in OpenCV. This is incredible stuff and SO very straight forward. Big shout out to Bernát Gábor for compiling the resources to get me thru this in a few hours.
This is my first attempt at basic object recognition using OpenCV following the completely awesome set of tutorials by Kyle Hounslow. Be sure to check out his videos on Youtube and donate so he can pay off his education early! Huge thanks to him and Bernát Gábor from OpenCV.org for their amazing effort in creating the resources that make this set of libraries and resources accessible to everyone!
Included in the github repo are also the properties files required for visual studio projects. You will need to install OpenCV and direct the project to the proper OpenCV directory (I had used c:\opencv which should be called out in the properties files).
I also strongly, strongly, strongly sugget following the initial setup instructions and basic tutorials presented by Bernát Gábor located on the OpenCV.org site and accessible from here. His tutorials are awesome and though they are less of a "surgical strike" they are packed with much more detail.
I have tried to comment the code in a way that felt most accessible. Kyle's comments were awesome, though I tried to break a few sections up a bit for the total newcomer (read: me!).