National Instruments IMAQTM Digital Camera User Manual


 
Chapter 4 Performing Particle Analysis
© National Instruments Corporation 4-3 IMAQ Vision for Visual Basic User Manual
Removing Unwanted Particles
Use CWIMAQVision.RejectBorder to remove particles that touch the
border of the image. Reject particles on the border of the image when you
suspect that the information about those particles is incomplete.
Use
CWIMAQVision.RemoveParticle to remove large or small particles
that do not interest you. You also can use the
Erode, Open, and POpen
methods in
CWIMAQVision.Morphology to remove small particles.
Unlike
CWIMAQVision.RemoveParticle, these three methods alter the
size and shape of the remaining particles.
Use the hit-miss method of
CWIMAQVision.Morphology to locate
particular configurations of pixels, which you define with a structuring
element. Depending on the configuration of the structuring element,
the hit-miss method can locate single isolated pixels, cross-shape or
longitudinal patterns, right angles along the edges of particles, and other
user-specified shapes. For more information about structuring elements,
refer to Chapter 9, Binary Morphology, of the IMAQ Vision Concepts
Manual.
If you know enough about the shape features of the particles you want to
keep, use
CWIMAQVision.ParticleFilter2 to filter out particles that
do not interest you. If you do not have enough information about the
particles you want to keep at this point in the processing, use the particle
measurement methods to obtain this information before applying a particle
filter. Refer to the Make Particle Measurements section for more
information about the measurement methods.
Separating Touching Particles
Use CWIMAQVision.Separation or apply an erosion or an open
operation with
CWIMAQVision.Morphology to separate touching
objects.
CWIMAQVision.Separation is an advanced operation that
separates particles without modifying their shapes. However, erosion and
open operations alter the shape of all the particle.
Note A separation is a time-intensive operation compared to an erosion or open operation.
Consider using an erosion if speed is an issue with the application.