Detect Objects Concepts

NI Vision Builder

Check for Presence Locate Features Tab

Detect Objects Concepts

The Detect Objects step is based on a technique called particle analysis. A particle is an area of touching pixels with the same logical state. All pixels in an image that belong to a particle are in a foreground state. All other pixels are in a background state. In a binary image, pixels in the background have values equal to zero while every nonzero pixel is part of a particle.

You can use particle analysis to detect particles in an image and make selected measurements of those particles. Particle analysis consists of a series of processing operations and analysis functions that produce information about any two-dimensional shape in an image.

Thresholding

Thresholding enables you to select ranges of pixel values in grayscale and color images that separate the objects under consideration from the background. Thresholding converts an image into a binary image, with pixel values of 0 or 1. This process works by setting to 1 all pixels whose value falls within a certain range, called the threshold interval, and setting all other pixel values in the image to 0. Figure 1a shows a grayscale image, and Figure 1b shows the same image after thresholding.

Figure 1

Binary Morphology

Because thresholding is a subjective process, the resulting binary image may contain unwanted information, such as noise particles, particles touching the border of images, particles touching each other, and particles with uneven borders. By affecting the shape of particles, morphological functions can remove this unwanted information, thus improving the information in the binary image.