Stitcher create() to stitch two images together error

asked 2019-06-14 09:27:43 -0500

gambret gravatar image

updated 2019-06-14 10:43:15 -0500

OpenCV 3.4 Windows 10 VS 2017

Hello, I'm trying to run the stitcher code provided by OpenCv to combine two images into one, but I am getting an error in my code here:

Ptr<Stitcher> stitcher = Stitcher::create(mode, try_use_gpu);
Stitcher::Status status = stitcher->stitch(imgs, pano);

bool try_use_gpu: too many arguments in function call. Error C2660 'cv::Stitcher::create': function does not take 2 arguments

That is the only error I am receiving when I try to run the code, but I haven't seen anyone else reporting this particular error. Can anyone provide guidance, please?

Edit: If I delete try_use_gpu, I get 11 errors like this, and I also do not know how to address the issues here:

Error LNK2019 unresolved external symbol "bool __cdecl cv::imwrite(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<int,class std::allocator<int=""> > const &)" (?imwrite@cv@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV_InputArray@debug_build_guard@1@ABV?$vector@HV?$allocator@H@std@@@3@@Z) referenced in function _main

Here is the link to the code I am using:

docs.opencv.org/3.4/d8/d19/tutorial_stitcher

Thank you again for your assistance.

edit retag flag offensive close merge delete

Comments

which exact opencv version are you using ? api has changed

berak gravatar imageberak ( 2019-06-14 11:07:54 -0500 )edit

cv::debug_build_guard::_InputArray

you link release opencv libs to a debug project, but you need debug libs !

berak gravatar imageberak ( 2019-06-14 11:09:44 -0500 )edit

Thank you for the reply. I am using version 3.4.6. I did not realize I linked the wrong opencv libs. How would I go about making the change from release libs to debug libs?

gambret gravatar imagegambret ( 2019-06-14 11:56:58 -0500 )edit

link against opencv_somethingd.lib

berak gravatar imageberak ( 2019-06-14 14:02:15 -0500 )edit