A machine-vision system that provides quick changing and/or automatic
adjustment of illumination angle, dispersion, intensity, and/or color of
illumination. One such system includes a light source emitting polarized
light, a machine-vision imager, an image processor operative to generate
a quality parameter based on an image, and one or more of the means
described above for selectively directing the light in a predetermined
pattern based on its polarization and based on the quality parameter of
the image. Some embodiments include an imager, a controllable light
source, first and second optical elements that selectively direct light
in first and second patterns, and a controller controlling the light
characteristics using the first and/or second light patterns. One method
includes setting one or more illumination parameters, illuminating the
object based on the illumination parameters, obtaining an image,
generating a quality parameter of a region of interest, and iterating
using a different illumination parameters.