Filters, Convolution filter, Filters -10 – National Instruments IMAQ Vision for Measurement Studio User Manual

Page 23: Convolution filter -10

Advertising
background image

Chapter 2

Getting Measurement-Ready Images

IMAQ Vision for LabWindows/CVI User Manual

2-10

ni.com

transformations. For more information about these lookup tables, see
Chapter 5, Image Processing, in 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 IMAQ Equalize 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.

Convolution Filter

The

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.

Advertising