Category Archives: Focus Stacking

Stacking: the Overloaded Word That Needs Explanation

The current rage of “stacked Milky Way” (or night sky) captures is quite different from the star trail or timestacks style of captures. Huh? The words stack and stacking are overloaded with many different meanings. Let’s see if we can add some precision and clarification.

Here are some of the variations possible:

  • Auto Blend Layers with Stacking: Used for macro/focus stacking, HDR, and generic image blending – NOT for astro images!
  • Lighten Mode Stacking: Creating Star Trails!
  • Statistics Mode Blending (Stacking): Can perform the same operation as Lighten Mode Stacking when the option “Maximum” is used, however Statistics are heavy weight and more complicated to do in our opinion.
  • Align and Stack: Deep sky astrophotography using several images taken one after another as quickly as possible. Photoshop doesn’t do this well, but we describe how in the next section. Align is the distinguishing word here.
  • Tracked Stacked Images: For still astrophotography images with less noise and greater detail. A device is required that tracks the sky rotation – the word tracked is the key here.

    Adobe Lightroom and Adobe Bridge “Stacking”

  • Group into Stack:  Not stacking at all! It really just means “create a group”.

The above is NOT an exhaustive list of the kinds of stacking you may hear about!

Stacking Types Explained

Group into Stack

Let’s start with the easy one: Stacking may mean add to group. In Lightroom and Adobe Bridge you can pick several photos and the options  Stacking -> Group into Stack. Or pick several photos and either Photo Merge to HDR or Panorama with the “Create Stack” option checked. In this context, Stacking and Stack just means group.  Unfortunately a photo can only appear in one stack, and you cannot stack photos from different folders together.

Why would you want a photo to appear in two (or more) stacks groups? Here is an example where I used a single top shot and created two different panoramas.

Panoramas 1 and 2 were both created using image 3 (608095.NEF) but when panorama 2 was created, image 3 was removed from the stack (group) for 1 and added to the stack (group) with 2. Furthermore, you can see that the panorama and the two photos used to create it were all added into the group (notice the last image says 3 of 3).

Blend Layers using Lighten Mode

Stacking may mean blend photos in lighten or darken blend mode – examples are star trails and timestacks. In this usage, the lightest (or darkest) of all the pixels in each image is selected. This is the kind of stacking that AdvancedStacker Plus does. Below is an example of taking several images that we collected over time with long delays between each exposure causing the “dotted” appearance of the star trail.

Several layers of images taken at intervals all set to blend mode “Lighten”

Align and Blend Stacking

Stacking can ALSO mean ALIGN and blend images with median, mean (aka average) or more sophisticated algorithms. Indeed astroimagers have been doing this style of blending for years using techniques that involve “star registration” (aligning stars with stars) and some pretty fancy stacking algorithms like Alpha-Kappa Median Clipping and Entropy Weighted Average. The key point here is the alignment. Indeed, here at StarCircleAcademy, we’ve explained how you can brighten and reduce noise in your foreground using simple astrophotography processing techniques.  See below for how to accomplish Align and Blend Stacking in Photoshop, and plenty of warnings about why this method is very likely to FAIL using Photoshop as the tool.

You may also see references to tracked, stacked images. These are the same as “align and blend” just described, except that to capture the image, the camera is guided by an external device (or by some fancy internal hardware), to allow longer exposures of the stars without getting unintentional trailing (smears) of stars.

The takeaway is that not all stacking is created equal. You need to know the context to understand what is meant by the word: stacking.

Focus Stacking / Auto Blend Layers

In Photoshop there is Edit -> Auto-Blend Layers -> Stack Images this is yet another kind of stacking (focus stacking) and despite the wording is NOT the kind of operation needed to ALIGN and Blend astro images. If you don’t believe us, give it a try and you’ll see it will do very weird things with your layers. Below are the same images as earlier. Note the bizarre masks it created to do the blending.

Edit -> Auto-Blend Layers -> Stack Images makes a mess. We told you so! Click to see a bigger image.


Aligned, Stacked Starry Landscape Images

While it would probably be better to make this a separate article in itself, we found it painful enough that we don’t recommend bothering – and yet we proceed to explain HOW to do it anyway!

