【问题标题】:error: use of undeclared identifier 'groupRectangles'错误:使用未声明的标识符“groupRectangles”
【发布时间】:2015-11-17 12:55:40
【问题描述】:

我正在尝试在 opencv 中对多个矩形进行分组。这就是我正在做的事情

void groups_draw(Mat &src, vector<Rect> &groups)
{

    vector<Rect> rects;
    for (int i=(int)groups.size()-1; i>=0; i--)
     {
        rects.push_back(groups.at(i));
    }
    groupRectangles(rects, 1, 0.2);
}

但我收到以下错误:

错误:使用未声明的标识符“groupRectangles”

我的文件中的标题是:

#include "opencv2/core/core.hpp"
#include  "opencv2/text.hpp"
#include  "opencv2/highgui.hpp"
#include  "opencv2/imgproc.hpp"

#include  <vector>
#include  <iostream>
#include  <iomanip>

using namespace std;
using namespace cv;
using namespace cv::text;

【问题讨论】:

标签: c++ opencv


【解决方案1】:

函数groupRectanglesopencv2/objdetect/objdetect.hpp中声明。

不过,您可以使用 include all opencv2/opencv.hpp

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-12
    • 2014-08-04
    • 2020-05-05
    • 2019-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多