imaqParticleFilter
Usage
int imaqParticleFilter(Image* dest, Image* source, const ParticleFilterCriteria* criteria, int criteriaCount, int rejectMatches, int connectivity8);
Purpose
Filters particles based on their morphological measurements.
Note This function is obsolete. The replacement function is imaqParticleFilter2(). |
Image Types Supported
IMAQ_IMAGE_U8
Parameters
Name
|
Type
|
Description
|
---|---|---|
dest | Image* | The destination image. |
source | Image* | The image on which to perform the particle filter. The calculation modifies the border of the source image. The border must be at least one pixel wide if you use connectivity-4 or two pixels wide if you use connectivity-8. |
criteria | const ParticleFilterCriteria* | The array of criteria for the filter. This parameter is required and cannot be NULL. |
criteriaCount | int | Specifies the number of entries in the criteria array. |
rejectMatches | int | Set this parameter to TRUE to transfer only those particles that do not meet all the criteria. Set this parameter to FALSE to transfer only those particles that meet all the criteria to the destination. |
connectivity8 | int | Set this parameter to TRUE to use connectivity-8 to determine whether particles are touching. Set this parameter to FALSE to use connectivity-4 to determine whether particles are touching. For more information about connectivity, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual. |
Return Value
Type |
Description |
---|---|
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). |
Parameter Discussion
source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.