User`s guide
Correcting for Nonuniform Illumination
Correcting for Nonuniform Illumination
Global threshold techniques, which areoftenthefirststepinobject
measurement, cannot be applied to unevenly illuminated images. To correct
this problem, you can change the lighting conditions and take another picture,
or you can use morphological operators to even out the lighting in the image.
Once you have corrected for nonuniform illumination, you can pick a global
threshold that delineates every object from the background. In this topic, you
use the Opening block to correct for uneven lighting in an intensity image:
1 Define an intensity image in the MATLAB workspace. To read in an
intensity image from a PNG file, at the M ATLAB command prom pt, type
I= imread('rice.png');
I is a 256-by-256 matrix of 8-bit unsigned integer values.
2 To view the image this matrix represents, at the MATLAB command
prompt, type
imshow(I)
6-11