After examining the example a bit more, I found that it was not using the mest AutoThreshold for the job, which was causing a misformed particle. If you edit the code to look like this:
'Perform the operation only if an image has been loaded
If CWIMAQViewer1.Image.Width > 0 Then
'Automatic threshold of the image
CWIMAQVision1.AutoThreshold CWIMAQViewer1.Image, CWIMAQViewer1.Image, 2, cwimaqATMethodMetric
CWIMAQViewer1.Palette.Type = cwimaqPaletteBinary
'Extraction of shape descriptors
CWIMAQVision1.ParticleMeasurement CWIMAQViewer1.Image, cwimaqMeasurementHeywoodCircularityFactor, HeywoodArray
CWIMAQVision1.ParticleMeasurement CWIMAQViewer1.Image, cwimaqMeasurementCenterMassX, CenterXArray
CWIMAQVision1.ParticleMeasurement CWIMAQViewer1.Image, cwimaqMeasurementCenterMassY, CenterYArray
I believe you will be more pleased with the results.
Regarding your application, you should try visually inspecting the binary image to make sure that all of your particles are well formed. If they aren't, you could try different methods of AutoThresholding, or various binary morphology operations like convex hull of filling holes. See the IMAQ Vision Concepts Manual for more information.
If you upgrade to the new version of IMAQ Vision, it will work with your current copy of VB.
Hope that helps,
Kevin
National Instruments
Vision Algorithms