Particle Analysis
- Updated2025-11-25
- 3 minute(s) read
This section describes conceptual information about particle analysis, including thresholding, morphology, and particle measurements.
Introduction
You can use particle analysis to detect connected regions or groupings of pixels in an image and then make selected measurements of those regions. These regions are commonly referred to as particles. A particle is a contiguous region of nonzero pixels. You can extract particles from a grayscale image by thresholding the image into background and foreground states. Zero valued pixels are in the background state, and all nonzero valued pixels are in the foreground.
Particle analysis consists of a series of processing operations and analysis functions that produce information about particles in an image. Using particle analysis, you can detect and analyze any 2D shape in an image.
When to Use
Use particle analysis when you are interested in finding particles whose spatial characteristics satisfy certain criteria. In many applications where computation is time-consuming, you can use particle filtering to eliminate particles that are of no interest based on their spatial characteristics, and keep only the relevant particles for further analysis.
You can use particle analysis to find statistical information, such as the presence of particles, their number and size, and location. This information allows you to perform many machine vision inspection tasks, such as detecting flaws on silicon wafers, detecting soldering defects on electronic boards, or web inspection applications such as finding structural defects on wood planks or detecting cracks on plastics sheets. You also can locate objects in motion control applications.
In applications where there is a significant variance in the shape or orientation of an object, particle analysis is a powerful and flexible way to search for the object. You can use a combination of the measurements obtained through particle analysis to define a feature set that uniquely defines the shape of the object.
Concepts
A typical particle analysis process scans through an entire image, detects all the particles in the image, and builds a detailed report on each particle. You can use multiple parameters such as perimeter, angle, area, and center of mass to identify and classify these particles. Using multiple parameters can be faster and more effective than pattern matching in many applications.
By using different sets of parameters, you can also uniquely identify a feature in an image. For example, you could use the area of the template particle as a criterion for removing all particles that do not match it within some tolerance. You then can perform a more refined search on the remaining particles using another list of parameter tolerances.
The following figure shows a sample list of parameters that you can obtain in a particle analysis application. The binary image in this example was obtained by thresholding the source image and removing particles that touch the border of the image. You can use these parameters to identify and classify particles. The following figure shows the values obtained for the particle enclosed in a rectangle.
To use particle analysis, first create a binary image using a thresholding process. You then can improve the binary image using morphological transformations and make measurements on the particles in the image.