gpt4 book ai didi

c++ - OpenCV C++ "CvSURFParams was not declared in this scope"错误

转载 作者:行者123 更新时间:2023-11-28 06:22:18 25 4
gpt4 key购买 nike

我想在 OpenCV C++ 中实现 SURF 算法。我的包括:

#include <stdio.h>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/nonfree/features2d.hpp"

当我运行这行代码时

CvSURFParams params = CvSURFParams(500, 1);

我收到“CvSURFParams 未在此范围内声明”错误。

请帮帮我

最佳答案

很可能您使用的是 C api,请改用 cv::SURF

或者,如评论中所建议的,正确的语法是 CvSURFParams params = cvSURFParams(500, 1);

关于c++ - OpenCV C++ "CvSURFParams was not declared in this scope"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29119702/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com