If you want the cleanest possible images, you’ll – of course – want to reduce the overall noise  and bring out details by using many images instead of one. This approach is not all puppies and kittens. Here are some of the pitfalls:

  1. The direction of sky movement relative to the ground has a significant influence on the quality of the result (as well as the order chosen for alignment). In general, setting constellations are better than rising ones.
  2. Most of the existing tutorials will assume that you have a recent (CC) version of Photoshop with statistics and an an “Auto Align” that properly manages masked regions.
  3. Some of the tutorials we’ve observed are more cumbersome than they need be. There are plenty of hotkeys and mouse shortcuts to make the process go pretty quickly.
  4. More than 10 or so images can become quite demanding on machine resources.
  5. The complexity of your foreground will also affect the outcome. A clean, crisp separation between sky and land is preferable. Trees, poles, wires, and other things that extend through the sky are problematic.
  6. Lens distortion can also adversely affect the outcome.

Aligned Stacking Procedure

  1. Load all the photos as layers in Photoshop.
  2. Heal out airplane and satellite trails from each layer.
  3. Select all the layers and add to a group named “Sky
  4. Right click the Sky Group and duplicate the whole group as “Foreground”
  5. Select all the layers in Foreground.  Use Layer -> Smart Object -> Convert to Smart Object.
  6. Select Layer -> Smart Object -> Stack Mode -> Mean
  7. Duplicate Mean using Ctl-Alt-Shift-E (Command-Option-Shift-E on MAC). Label the newly created layer “Mean” and turn it off.
  8. Select all layers in Sky. Set blend mode to “Lighten” and observe the direction of star movement against the ground.
  9. Be sure the image with stars nearest the ground is at the BOTTOM of the stack. The bottom layer will be your base for alignment. You can drag layers around, or Layer -> Arrange -> Reverse may do the trick.
  10. Create a mask keeping as much of the sky as is easy to do but that DOESN’T include any ground  or fixed location objects. IMPORTANT: Be sure the mask doesn’t have holes in it, including at the bottom corners. Click the layer mask, hold down the Alt (Option) key and drag the mask to the next sky layer. Repeat until all sky images are masked with the same mask.
  11. Select the bottom layer and lock it  (Layers -> Lock Layers -> check Position -> Ok)
  12. Select all the sky layers.
  13. Chose Edit -> Auto Align Layers -> Auto
  14. When alignment is done, set blend mode for all sky layers to Darken. If stars are disappearing in the result image, that’s bad.
    1. If alignment is great everywhere, that is you have plenty of stars, you’re done. But it probably won’t be. So…
    2. Duplicate the current layers to a NEW document – call it whatever you want, but perhaps “Left looks good” makes sense.
    3. Open the history palette and click just above the “Align Layers” item (to restore to before the alignment was done). Lock the TOP layer (see item 11) and repeat steps 12-14.
    4. If a large portion of the image still has streaks in some quadrant, try undoing align, undoing the lock and re-aligning.
    5. If you’re still getting a significant amount of streaking you can also try Auto Align -> Reposition rather than auto.

      Q: Why do I have disappearing stars?
      A: The reason they are disappearing is because they are not aligned. In Darken mode, the darker sky “wins” out over the several stars. This COULD be a good thing in other situations, but not here!

      Q: If I went through the trouble of doing all this alignment, why is it still “off”?
      A: Photoshop isn’t optimized to align stars. Secondly, lens distortion makes a star move non-uniformly across the sensor. And third: stars at different declinations (celestial latitudes) travel at different speeds across the field. To eliminate streaks, the best solution is to track the sky.


  15. Take the aligned sky, delete all the layer masks. With all the aligned sky layers selected, create a smart Object.
  16. Do the same Stack Mode “Mean” trick for the sky smart object that you previously did for the foreground.
  17. The rest is pretty straight forward. Turn the foreground (mean) back on. Use a selection to reveal only the foreground and apply that to the Foreground Group.
  18. Adjust contrast, color balance, vibrance, etc. to your satisfaction.
  19. Save the kit and caboodle.

Does all this seem too complicated? Well, then perhaps you might consider using these tools instead. They do most of the hard work for you and they KNOW the difference between stars and foreground (usually because you help them know).

  • On a Mac: Starry Landscape Stacker – from the Mac App Store
  • On a PC: Sequator – do a Google Search to download it.

By the way there are many astro processing tools, like Deep Sky Stacker – but most/all of them expect that your images will have NO foreground or non-moving objects like wires in them.

Review: CamRanger

I am always looking for the best solutions for automating my night photography. In fact, I recently reviewed a litany of products. At the time I didn’t know about the CamRanger product – my friend Rob C. told me about it.

I am now the owner of a CamRanger. Here are my first impressions:

IMG_1552

