OpenCV is a powerful enviroment for vision developers recent releases has seen it spread its platform base to android but is well supported on both Windows and Linux. I dont clame to be a Cpp expert I would say I have several years of experience but my memory often forgets things. Please remember there always different faster or slower ways to program Cpp I choose often to use a more C# style to make it easier to adapt and improve often in my work it doesn't matter if it takes an extra few seconds since I am not working on real time code. Therefore please don't bash me for my coding style often it is very rushed anyway like most research code is.
I hope some of these code snippets come in useful since often the documentation is a little technical and a quick example makes it obvious what you are supposed to do.