参考博客:
https://blog.csdn.net/u012058778/article/details/90764430?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2allfirst_rank_v2~rank_v25-2-90764430.nonecase&utm_term=mat%E4%B8%ADcreate%E5%87%BD%E6%95%B0&spm=1000.2123.3001.4430
创建一个和原图相同尺寸、类型(通道数)的图:
Mat photo = imread("1.jpg");
Mat dstImage;
dstImage.create(photo.size(), photo.type());
Mat imageContours = Mat::zeros(edge_image.size(), CV_8UC1);
Mat Contours = Mat::zeros(edge_image.size(), CV_8UC1); //绘制
CV_8UC1的最后的1表示单通道图像