首页 文章

OpenCV将轮廓设置为0

提问于
浏览
0

我在C中使用OpenCV进行编码 . 我从这个方法中得到了

findContours()

存储在'contours'中的值;数据类型是vector> . 我想将轮廓[i]设置为0; contours[i]=0 不是't work, because it expects a vector of vectors of points and not a integer. Has anyone an idea how I could '清楚'它?谢谢!

1 回答

  • 2

    findContours() 返回 vector<vector<Point> > . 这意味着轮廓[i]是 vector<Point> . 我会这么试试

    contours[i].clear();
    

    代替 .

相关问题