Process > Background > Subtract
Note: The Subtract command should be used instead of the Correct command for all images except those of transmitted light experiments which will be used to measure optical density. For optical density applications, the Correct command should be used instead. The Correct command accounts for the fact that optical density is not a linear function of the gray scale.
For an overview of the background adjustment features, click here.
There are two methods of background subtraction:
- Flattening the background by reducing contrast among the background pixels
- Subtracting background artifacts based on a 'background' image.
The Flattening Method
This method can be used to even out backgrounds that contain the same intensities as the objects of interest. It is ideal for images that contain multiple objects of interest that are identifiable by a more or less uniform intensity range. With this method, you must tell Image-Pro the size (diameter) of the largest object of interest in the image. When either the Dark Background or Bright Background command is invoked, Image-Pro uses the size specification to auto-detect the objects of interest in the image. All pixels that are not part of an auto-detected object of interest are considered background. Image-Pro 'flattens' the background pixels by reducing the contrast between them.
The "Background" Image Method
To use this method, you need to create a “background” image. A background image contains only the background. You can produce a background image by acquiring an image with the sample removed (e.g., remove the slide from the microscope's stage) or with the optics defocused entirely.
When you subtract a background using this method, Image-Procompares the active image to the background image, and pixels deemed to be part of the background are replaced with a value close to the mean background intensity.
The algorithm is based on the following formula:
where
is a pixel value of the original image at location
(x,y);
is a pixel value of the background image at location
(x,y);
M is the average pixel value of the background image; and
is the new pixel value in the corrected image.
Subtract Menu
When you click on the Subtract tool, the Subtract menu is displayed. The options on this menu are described below.
Dark Background...: Click on this button to perform a background 'flattening' operation on an image that has bright objects of interest on a dark background. The background subtraction is performed based on the current value you have entered for Feature Size.
Bright Background...: Click on this button to perform a background 'flattening' operation on an image that has dark objects of interest on a bright background. The background subtraction is performed based on the current value you have entered for Feature Size.
Background from Points: This option allows you to click at points in the image that best represent the image's background. These points identify a set of pixels that Image-Pro can then use to calculate the intensity value to subtract from the image. When you click on this option, the following options are displayed:
- Spline/Mean/Median: Click on the option that will best represent the background to be subtracted.
- Spline: Click on this option if the background has variations in luminance that are surface-like, and you selected points at the peaks and valleys of the surface. Calculated from the points selected, this option uses a thin-plate spline to reconstruct the background surface to be subtracted.
- Mean: Click on this option to subtract a flat background image based on the mean value of the points selected.
- Median: Click on this option to subtract a flat image based on the median value of the points selected.
- Radius: Specifies the radius of the bounding circle around the points that identifies the pixels to be included in the calculation.
- Regularization: The option is only relevant when Spline is selected (see Spline/Mean/Median above). Enter a value here to control the amount of smoothing to be effected from point to point. When Regularization is 0 (Default) the exact spline interpolation is used (no smoothing).
- Create Background: Click this button to create the background and subtract it from the image based on the points you have clicked and the settings you have defined.
Feature Size: In the Feature Size spin box, enter the approximate diameter (in pixels) of the largest object of interest in your image or ROI. This value is only significant if you use the Dark Background or Bright Background command. It is used by the Background Subtract operation to distinguish objects of interest from noise in the background.
Note: When selecting a Feature Size value, it is better to estimate high rather than low. Selecting a value that is too large will increase processing time, but will not adversely affect the image. Selecting a value that is too low may produce unwanted results.
Browse: Use this button if you want to perform a background subtraction based on a background image. Clicking this button allows you to navigate to and open the image stored on your hard drive that represents the background. The background image must be the same class as the image for which it will be used to correct.
Note: If the background image is already opened in the workspace, you can bypass the Browse button to use it for background subtraction, as follows:
Make sure the image of interest is the currently active image in the Image-Pro workspace.
Click on the thumbnail of the background image in the Subtract menu.