An ImageJ Plugin that computes the background of a grayscale image by adjusting a polynomial surface to the values of background pixels. An overview of a typical worflow is presented below.
Follow the steps:
- Download the latest release, and place it into the "plugins" directory of the current ImageJ/Fiji installation
- Restart ImageJ/Fiji
- A new menu appears in "Plugins > IJ Tools > Vignetting > Fit Background..."
- ImageJ
- JUnit
- Jama (Java Matrix Library)
A typical workflow is as follow:
-
Open the image to process
-
duplicate, and apply a threshold method that will select the foreground. Any other binarisation method can be applied. The segmentation does not need to be perfect.
-
Run the "Fit Background..." plugin, and adjust the following options:
- image is the image to process
- mask if the binary image corresponding to the foreground
- max degree is the maximum degree of the polynomial surface. A degree equal to 1 corresponds to fitting a plane. Values of 2 or 3 usually already provide acceptable results.
- sampling step: when the image is large, it is possible to reduce the number of pixels to consider for computing the fit. The value corresponds to the step between two pixel in each direction (a step value 3 will consider only one pixel in a 3x3 region).
The result image is an estimation of the background value. It can be later used to normalise the input image, or to apply inpainting to specific regions.
