pano-blend: open-source reconstruction of SmartBlend

122 views
Skip to first unread message

Pavel Peřina

unread,
Jul 2, 2026, 5:28:14 PMJul 2
to hugin and other free panoramic software
Hi all,

Some of you may remember SmartBlend (Michael Norel, 2007) - the enblend
alternative that often found less visible seams, but was 32-bit
Windows-only closed-source freeware, abandoned for years.

Starting from the recipe Norel himself posted to this list back in 2011
( https://groups.google.com/g/hugin-ptx/c/x_upOsb4FZg/m/sThqoOJo9h8J ),
with a little peeking into the binary and a lot of AI assistance, I've rebuilt it as an
open-source (MIT) C++/OpenCV tool: graph-cut seam finding with a
perceptual colour-difference cost, multi-band blending.

It works from the command line on nona's TIFF_m output, or as Hugin's
blender - set it as the enblend executable in Preferences > Programs
(tested).

No wrapper script or uncropped overlay images needed.

Code, docs and a prebuilt Windows x64 binary:

  https://github.com/pavel-perina/pano-blend
  https://github.com/pavel-perina/pano-blend/releases/tag/v1.1

Fair warning: it's a first working version. It gets slow with many images
(every overlapping pair is seamed) and it's not yet suited to very large
panoramas - it keeps full-canvas buffers per image, so memory grows
quickly with canvas size.

Single-row panoramas of a handful of frames are the tested territory.

Pavel

Václav Černý

unread,
Jul 3, 2026, 3:28:40 PMJul 3
to hugin and other free panoramic software
Wow, 
it looks interesting; i remember trying SmartBlend years ago. 
Looking forward to trying your pano-blend  on upcoming projects.
Are you planing to add support for -w both     ( vertical and horizontal seam)?
I am usually making full 360*180 ( usually in 3 rows*9  images + nadir+ zenit ), and most of the time, i think that it should behave allright even without this feature  but seems nice to have.   

Best wishes from Prague    Václav 
P.S. I can provide you som  360*180 test data.
 




Dne čtvrtek 2. července 2026 v 23:28:14 UTC+2 uživatel pavel....@gmail.com napsal:

Pavel Peřina

unread,
Jul 3, 2026, 5:19:04 PMJul 3
to hugin and other free panoramic software
Hi. I never worked with extra large panoramas, but first I want to restructure and optimize it a bit. Now it finds more seams than is needed/used (basically all combinations for overlapping images) and maybe it's not memory efficient. Later I want to extend it to large panoramas. Possibly process it by some large temporary blocks like 16000x160000 pixels and then creating bigtiff organized by tiles and save progressively 2x downsampled pages (kind of like google map tiles). My only problem is that I don't know which program supports it, we tried this approach at work with electron microscope images and tiff with 40000x40000 pixels means that program either crashes or it takes minute to decode whole image.

But I don't want to promise anything. I even tested this program only on three panoramas having between two and five photos, I haven't tried masks or panorama having multiple rows.

About -w switch, how does it work? does it wrap photo around top-bottom, left-right edge when placing it to output image and nothing else? 

Having some test data would be interesting (especially pre-aligned with pto file)

Thanks

Pavel



Dne pátek 3. července 2026 v 21:28:40 UTC+2 uživatel vaclav.va...@gmail.com napsal:

Roman Gischig

unread,
Jul 4, 2026, 11:43:52 AMJul 4
to hugi...@googlegroups.com
Hi Pavel,

I've tested your new implementation, and technically it works fine. I've used 24 JPG's (input to Hugin) from my old DJI-Mavi-Air spherical panorama, and used a stereoscopic mapping, then I saved the processed TIFF and fed all 25 images into your program.

A) it used 120GB of RAM (yes I have 128GB of RAM installed...) which for sure is not optimal, but you mentioned this in your comments ;-) 
B) CPU usage never went beyond 15% (on my 32 thread maschine..)
No GPU (Nvidia 3090) usage -> guess this is expected.

It did complete! nice work.

I did not manage to get it done directly from Hugin, but I don't think I tried hard enough, nor did I understand how to do it right.. Tried to replace the enblend in Hugin, also tried to replace the files... but never mind.

thanks for your efforts, and looking forward to more enhancement, and maybe one day a Mac version ;-)
roman




--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hugin-ptx+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hugin-ptx/e6fc1288-012f-4f1b-b89b-c955bd75a0ccn%40googlegroups.com.

Pavel Peřina

unread,
Jul 4, 2026, 4:40:57 PMJul 4
to hugi...@googlegroups.com
Hi Roman,
thanks for the report, only multithreaded code is initial color space conversion which takes a few (tens) seconds, on 32 cores, it might be roughly one second. Finding seams is not multithreaded. Blending, which is done using OpenCV library might be. TIFF compression is not. 

For me it worked from Hugin, I just set preferences > Programs > Enblend and here I set full file path to executable. I assume it works on Mac, if you compile it from sources (just like on Linux and very likely FreeBSD), but I don't have Mac. Also there is no precompiled Linux binary, because ... every Linux is different and building an executable without dependencies would require extra effort. 

You received this message because you are subscribed to a topic in the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hugin-ptx/A4y6AlNKgUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hugin-ptx+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hugin-ptx/CAHQatumqjOKiJzR3OM2ftNCRUM5en6JAmwz%3DR8PDc1Uyz7%3Dgig%40mail.gmail.com.

Pavel Peřina

unread,
Jul 10, 2026, 5:39:30 PM (14 days ago) Jul 10
to hugin and other free panoramic software
There is a new version: https://github.com/pavel-perina/pano-blend/releases/tag/v1.3.1
It find seams only between N-1 image pairs starting from center and adding images sorted by overlap with existing ones (not tested properly on multi-row panorama) and memory consumption is hopefully a bit lower. 

I tested it with Hugin again, and for some reason it does not work when it's configured as enblend executable in programs :-(
Solution is to run nona and panoblend manually:
# Produce deformed and properly placed TIFFs (PTO is project saved in Hugin): 
nona -v -o p_ -m TIFF_m P1025887\ -\ P1025893.pto
# Merge panorama, save debug files, use 2^7 (128 pixels) for blending around the seam
~/devel/pano-blend/build/pano-blend -l 7 -SeamVerbose p_000*.tif -o pano.tif
# Proceed with crop, use exiftool to transfer metadata and possibly geotag ...


Dne sobota 4. července 2026 v 22:40:57 UTC+2 uživatel Pavel Peřina napsal:
Reply all
Reply to author
Forward
0 new messages