National Instruments IMAQTM Benutzerhandbuch

Seite von 121
Chapter 2
Getting Measurement-Ready Images
2-10
ni.com
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 
CWIMAQVision.Convolute
 
or 
CWIMAQVision.NthOrder
, or you can use a predefined highpass 
filter with 
CWIMAQVision.EdgeFilter
 or 
CWIMAQVision.CannyEdgeFilter
CWIMAQVision.EdgeFilter
 
allows you to find edges in an image using predefined edge detection 
kernels, such as the Sobel, Prewitt, and Roberts kernels.
Convolution Filter
CWIMAQVision.Convolute
 allows you to use a predefined set of 
lowpass and highpass filters. Each filter is defined by a kernel of 
coefficients. Use the CWIMAQKernel object to define the filter. Use 
CWIMAQKernel.LoadKernel
 to load a predefined kernel into the 
object. If the predefined kernels do not meet your needs, use the 
CWIMAQKernel.SetSize
 method to set the size of the kernel and the 
CWIMAQKernel.Element
 property to set the data in the kernel.
Nth Order Filter
CWIMAQVision.NthOrder
 allows you to define a lowpass or highpass 
filter depending on the value of N that you choose. One specific Nth order 
filter, the median filter, removes speckle noise, which appears as small 
black and white dots. For more information about Nth order filters, refer to 
Chapter 5, Image Processing, of the IMAQ Vision Concepts Manual.
Grayscale Morphology
Perform grayscale morphology when you want to filter grayscale 
features of an image. Grayscale morphology helps you remove or 
enhance isolated features, such as bright pixels on a dark background. 
Use these transformations on a grayscale image to enhance non-distinct 
features before thresholding the image in preparation for particle analysis.
Grayscale morphological transformations, which include erosions and 
dilations, compare a pixel to those pixels that surround it. An erosion keeps 
the smallest pixel values. A dilation keeps the largest pixel values.
For more information about grayscale morphology transformations, refer 
to Chapter 5, Image Processing, of the IMAQ Vision Concepts Manual.