OpenCV 3.0 adaptation
get code to work with OpenCV3
Merge pull request #28 from edgarriba/master

Get the code work with OpenCV3