Opencv integration

Hey @kislayabhi I played with your branch today and I made some refactors to it. Have a look, understand what I did then merge into your branch and update the other factory class to match this style a bit. I'll probably play around with the other factory tomorrow too so if you're not going to work tomorrow then hold off merging this in because I might do some more work.

feel free to ask questions or make comments!
I realize this is a lot longer than what you had but I like this way a lot more for the tests. Its much easier to see which test failed if a test failed and the method is generally easier to understand I think.