将OpenCV链接到Webots(Ubuntu)的问题

问题描述 投票:1回答:1

我刚刚开始使用Webots,我想将OpenCV包含在项目中。我读到为了做到这一点,我应该修改控制器的makefile。因此,我做了一个简单的控制器,机器人可以在其中前进,这很好。我打开了makefile,然后添加了前两行:1

我已经在系统上安装了OpenCV 3.2,并通过以下命令确认:2

构建控制器,我看到以下内容:3

我也尝试过

#include "opencv2/highgui.hpp"

但它说

严重错误:opencv2 / highgui.hpp:没有这样的文件或目录

您有什么想法吗?预先谢谢你。

opencv ubuntu linker pkg-config webots
1个回答
0
投票

您可以在此处找到使用OpenCV的Webots控制器的示例:https://github.com/cyberbotics/webots/tree/master/projects/samples/howto/controllers/vision

© www.soinside.com 2019 - 2024. All rights reserved.