Removing unwanted particles, Separating touching particles, Improving particle shapes – National Instruments IMAQ Vision for LabWindows TM /CVI User Manual

Page 45

Advertising
background image

Chapter 4

Performing Particle Analysis

© National Instruments Corporation

4-3

IMAQ Vision for LabWindows/CVI User Manual

Removing Unwanted Particles

Use

imaqRejectBorder()

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

imaqSizeFilter()

to remove large or small particles that do

not interest you. You can also use the

IMAQ_ERODE

,

IMAQ_OPEN

, and

IMAQ_POPEN

methods in

imaqMorphology()

to remove small particles.

Unlike

imaqSizeFilter()

, these three operations alter the size and

shape of the remaining particles.

Use the

IMAQ_HITMISS

method of

imaqMorphology()

to locate

particular configurations of pixels, which you define with a structuring
element. Depending on the configuration of the structuring element, the

IMAQ_HITMISS

method can locate single isolated pixels, cross-shape or

longitudinal patterns, right angles along the edges of particles, and other
user-specified shapes. Refer to Chapter 9, Binary Morphology, of the
IMAQ Vision Concepts Manual for more information about structuring
elements.

If you know enough about the shape features of the particles you want to
keep, use

imaqParticleFilter2()

to filter out particles that do not

interest you.

Separating Touching Particles

Use

imaqSeparation()

or apply an erosion or an open operation

with

imaqMorphology()

to separate touching objects. The

imaqSeparation()

function is an advanced function that separates

particles without modifying their shapes. However, erosion and open
operations alter the shape of all the particles.

Note

A separation is a time-intensive operation compared to an erosion or open operation.

Consider using an erosion or open operation if speed is an issue with your application.

Improving Particle Shapes

Use

imaqFillHoles()

to fill holes in the particles. Use

imaqMorphology()

to perform a variety of operations on the particles.

You can use the

IMAQ_AUTOM

,

IMAQ_CLOSE

,

IMAQ_PCLOSE

,

IMAQ_OPEN

,

and

IMAQ_POPEN

methods to smooth the boundaries of the particles. Open

and proper-open smooth the boundaries of the particle by removing small

Advertising