BrightnessEqualize
BrightnessEqualize[image]
adjusts the brightness across image, correcting uneven illumination.
BrightnessEqualize[image,flatfield]
uses the correction model given by flatfield, which models the variation in brightness across image.
BrightnessEqualize[image,flatfield,darkfield]
uses the dark environment model given by darkfield.
Details and Options
- Local brightness adjustment is also known as flat fielding, and is used for removing image artifacts caused by nonuniform lighting or variations in sensor sensitivities.
- BrightnessEqualize works with arbitrary 2D and 3D images, adjusting the lightness channel in the LABColor space.
- A flatfield image is an image of a homogeneous signal like a plain well-lit white background. A darkfield is the same image obtained without lighting. The flat fielding of an image with an object in the same setting is given by .
- Possible settings for either flatfield or darkfield include:
-
val a constant value val corrimage a correction image (rescaled to the image dimensions) {scope,model} fit the data into a given model - The default flatfield consists of a 2nd order polynomial fit. The default darkfield is assumed to be 0.
- Using {scope,model}, the flatfield or darkfield is estimated by fitting a function.
- The scope parameter specifies whether to fit the entire image data or the image projections along each axis. Possible settings include:
-
"Global" fit the entire image to the model "Marginal" separately fit model to the projections along each axis - The model can be one of the following:
-
n an n-degree polynomial f,params,vars an arbitrary model f with parameters params and variables vars - The following options are available:
-
Masking Automatic the regions to use for model estimation PerformanceGoal Automatic aspects of performance to try to optimize - Using Masking->Automatic, over- and underexposed pixels are not used for the adjustment.
- With partially transparent images, the alpha channel is multiplied with the mask.
Examples
open allclose allScope (7)
Data (3)
Parameters (4)
Remove uneven illumination in a microscopy image by estimating the brightness distribution:
Fitting a multivariate polynomial of first order on the entire image domain:
Using a second-order polynomial:
Fitting second-order univariate polynomials to the image marginals in each direction:
Remove a vignette effect by fitting the lightness channel to a given model:
Assuming a rotationally symmetric, radial-dependent vignette:
Perform a subtractive correction on an astronomical image by estimating the dark field:
Options (1)
Applications (7)
Achieve a constant luminosity of the Moon surface:
Equalize brightness of a microscopy image:
Equalize brightness distribution assuming a homogeneous background:
Equalize color distribution by handling each channel separately:
Remove uneven illumination from a scanned document:
Create a mask to omit text in the subsequent equilibration:
Equalize brightness distribution fitting a sixth-order polynomial:
This improves the text recognition result:
Equalize the brightness distribution without a mask applying a horizontal fit:
This also improves the text recognition result:
Reduce the vignette effect of a photograph:
Compute a mask for the background that is expected to have even illumination:
Remove CCD artifacts from an image taken by a low-quality camera with many pixel defects.
Flat-field image of the camera:
Microscopy image of a tear drop:
Correct uneven illumination in an MR scan:
Use only muscle tissue for brightness estimation:
Correct uneven brightness in a 3D magnetic resonance volume:
Note the reduced brightness toward the perimeter of the volume:
Select the muscle tissue to estimate the brightness distribution:
Estimate the brightness distribution by a polynomial in cylindrical coordinates of even orders up to 4:
Compare the initial volume and the result with equalized brightness:
Text
Wolfram Research (2017), BrightnessEqualize, Wolfram Language function, https://reference.wolfram.com/language/ref/BrightnessEqualize.html.
CMS
Wolfram Language. 2017. "BrightnessEqualize." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BrightnessEqualize.html.
APA
Wolfram Language. (2017). BrightnessEqualize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BrightnessEqualize.html