Processing a Milky Way image using the Photoshop “Stack Median” filter

    Milky Way from Whitesands Bay
    Milky Way from Whitesands Bay

    This image of the Milky way was taken a few weeks ago in Pembrokeshire from the car park at Whitesands Beach at about 10pm. On the far right you can see the South Bishop Light which stands on its own small island West of Ramsey Island; it is about 9 km away to the South West.You can see it in my Astro Gallery.

    The final image is made from 14 identical 30 second exposures at ISO1600 taken in sequence using a Sony NEX7 camera with a Samyang 12mm lens at f2.0. I have in camera noise reduction turned on. The lens is manually focussed, and I have the camera set to manual for exposure to keep everything the same between successive images. Once imported into Lightroom, I adjusted the colour balance of one of the images and then synced that across to the other 13. The 14 images were then exported to Photoshop CC14 as layers in one image. Below is the method I used:

    You need to create two separate sets of 14 layers – one for the foreground and background – in fact “the ground”! And one for the sky and stars. So the first step is to duplicate all 14 layers, and group the 14 copies into a smart group which you can name “ground”.

    In each of the successive images the stars will have shifted, and for what we want to do with the “sky” set of 14 we need them all aligned. We can get Photoshop to do this automatially but we need to get PS to ignore the ground – we do that by roughly masking out the ground in each image so that it just has stars to work with.

    So, you hide all the layers except one of the sky layers to work on; create a layer mask for the visible layer and then thoroughly mask out the ground and any fixed lights etc. It doesn’t matter if you mask out some of the sky, but make sure you mask out all of the ground. You can then copy that mask to each of the other sky layers.

    Unhide the sky layers, select all 14 and then Auto Align the layers; then delete all 14 layer masks. Select the 14 sky layers and convert them to a smart object which you can name “sky”.

    What you now have is two smart objects: one “sky” with the stars lined up; one land which was already lined up unless you accidentally kicked your tripod!

    Here is the clever bit – it does require the extended version of PS, or CC14. We are going to use Layers > Smart Objects > Stack Mode > Median to perform some clever processing which will substantially reduce the noise, particularly colour noise. Where there is a pixel at a particular position in the image with the same value in each of the 14 images, that same value will be used in the final result – eg a star. Where there is a pixel whose value changes randomly in each of the 14 images then the median value will be used in the final result – eg noise and plain sky. As the noise is random and if there are sufficient images as a sample to work on, then the result of this process is to cut out a large amount of the noise.

    So we do the Layers > Smart Objects > Stack Mode > Median on each of our two smart objects.

    Then Finally, select the foreground, add a layer mask and paint out the blurry sky to reveal the noise free sky layer – here, more care is needed in the masking to get the boundary between ground and sky just the way you want it.

    After that it is “just” a matter of processing to bring out the details in the Milky Way, etc. I do this back in Lightroom.

    Each of the 14 files from the NEX7 is a 25Mb dng file – thats a lot of pixels for PS to handle when it has these 14 images loaded up as layers in one file. So the processing is not instantaneous particularly when converting to smart objects and running the median filter. I noticed that the processor was running at about 60% but that 97% of my 8Gb of RAM was being used, so perhaps it would be quicker with more RAM. There are also issues with saving TIFF files over 2Gb. In any event, I flattened the layers after the PS processing was complete as there was no need to save the layers as it could all be done again if necessary and my final processing was in LR which is non destructive anyway.

    This is the first time I have used this method and I am very pleased with the noise reduction. What would I do different next time? I would use a higher ISO – 3200 – and a shorter exposure time to cut the star trails.

    Detail of unprocessed image
    Detail of unprocessed image
    Detail of processed image using median filter
    Detail of processed image

    Landscape Astrophotography

    Communing with the Heavens – 26s, ISO1600, f2.0 Sony NEX7 and Samyang 12mm

    Last Friday I tried my hand at some Landscape Astrophotography at the ancient stone circle at Avebury. I went with a friend from Tetbury Camera Club – safety in numbers in the land of Druids! Friday was a new moon and being July the Milky Way was high in the sky. Both of us had recced the scene in the daylight and had some specific POVs in mind. But neither of us could be sure how dark it would be.

    Avebury is on the edge of the Salisbury Plain dark area, but quite close to Swindon and Calne besides having its own small group of houses and a pub in the village. As it turned out the Milky Way was visible but I would say not stunning. Good enough for an atmospheric shot of the stars and the old stones. The sodium light from Swindon and Calne dominate the horizon, and do tend to wash everything with a sodium light cast even where to the human eye it looks dark – the camera sees it all.

    I was using my Sony NEX7 with a Samyang 12mm manual focus lens. I had already checked to see where the point of infinity focus was on the lens focus scale and had checked that the lens resolved point light sources as such, so I was reasonably confident that I had tha basic kit. The high ISO performance of the NEX7 is pretty good and I do use ISO1600 for interior work and it cleans up OK. I had even purchased some chemical hand-warmers which I had ready in a sock to attach to the lens if condensation looked like being a problem, but there was no need for that.

    Using the so called rule of 500  I would be able to shoot at 28 secs while maintaining the appearance of reasonable point sources for the stars. Anything over that, the theory says, will produce visible short lines instead of points. The rule of 500 works like this: you divide 500 by the full frame focal length of the lens and that’s your max shooting time. So for my Samyang 12mm, that is the full frame equivalent of  an 18mm lens: 500/18 gives approximately 28secs. I have read that 400 is a more practical number which would give 22 secs. I opted for 25secs at f2.0 and ISO1600, which has produced a reasonable result, perhaps slightly on the dark side. You can see though, that the shorter the focal length, the better. A 50mm lens on a full frame camera would give only 10 secs using 500.

    What I was not prepared for was the difficulty of composing the image in very dark conditions. The NEX 7 has an EVF and it could see nothing! Even Matt with his D800 and its OVF said he was struggling to compose his images (they looked pretty good to me!). It was a matter of shooting blind, reviewing the result, adjusting the camera on the tripod, repeating the process until an acceptable composition was achieved. Getting everything just right was still almost impossible but the advantage of a wide angle lens and 25 megapixels is that there is plenty of scope for cropping! To speed the composition process up I used a much higher ISO and shorter shutter time.

    Taking the image is just the beginning. It takes a lot of careful processing to extract the detail from the image, and to get rid of the inevitable high ISO noise. I used Topaz Denoise, which does a very respectable job.  Even with the camera’s “in camera noise reduction” turned on, you are going to get noise, though presumably the camera has done away with any hot pixels.

    The finished image above, was the result of processing in Lightroom (mainly) with Topaz Noise reduction and the Topaz Detail  (preserve highlights preset). I am still experimenting with the processing and trying to find the ideal compromise between low noise and sharpness of image – not there yet!

    I am looking forward to some more experimentation with the camera too. I need to perfect the art before my holiday next year to the USA where we will be visiting some truly dark places! On my list to try out is the concept of taking multiple images and using the Photoshop median filter to remove noise. I have seen this technique demonstrated on the internet and it looks good.


What’s it all about?

Here are my jottings about my photographic projects and activities. I have been working on a focus stacking macro photography rig. There are quite a few posts about that. In addition I write about other photographic activities as and when!


Category Specific RSS


Warning: A non-numeric value encountered in /home/public/mhp_blog/wp-content/plugins/ultimate-social-media-icons/libs/sfsi_widget.php on line 238