I desperately need help with the opencv stitching module. I need to create a panoramic photography using the "stitch" method in opencv. Below is what I have so far.. but when I run the program I get this error: Need more images. Is there an OpenCV expert who can help me with this error?
IplImage* img1 = cvLoadImage("/Users/myName/Desktop/image1.jpg", CV_LOAD_IMAGE_COLOR);
IplImage* img2 = cvLoadImage("/Users/myName/Desktop/image2.jpg", CV_LOAD_IMAGE_COLOR);
Mat vecImg1 = img1;
Mat vecImg2 = img2;
Mat allImages;
allImages.push_back(vecImg1);
allImages.push_back(vecImg2);
Mat outputImage;
Stitcher stitchImg = Stitcher::createDefault();
Stitcher::Status s = stitchImg.stitch(allImages, outputImage);
cout << "status: " << s << endl;
cvNamedWindow("stitch images", CV_WINDOW_AUTOSIZE);
cvShowImage("stitch images", &outputImage);
cvWaitKey(0);
cvDestroyWindow("stitch images");