Fixed for latest version of OpenCV API