Make the code compileable on OpenCV 2.4.10
Merge pull request #3 from izzyleung/patch-1

Make the code compileable on OpenCV 2.4.10