ultramango / gear360pano

Simple script to create equirectangular panorama by stitching images from Samsung Gear 360
MIT License
225 stars 55 forks source link

Video stitching disconcerting #30

Closed evertvorster closed 6 years ago

evertvorster commented 7 years ago

Enblend uses some fancy procedure to pick a seam between two images that it stitches. This produces superior results for stills.

However, due to the small differences between video frames, the stitching seam jumps around and the effect is quite disconcerting on near objects in video.

I have been doing a little bit of testing, and multiblend is visually quite superior, as it just does a straight blend between the images. It is slightly faster too. In Arch, multiblend is easy to install, I don't know about other distrobutions. The command for multiblend is not quite a drop-in replacement.

All the options has to be specified before the output file. Also, I was using enblend "-w", which turned into "--wideblend" for multiblend.

Lastly, --compression=jpeg "$JPEGQUALITY" needs to be turned into --compression=$JPEGQUALITY It looks like this is because multiblend reads the compression type from the file extention.

Please consider adding multiblend as an option for video stitching. -Evert-

ultramango commented 7 years ago

Looking at the speed improvements mentioned on multiblend website it looks like a good idea, especially for video stitching.

kwahoo2 commented 7 years ago

Just a tip, implementation for multiblend in gear360pano.cmd

run_command "multiblend" "--compression=$JPGQUALITY"\ "-o" "$2" \ "$TEMPDIR/${OUTTMPNAME}0000.tif" \ "$TEMPDIR/${OUTTMPNAME}0001.tif"

Of course, we need some kind of setup script before the first use of multiblend, eg.:

g++ multiblend.cpp -o multiblend -msse2 -O3 -ltiff -ltiffxx -ljpeg -lpng
sudo cp multiblend /usr/local/bin/

After this, the slowest thing is nona, but I got nice results enabling GPU (nona -g).

evertvorster commented 7 years ago

I have played a bit with all the options in enblend, hoping to avoid pulling in multiblend as a dependency. It looks like the seam generator can not be tuned to a simple blend between the images, and the seam jumping around during the video is very disconcerting.

Unfortunately, multiblend is just visually superior on videos.

ftoledo commented 7 years ago

@kwahoo2 I think that can will work on debian packages for multiblend. Also i want to package gear360pano script too.

ultramango commented 7 years ago

Packaging is always a tricky business :) - but this could be a good test for a flatpak package format.

ultramango commented 6 years ago

multiblend is the default for video now. Closing the issue.