What software can improve multi-image stacking for high-ISO noise reduction?
Asked 7/20/2015
1 views
2 answers
0
I already use Photoshop to auto-align a burst of nearly identical frames and combine them with median stacking to reduce high-ISO noise. It works, but I’m wondering whether there are better tools or workflows designed specifically for this.
I’m interested in software that may do a better job with:
- sub-pixel alignment between frames
- smarter combination methods than simple per-pixel median/average
- integration with overall noise reduction
This seems related to astrophotography stacking, where multiple short exposures are combined to approximate a cleaner longer exposure. Are there stand-alone tools or Photoshop/Lightroom plug-ins that are better suited to this kind of noise-reduction stacking?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
11y ago
2 Answers
4
I use the following programs to do work involving image stacking.
The free of charge Hugin panorama stitcher uses the executable "align_image_stack" program, this program can be copied to some directory and be use as a standalone command-line program.
The free of charge ImageMagick program.
The free of charge ImageJ program
The free of charge Bioformats package for ImageJ needed to open LZH compressed TIFF files
My favorite way of removing outliers and removing the noise works as follows. I move the image files, say, im1.tif im2.tif etc. to a directory where I have put the executable "align_image_stack". There I open a command prompt and give the command:
align_image_stack -a al -C -t 0.3 -c 20 im1.tif im2.tif im3.tif im4.tif im5.tif im6.tif ...
The option -a sets the prefix, the choice "al" means that the remapped files will be al0000.tif, al0001.tif etc. The -C command will cause the remapped files to be cropped to the same size. The -t 0.3 sets the tolerance of the maximum allowed deviation of the control points the program will use for alignment, 0.3 means 0.3 pixels distance (default value is 3 if you don't give this command).
The lowercase -c command allows you to set the number of control points per sector of the image, the default value is 8, if you choose 20 you end up with hundreds of control points in total, usually this works very good. Finally you specify the files, the alignment is done in the sequence you specify (this can be important for HDR alignment, in that case you don't want to put the darkest image next to the brightest).
It can happen that the automatic alignment doesn't work well, in that case you can add the option -p test.pto. If you then start the Hugin program you can open the test.pto file and check out the control points, modify them and use the Hugin program to do alignment and remapping. In case you have a large number of files in the stack, there can be a small gradual drift in alignment and then you should use the Hugin program and add control point linking images that are far away from each other in the sequence.
The next step is to use the remapped files to remove the noise and outliers. The best way to proceed is to first normalize the images to have exactly the same exposure. The camera exposure changes in discrete steps due to changes in lighting which creates complications if we want to use the minimum and maximum to remove marginal outliers. To correctly normalize the exposures, you can transform to linear colorspace using ImageMagick. You open a command prompt and give the command:
convert al0000.tif -colorspace RGB lin0.tif
and you do that for all the files. Then you can open these files using ImageJ. If you start ImageJ, go to the plugins menu and click on the bioformats imprter, you can open the files lin0.tif, lin1.tif etc. You need to remove the alpha channel, you do that by selecting the 4th channel of each image and then in the image menu, you go to "stacks" and select "delete slice". The images will then become visible, this is due to ImageJ not handling alpha channels correctly. Then, in the Analyze menu you can select measure. Before you do that you can use the "set measurement..." to select all the items that you want to measure (mean, standard deviation modal value, median etc. etc.)
By measuring the average brightness values you can calculate by what factor you should normalize each picture. You then implement that by choosing in the "process" menu the option "math" and then you select multiply or divide.
If you are done, you save the images (not using BioFormats but by selecting the "file" tab in the menu and hitting "save"). Then because ImageJ does not handle channels and layers correctly in this case when dealing with LZH compressed tiff images, you'll have the different channels appearing as different layers. You can easily correct for that using ImageMagick by giving the command:
convert lin0.tif -combine lin0.tif
To remove the outliers, you compute images containing the maximum and minimum gray values in the stack. To compute the maximum, you give the command:
convert lin*.tif -evaluate-sequence Max mx.tif
To compute the minimum, you give the command:
convert lin*.tif -evaluate-sequence Max mn.tif
Then, you want to compute the average of the files such that for each point in the images you are calculating the average but with leaving out the minimum and the maximum. This is equivalent to summing up all the files lin*.tif and subtracting from that mx.tif and mn.tif and then dividing the result by the number n of files minus 2. If we put 1/(n-2) = w, then the following ImageMagick command needs to be given:
convert lin*.tif mx.tif mn,.tif -poly "w,1,w,1,w,1,......-w,1,-w,1" avl.tif
So, you give each of the lin*.tif files a weight of w, while the files mx.tif and mn,tif get a weight of -w, the "1" in the command sets the power to 1, as we're not going to raise the gray values to any power here.
Finally, you need to transform av.tif back to sRGB, you do that by giving the command:
convert avl.tif -set colorspace RGB -colorspace sRGB av.tif
So, you need to first tell ImageJ that avl is a linear colorspace image and then you can tell it to convert it to sRGB and store the result in av.tif.
Originally by user28357. Source · Licensed CC BY-SA 4.0
user28357
11y ago
0
Generated from our catalog & community — verify before relying on it.
Yes. A more specialized workflow is to use dedicated alignment software first, then combine the aligned frames with statistics tools.
From the community answers, a common free option is Hugin’s command-line tool align_image_stack, which can do precise alignment before stacking. After alignment, tools such as ImageMagick or ImageJ can be used for averaging/median-style combination and outlier rejection.
Why this can be better than a basic Photoshop stack:
- more control over sub-pixel alignment
- better handling of slight frame-to-frame shifts
- flexible combining methods and batch workflows
This approach is especially relevant when you have multiple nearly identical exposures and want to reduce random noise without changing the scene.
In general, averaging aligned frames reduces random noise more efficiently than a single frame, while median stacking is stronger at rejecting outliers. Astrophotography software uses the same principle, though those tools are often optimized for stars and sky rather than everyday scenes.
So, yes: if Photoshop’s built-in stack feels limited, try align_image_stack for alignment and ImageJ/ImageMagick for the actual stack combination.
Recommended products
UniqueBot
AI11y ago
Your Answer
Related Questions
Can stacking multiple exposures reduce high-ISO noise, and is there software that does it well?
Can Aperture use plug-ins for noise reduction comparable to Lightroom?
Which noise reduction software works well for RAW and JPEG files?
Can software recover photos that are out of focus or blurred by camera shake?
What Photoshop plug-in can create a strong corner-burn or vignette effect?