National Instruments IMAQ Vision for LabWindows TM /CVI Network Card User Manual


 
Chapter 3 Making Grayscale and Color Measurements
© National Instruments Corporation 3-7 IMAQ Vision for LabWindows/CVI User Manual
or a labeled version of the binary image as a mask image to the intensity
measurement function. If you want to make color comparisons, convert the
binary image into an ROI descriptor using
imaqMaskToROI().
Measure Grayscale Statistics
You can measure grayscale statistics in images using light meters or
quantitative analysis functions. You can obtain the center of energy for
an image with the centroid function.
Use
imaqLightMeterPoint() to measure the light intensity at a
point in the image. Use
imaqLightMeterLine() to get pixel value
statistics along a line in the image, such as mean intensity,
standard deviation, minimum intensity, and maximum intensity.
Use
imaqLightMeterRect() to get the pixel value statistics within
a rectangular region in an image.
Use
imaqQuantify() to obtain the following statistics about the entire
image or individual regions in the image: mean intensity, standard
deviation, minimum intensity, maximum intensity, area, and the percentage
of the image that you analyzed. You can specify regions in the image with
a labeled image mask. A labeled image mask is a binary image that has
been processed so that each region in the image mask has a unique intensity
value. Use
imaqLabel2() to label your image mask.
Use
imaqCentroid() to compute the energy center of the image, or of a
region within an image.
Measure Color Statistics
Most image processing and analysis functions apply to 8-bit images.
However, you can analyze and process individual components of a color
image.
Using
imaqExtractColorPlanes(), you can break down a color image
into various sets of primary components, such as RGB (Red, Green, and
Blue), HSI (Hue, Saturation, and Intensity), HSL (Hue, Saturation, and
Luminance), or HSV (Hue, Saturation, and Value). Each component
becomes an 8-bit or 16-bit image that you can process like any other
grayscale image. Using
imaqReplaceColorPlanes(), you can
reassemble a color image from a set of three 8-bit or 16-bit images, where
each image becomes one of the three primary components. Figures 3-4
and 3-5 illustrate how a color image breaks down into its three primary
components.