I'm attempting to stitch together a set of images using OpenCV.
I found some example code from this source: https://www.youtube.com/watch?v=dCUkc0VmqtA, which I have also included below:
#include <iostream>
#include <fstream>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/stitching/stitcher.hpp"
using namespace std;
using namespace cv;
bool try_use_gpu = false;
vector<Mat> imgs;
string result_name = "result.jpg";
void printUsage();
int parseCmdArgs(int argc, char** argv);
int main(int argc, char* argv[])
{
int retval = parseCmdArgs(argc, argv);
if (retval) return -1;
Mat pano;
Stitcher stitcher = Stitcher::createDefault(try_use_gpu);
Stitcher::Status status = stitcher.stitch(imgs, pano);
if (status != Stitcher::OK)
{
cout << "Can't stitch images, error code = " << status << endl;
return -1;
}
imwrite(result_name, pano);
return 0;
}
However, when I try to build the above code, I recieve the following error message:
1>main.obj : error LNK2019: unresolved external symbol "int __cdecl parseCmdArgs(int,char * *)" (?parseCmdArgs@@YAHHPAPAD@Z) referenced in function _main
Would anyone be able to explain why this happens, and how to solve the problem?
Note: I am using OpenCV 2.4.10 and Microsoft Visual Studio 2010.