Dear colleagues, can anyone explain to me the degradation of stitch() in C++ version 3.4.0 compared to version 4.7.0? I would like to understand the reason - I don’t think it’s just a Opencv error? And what can be done and who to contact?
P.S.
The use of parameters d3 and panorama mode is not suggested.
Changing the sequence of shots leads to even worse results.
All original 16 images overlap by more than half with neighboring images.
Here is an example of stitching 16 pictures on version 3.4.0, and here on version 4.7.0.
Thank you very much for your answer.
I’m afraid that this is impossible and not for my reason -
Each of the 16 bmp pictures has a size of 8192x8192х24 and the forum does not give the opportunity to attach them here.
As for the source code - it is taken from the example, I just added a try catch and a lot of additional services
for input, output and error messages (partially in Russian).
If you want, I will try to remove everything unnecessary and send it to you as quickly as possible.
try {
Ptr stitcher = Stitcher::create(mode);// create(mode) for version 4.7.0 and create(mode, try_use_gpu); bool try_use_gpu = false for v 3.4.0
status = stitcher->stitch(imgs, pano);
}
catch (exception& e) {
v=snprintf(msg, sizeof(msg), u8"\n %%Error: stitcher->stitch: ‘%s’", e.what());
}
Your N.S.Y.
The source code is in OpenCV\opencv-4.7.0\opencv\sources\samples\cpp\stitching.cpp and in \OpenCV\opencv-3.4.0\opencv\sources\samples\cpp\stitching.cpp
The example is fully functional (I also tested it directly on it, without any of my additions). That’s why
as soon as You tell me where I can put the original pictures, You can check both options - good on 3.4.0 and bad on 4.7.0. The resulting image will have a size of 22924 x 22331 x 24. If you have a weak computer at hand, then in addition to the three errors described in Opencv (“Need more images”, “Homography estimation failed”, “Camera parameter adjustment failed”), after stitching you may get several others, so it’s better adding try catch.
Surprisingly, stitching such 16 large images works on some computers, but not on others. I checked on (Intel(R) Core™ i7-10700 CPU @ 2.90GHz, 16 ГБ memory)
I also checked this degradation on Windows 10, 11 and on Ubuntu 20.04.
Thank you very much.
NY.