What is an image stack?

An image stack is a combination of a group of images, these could be similar frames of different. By combining the images you can create a composed image that could enhance the images in a number or ways:

  • to reduce noise or distortion
  • to remove unwanted elements from the image, this is great for removing for example peoples walking in a frame.

Image stacks are stored in Photoshop as Smart Objects which has several benefits. Applying a stack mode to a Smart Object is a non-destructive effect which means that you will be able modify the stack mode if you want.

Creating an image stack

For best results it is advised to use images with the same dimension and with a similar content. For example you want to make a shot of the Milky Way Galaxy and you are shooting at a high ISO, you can reduce noise by taking multiple shots of the same frame. We all know that the Earth is rotating and there will be some difference between the images, but overall the frame will be 99% the same. By stacking the obtained images we can enhance it, we can eliminate noise.

For creativity purposes it is also possible to stack images with different content, but the end you will never know what will be the result.

Important!

An image stack must contain at least two layers.

1.  You can also combine images using a script (File > Scripts > Load Files into Stack).

www.pixelstrobist.com

2. Once all the images are loaded choose Select > All Layers.

3. Choose Edit > Auto-Align Layers and select Auto as the alignment option. If Auto does not create good registration of your layers, try the Reposition option.

www.pixelstrobist.com

4. Choose Layer > Smart Objects > Convert to Smart Object.

www.pixelstrobist.com

5. Choose Layer > Smart Objects > Stack Mode and select a stack mode from the submenu.

www.pixelstrobist.com

Stack modes

In fact we have multiple stack modes, each of them will give you a different result. Stack modes operate on a per-channel basis only, and only on non-transparent pixels. For example, the Maximum mode returns the maximum red, green, and blue channel values for a pixel cross section and merges them into one composite pixel value in the rendered image. What does that mean? It means the the value of each channel (R,G,B) are computed based on an algorithm. How each algorithm is working for each stacking mode is described below. For exemplification purposes we will use 3 images loaded into stack.

Stack modes explained

  • Entropy
    • The binary entropy (or zero order entropy) defines a lower bound on how many bits would be necessary to losslessly encode the information in a set.
    • entropy = – sum( (probability of value) * log2( probability of value) )
    • Probability of value = (number of occurrences of value) / (total number of non-transparent pixels)

  • Kurtosis
    • A measure of peakedness or flatness compared to a normal distribution. The kurtosis for a standard normal distribution is 3.0. Kurtosis greater than 3 indicates a peaked distribution, and kurtosis less than 3 indicates a flat distribution (compared to a normal distribution).
    • kurtosis = ( sum( (value – mean)4 ) over non-transparent pixels ) / ( ( number of non-transparent pixels – 1 ) * (standard deviation)4 ).

  • Maximum
    • The maximum channel values for all non-transparent pixels

  • Mean

  • Median
    • Effective for noise reduction and removal of unwanted content from the image
    • The median channel values for all non-transparent pixels

  • Minimum
    • The minimum channel values for all non-transparent pixels

  • Range
    • Maximum minus the minimum of the non-transparent pixel values

  • Skewness
    • This is a measure of symmetry or asymmetry around the statistical mean
    • skewness = (sum( (value – mean)3) over non-transparent pixels ) / ( ( number of non-transparent pixels – 1 ) * (standard deviation)3 )

  • Standard Deviation
    • standard deviation = Square Root(variance)

  • Summation
    • The sum channel values for all non-transparent pixels

  • Variance
    • variance = (sum( (value-mean)2 ) over non-transparent pixels ) / ( number of non-transparent pixels – 1)

Notes

  1. Choose File > Scripts > Statistics.
  2. Choose a stack mode from the Choose Stack Mode menu.
  3. Apply the stack mode to currently open files, or browse to select a folder or individual files. Files you select are listed in the dialog box.
  4. If desired, select Attempt To Automatically Align Source Images (equivalent to choosing Edit > Auto-Align Layers). Then click OK. Photoshop combines the multiple images into a single multilayered image, converts the layers into a Smart Object, and applies the selected stack mode.

Sharing is caring!

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here