Ask Your Question
0

use module form opencv contrib in c++

asked 2020-03-23 23:33:51 -0600

I'm trying to use the anisotropicDiffusion() function from the ximgproc module in opencv contrib but I am having problems loading it into my editor codeblocks or G++ on Ubuntu 18.04. In general, how do I install a module from opencv contrib to be able to use it?

Also, opencv seems to reference from the following location /usr/include/opencv2/. When I did my original make install it built most of my hpp files under /usr/local/include/opencv4/opencv2/. How do I have my machine look for the hpp files under /usr/local/include/opencv4/opencv2/?

https://docs.opencv.org/3.4/df/d2d/gr... https://github.com/opencv/opencv_cont...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-03-24 03:18:20 -0600

berak gravatar image

updated 2020-03-24 03:30:47 -0600

can't help wirh any IDE, but for opencv4, your include path should be

/usr/local/include/opencv4/

then use headers like

#include "opencv2/core.hpp"
#include "opencv2/ximgproc.hpp"
edit flag offensive delete link more

Comments

Anyone know how to modify the path in Ubuntu to use the above path instead?

dhpancha gravatar imagedhpancha ( 2020-03-24 14:54:42 -0600 )edit

it is your "include path", used with g++ cmdline like:

g++ -I/usr/local/include/opencv4/ .......
berak gravatar imageberak ( 2020-03-25 05:39:41 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-23 23:33:51 -0600

Seen: 292 times

Last updated: Mar 24 '20