Major commit for compatibility with OpenCV 3.0