Updating the OpenCV class usage to newer standards