Effective background removal

If you have an uneven background in your image with a target that doesn’t take up most of the image, I have found a good method to remove it. My flats are sometimes not the best, probably due to the multiple pieces of glass I have between the telescope and sensor reflecting the light. This tends to give me rotational gradients that I want to remove without removing too much real data. I do this in post-processing in Gimp, just after a noise removal scheme is applied.

First, duplicate the layer. Then, open Filters -> Enhance -> Despeckle. Change the settings to what is displayed here:

This will smooth out the background as well as your object. Apply the filter. Now, pick a background color near the object, and paint the remnants of the target out of the layer.

Change the layer blend mode to “subtract.” This should greatly remove your background!