Ask Your Question
0

Stitching Images, error code 1

asked 2017-01-05 06:21:15 -0600

Akhilesh gravatar image

updated 2017-01-05 06:28:24 -0600

Hi, I have a simple code of stitching image.

int main() { Mat pano; vector <mat> imgs;

imgs.push_back ( imread ("2.jpg",CV_LOAD_IMAGE_COLOR));
imgs.push_back ( imread ("3.jpg",CV_LOAD_IMAGE_COLOR));
Stitcher stitcher = Stitcher::createDefault(true);
Stitcher::Status status = stitcher.stitch(imgs, pano);
if (status != Stitcher::OK)
{
    cout << "Can't stitch images, error code = " << int(status) << endl;
    return -1;
}
imshow("result_name", pano);
waitKey(0);

}

I have 2.jpg and 3.jpg is the present working directory. I am running this code, I am getting error : Can't stitch images, error code = 1 Can anybody help me to get rid of this error?

Here 2.jpg and 3.jpg are the cropped images from the single image.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-01-05 08:09:54 -0600

Akhilesh gravatar image

updated 2017-01-05 08:10:40 -0600

Hi, I have found the solution. Actually the problem was nothing but just the images. The common area in the images was not enough, so after trying with the different images, I got the stitched image.

edit flag offensive delete link more

Comments

Yes that usually happens when images do not overlap enough.

treak gravatar imagetreak ( 2017-12-24 05:31:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-01-05 06:21:15 -0600

Seen: 6,686 times

Last updated: Jan 05 '17