HDR Merge CLI Tool PhotomatixCL

Introduction

PhotomatixCL is a Command-Line Interface that lets you integrate HDR merge into an automated imaging solution.

You can use PhotomatixCL to merge exposure bracketed photos into an HDR image, process it with tone mapping or fusion, and save the result as JPG or TIFF. PhotomatixCL also includes image alignment, ghost removal, saving as EXR, and the same HDR presets as Photomatix Pro, which you can try for free.

PhotomatixCL runs on Windows and Linux. It can load images from your computer or local network, or fetch the contents of images on a web server.

You can try PhotomatixCL for free by downloading it below. The trial doesn't expire, but adds a watermark to the resulting images. A PhotomatixCL license avoids the watermark.

Installation

Windows

1)

Download PhotomatixCL for Windows

2)

Run the installer

Linux

1)

Download the build that best fits your needs:

  Ubuntu build:  

PhotomatixCL for Linux Ubuntu

 

Ubuntu 23.04 & 24.04 / Linux Mint 22

x86_64 architecture

  Universal build:  

Statically linked PhotomatixCL for Linux

 

Other distros, self-contained libraries

x86_64 architecture

  ARM build:  

PhotomatixCL for Linux ARM

 

Debian

ARM architecture

2)

Go to the directory where you want PhotomatixCL to be installed, and run the command:

tar xf <FolderDownloadedFile>/<NameDownloadedFile>

<FolderDownloadedFile> is the path to the folder where you downloaded PhotomatixCL.

<NameDownloadedFile> is the name of the build you downloaded (e.g. PhotomatixCL-801-U23.tar.gz if you downloaded the Ubuntu build).

3)

If you installed the Ubuntu build:

To get EXIF data transferred, install the "exiftool" package using your system's package manager.

To get automatic lens correction for supported lenses, install the "liblensfun1" and "liblensfun-data-v1" packages, if they are not already installed,.

To get automatic lens correction for supported lenses, install the "lensfun" data package (it could also be called "liblensfun" or "liblensfun-data" depending on your system).

More information

For a comparison of the Linux builds, troubleshooting installation issues or setting up a license key, check the PhotomatixCL Installation Guide.

Merging a bracketed set to HDR

A command line for merging bracketed images follows this pattern:

PhotomatixCL [Options] [Input Files]
[Options]:List of processing and output options passed to PhotomatixCL
[Input Files]:The path or URL of each of the input bracketed images (they are entered at the end of the command line and are not preceded by an option)

Sample PhotomatixCL command

PhotomatixCL -a2 -x Detailed -h remove -s jpg -o <PathOutput>OutputImage <PathInput>Photo1.jpg <PathInput>Photo2.jpg <PathInput>Photo3.jpg

The above command aligns and merges three image files to HDR, processes the 32-bit HDR image with the 'Detailed' preset and saves the result as JPEG.

Let's look at the options passed to PhotomatixCL:

-a2:  Align the input bracketed images.

-x Detailed:  Process the merged HDR image with the 'Detailed' preset. You have two options to specify the preset after '-x':

  • Option 1: Provide the name of the built-in preset you want to apply'.

    'Detailed' is the default tone mapping preset. 'Natural' is a popular preset for exterior scenes and 'Interior2' for real estate interiors.

  • Option 2: Provide the path to a custom Photomatix preset file, including its xmp file extension. You can use the Photomatix Pro trial for free to create and save custom presets in an XMP file.

-h remove:  Remove the 32-bit HDR image after processing (if you prefer to keep it, add the option -32 and replace '-h remove' with '-h exr' to save it as EXR).

-s jpg:  Save the processed image in JPEG format (use -s tif to save as TIFF).

-o <PathOutput>OutputImage:  Save the resulting image as OuputImage.jpg in the directory at path <PathOutput>. Note that the extension is automatically added.

Last arguments:  The remaining arguments are the path names or URLs for the input bracketed photos and aren't preceded by an option.

