Error while doing cmake.. in opencv/samples/build directory

asked 2018-11-27 08:48:34 -0600

/home/nik/Downloads/opencv-master/samples/cpp/stereo_match.cpp:68:21: error: ‘samples’ has not been declared C:\fakepath\error.pngimg1_filename = samples::findFile(parser.get<std::string>(0));

edit retag flag offensive close merge delete

Comments

Which opencv version do you use ?

cv::samples is available since this PR

LBerger gravatar imageLBerger ( 2018-11-27 09:05:12 -0600 )edit

please add your errormsg AS TEXT here, not as an image. thank you.

berak gravatar imageberak ( 2018-11-27 09:05:44 -0600 )edit
1

version 3.3

nikhiljais gravatar imagenikhiljais ( 2018-11-27 11:07:50 -0600 )edit

what about updating to a more recent version ? (where none of it is a problem)

berak gravatar imageberak ( 2018-11-27 11:11:31 -0600 )edit

ok i will update and will inform you.

nikhiljais gravatar imagenikhiljais ( 2018-11-27 11:14:12 -0600 )edit
1

Don't post an issue delete cmakecache.txt and

git clone https://github.com/opencv/opencv.git

git clone https://github.com/opencv/opencv_cont...

and run cmake

LBerger gravatar imageLBerger ( 2018-11-28 02:40:46 -0600 )edit

where is this file cmakecache.txt ?

nikhiljais gravatar imagenikhiljais ( 2018-11-28 03:06:36 -0600 )edit

in your opencv/build folder (and you should probably clean this entirely)

berak gravatar imageberak ( 2018-11-28 03:09:10 -0600 )edit

ok i have cleaned this. just a sec, it's all been a mesh. let's simplify it. 1. I have to do git clone https://github.com/opencv/opencv.git 2. git clone https://github.com/opencv/opencv_cont... then I have to go to opencv-master/samples directory 3. mkdir build 4. cd build 5. cmake .. 6. make

RIght?? Please help.

nikhiljais gravatar imagenikhiljais ( 2018-11-28 03:13:37 -0600 )edit

@berak please help

nikhiljais gravatar imagenikhiljais ( 2018-11-28 03:59:10 -0600 )edit

you probably should not put your build folder into the samples, but apart from that -- help with what, now ?

berak gravatar imageberak ( 2018-11-28 04:06:25 -0600 )edit

if I create a build folder in opencv-master directory and do a cmake .. and make, then it's working fine. But I am unable to find the file opencv/build/bin/cpp-tutorial-pnp_detection as mentioned here to run real time model detection:

https://docs.opencv.org/3.1.0/dc/d2c/...

nikhiljais gravatar imagenikhiljais ( 2018-11-28 04:11:31 -0600 )edit

hmm, right, the tutorials won't get built automatically. you'll have to switch to the directory, and run cmake / make again from there

berak gravatar imageberak ( 2018-11-28 04:27:06 -0600 )edit

switch to which directory now?

nikhiljais gravatar imagenikhiljais ( 2018-11-28 05:13:40 -0600 )edit