Changed the api being used to openCV