Справочник Пользователя для National Instruments IMAQ Vision for LabWindows TM /CVI

Скачать
Страница из 119
Chapter 2
Getting Measurement-Ready Images
2-10
ni.com
Lookup Tables
Apply 
lookup table
 (LUT) transformations to highlight image details in 
areas containing significant information at the expense of other areas. 
A LUT transformation converts input grayscale values in the source image 
into other grayscale values in the transformed image. IMAQ Vision 
provides four functions that directly or indirectly apply lookup tables to 
images. 
imaqMathTransform()
—Converts the pixel values of an image 
by eplacing them with values from a predefined lookup table. 
IMAQ Vision has seven predefined lookup tables based on 
mathematical transformations. For more information about these 
lookup tables, refer to Chapter 5, Image Processing, of the IMAQ 
Vision Concepts Manual
.
imaqLookup()
—Converts the pixel values of an image by replacing 
them with values from a user-defined lookup table.
imaqEqualize()
—Distributes the grayscale values evenly within a 
given grayscale range. Use 
imaqEqualize()
 to increase the contrast 
in images containing few grayscale values.
imaqInverse()
—Inverts the pixel intensities of an image to 
compute the 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.
Filters
Filter your image when you need to improve the sharpness of transitions in 
the image or increase the overall signal-to-noise ratio of the image. You can 
choose either a lowpass or highpass filter depending on your needs.
Lowpass filters
 remove insignificant details by smoothing the image, 
removing sharp details, and smoothing the edges between the objects 
and the background. You can use 
imaqLowPass()
 or define your own 
lowpass filter with 
imaqConvolve()
 or 
imaqNthOrderFilter()
.
Highpass filters
 emphasize details, such as edges, object boundaries, 
or cracks. These details represent sharp transitions in intensity value. 
You can define your own highpass filter with 
imaqConvolve()
 or 
imaqNthOrderFilter()
, or you can use a predefined highpass filter 
with
imaqEdgeFilter()
 or 
imaqCannyEdgeFilter()
. The 
imaqEdgeFilter()
 function allows you to find edges in an image using 
predefined edge detection kernels, such as the Sobel, Prewitt, and Roberts 
kernels.