iPhone Application

  1. I ordered from the CamRanger website, selected two day delivery. The box came all the way across the US. From Virginia to California and it arrived in two days. Woohoo! Great store and interaction.  It’s also available through Amazon, but doesn’t qualify for Prime. I figure if I’m going to pay for shipping I’ll order it directly from the company and hope they keep a bit more of the cash.  By the way I paid with PayPal. Sweet. 
  2. The packaging is reminiscent of the iPhone. Everything is nicely tucked into a little box. I was worried briefly because I also ordered two extra batteries. Thankfully they were tucked into the same box.
  3. Included were: Quick start instructions, a charger (wall wart), charger cable, USB to mini USB to connect to the camera, Ethernet cable (for upgrading the firmware), the batteries, a cigarette sized-packet with the CamRanger unit, and a carry pouch with a velcro closure and a carbiner clip.

The CamRanger is an incarnation of the TP-Link portable wireless router. It even says so on the batteries and under the case. Really clever approach! Kudos to them. Of course the firmware has been customized, and they are using the USB connector to drive the camera.  With that arrangement they can do a WHOLE lot more than you can do with a lowly intervalometer.

Essential is the CamRanger application for iPad and iPhone. They are planning to roll out other applications, including one for the PC. Since the device is a portable router, theoretically they could even provide some simple browser driven connectivity.  I loaded the app long before I received the box. You can’t get to square one without the device, however – it won’t show you any of its glorious features until it can talk to a camera. Makes some sense since what you can do depends on the camera it connects to.  I found some blemishes with the application which I’ll enumerate in just a moment.

What Can the CamRanger Do?

Before I criticize, let me first explain what you CAN do with this clever device. And this is just scratching the surface.

  • Focus stacking – let CamRanger control incremental focus for maximum depth of field with your macro (or other) shots.
  • Remotely adjust focus (camera auto-focus must be turned on for this).
  • True HDR using exposure time, ISO or f/stop increments. Up to 7 exposures are allowed.  Intervalometers with this feature can only work in low light since they can only crudely control the camera shutter.
  • Monitor “live view” and captured images. Even delete them when they suck. I am slathering at how this will improve my Astrophotography. Have you ever tried to adjust focus of a telescope pointed nearly straight up – it’s a neck breaker.
    IMG_1556

    Delete Images from Camera

  • Intervalometer functions: timelapse, and bulb exposures.
  • Complete control of settings (how complete depends on your camera). Nearly all of the settings can be changed remotely including ISO, f/stop, exposure time, metering mode, image size and type… and more.  I even moved the connection from my Canon 5D Mark II to my cohort’s Nikon D800 and had immediate control of his camera and its unique settings.
  • Some features do require manually changing the camera mode knob. For example to get bulb exposures you must be in Manual mode on a Canon 50D or in Bulb Mode on the 5D Mark II.  These peculiarities vary by camera.
  • CamRanger can do everything the EyeFi can do for sending images. EyeFi isn’t supported on CompactFlash media cameras so CamRanger is a great replacement!
  • IMG_0137Focus by touching the iPad screen.
  • Provides a Live View Histogram.
Touch the iPad to select focus point!
IMG_0128

Landscape Mode

 

 

 

 

IMG_0127

Portrait Mode

IMG_0136

View images from the camera memory card

What Could Use Some Improvement

