I am trying to stitch images for constructing panorama. But I am unable to stitch more than 3 images at a time. The code on which I am working on it is in here When I run stitching more than 3 images, the error I am getting is:
Camera parameters adjusting failed
Ptr<BundleAdjusterBase> adjuster;
adjuster = makePtr<BundleAdjusterReproj>();
adjuster->setConfThresh(conf_thresh);
if (!(*adjuster)(features, pairwise_matches, cameras))
{
cout <<"Camera parameters adjusting failed." << endl; return -1;
}
Can someone help me in refining this code or solving the problem. The sample images I am working to stitch are