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
276 stars 17 forks source link

ERR PANO TOO LARGE #127

Closed 18702738101 closed 2 months ago

18702738101 commented 6 months ago

When I export a panoramic picture, the software reports an error: ERR PANO TOO LARGE Reset the adjustments through the edit menu. 微信图片_20240312162017

przestaw commented 6 months ago

I can confirm issiue with ERR PANO TOO LARGE for 10+ JPEG photos. Did not run out of memory. I wouldnt mind if pano from multiple photos took long to export

krupkat commented 6 months ago

Thanks for the reports!

Just to confirm, did you get a good result with a previous version of Xpano, or is this the first time you're testing the app now with the 0.18 version? I have added this check in 0.18 because previously the app was crashing for large panos.

I'll have a look and try to implement it so that the pano is exported at a maximum supported resolution (possibly selectable in the options).

If you don't mind sharing your pictures, I'd be happy to test the new approach on them, you can send me a link on email / matrix chat (links on https://krupkat.cz)

przestaw commented 6 months ago

I have added this check in 0.18 because previously the app was crashing for large panos.

Is this limitation of OpenCV or some engine in the app? I admit my photos were JPEGS ~18MPx each straight from camera with no edits [I was testing if your app will suit my needs].

If this is limitation of the app, please point me to the parts of code/module responsible for holding/handling of stiched panorama. Any information about algorithm/architecture of your app will be welcome. I have no familiarity with OpenCV API [or GUI you have used] but I have some experience with bitmaps & graphics in boost/Qt soo... when I will have some free time I might try to help :)

Cheers

Altonss commented 5 months ago

I also encountered this issue, just made this PR https://github.com/krupkat/xpano/pull/129 that makes the maximum panorama size customizable. This should at least help a little bit :)

krupkat commented 5 months ago

This is great, thanks a lot! :)

@przestaw

Is this limitation of OpenCV or some engine in the app?

The error was coming from OpenCV, but honestly I was not able to reproduce it when I tried recently... when I disable the max pano size and try some large pano (e.g. by rotating a perspective projection in so that it stretches a lot) I get an out of memory exception and surprisingly, the app survives, just cancelling the task.

Altonss commented 5 months ago

On some panorama settings (perspective for example), I also get OOM errors from Opencv (but the app doesn't crash!). But using spherical everything works fine. I guess this might be related to how the images have been taken (more suited to spherical), but it's still strange that perspective needs so much more memory.

krupkat commented 5 months ago

the perspective projection (also called rectilinear) is especially bad for wide field of view images - more than 120 degrees and the stretching effect really kicks in, there is some description of this here (wide horizontal field of view):

https://www.cambridgeincolour.com/tutorials/image-projections.htm

I see some possible options:

flightmansam commented 3 months ago

Could I request that you trigger github to release a new build? It would be smashing to have this feature added in the main builds section.

Love the app!

krupkat commented 3 months ago

Great to hear! I'd be curious to know what sizes / number of images you can get up to, feel free to share here or privately.

The new builds: https://github.com/krupkat/xpano/releases/tag/pre-release-v0.19.0

flightmansam commented 3 months ago

It eas just 6 very high res photos straight out of camera (6000x4000). The in camera panorama maker (Sony a6400) is absolutely garbage and it lowers the res by a butt load. And so I found your amazing app! It works so well now with the max size adjustment. Output file turned out quite alright!

(link disabled, pm me if you need it)

jsren commented 2 months ago

Can confirm I just ran a 48811 x 4294 8bpp panorama and it stitched no problem! This definitely fixes the problem. Thanks! 🙂

jsren commented 2 months ago

+1 on the A6400 built-in panorama being awful, and this program being amazing!

krupkat commented 2 months ago

Thanks for all your feedback, it is encouraging :)

I'll be releasing a new version soon where you'll be able to limit the max pano size in MPx, with the benefit that the app will automatically shrink the panorama to the selected MPx limit. I'll close this issue afterwards.

https://github.com/krupkat/xpano/tree/feature-max-pano-size

image

krupkat commented 2 months ago

@18702738101 @jsren @flightmansam @przestaw @Altonss

Hopefuly this is fixed now, feel free to reopen.

flightmansam commented 2 months ago

@krupkat You're a legend, thanks so much.