I’ve ordered my complaints according to how much they affect the way I do most of my work which is night and astrophotography.  Some of these are nitpicking, I know.

  1. There is no sub-second interval for long exposures. I’d love for them to add a “star trail mode” and select the shortest possible interval between shots based on the camera type and behavior. The company says this is a limitation in what they are able to do through the USB connection to the camera.
  2. There appears to be no way to know if a timelapse is running nor can you stop a timelapse in progress.  The CamRanger can continue to run a timelapse sequence without an app driving it.  That’s a plus. But not being able to tell if it is running or to abort a sequence in progress is annoying. CamRanger tells me they are planning to address this in an upcoming release. Yeah!
  3. The pouch for the CamRanger could be improved to:
    • Hold all the items that come in the kit. The pouch can only hold the CamRanger device, USB cable and perhaps an extra battery – not the additional cables or plug-in charger.
    • Add velcro straps so I can wrap them around my tripod leg and secure the pouch to my tripod,
    • Provide a closeable window so I can see at a glance the unit status (i.e.those LEDs which are too bright, see below).
  4. The timelapse settings use spin dials to select the number of exposures and exposure times. The keypad would be more efficient.  It would also be great if the App automatically calculated your elapsed running time based on the number of exposures and a configurable frame rate (like TriggerTrap does). CamRanger is adding the calculation.
  5. The LEDs on the device are pretty doggone bright for night work. Would be great if they were dimmable. Of course that can be achieved by putting the device in the pouch or by putting some semi-opaque tape over the LEDs.
  6. IMG_1564To interact with the CamRanger, you have to switch your iDevice to the WiFi network generated by the CamRanger. Unfortunately that means you can not use your iDevice browser to surf the internet. If there were some fast-switch way to do it, I’d like that. Or better yet, I’d like to integrate the CamRanger into an existing network.
  7. The CamRanger itself comes with a serial number sticker. I’m SURE it will come off or get lost, but you need that serial number to connect to the device. The same serial number can be found on a sticker under the battery cover, though.
  8. The Access Key to join the CamRanger network is all in upper case.  All lower would be easier to type.
  9. My buddy Rob noted that he felt like he was going go have to break the battery cover off. Mine seems to come off quite easily if you hold it correctly.
  10. The CamRanger battery is a custom lithium-ion form factor. You can charge the battery in-device, but there is no additional charger provided.
  11. Sometimes when switching functions, for example when switching to Timer it told me “must turn off live view” which seems a bit strange since it knows how to do it!
  12. I ended up with both my iPad and my iPhone attempting to connect to CamRanger. It caused a problem that was not obviously solvable (Communication Error) until I realized both of my devices were trying to get CamRanger’s attention.

As I noted, some features depend on the way your camera interacts with the USB connection. I didn’t figure out, for example, how to cause my camera to meter the scene for me so that I could manually adjust my exposure – i.e. what I’d normally do with a half-press of my shutter button.

I haven’t tested the range or battery life as yet. Claimed battery life of the CamRanger is 6 hours. There is, however, no on screen indication of the CamRanger’s current battery condition.

Now That I’ve Used it More…

The problems with not being able to see if or stop a timelapse are more than irritating.  The only way to stop a timelapse in progress is to turn off the CamRanger device and turn it back on. It takes about a minute to come back up and meanwhile since the WiFi from CamRanger goes away, my iPad or iPhone will by default switch back to another known network (my home in this case).  That means I have to remember to also switch WiFi networks or I get “unable to communicate”.  I also noticed that for bizarre reasons which are not quite clear I could start a timelapse, but the camera did nothing.  However I *could* use the Capture button.

But that’s not the end of the pain, unfortunately.

  • The Bulb and timelapse settings are not saved. All settings reset to 0 when a timelapse completes.  If you want to re-run the same program – as I do when I take darkframes after my astrophotography sequences – you have to reprogram everything. That’s tedious.
  • Apparently the interface is not smart enough to know how to do HDRs that exceed the camera settings 30″ exposure time.  On my 50D, for example, an HDR sequence that should shoot at 15, 30 and 60 seconds will not be accepted. However that sequence can easily be achieved by using bulb mode for the last shot and that does not require changing the dial on the camera – so the app could figure it out.  I even tried doing this in “Bulb” mode, but it still didn’t seem to work.
  • The biggest pain in the butt is that the “Autofocus” behavior is not preserved.  What this means is I leave the AF button on on the lens, carefully fine tune the focus, turn it to MF (manual focus mode) on CamRanger and take my shots. If, however I am forced to cycle the CamRanger power it reverts to AF mode by default so the first shot will try to autofocus in the dark – which prevents the camera from shooting.  I’d like to set the default behavior to NOT AF even though I have set AF on the lens.
  • It also appears the timelapse is not aware of the drive mode for the camera.  I often set my camera to the 2-second (or 10 second) delay for two reasons: 1. it lights the self timer on the camera so I know when a frame is about to fire, and 2. In delay mode, an Autoexposure bracket (AEB) will automatically complete from a single press of the shutter. The timelapse settings could know that the minimum delay will be the length of the camera self timer delay (plus perhaps a second).  But it doesn’t use that information.

The good news is that the biggest pain points can be fixed in the app. I suspect some of the more advanced things would require the app to know more about the camera – and are thus less likely to be supported.

The other good news is, it really does save me from breaking my neck trying to get my eye down to the view finder or to view the LCD – when objects are high overhead I’ve had to lay down on the ground to see the LCD – blecch. And it’s great fun to watch the images roll in as the timelapse runs – even from indoors while my poor equipment is out shivering in the cold.