RegionsProfile Method

NI Vision for Visual Basic

RegionsProfile Method

Syntax

CWIMAQVision.RegionsProfile SourceImage, Regions, ProfileReport

Return Type

Long

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

Purpose

Calculates the profile of the pixels along the boundary of the specified regions. This method returns other information such as pixel statistics and the coordinates of the pixels along the boundary.

Remarks

This method operates on all region objects whose Active property is True.

Parameters

SourceImage As CWIMAQImage

The input source image used for calculating the profile.

Regions As CWIMAQRegions

Defines the region of interest.

ProfileReport As CWIMAQProfileReport

On return, a report object containing relevant information about the pixels along the specified boundary.

Example

Private Sub Run_Click()
    Dim profileReport As New CWIMAQProfileReport
    
    ' Find the profile on the image in Viewer1 along
    ' the boundary of the regions selected on Viewer1.
    CWIMAQVision1.RegionsProfile CWIMAQViewer1.Image, _
                                 CWIMAQViewer1.Regions, profileReport
End Sub

See Also

LineProfile2