16
尝试将二进制图像”上运行findContoursfindContours错误 '只支持8uC1图像'
Mat conv(image.size(), CV_8U);
image.convertTo(conv, CV_8U);
vector<vector<cv::Point> > contours;
findContours(conv, contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);
thorws错误:
OpenCV Error: Unsupported format or combination of formats ([Start]FindContours support only 8uC1 images) in cvStartFindContours,
任何想法 感谢
有没有一种方法,我可以减少它为单色?我已经有一个黑色和白色的图像,这是从另一个程序canny过滤 – 0xSina
@ 0xSina:是的,只是添加它:) – Vlad
很酷,谢谢! – 0xSina