On Wed, May 09, 2012 at 06:00:54PM +0200, Rogier Wolff wrote:
> I just started writing that it failed. Somehow, it failed similar to
> the older version while loading the first image. I then tested just
> blending two images, and that worked. Next I tested blending 6 images,
> and that workt too! I noticed in the results that my preparations had
> not been good, so now my PC is running nona again....
>
> I don't know what went wrong: I can't reproduce it.
Good news, bad news.
The bad news: It crashes again. The good news: I know what triggers
it.
It's the images that wrap around the 0/360 degree mark that cause the
troubles.
David, would the algorithm in multiblend lend itself to a "priority"
scheme?
In my current panorama that I'm stitching, I have take 15 portrait
shots for the 360 degree "background" at 18mm focal length. Clouds,
some houses closeby etc etc. But then I shot the interesting parts at
135mm focal length. About 23 more images.
So now I have 38 images. Most of the 1.2G pixels are interpolated from
the "low-res" 18mm shots. However, when we get to the tele-lens photos
we get interesting parts that should "override" the lowres images.
Currently I manually cut out a mask for the parts that I know I've shot
in highres.
Apparently I'm not good at this because I still get:
WARNING: some images completely overlapped
WARNING: some image areas have been arbitrarily assigned
So my question: could some priority be given to the "highres" images?
Anyway, after loading all images that do not overlap the 0/360
boundary I still get:
And then after "blending..." I still get:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff710ac50 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0 0x00007ffff710ac50 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000409a81 in mask_into_output (input=0x63d440, mask=0x5c80410, output=<optimized out>, first=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:85
#2 0x000000000040a73d in blend () at blending.cpp:766
#3 0x000000000040c195 in go (argv=<optimized out>, input_args=<optimized out>) at go.cpp:74
#4 0x0000000000401c87 in main (argc=38, argv=0x7fffffffe038) at multiblend.cpp:184
(gdb)
whereas when I give it an image that overlaps 0/360 I get it while
loading that image:
loading p78370000.tif...
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b9fe16 in ?? () from /usr/lib/x86_64-linux-gnu/libtiff.so.4
(gdb) where
#0 0x00007ffff7b9fe16 in ?? () from /usr/lib/x86_64-linux-gnu/libtiff.so.4
#1 0x00007ffff7bae3e9 in TIFFReadEncodedStrip () from /usr/lib/x86_64-linux-gnu/libtiff.so.4
#2 0x0000000000404e3f in load_image (image=0x610960) at loadimages.cpp:964
#3 0x0000000000405237 in load_images (argv=0x7fffffffe340, argc=1) at loadimages.cpp:1029
#4 0x000000000040be80 in go (argv=0x7fffffffe340, input_args=1) at go.cpp:18
#5 0x0000000000401c87 in main (argc=4, argv=0x7fffffffe328) at multiblend.cpp:184
(gdb)
This is not due to "out of memory" or something like that. Strace
shows:
mmap(NULL, 363035874, PROT_READ, MAP_SHARED, 4, 0) = 0x7f54fbb1d000
mmap(NULL, 602636288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f54d7c65000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault
It mmaps the 300M input file (fd=4), then mallocs (using mmap again),
600Mb of image data. and then crashes.
Hmm..... Could it be that it's calculating the "memory to alloc" in an
int and then allocing 600M instead of 4G+600M?