Note: The input images must be supplied at the end of the command line. All other arguments can be supplied in any order, as long as they are before the input images.

Check the PhotomatixCL command generator further down to generate a PhotomatixCL command line based on the options you select.

For the full PhotomatixCL options reference and command examples, see the PhotomatixCL Documentation.

Batch merging images

PhotomatixCL takes one set of bracketed images as input. Merging multiple bracketed sets requires running PhotomatixCL in a loop that processes one set at a time.

You can use the PhotomatixCL-Driver utility to batch process a folder containing multiple sets of bracketed images stored on a computer or local network. PhotomatixCL-Driver is installed in the 'Batch' subfolder.

A command line for batching sets of bracketed images with PhotomatixCL-Driver follows this pattern:

PhotomatixCL-Driver [Selection Criteria] [PhotomatixCL Command Line]

[Selection Criteria]

Provides the directory to look in, the number of images in a set and any criteria that the file names must match. The criteria are given with the following command line options:

-n <num>Merge <num> images to HDR, where <num> is the number of images per bracketed set (e.g. -n 3).
-s <dir>Search the images to merge in <dir>, where <dir> is the directory of the input images.
-m <pattern>(Optional) Filter the input files by processing files with names following the pattern given by <pattern> (e.g. -m "*.jpg" to process only JPEG files).

[PhotomatixCL Command Line]

The command line to merge a bracketed set in PhotomatixCL, but with two differences:

  1. You don't enter the path of the input files at the end of the command line. PhotomatixCL Driver will automatically add them before PhotomatixCL is run.
  2. Use the -d option to specify the path of the output folder where the processed images will be saved (the -o option isn't applicable when using PhotomatixCL Driver).

Sample PhotomatixCL Driver Command

The command below aligns and merges to HDR the JPEG files in the folder specified by the '-s' option, in sets of three images each, then processes them with the 'Natural' preset, and saves the resulting images into the folder specified by the '-d' option.

(The part of the command line corresponding to the Set Selection Criteria is in orange color and the part corresponding to the PhotomatixCL Command Line in green color.)

Commands on a Windows OS

cd "c:\Program Files\PhotomatixCL" Batch\PhotomatixCL-Driver -n 3 -s "c:\Images\Sets" -m "*.jpg" PhotomatixCL -a2 -x Natural -d "c:\Images\Output\\"

Commands on a Linux OS

cd /home/<user>/PhotomatixCL/ Batch/PhotomatixCL-Driver -n 3 -s /home/<user>/Images/Sets -m "*.jpg" PhotomatixCL -a2 -x Natural -d /home/<user>/Images/Output/

If you've installed the statically linked build, replace '/home/<user>/PhotomatixCL/PhotomatixCL' with '/home/<user>/PhotomatixCL/PhotomatixCL-static'.

In case you get a permission error the first time you run the command, right-click on the PhotomatixCL-Driver file, select the 'Properties' option, click on the 'Permissions' tab and check the box 'Allow executing the file as program'.

PhotomatixCL Command Line Generator

Generate the command lines for PhotomatixCL and PhotomatixCL-Driver by customizing the form below to your needs.

(The command lines are displayed in the highlighted boxes below the form.)

Platform:  
Path to the PhotomatixCL program:  
 Run PhotomatixCL in trial mode
When run in trial mode, PhotomatixCL adds a watermark to the output images. Uncheck this box if you registered PhotomatixCL with a valid PhotomatixCL license key.
Folder of input images:  
Number of images per bracketed set:   (3 images at a time will be merged to HDR)
Process:
Process on     core(value is used for multithreading)

Merge to HDR options

Deghosting strength:  

Specify RAW file options

White Balance    
Apply to:  

HDR processing settings

Filter preset list
 Use custom HDR preset saved in XMP file

Output

Folder of output images:  
Save processed image as:  
Save 32-bit HDR image as:  

PhotomatixCL command line alone

Full PhotomatixCL-Driver command line