Skip to Content

image processing

Remove Gradients in Your Astrophotos with Photoshop

Adobe Photoshop is the preferred weapon of choice for many astrophotographers of varying levels of experience.  The intuitive user interface and limitless image processing capabilities make it a real contender in the astrophotography world.

The seamless integration with the .RAW image files produced by a Digital Camera makes Photoshop an attractive choice for photographers using popular Canon and Nikon DSLR’s.

It continues to be my personal favorite tool for processing astrophotography images.

The M78 nebula in OrionWhether you are brand new to astrophotography image processing, or a seasoned veteran, an uneven field in your image is something that every astrophotographer will deal with at some point.

The steps I will discuss below can be done in Photoshop without using any additional plugins. However, I strongly recommend investing in the Astronomy Tools Action Set, and Gradient Xterminator.  They are well worth the expense and can make a monumental difference to your images.

This Photoshop tutorial involves the following:

  •   Assessing your uneven field
  •   Removing the DSO from your image
  •   Creating a synthetic flat frame
  •   Subtracting the flat frame from your image

 

An Effective Photoshop Technique for Removing Gradients

One of the most time consuming and frustrating stages of your image processing workflow can be dealing with gradients.  Your background sky goes from a dark blue to pink as the encroaching glow of city light pollution stains your image.  Luckily, there is an extremely useful and effective method for removing gradients using Photoshop.

This method involves creating a synthetic flat frame and subtracting it from your original image.

Quickly correct your uneven field

The method you’ll see me use in the video below is a very popular way to remove gradients using Photoshop.  Variations of this technique have been used by amateur astrophotographers for years.  I do not take credit for this method.  Like almost everything else I have learned about this hobby, I picked this up by watching and reading countless image processing tutorials shared by others.

Video: How to Remove Gradients in Photoshop:

This technique works better on some deep-sky images better than others.  Large targets such as nebulae that fill the entire frame will be difficult to tackle using this process.  In my example, the Leo Triplet of galaxies worked very well, as they are surrounded by a large area of surrounding space.

Assessing the Data

  1. Start by opening up your final stacked image.  I use DeepSkyStacker to register and stack all of my image frames.
  2. Crop your image to remove the stacking artifacts and overlapping frames.
  3. Convert the image from 32bit to 16 bit, to open up further editing options in Photoshop.
  4. Perform a quick levels adjustment, bringing the left-hand slider up against the data on the histogram.
  5. Make a curves adjustment, pulling the details contained in your deep-sky object forward.
  6. By now, you should have a good idea of how bad the vignetting and color gradients are in your image.

 

Gradient issues in a astrophotography image

A curves adjustment will show the uneven field

Removing the DSO from the image

Now comes the fun part.  This is where you either have the option of running a third-party plugin such as Gradient XTerminator or tackling the issue yourself.  It’s beneficial to learn this method of removing gradients in photoshop for all types of astrophotography including wide field Milky Way shots.

  1. First, copy your original image layer and paste it on top.  Name it “Gradients”
  2. Copy this layer to a new image. Select All > Copy > File > New > Paste.
  3. On the new image that was just pasted, remove the deep sky objects from the field of view.

This can be done various ways, but I prefer to use the healing brush.  The important part to remember is that we are only interested in the color information of the background sky.  We don’t want to change the data found in the deep-sky objects themselves.  See this in action in the video above.

 

Using the healing brush in Photoshop

Remove the DSO using the healing brush

Creating a Synthetic Flat Frame

Now that we have a version of our image without our deep-sky object(s), we can correct the uneven field in the background sky.  At this point, you may also want to remove any bright stars that may negatively affect the resulting synthetic flat frame.

Richard Hum had this to say on YouTube:

What I usually find helpful is to use Select -> Colour Range -> Highlights to select the stars, and then do a content-aware fill. I find it works better than not removing the stars and just doing dust and scratches.

  1. Now, we need to blur the details of our copied DSOless image. Choose Filter > Noise > Dust and Scratches.
  2. For my camera’s resolution in the example, a Radius value of 80 pixels was used, and a Threshold of O.
  3. You should now see a blurred version of the background sky, with an evident uneven field.

 

