- Various fixes for seg faults
- Some fixes for very large panoramas
- Fixed a couple of buffer overflows
v2.0 is an almost complete rewrite.
- Fix for memalign on MacOS
- Now properly ignores Enblend's -f parameter
- Rewritten, better quality blending engine
- No limit to number of images
- Disk caching for large mosaics
- Improved boundary wrapping
- Image position adjustment via command line parameters
Multiblend is a multi-level image blender for the seamless blending of image mosaics, such as those created with Hugin, PTAssembler, or PTGui. It is a significantly faster drop-in alternative to Enblend, although it lacks some of Enblend's advanced features.
Usage: Multiblend [options] [-o OUTPUT] INPUT [X,Y] [INPUT] [X,Y] [INPUT]...
--levels X / -l X X: set number of blending levels to X
-X: decrease number of blending levels by X
+X: increase number of blending levels by X
--depth D / -d D Override automatic output image depth (8 or 16)
--bgr Swap RGB order
--wideblend Calculate number of levels based on output image size,
rather than input image size
-w, --wrap=[mode] Blend around images boundaries (NONE (default),
HORIZONTAL, VERTICAL). When specified without a mode,
defaults to HORIZONTAL.
--compression=X Output file compression. For TIFF output, X may be:
NONE (default), PACKBITS, or LZW
For JPEG output, X is JPEG quality (0-100, default 75)
For PNG output, X is PNG filter (0-9, default 3)
--cache-threshold= Allocate memory beyond X bytes/[K]ilobytes/
X[K/M/G] [M]egabytes/[G]igabytes to disk
--no-dither Disable dithering
--tempdir <dir> Specify temporary directory (default: system temp)
--save-seams <file> Save seams to PNG file for external editing
--load-seams <file> Load seams from PNG file
--no-output Do not blend (for use with --save-seams)
Must be specified as last option before input images
--bigtiff BigTIFF output
--reverse Reverse image priority (last=highest) for resolving
--quiet Suppress output (except warnings)
--all-threads Use all available CPU threads
[X,Y] Optional position adjustment for previous input image
- Consistent and integrated seaming
Enblend blends input images one at a time, calculating and optimising a new seam line for each new input image against the intermediate output image so far. Not only is this slow (due to the repeated seaming and Enblend's use of an exact but complex algorithm for seam generation), it also makes the routes of Enblend's seams (and the degree to which images are blended) dependent on the order that input files are provided to it. In contrast, Multiblend calculates a unique composite seam for all images simultaneously, using a faster algorithm:
Multiblend, however, doesn't optimise seams as Enblend does.
(…and 716 other possibilities)
Enblend similarly expends a lot of CPU cycles generating a full intermediate image for each new input image, with each intermediate image taking longer to generate than the last as the output image grows. This is where Multiblend really wins out, as all images are (effectively) simultaneously blended:
In testing, Multiblend is about 10x faster for small mosaics. Due to Enblend's O(n2) time complexity, compared to Multiblend's O(n) linear time complexity, this speed advantage increases to 300x for a gigapixel mosaic:
Based on this exponential difference, Multiblend would take less than a day to blend a terapixel (1000 gigapixel) mosaic; Enblend would take 360 years.
- Smoother, more consistent blending
The following images show how Multiblend blends images more smoothly than Enblend:
Other differences in implementation mean that Multiblend is able to blend images which have very little overlap, or even none at all (including images which have gaps between them):
Enblend blends image sequentially, with the amount of blending seeming to be dependent on both the amount of overlap and the current size of the intermediate mosaic. This means that later images get blended more than ealier images do. Multiblend blends all images by the same amount:
Although Enblend employs dithering to reduce banding, it appears to be broken as residual banding is still detectable in output images. Additionally, Enblend's dithering is random and non-deterministic which means running Enblend twice on the same inputs will not result in an identical output, which is potentially problematic. Multiblend uses ordered dithering and does not suffer from either of these issues:
- Image formats / position adjustment
Multiblend supports TIFF, JPEG, and PNG images for both input and output.
By specifying a coordinate pair after an input image, that image's position in the mosaic can be adjusted. This allows mosaics to be made from JPEGs or cropped PNGs, neither of which can natively (to the best of my knowledge) provide position information.
Multiblend will transparently cache data to disk if necessary, making it capable of blending much larger mosaics than Enblend.
- Multiblend doesn't optimise seams, as Enblend does by default.
Multiblend was inspired by Enblend.
Multiblend uses libtiff:
Copyright © 1988-1997 Sam Leffler
Copyright © 1991-1997 Silicon Graphics, Inc.
Multiblend uses libjpeg-turbo.
Multiblend uses libpng.
If you find any bugs or have any questions about Multiblend you can email me at firstname.lastname@example.org