Ask Your Question
0

opencv2 include files location

asked 2018-09-11 11:13:57 -0600

Simonc gravatar image

Hello,

I have downloaded and unzipped Opencv 3.4.3, created a build folder and ran make followed by make install. My opencv2 folder only contains 2 files. Where are the rest of the libraries?

I am attempting this tutorial http://www.daslhub.org/unlv/wiki/doku... it requires the #include opencv2/core/core.hpp among others.

I am using Code blocks and have the other opencv (no 2) includes working.

Thanks

edit retag flag offensive close merge delete

Comments

which os ?

berak gravatar imageberak ( 2018-09-11 11:17:17 -0600 )edit
1

Ubuntu 18.04

Simonc gravatar imageSimonc ( 2018-09-11 11:23:52 -0600 )edit

I used this https://docs.opencv.org/master/d7/d9f... tutorial. It says its for a old ubuntu and old Opencv but it's the only one on the opencv docs.

Simonc gravatar imageSimonc ( 2018-09-11 11:26:13 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-09-11 11:28:57 -0600

berak gravatar image
  • on linux: the default CMAKE_INSTALL_PREFIX is /usr/local so headers are in /usr/local/include

    (which should already be on your gcc's include path)

  • on win
    • for the prebuild libs: add opencv/build/include to the "additional include dirs"
    • if you built your own: add opencv/build/install/include to the "additional include dirs"
edit flag offensive delete link more

Comments

My OpenCV-3.4.3/opencv-3.4.3/build/include only contains cmake files. Is there a way to manually get the opencv2 libs?

Simonc gravatar imageSimonc ( 2018-09-11 11:36:21 -0600 )edit

please read the answer again, opencv-3.4.3/build/include is for win NOT linux

berak gravatar imageberak ( 2018-09-11 11:37:29 -0600 )edit

Like this one opencv2/core/core.hpp

Simonc gravatar imageSimonc ( 2018-09-11 11:37:40 -0600 )edit

after make install, there should be a opencv2 folder in /usr/local/include

and please use the opencv2 headers like:

#include "opencv2/core.hpp"

(opencv2/core/core.hpp is from outdated 2.4)

berak gravatar imageberak ( 2018-09-11 11:39:45 -0600 )edit
1

Ah thanks a lot. I was unaware of the existence of usr/local/include. Its all there.

Simonc gravatar imageSimonc ( 2018-09-11 11:40:48 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-09-11 11:13:57 -0600

Seen: 7,732 times

Last updated: Sep 11 '18