Last week I went to Tahoe to do some astrophotography.

I watched this video (https://www.youtube.com/watch?v=Rydg7JGTAbw) about image stacking to reduce noise in my photos so I decided to give it a shot.

My setup: Sony A7ii with Batis 2.8/18 lens. I shot all my photos with ISO 1600 with a tripod for 25 seconds of exposure. My aperture is f/2.8 and I set my focus distance to my hyperfocal distance for all my shots

This is what the sky of my first image looks like: enter image description here

And I followed the youtube video: I aligned just the sky and converted it to a smart object and applied the median filter. This is what it looks like: enter image description here

Upon applying the median filter, I realized that aside from the center of the sky, most stars have disappeared in the newly stacked smart object.

I suspected that the movement of the stars could have contributed to this. so I changed the stacking mode to maximum and saw the star trails: enter image description here

So here are my questions regarding my photos:

  1. If the stars moved significantly between each frame, how can auto-align function properly?
  2. How can I apply photo stacking to my current set of photos?
  3. What can I do in the future to prevent this from happening?


Would you guys mind submitting answers so I can reply individually?

  • \$\begingroup\$ It looks like the focus distance may have changed between frames which led to focus breathing. When stacked this has the same effect as a small amount of zoom blur. Why are you using hyperfocal distance rather than infinity for astro? \$\endgroup\$
    – Michael C
    Commented Mar 23, 2017 at 11:00
  • \$\begingroup\$ Either that or barrel distortion combined with camera/tripod movement caused the "stretching." It is fairly significant with that lens. phillipreeve.net/blog/review-zeiss-batis-18mm-2-8 \$\endgroup\$
    – Michael C
    Commented Mar 23, 2017 at 11:06
  • \$\begingroup\$ Was the in-camera stabilization turned off when these shots were taken? differences in sensor position/angle combined with the barrel/mustache distortion could have also caused the stretching. \$\endgroup\$
    – Michael C
    Commented Mar 23, 2017 at 11:09
  • 1
    \$\begingroup\$ His follow up video shows how to deal with failure of auto align. youtube.com/watch?v=zzVSm64zq44&feature=youtu.be \$\endgroup\$
    – Michael C
    Commented Mar 23, 2017 at 11:46
  • \$\begingroup\$ Closing aperture 2 stops will very likely increase image quality at the fringe and in corners for these focal length lenses. \$\endgroup\$
    – Grimaldi
    Commented Mar 23, 2017 at 14:04

5 Answers 5


You have to remap the images such that the stars are aligned precisely, this requires pixel level aligning throughout the entire picture. This is best done with specialized software, such as Hugin (which is free of charge). With Hugin you can mask out the foreground and align the sky, you can choose specific points that the program can use to get to alignment, in this case you have a sky full of stars to choose from. The Hugin program gives tight control of the algorithm that is used to do the remapping, you can e.g. input fixed parameters for the barrel distortion, or you can allow these parameters to be adjusted during the fitting.

  • \$\begingroup\$ Yes...astrophotography requires a different set of tools than PhotoShop- straight out of the box. As countiblis alludes, Hugin requires the careful selection of reference stars that the software will use to orient every other pinpoint of light on your multiple negatives....however, the technique is used more for noise reduction of multiple long exposures. \$\endgroup\$ Commented Apr 27, 2017 at 4:20

1) From the difference between median and max you can see that alignment didn't work and the pictures were not aligned. Why this is so, is hard to tell. Comparing the pictures in the tutorial with your picture, it seems contrast is higher and more "structure" is present in the stars field. I would try to ramp up contrast before aligning. Try an extreme setting.

2) I would try using a software written to align astro-photos, like DeepSkyStacker or PixInsight. DSS detects stars, gives feedback on how many are detected und allows setting the threshold. Note that stacking might amplify vignetting or other artefacts (like dust on the sensor). You will have to tweak image settings thoroughly.