creating a synthetic flat frame

Our synthetic flat frame

Applying the Flat frame to your Image

  1. Now, go back to your original image, and make sure you have the “Gradients” layer we created selected
  2. Next, choose Image > Apply Image.
  3. From the Source drop-down menu, select the copied, blurred image we just created. (Untitled-1)
  4. From the Blending Mode dropdown, select Subtract.
  5. Leave the Opacity at 100%, and set the Offset to 30 and hit, OK.

 

Deep sky astrophotography

Your new and improved image

Your new image with the gradients layer on top should look much better.  The “Gradients” layer we created can be scaled back by using the Opacity slider on the layer.  You may not need to use this layer at 100% to completely correct your gradient issues, but expect to have it set to between 80%-100% in most cases.




This layer can be toggled on and off to review and inspect the improvements to your image.  If necessary, you can go back and test some of the variables including changing the Radius value, and/or removing the stars before blurring the frame.

From this point, you can go about your image processing as you normally would, with a much improved, even background sky.

Wide field images captured with my camera lens suffer from horrible vignetting in my backyard.  The gradient removal technique above was used on this image of the Orion constellation to correct the background sky:

Orion constellation

The Orion constellation from my backyard

Try this method on some of your existing widefield images that suffer from a gradient in the background sky.  An uneven field is a common problem in almost all astrophotos, so mastering this technique will come in handy in your future endeavors.

Did you know you can sell your astrophotos as stock photography?  I have sold several of my images on Shutterstock over the past 3 years.  View my portfolio.

Thank you for your interest in AstroBackyard.  If you would like to contribute to this blog with an astrophotography article, please contact me.

You can stay up to date with the latest images and information on the AstroBackyard Facebook page, or by following me on Twitter and Instagram.

Until next time, clear skies!

Related Posts

Astrophotography Tutorials – AstroBackyard

Astrophotography Tutorial – Deep Sky Image Processing in Photoshop

Galaxy Season Target – The Leo Triplet of Galaxies

My Complete Deep Sky Astrophotography Equipment Setup

Beginner Astrophotography Telescopes – My Top Picks

Resources:

Astrophotography Tutorials – PhotographingSpace.com

Gradient Xterminator – Photoshop Plugin

Astronomy Tools Action Set – Pro Digital Software

Related Tags

Screen Calibration

|Image Processing|3 Comments

Screen Calibration for Astrophotography

With my recent purchase of a new laptop computer, I am reminded of the importance of having a well calibrated computer monitor for editing and viewing astrophotos. The brightness of my new laptop screen is intense.  It appears to be about 25% brighter than my well-calibrated 23 Inch external IPS monitor.  This results in astrophotography images that are less-than pleasing to the eye.  I had to re-process many of my own photos in the photo gallery, once I discovered that they did not look the way I intended them to on different screens.

Having a monitor that is too bright will show all of the impurities in your background sky.

If you have been processing your astrophotography images on a dim monitor, you may be in for an unpleasant surprise when you see them on a bright screen for the first time!  When you upload your image to the web, you have to accept the fact that people from all over the world may view your work on monitors and screens that display images MUCH different than yours.  It is wise to make sure your computer screen is giving you an accurate rendition of the image you worked so hard to capture.

 

Screen Calibration for Astrophotography

How are your astrophotos displaying on other screens?

Why should you calibrate your monitor?

Screen calibration helps to ensure that colors are represented accurately on your monitor.  This is an important aspect of your experience on the computer whether you are processing astrophotography images or not.  You will ensure that you are seeing the images displayed on screen as they were intended to be viewed.  This is especially important for creative professionals such as Graphic Designers, Photographers and Video Production teams.  The idea is to have your monitor conforming to a preset color benchmark such as the sRGB or Adobe RGB color space.

 

astrophotography display screen brightness

How do your astrophotography images appear on other screens?

