Dear enthusiast,
I really don't believe the problem is with the binary image, and I know that the documentation is old.Please try the following code and let us know if it works for you:
Dim i As New CWIMAQImage
Dim data As New CWIMAQParticleFilterData
Dim myRange As CWIMAQRange
' Select particles that contain less than 100 pixels or
' more than 300 pixels and remove them.
data.Add
data(1).Parameter = cwimaqParticleArea myRange.Initialize 100, 300
data(1).Exclude = True
data(1).Range = myRange
' Perform the particle filter operation and
' store the result in i
CWIMAQVision1.ParticleFilter CWIMAQViewer1.Image, i, data, True
Regards,
Nestor Sanchez
Applications Engineer
National Instruments
Nestor