krupkat / xpano

Automated photo stiching tool. Lets you import a directory of images and then export the autodetected panoramas.
https://krupkat.github.io/xpano/
GNU General Public License v3.0
133 stars 13 forks source link

A lot of images in one panorama -> too high mem usage -> crash. #102

Open justanothergithubuserNr2 opened 1 year ago

justanothergithubuserNr2 commented 1 year ago

Bug description If I try to stitch a panorama with a lot of (12, 15, 20 or more) images, the stitching progress is working normal from 0 up to a point of 90-99%. But at this point, the progress slows down dramatically and memory usage is starting to increase, until all my RAM and swap is used and Xpano crashes (or get killed by the OS?). Sometimes, this happens while calculating the preview, sometimes you can calculate the preview but it you calculate high res to export, it crashes. I have 16GB RAM and 8GB swap, which is way more than a lot of other computer have.

Desktop (please complete the following information):

krupkat commented 1 year ago

Welcome and thanks for the report!

Seems like a bug in the algorithm, it shouldn't eat 16gb for this number of photos, how many MPx are they? I have tested with 14 images (24Mpx) and the memory usage tops about ~ 4gb.

Can you please have a look after a crash in ~/.local/share/krupkat/Xpano/ in the logs and look if there are any errors? Or you can copy paste here.

If there is nothing there, it would be great if you could share some photos where it crashes (you can send them privately as well, my contact is at https://krupkat.cz/)

justanothergithubuserNr2 commented 1 year ago

In one setup that fails there are 19 images with a size of 4032x3024px with 2-3 buildings and more than 7 trees. Perhaps the trees cause the problems because their leaves cause many features in the images?

krupkat commented 1 year ago

The feature counts are likely not an issue, I have found two different problems so far:

1) Will be solved by #107

2) In some cases Multiblend tries to allocate a vector of negative size (here: image.cpp), I'll have to investigate this more.