How to Calibrate your Screen for Astrophotography

The first step towards adjusting your computer monitor display settings is by using the interface on the unit itself.  Some models have more in-built control options than others.  If you use an external monitor like me, it will have a set of controls, usually at the front and under the screen.  My ViewSonic LED monitor has the typical bare bones contrast, brightness, and color mode.  Make sure that you do not have any ambient lighting in the room affecting your views.  Do not calibrate your monitor in a bright, sunlit room, or with reflections appearing on-screen.

For accurate results, face your screen head-on, with your eye lined up with the top of the screen.

 

Calibration Tools and Adjustments

It is necessary to  have some reference material on-screen that will let you know if you’ve pushed your settings too far one way or the other.  See the grayscale chart from APCmag below:

 

Screen Callibration

You should be able to distinguish between each shade of white/black

Using the Color Calibration Feature in Windows 10

If you are using Windows 10, they have a nifty color calibration walk-through that is great for making adjustments called Display Color Calibration.  It will take you through a number of tests to see just how far off your display is.  They call it “color” calibration, but it’s really an overall screen calibration test.  You can get to it by following this command path:  Start Menu > Settings > System > Display > Advance Display Settings > Color Calibration.  The following calibration images are used in the Windows color calibration test.

Have you Checked Your Gamma Today?

“Gamma defines the mathematical relationship between the red, green, and blue color values that are sent to the display and the amount of light that’s ultimately emitted from it.”

 

Adjusting the gamma on your screen

In the image above, you should not see any overly obvious “dots” within the circles.

 

The Brightness Effect

As I stated earlier, having a display that is too bright can absolutely wreak havoc on an astrophoto that has been stretched too far.  I know about this phenomenon all too well, as I like to stretch my data to the max.  The tell-tale signs of an astronomical image that has been stretched too far, or with serious gradient and vignetting issues – is a muddy, green/brown background sky.  The sky may appear to have a nice neutral dark grey or black on your dim monitor, but on your nephews brand new ultra-backlit iPhone, it’s a multicolored mess!  Even images on APOD can appear to diminish in quality under the scrutiny of an overly bright display.

Here’s an image you can use as a guide.  You should be able to distinguish between the mans shirt, and the background.  The black “X” in the background should be barely visible.

 

screen-brightness

 

Contrast – Don’t Overdo it

Using the image below, adjust the contrast settings of your monitor so that the background appears black and not grey. If you have lost details in the white shirt the man is wearing, such as the buttons and creases, you have pushed the contrast too far.

 

Contrast Adjustment

Can you see the details in Jim Halpert’s white shirt?

My Best Advice

My advice is to process the image on image on a screen that has been calibrated as best as possible.  If you have access to a overly bright, unforgiving display – maybe have a look at your image on that as well.  It can be useful to see an exaggerated version of your subject, and fix any issues that really jump out at you.

 

My Main Astrophotography Monitor for Processing:

ViewSonic VX2370 Series IPS LED

Computer monitor for astrophotography

Take a look a few example astronomy photos taken by professionals on Astronomy Picture of the Day.  Use the color, levels and background sky you see in their photos as a guideline.  Chances are, the photos you see here will look great, no matter which display screen you view them on.  This is because they have taken the precautions needed to ensure that their images are an accurate representation of scientific data, including screen calibration.  Many of these astrophotographers have dedicated calibration tools to help them keep their displays accurate.

I have had many issues with uneven sky backgrounds in the past, probably due to lack of flat frames or poor quality flats!  The dim monitors hide this messy background making the sky to appear a nice dark grey or black.  There is value in viewing your images on a variety on screens to learn how to better process your images.  I hope that this write-up has opened your eyes to the importance of screen calibration when processing astrophotography images.  As for getting your night sky photos printed?  I’ll save that for another post;)

 

Screen Calibration

 

Related Tags

Selective Processing for More Detail

Staying Inside – Image Processing

