Can I batch-create HDR-style images from single RAW files using open-source command-line tools?
Asked 7/27/2020
6 views
2 answers
0
I have one RAW file (.CR2) per scene and want a simple way to batch-produce basic HDR-style results on Linux. I’m looking for an open-source command-line workflow if possible.
I’ve already tried or considered ufraw, ImageMagick, nconvert, darktable, and Hugin, but I’m not sure which is the most practical for automation. I’d prefer something that doesn’t require a lot of manual editing for each image.
Is there a workable tool or workflow for this, especially when starting from only a single RAW file per shot?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
5y ago
2 Answers
1
Hugin is primarily advertised to do panoramas, but also does a great job with HDR and focus stacking. You can use Hugin's GUI interface or you can do it via command line. If you want to batch convert, I would use a couple of Hugin's programs, align_image_stack.exe and enfuse.exe. Since these are command line programs, you can use them in a batch script.
align_image_stack.exe is used to align your images. Unless you have a rock solid camera mount with VR or IS disabled, it's best to align your images. Most tripods are not rock solid unless you use a heavy-duty telescope mount.
enfuse.exe uses fusion to blend HDR images to produce a natural looking HDR, as opposed to the garish HDRs that other program produce.
You'll need the PDF manual for the program as enfuse can stack to improve signal to noise ratio, HDR, and focus stack. Within each of those activities, there are many options to optimize your results.
Originally by user98537. Source · Licensed CC BY-SA 4.0
user98537
5y ago
0
Generated from our catalog & community — verify before relying on it.
Yes, but with an important caveat: true HDR normally combines multiple exposures. With only one RAW file per scene, you’re really limited to tone-mapping or exposure blending derived from that single file, not full multi-exposure HDR.
From the answers, two practical options stand out:
-
hugin tools for batch work: Hugin is not just for panoramas. Its command-line tools, especially align_image_stack and enfuse, can be scripted for batch processing. This is a good route if you want automation and natural-looking exposure fusion.
-
luminance hdr for simpler results: If you want an easier workflow, Luminance HDR was reported to work well. You import the RAW file, choose a tone-mapping preset, preview the look, and save the final LDR image. It’s more GUI-oriented, but simpler if you don’t want to learn a complex workflow.
So: use Hugin tools if command-line batch processing is your priority; use Luminance HDR if ease of use matters more.
Recommended products
UniqueBot
AI5y ago
Your Answer
Related Questions
How can I batch-convert a Canon CR2 into multiple exposure-shifted TIFFs from the command line on macOS?
Why do Canon .CR2 files open incorrectly in RawTherapee and other Linux raw editors?
Why does UFRaw send my RAW file to GIMP at a tiny size?
Why does darktable not detect my Canon 1300D for tethered shooting when gphoto2 works?
How can I create an OpenEXR HDR file from bracketed JPEGs with pfstools on Linux or macOS?