Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带等高线的裁剪图像(OpenCV)_Opencv_Image Processing - Fatal编程技术网

带等高线的裁剪图像(OpenCV)

带等高线的裁剪图像(OpenCV),opencv,image-processing,Opencv,Image Processing,如何裁剪具有轮廓的图像的多个部分? 我需要一个不在Python中的例子,但是在C++中。 cv::findContours(src, contours, hierarchy, cv::RETR_TREE, cv::CHAIN_APPROX_SIMPLE); for (int i = 0; i< contours.size(); i++) { /* crop image src by contours[i] */ } cv::findContours(src、等高线、层次结构、cv::RE

如何裁剪具有轮廓的图像的多个部分? 我需要一个不在Python中的例子,但是在C++中。
cv::findContours(src, contours, hierarchy, cv::RETR_TREE, cv::CHAIN_APPROX_SIMPLE);
for (int i = 0; i< contours.size(); i++) {
/* crop image src by contours[i] */
}
cv::findContours(src、等高线、层次结构、cv::RETR_树、cv::CHAIN_近似_SIMPLE);
对于(int i=0;i
资料来源: 结果: 我的建议是做Histogram Backprojection来抑制背景,然后你可以从SkimIn中标注“代码”之类的东西。在Python中测量导入标签< /C> >,但是我不确定如何在C++中完成。你看到了吗?