Subtraction of light polluted skies and vignetting from star-images

Bjørn, Fri Sept 15 2006, 09:17PM

This is a simple and probably very old trick but it is quite useful to know.


This is the original picture, not many stars are visible and the colour is bad.
1158353852 27 FT1630 Original


This is what we get if we try to adjust the brightness and contrast, since the light pollution and vignetting is uneven it is hopeless to get a good result.
1158353852 27 FT1630 Adjust


What we need to do is to subtract the sky and the vignetting before we adjust the contrast and brightness. We do that by replacing every pixel in the image with the median of the pixels around it to remove the stars.
1158353852 27 FT1630 Median


Then we subtract that from the original and adjust the brightness and contrast. Now we get many more more stars and useful colours.
1158353852 27 FT1630 Processed
Re: Subtraction of light polluted skies and vignetting from star-images
HV Enthusiast, Fri Sept 15 2006, 10:16PM

Yep, this is known as creating an "artificial flat." In fact there are many advanced programs out there (mostly free) that will do this for you with great results. They mostly were developed for microscopic type work, but work equally well in this application.

You can also get much better results by creating a true flat. Easy way to do this is to take a photo (exposing so histogram is centered) of a uniform section of white wall (in your home) or of the sky just prior to dark, and then use this as a master flat frame.

Here is an photo (unfinished at this time) that I was working on last year. There was a huge light pollution gradient which I spent a lot of time removing (manually) by using an artificial gradient mask. The sky came out really nice and it worked very well, but my mask was quick and dirty so the trees look a bit rough from the processing.


1158358561 15 FT16149 Dipper01

1158358561 15 FT16149 Dipper02
Re: Subtraction of light polluted skies and vignetting from star-images
AndrewM, Sat Sept 16 2006, 12:40AM

why would you want to take a photo of the wall, why not just make a uniformly white picture on the computer? to reduce CCD noise? If so, that doesn't seem to be what bjorn is getting at.
Re: Subtraction of light polluted skies and vignetting from star-images
Bjørn, Sat Sept 16 2006, 01:36AM

Subtracting a picture of something flat will remove the vignetting from the lens where it is darker in the corners. It will not help so much for the CCD or CMOS sensor noise because you need to use the same exposure length and same temperature to get a good effect.

Most good cameras can do dark field subtraction with great results by automatically subtracting a second picture taken with the shutter closed. The downside is that it takes twice as long so in some cases it is better to do it manually.
Re: Subtraction of light polluted skies and vignetting from star-images
AndrewM, Sat Sept 16 2006, 01:51AM

ah, gotcha...
Re: Subtraction of light polluted skies and vignetting from star-images
HV Enthusiast, Sat Sept 16 2006, 03:29AM

wrote ...

Most good cameras can do dark field subtraction with great results by automatically subtracting a second picture taken with the shutter closed. The downside is that it takes twice as long so in some cases it is better to do it manually.

And especially when doing astrophotography when good imaging nights are far and few between, you don't want to waste half your night with the in camera dark field subtration / reduction routine.

I'll usually shoot my darks on different nights (with same temperature, exposure length), or merely shoot them (usually 5-10 which are averaged) while i'm packing up for the night or on the drive home. Plus, i now have a library of various darks over different exposures / temperatures which I use instead of taking new ones.

Also, some programs, such as Images Plus have the capability to perform Synthetic Dark frames and adaptive dark frame algorithms.

All this talk has got me excited to go out and do some more imaging. I missed last winter due to my Tesla activities, but i want to get out and re-image M42 and the Horsehead nebula using my new Canon 20Da camera.

I'll leave you with one of my favorite objects in the sky, the Double Cluster. Definitely a beautiful gem in the sky!

1158377342 15 FT16149 Doublecluster01