passes the contour matrix instead of returning the cv::Mat