Updated for OpenCV 3.0.0