1 | initial version |
The reason you are getting the error, or rather no result image is created, in your case small pixel sized black image is due to the fact that stitcher parameters are created with default values in parameters. Here the resolution acceptance ratio is set to 0.6 as default, but you require it to be flexible,
That is why, just after the line
Stitcher stitcher = Stitcher::createDefault(try_use_gpu);
add these
stitcher.setRegistrationResol(-1); /// 0.6
stitcher.setSeamEstimationResol(-1); /// 0.1
stitcher.setCompositingResol(-1); //1
stitcher.setPanoConfidenceThresh(-1); //1
stitcher.setWaveCorrection(true);
stitcher.setWaveCorrectKind(detail::WAVE_CORRECT_HORIZ);
I hope this will help you out.