To whet your appetite: a little script to automatically exposure-fuse
exposure brackets with hugin tools and pv. Some of you have asked how pv
can be made to fit into the hugin toolset, and this is an example, where
it can already fit in quite well; in this example it will replace the
use of first nona, then enfuse, and produce an exposure fusion straight
from a freshly-generated PTO file. Save the script to 'pv_fuse.sh' and
make it executable.
#! /bin/bash
# pv_fuse.sh - exposure-fuse an exposure bracket
# Assuming you have a set of bracketed shots in your present
# working directory, this is a bash script to automatically create
# a PTO file 'bracket.pto', register the images, and then
# exposure-fuse the images in full size with pv to an openEXR file,
# creating output named bracket.fused.exr. Call this script with the
# set of images you want to fuse, like
# pv_fuse.sh IMG1.JPG IMG2.JPG IMG3.JPG
# first make a pto file 'bracket.pto' and register the images:
pto_gen -p0 -o bracket.pto "$@"
pano_modify -p0 --fov=AUTO --canvas=AUTO -obracket.pto bracket.pto
cpfind --sieve2size=5 -o bracket.pto bracket.pto
autooptimiser -p -o bracket.pto bracket.pto
pano_modify -p0 --fov=AUTO --canvas=AUTO -obracket.pto bracket.pto
# now process it with pv - note that you'll have to replace
# '/path/to/pv' to where the pv binary resides on your system.
/path/to/pv -W \
--blending=hdr \
--snapshot_like_source=yes \
--snapshot_facet=1 \
--snapshot_extension=exr \
--aeb_auto_brightness=yes \
--snapshot_prefix=bracket \
--next_after_fusion=yes \
bracket.pto
##### end of script file
Here's an explanation of the parameters passed to pv:
-W
show the image set which is processed in a Window, not full-screen
--blending=hdr
while the image shows during processing, display it with HDR blending.
This is only cosmetic.
--snapshot_like_source=yes
create output with the same size, orientation and projection as one of
the images in the PTO file
--snapshot_facet=1
namely, the image #1 - pv counts from zero, so this is the *second* one;
with my canon camera, it's the darkest of the lot.
-snapshot_extension=exr
The default would be to create a JPG, but I like EXR. pick your own choice!
--aeb_auto_brightness=yes
The scripts generating the PTO file do assign Ev values gleaned from the
images, but this option tells pv to look at them again and figure out
the relative brightness, just in case.
--snapshot_prefix=bracket
When saving the result to disk, use 'bracket' as it's base name. In this
example, it will come out as bracket.fused.exr
--next_after_fusion=yes
After doing an exposure fusion from the current set of images, proceed
to the next image or PTO file in line. Here, there is no other input
lined up, so pv will terminate
And that's it! Enjoy!
A hint: pv is good to *display* EXR files as well, in case you've
wondered how to look at the result ;)
Kay
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/hugin-ptx/31bbd6f0-93f9-e666-f6ab-fc35dc055feb%40yahoo.com.