Changes for OpenCV 3