3) You could use a mount, which counteracts earth's rotation, like Vixen's Polarie or Skywatcher's Star Adventurer. These allow to take exposures of 1-3 minutes at normal ISO settings between 400-1000, greatly reducing noise in the first place.

  • \$\begingroup\$ DeepSkyStacker is quite abstruse for a beginner. Do you know of anything easier to use? \$\endgroup\$
    – user382459
    Commented Sep 8, 2018 at 5:08

As I see things, you have a few problems here.

First of all, although it's impossible to say with certainty, I'd guess that the combination of trees in the foreground (probably moving somewhat randomly) and the stars in the background (moving predictably, but almost certainly not in sync with the trees in the foreground) is probably getting Photoshop confused--it can't find any way to shift/rotate things so it all lines up to give a better match than just leaving things alone, so it...leaves things alone.

Second, your individual exposures are long enough that the stars have quite visible movement in the individual frames (pretty easy to see in the first frame, if you look carefully). So, even if you get the frames aligned well, you're still going to have fairly visible trails (just shorter ones).

Finally, for this you're almost certainly better off using raw files instead of JPEG1. If memory serves, the A7ii can produce raw files that use lossy compression. If so, you definitely want to use the uncompressed raw format--this is exactly the sort of picture that will trigger visible artifacts if you use lossy compression.

1. Of course, maybe for the real thing you are using raw already, and you just posted JPEGs because browsers and such don't support raw--if so, my apologies.


The median filter is really good for handling noise in stacked images because it discards statistical outliers, e.g. if a plane was passing the sky while you shot, the plane would be completely removed after a median stacking, whereas a mean/average filter would leave a trace of the airplane.

But if the images are not rotated, so the stars align before stacking, the stars themselves just become statistical outliers (in that particular pixel between shots), and that's why they disappear.

If you are Mac user, there is an app, StarryLandscapeStacker, that can handle the rotation/stacking pretty well.

This photo was produced with the app (with a bit of post processing in PhotoShop) from 12 individual exposures.

  • My first guess was that camera has moved between or even during exposures (for whatever reason) mostly diagonally, then automatic aligning would align the frames preferring sharp central part of frame and then these trails appeared because of how image is projected by rectilinear objective. Inspect the trees to see if it is the case - they would tell better unless it was windy that night. If trees appear in different positions, this is the case.
  • It could also be that Photoshop tried to stretch images, not only rotate and move them. Check your aligning settings if there are any.
  • And my last and best guess is that it is natural distortion of sky. Rectilinear objective will only preserve geometric shapes if the object moves without tilting against optical axis. This will be apparent if you do not point your camera roughly the at Pole star (the north center of sky rotation) and if you use ultrawide angle objective (18mm is enough) and if you use long enough exposure (total exposure time). In this case you will both move/rotate and distort images to fix it (it will be good enough but it won't be exact match).

I may try it myself if you upload high resolution JPEGs (straight out of developer).

  • 1
    \$\begingroup\$ The camera does not appear to have moved at all, given that the plants at the bottom remain in the same position. This is just the natural movement of the stars. \$\endgroup\$ Commented Apr 23, 2017 at 2:24
  • \$\begingroup\$ @user1118321 did you read my answer to the end? \$\endgroup\$ Commented Apr 23, 2017 at 12:47
  • 1
    \$\begingroup\$ Yep, sure did. Still feel the same. \$\endgroup\$ Commented Apr 23, 2017 at 14:47
  • \$\begingroup\$ @user1118321 This cannot be natural movement of the starts because it is question about frame stacking. The last part of my answer describes geometric distortion which is the result of natural movement, it is not the same as natural movement. \$\endgroup\$ Commented Apr 23, 2017 at 17:43
  • \$\begingroup\$ If the camera does not move but the star field does, any geometric distortion produced by the lens will change the relative position in each image of each star to the other stars as they move through the field of view. This is the natural movement of the stars combined with the distortion characteristics of the lens. \$\endgroup\$
    – Michael C
    Commented Apr 28, 2019 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.