ParticleMeasurement Method

NI Vision for Visual Basic

ParticleMeasurement Method

Syntax

CWIMAQVision.ParticleMeasurement SourceImage, MeasurementType, MeasurementsArray [, Calibrated = False] [, Connectivity8 = True]

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Takes a measurement on all particles in a binary image.

Remarks

This method modifies the source image. If you need the original source image, create a copy of the image using the CWIMAQVision.Copy method before using this method.

Use this method with U8, I16 and SGL images.

Parameters

SourceImage As CWIMAQImage

The image on which to get information about the particles.

MeasurementType As CWIMAQMeasurementTypes

The type of measurement to take.

MeasurementsArray As Variant

On return, the value of the measurement on each particle in the image.

Calibrated As Variant

[Optional] Whether to take calibrated measurements on the particles in the image.

This parameter has a default value of False.

Connectivity8 As Variant

[Optional] 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, refer to the NI Vision Concepts Manual.

This parameter has a default value of True.

See Also

Threshold

ParticleReport