there are lots of material on the topic of OpenCV, see Books | OpenCV for list of books, i personally suggest the O'Riely book, it covers image processing concepts as well as the libraries, which makes for a better understanding of your program, they also released a C++ version this month, which i will definitely be getting.
there is also lots of tutorials on the openCV website, with code ready to compile. OpenCV also comes with really cool examples when you compile it.