Graphic CCD Imaging Primer
Imaging Made Easy and Fun!

Synthetic Flat Fields with Corel PhotoPaint 9
Before
Before (image courtesy Dean Schwartzenberg)
After
After (click for full-size version)

We've all had problems with uneven backgrounds/gradients in images. Flat fields have been the traditional answer to this problem. If you didn't do a flat field though, it is possible to build a fake one thanks to the power of today's image processing software!

Notes

One example of artificially flattening images with PhotoShop can be found here. Another can be found here. (You can use Google to find others: do a search on "artificial flat field".)

Steps

1. Open the image.

2. Make a copy of the image (press copy button) Copy button

3. Paste the copy as a new document (using Edit / Paste / As New Document). The copy will be used to make a mask for the original image.

Edit Menu

4. Mask the stars and deep sky objects in the image. Create a colour mask (Mask/Color Mask).

We just want to mask the stars and most of the extent of the deep sky objects in the image.

Colour Mask Menu

4A. Turn off the marquee button in the colour mask dialog.
Marquee OFF

Mask Preview

4B. Click the eyedropper tool in the colour mask dialog.
Eyedropper ON

4C. Click on the center of a bright star in the image.

4D. Set the "N" value in the Color Mask dialog to 80.

4E. Click the marquee button.
Marquee ON

4F. You should now have a mask that looks something like that below. Click the OK button to apply the mask.

Mask Preview

Now we want to paint everything in the mask (stars, galaxies, etc.) black.

Eyedropper tool

5A. Select the eye dropper tool from the toolbar and click on the darkest area of the background in the image.

Paintbrush tool

5B. Select the paint tool from the toolbar.

Paint brush size

5C. Adjust the brush size to be fairly large (say 100 pixels or more).
Paint over the entire image (the mask will protect most of it).

Mask Menu

5D. Now remove the mask (Mask/Remove Mask)

Now you should have something like at right. This is the background with most of the bright foreground stuff knocked out. If we apply this as a mask to the original image though, it will not only remove the gradient (good) it will remove the fainter parts of the deep sky objects (bad).

Galaxies partially eliminated.

6. So, we need to repeat our mask and paint out the peripheral areas of the deep sky objects in the image. These areas are shown masked at right.

Galaxy peripheries masked.

The "N" mask value should be very small here (see the mask dialog pictured below). This is where the rubber meets the road! If this part is well-done, then the final result will be good.

2nd Colour Mask Settings

7. Now that all traces of the galaxies have been wiped out, we are ready to proceed (don't forget to remove your last mask!). Often, doing a Gaussian blur at this point is helpful to smooth out our mask image (in the Effect/Blur submenu). Simply copy the painted image and paste it into the original image as an object. This can be done as a regular "ctrl-v" paste or from the Paste submenu as shown at right.

Past Submenu

Of course, when you do your paste PP doesn't drop the new object exactly at the top left of the image. Use the Transform toolbar to move the new object to coordinates (0,0).

Transform Toolbar

8A. Now that we have pasted our mask onto the original image, we need to blend the two together. Open the "Objects" Docker by clicking on it. If the Objects Docker is not visible, press Ctrl-F7 or open it from the Window/Dockers submenu.

Objects Docker

8B. Choose "Difference" as the merge mode. Then choose the percentage by using the slider. Experimentation will allow you to determine the best percentage to use (undo is very handy here!).

Merge Mode

8C. When you finally have a result you are happy with, flatten the image using the menu shown at right. Now you can save the image in any format.

Combine submenu