Removed libc++ dependency by switching from shared_ptr to cv::Ptr. Added a custom deleter to cv::Ptr