'MSize' 不是 cv::Mat 的成员
'MSize' is not a member of cv::Mat
出于好奇,我正在尝试 运行 这个回购协议:https://github.com/jzeimen/PuzzleSolver/tree/master/PuzzleSolver
每当我尝试 运行 来自 PuzzleDisjointSet.cpp 的以下代码行时,Eclipse 都会抛出标题错误“'MSize' 不是 cv::Mat 的成员”:
cv::Mat::MSize size_of_a = sets[rep_a].locations.size;
位置定义如下:
struct forest{
cv::Mat_<int> locations;
cv::Mat_<int> rotations;
int representative;
int id;
};
and sets 是森林结构的矢量版本。当 documentation clearly refutes this.
时,我主要对为什么会发生这种情况感到困惑
我相信我包含的 header 文件是正确的(PuzzleDisjointSet.h 包括上面的森林结构定义以及集合定义。
#include "PuzzleDisjointSet.h"
#include <algorithm>
#include <opencv2/core.hpp>
#include <opencv/cv.h>
#include <opencv2/core/mat.hpp>
也许你可以检查之前的版本并使用它,或者我怀疑它可能已经移动到不同的 class,你可以尝试寻找那个
OpenCV 版本:4.3.0
cv::MatSize size_of_a = sets[rep_a].locations.size;
出于好奇,我正在尝试 运行 这个回购协议:https://github.com/jzeimen/PuzzleSolver/tree/master/PuzzleSolver
每当我尝试 运行 来自 PuzzleDisjointSet.cpp 的以下代码行时,Eclipse 都会抛出标题错误“'MSize' 不是 cv::Mat 的成员”:
cv::Mat::MSize size_of_a = sets[rep_a].locations.size;
位置定义如下:
struct forest{
cv::Mat_<int> locations;
cv::Mat_<int> rotations;
int representative;
int id;
};
and sets 是森林结构的矢量版本。当 documentation clearly refutes this.
时,我主要对为什么会发生这种情况感到困惑我相信我包含的 header 文件是正确的(PuzzleDisjointSet.h 包括上面的森林结构定义以及集合定义。
#include "PuzzleDisjointSet.h"
#include <algorithm>
#include <opencv2/core.hpp>
#include <opencv/cv.h>
#include <opencv2/core/mat.hpp>
也许你可以检查之前的版本并使用它,或者我怀疑它可能已经移动到不同的 class,你可以尝试寻找那个
OpenCV 版本:4.3.0
cv::MatSize size_of_a = sets[rep_a].locations.size;