Ask Your Question
0

How to know what to #include for a given function ?

asked 2016-08-09 23:45:18 -0500

Nbb gravatar image

I am using opencv 2.4.13 and I want to use SLIC

I googled OpenCV SLIC and I get to this page http://docs.opencv.org/trunk/d3/da9/c...

Now it tells me I need to #include "slic.hpp" but I cant find it in my OpenCV folder. How do I find out where slic.hpp is located ? The website doesn't tell me anything.

If I google stereocalibrate, I get this http://docs.opencv.org/3.0-beta/modul... but again Im not sure what folder to include .

Is there a webpage / guide that tells me what folder I need to include if I want to use a specific function ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2016-08-09 23:59:24 -0500

berak gravatar image

updated 2016-08-10 00:03:19 -0500

I am using opencv 2.4.13 and I want to use SLIC

sorry, but using opencv2.4, you just can't.

you will need to build (latest) opencv master branch and opencv_contrib

Is there a webpage / guide that tells me what folder I need to include ?

maybe it's easier to see from here , each module has its own header, in the case of SLIC you would #include "opencv2/ximgproc.hpp (which again includes slic.hpp)

also, please use http://docs.opencv.org/master/ for opencv3, docs.opencv.org/2.4.13/ for opencv2.4, and try to avoid anything from outdated 3.0.beta

edit flag offensive delete link more

Comments

It's areal problem that google ranks the opencv 2.4 doc higher than the up-to date documentation.

emiswelt gravatar imageemiswelt ( 2016-08-10 06:59:20 -0500 )edit
1

You can get an access to all the OpenCV documentation at: http://docs.opencv.org/.

Eduardo gravatar imageEduardo ( 2016-08-10 10:22:29 -0500 )edit

That's definitely true and I know that. The thing is that a lot of devs just google for a problem or documentation - it's very convenient. For OpenCV, it's easy to stumble upon the outdated documentation.

emiswelt gravatar imageemiswelt ( 2016-08-10 11:09:14 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-08-09 23:45:18 -0500

Seen: 89 times

Last updated: Aug 10 '16