Coping with light pollution using artificial flat field subtraction

From ScienceZero
Jump to: navigation, search

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. Vignetting makes the corners darker because of limitations of the high speed lens used.

Originalsky.jpg


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. If we manage to get one part of the picture to look good then other parts of the picture will be worse than the original.

Adjustsky.jpg


What we need to do is to subtract the sky and the vignetting before we adjust the contrast and brightness. We create an artificial flat field by replacing every pixel in the image with the median value of the pixels around it to remove the stars. Since the stars are point sources of light they add little to the median value and we are effectively left with a picture of the empty sky with vignetting, light pollution and all.

Mediansky.jpg


Then we subtract the artificial flat field from the original and adjust the brightness and contrast. We are now left with the picture of the stars with the light pollution and vignetting removed and we get many more visible stars and useful colours.

Processedsky.jpg