Chapter2 GettingMeasurement-Ready Images
IMAQVision for LabWindows/CVI User Manual 2-10 ni.com
transformations. Formore information about these lookup tables, see
Chapter5, ImageProcessing,intheIMAQ Vision Concepts Manual.
•imaqLookup()—Convertsthe pixel values of an image by replacing
them with valuesfrom a user-defined lookup table.
•imaqEqualize()—Distributesthe grayscale values evenly within a
givengrayscale range. Use IMAQ Equalize to increase the contrast in
imagescontaining fewgrayscale values.
•imaqInverse()—Invertsthe pixel intensities of an image to
computethe negative of the image. For example, use imaqInverse()
before applying an automatic threshold to your image if the
background pixels are brighter than the object pixels.
FiltersFilteryour image when you need to im prove the sharpness of transitions in
theimage or increase the overall signal-to-noise ratio of t he image. You can
choose either a lowpass or highpass filter depending on your needs.
Lowpassfilters remove insignificant details by smoothing the image,
removingsharp details, and smoothing the edges between the objects
and the background. Youcan use imaqLowpass() or define your own
lowpassfilter with imaqConvolve() or imaqNthOrderFilter().
Highpass filtersemphasize details, such as edges,ob ject boundaries, or
cracks.These details represent sharp transitions in intensity value. You can
defineyour own highpass filter with imaqConvolve() or
imaqNthOrderFilter(),or you can use a predefined highpass filter with
imaqEdgeFilter()or imaqCannyEdgeFilter().The
imaqEdgeFilter()function allows yo u to find edges in an image using
predefinededge detection kernels, such as the Sobel, Prewitt, and Roberts
kernels.
Convolution FilterThe imaqConvolve()function allows you to use a predefined set of
lowpass and highpass filters. Each filter is defined by a kernel of
coefficients.Use imaqGetKernel() to retrieve predefined kernels. If the
predefined kernels do not meet your needs, define your own custom filter
using a 2D array of floating point numbers.