Nonuniform Illumination Correction¶
Corrects for nonuniform lighting in an image.
returns Grayscale image after correction
- img - RGB or grayscale image
- ksize - Kernel size
- Corrects for nonuniform illumination for situations where there is no available background image to do background subtraction. The function corrects for nonuniform lighting by creating a background image from the original by blurring with the specified kernel size.
from plantcv import plantcv as pcv # Set global debug behavior to None (default), "print" (to file), # or "plot" (Jupyter Notebooks or X11) pcv.params.debug = "print" # Correct illumination in the image corrected_img = pcv.transform.nonuniform_illumination(img=img, ksize=31)
Image after correction