opencv
HeyMountain
这个作者很懒,什么都没留下…
展开
-
切换opencv版本,出现 fatal error: opencv2/legacy/legacy.hpp: No such file or directory
CMakeLists的一点点修改因为usr/local/opencv3/share/OpenCV/OpenCVConfig.cmake中设置了opencv的配置,自定义路径安装opencv时,找不到这个文件OpenCVConfig.cmake,opencv-config.cmake需要在项目的CMakeList.txt中添加OpenCVConfig.cmake的路径路径为自己安装opencv...原创 2019-11-09 17:22:34 · 7083 阅读 · 1 评论 -
(已解决)opencv cmake时显示:modules is observed for OpenCV modules second time.
电脑最初只安装了一个opencv4.1,后来版本太新,不会操作,换成了opencv3.4.0,又因为一些代码比较早,是在opencv2.x下运行的,用opencv3.x版本运行时一直报错,缺少头文件什么的,所以,在opencv3.4的版本下又安装来opencv2.4安装步骤请参考https://blog.csdn.net/u011681952/article/details/84661726...原创 2019-10-22 09:52:41 · 413 阅读 · 0 评论 -
has no member named 'pt'问题(已解决)
error: ‘__gnu_cxx::__alloc_traits<std::allocator<cv::Point_<float> > >::value_type {aka class cv::Point_<float>}’ has no member named ‘pt’ point1.push_back(point1[GoodM...原创 2019-10-21 22:47:34 · 10538 阅读 · 1 评论 -
error: ‘Directory’ is not a member of ‘cv’,opencv2/contrib.hpp: 没有那个文件或目录
error: ‘Directory’ is not a member of ‘cv’directory类是属于contrib模块解决方法:头文件中加<ocontrib.hpp>在opencv3以后,该模块取消,所以opencv3.x或opencv4.x版本运行时,会出现如下错误fatal error: opencv2/contrib.hpp: 没有那个文件或目录解决...原创 2019-10-21 21:25:54 · 931 阅读 · 1 评论 -
has no member named ‘pt’.pt
home/ning/vscode/sift/sift.cpp: In function ‘int main(int, char**)’:/home/ning/vscode/sift/sift.cpp:136:64: error: ‘__gnu_cxx::__alloc_traits<std::allocator<cv::Point_<float> > >::v...原创 2019-10-20 18:21:33 · 477 阅读 · 0 评论 -
terminate called after throwing an instance of 'cv::Exception'(已解决)
$ g++ -o sift sift.cpp -I /usr/local/include -I /usr/local/include/opencv -I /usr/local/include/opencv2 -L /usr/local/lib /usr/local/lib/*.so$ ./sift 1.jpg 2.jpgterminate called after throwing an in...原创 2019-10-20 14:22:08 · 17510 阅读 · 3 评论 -
在函数‘main’中: sift.cpp:(.text+0x5a):对‘cv::imread(cv::String const&, int)’未定义的引用
程序链接的时候找不到源码,下面开始解决问题opencv在ubuntu下是通过调用早已编译好的动态链接库.so文件来生成程序的。解决方法一通过g++ 的编译控制选项也许可以制定编译器的查找路径test为可运行程序和。cpp文件的名称 g++ -o test test.cpp -I /usr/local/include -I /usr/local/include/opencv -I /usr...原创 2019-10-20 13:42:25 · 1655 阅读 · 0 评论 -
sift.cpp:88:5: error: stray ‘\357’ in program namedWindow("灰度图1",0);
删除出错行多余的空格原创 2019-10-20 13:02:01 · 653 阅读 · 0 评论 -
error: ‘SiftFeatureDetector’ was not declared in this scope,修改代码
sift_test.cpp:15:5: error: ‘SiftFeatureDetector’ was not declared in this scope SiftFeatureDetector siftDetector;//SIFT=SiftFeatureDetector=SiftDescriptorE ^/home/ning/桌面/周报/第三次周报/sift_test...原创 2019-10-20 12:31:47 · 1615 阅读 · 0 评论 -
段错误 (核心已转储)
./qr 1.jpg712 ./qr 1.jpg段错误 (核心已转储)./qr 1.jpg段错误 (核心已转储)第一次运行可以正常运行检测,第二次则出现该问题源代码如下:#include "opencv2/highgui/highgui.hpp"#include "opencv2/imgproc/imgproc.hpp"#include "opencv2/imgproc/...原创 2019-10-13 22:10:13 · 740 阅读 · 0 评论