opencvubuntulinkerpkg-configwebots

Problem with linking OpenCV to Webots(Ubuntu)


I've just started using Webots and I want to include OpenCV for a project. I read that in order to do this, I should modify the makefile of my controller. So, I made a simple controller in which the robot goes forward and it is just fine. I opened then the makefile and I added the first two lines:1

I have installed OpenCV 3.2 on my system and I confirm it with:2

Building my controller I see the following: 3

I also tried the

#include "opencv2/highgui.hpp"

but it said

fatal error: opencv2/highgui.hpp: No such file or directory

Do you have any ideas? Thank you in advance.


Solution

  • You can find here an example of Webots controller using OpenCV: https://github.com/cyberbotics/webots/tree/master/projects/samples/howto/vision/controllers/vision