The unseasonably cold weather and precipitation we have experienced here in Southern Ontario have given me the perfect opportunity to go through my old astrophotography images and reprocess the data.  I have been advancing my image-processing skills by studying current astronomy images taken by the pros.  Being a creative professional myself, I have always understood and appreciated the power of inspiration. I am always interested in new image-processing techniques, photoshop tutorials and new software that can enhance my work.  Through selective processing, I have been able to squeeze out the most amount of detail from my astro images.

Western Veil Nebula

The Western Veil Nebula – I reduced the stars to show more contrast in the nebula

My latest take on The Swan Nebula is my favourite version yet. Through selective processing, I was able to tame the background stars, while intensifying the gorgeous pinks and reds in the nebula itself.  I also recently reprocessed my wide-field image of the Western Veil Nebula, with a focus on reducing star size, and overall image contrast and color. The “witch’s broom nebula” is a tough process, especially if you have to deal with a severe gradient behind all of those stars. After assessing the gradient in photoshop, (mostly due to heavy light-pollution) I can easily even out the sky background using the Gradient Xterminator plugin.

I am quite pleased at my latest results of the Eagle Nebula as well.  I went through my astrophotography folders from the past 4 years (like I said, it’s been cloudy!)  and found a set of almost 2 hours of frames on M16 that I had not previously used!  I combined all of the data together from May 2012, and May 2013 in Deep Sky Stacker to create an image with over 3 hours of exposure time.  I decided to keep the extremely wide-field view captured by my 80mm telescope, rather than cropping the photo around the nebula. This image really benefitted from the selective processing technique. By reducing the stars on a separate layer, I was able to keep all of the detail found in the nebula.

Eagle Nebula - 80mm Telescope

Wide field image of the Eagle Nebula with my 80mm telescope

Image Processing Techniques

One of the processing techniques I have been implementing into my photos is to process different elements of the image separately. By this, I mean to process the background, the stars and the nebulosity on their own.  I am able to do this by selecting each element of the image and stretching the data without affecting the other areas. For example, I can boost the vibrance and saturation of the nebula or galaxy without adding additional noise to the background of space and stars.




As I have stated many times, I prefer to tame the stars in the image to be as small as possible.  Normally, I would run the “make stars smaller” action to the entire image in Photoshop. This actually starts to diminish the precious detail in your deep-sky object that you worked so hard to capture! Many other actions that are intended to correct issues with the background space and stars can take away from your subject as well.

You can also manually Remove the Stars Completely from your image using photoshop.

Swan Nebula - 8 Inch telescope

My latest version of the Swan Nebula

Selective Processing

There are several ways to accomplish the selective processing technique to your astronomy photos.  You can create multiple adjustment layers of your image in Photoshop, and apply the various actions to each element of the image on a separate layer.  Once you have applied your desired settings applied to each layer, you can use layer masks to combine all aspects of the photograph into one.  This means you will likely have layers for:

  • The Background Space – With a balanced black-point set

  • The Background Stars – Small, sharp and with lots of accurate colour

  • The Brighter Stars – Soft, or with Diffraction Spikes and Color

  • The Deep-Sky Object – Full of luminance, color and detail

  • The Core or Brightest Area of the DSO – reduced to show detail, not blown out

 

Selective Processing - Astrophotography

Processing the nebulosity separately from the background stars in Photoshop

You can also process the selected elements of your images as separate documents.  Sometime I prefer to do this to really focus on achieving the best possible result for my focus area, without the temptation to poke around at another feature.  Once you have processed each version of the image with your focus area maximized, you can then combine the images using layer masks.  The blending and layer masking is definitely the most delicate stage of the process.  You can really make a mess of an image by failing to inspect all areas of your image before flattening.

I find it helpful to use a reference image of your deep-sky target. This is the best way to make sure you have not overstretched your image data, and that your colors and details are an accurate portrayal of that particular deep sky wonder. I often look for inspiration on APOD!  To stay connected with me and my latest astrophotography images, please follow my Facebook Page.  I hope you are all excited about the wonderful deep-sky targets that will be gracing our night sky the coming months, I sure am!

Related Tags