Apparently, result
is null when you call showImage
.
The problem in your code is that you test if the status is OK (if ( status == stitcher.OK )
), and then you try to load the file anyway. Your code should be something like:
if ( status != stitcher.OK )
{
std::cout << "ERROR" << std::endl;
return 1;
}
Then you would probably see that the problem comes from the stitching.
Moreover, you don't need to write result
to a file before showing it.