[英]error: use of undeclared identifier 'groupRectangles'
我正在嘗試在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;
函數groupRectangles在opencv2/objdetect/objdetect.hpp
。
但是,您可以使用include all opencv2/opencv.hpp
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.