IMAQ Detect Shapes VI

LabView NI Vision

IMAQ Detect Shapes VI

Owning Palette: Searching and MatchingInstalled With: NI Vision Development Module

Searches for rectangles, lines, ellipses, or circles in an image.

Use the pull-down menu to select an instance of this VI.

IMAQ Detect Circles

Searches for circles in an image.

IMAQ Detect Circles

ccclst.gif

ROI Descriptor is the descriptor that defines the rectangle or rotated rectangle within which to detect shapes.

c1di32.gif

Global Rectangle contains the coordinates of the bounding rectangle.

c1dcclst.gif

Contours are each of the individual shapes that define an ROI.

cenum.gif

ID refers to whether the contour is the external or internal edge of an ROI.

cu32.gif

Type is the shape type of the contour.

c1di32.gif

Coordinates indicates the relative position of the contour.

cgenclasstagrefflat.gif

Image is a reference to the image in which you want to search.

cnclst.gif

Circle Descriptor specifies the sizes of circles to detect.

cdbl.gif

Min Radius specifies the minimum radius describing the circles to detect.

cdbl.gif

Max Radius specifies the maximum radius describing the circles to detect.

ccclst.gif

Match Options are the match options used when detecting shapes.

cbool.gif

Rotation specifies whether or not to search for rotated versions of the shape.

cbool.gif

Scale specifies whether or not to search for scaled versions of the shape.

cbool.gif

Occlusion specifies whether or not to search for occluded versions of the shape.

c1dnclst.gif

Range Settings is an array that specifies the allowable ranges for rotation and scale.

cu32.gif

Match Constraints specifies the match option whose values you want to constrain by the given range. The following options are available:

Rotation Angle (degrees) (0)

Set a range for this option to specify the angles at which you expect the VI to find template matches in the inspection image. The VI ignores this range if the Rotation is not enabled.

Scale Factor (%) (1)

Set a range for this option to specify the sizes at which you expect the VI to find template matches in the inspection image. The size is expressed as the following percentage: the size of the match divided by size of the template image, multiplied by 100. The VI ignores this range if the Scale is not enabled.

Occlusion (%) (2)

Set a range for this option to specify the amount of occlusion you expect for a match in the inspection image. NI Vision can accurately detect matches that have up to 50% occlusion. The VI ignores this range if the Occlusion is not enabled.

cdbl.gif

Min is the minimum value of the range for a given Match Constraint.

cdbl.gif

Max is the maximum value of the range for a given Match Constraint.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

ccclst.gif

Curve Parameters contains information about how curves are extracted from the inspection image during the match phase.

cu32.gif

Extraction Mode specifies how the VI identifies curves in the image. Choose from the following options:

Normal (0)

(Default) Select Normal if you want the VI to make no assumptions about the uniformity of objects in the image or the image background.

Uniform Regions (1)

Select Uniform Regions if you want the VI to assume that either the objects in the image or the image background consist of uniform pixel values. This allows the VI to more accurately calculate the external curves of the objects.

ci32.gif

Edge Threshold specifies the minimum contrast a seed point must have for it to be begin a curve. Valid values range from 1 to 360. The default value is 75.

cu32.gif

Edge Filter Size specifies the width of the edge filter that the VI uses to identify curves in the image. The following options are available:

Fine (0)

Sets the Edge Filter Size to fine.

Normal (1)

(Default) Sets the Edge Filter Size to normal.

ci32.gif

Min Length specifies the length, in pixels, of the smallest curve that you want the VI to identify. The VI ignores any curves that have a length less than this value. The default value is 25.

ci32.gif

Row Search Step Size specifies the distance, in the y direction, between the image rows that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

ci32.gif

Col Search Step Size specifies the distance, in the x direction, between the image columns that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

ci32.gif

Max Endpoint Gap specifies the maximum gap, in pixels, between the endpoints of a curve that the VI identifies as a closed curve. If the gap is larger than this value, the VI identifies the curve as an open curve. The default value is 10.

cbool.gif

Closed specifies whether to identify only closed curves in the image. The default value is FALSE, which specifies that the VI should identify both open and closed curves.

cbool.gif

Subpixel is ignored by the VI.

cdbl.gif

Minimum match score is the minimum score a returned shape can have.

i1dcclst.gif

Circles is an array of circle clusters that describe each found circle.

inclst.gif

Position is the coordinates of the found circle center.

idbl.gif

Radius is the radius of the found circle.

idbl.gif

Score is the score of the found circle. Values range from 0 to 1000, where 1000 represents a perfect match.

ii32.gif

Number of Matches Returned is the number of matches found.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Detect Ellipses

Searches for ellipses in an image.

IMAQ Detect Ellipses

ccclst.gif

ROI Descriptor is the descriptor that defines the rectangle or rotated rectangle within which to detect shapes.

c1di32.gif

Global Rectangle contains the coordinates of the bounding rectangle.

c1dcclst.gif

Contours are each of the individual shapes that define an ROI.

cenum.gif

ID refers to whether the contour is the external or internal edge of an ROI.

cu32.gif

Type is the shape type of the contour.

c1di32.gif

Coordinates indicates the relative position of the contour.

cgenclasstagrefflat.gif

Image is a reference to the image in which you want to search.

cnclst.gif

Ellipse Descriptor specifies the sizes of ellipses to detect.

cdbl.gif

Min Major Radius specifies the minimum length of the semi-major axis describing the ellipses to detect.

cdbl.gif

Max Major Radius specifies the maximum length of the semi-major axis describing the ellipses to detect.

cdbl.gif

Min Minor Radius specifies the minimum length of the semi-minor axis describing the ellipses to detect.

cdbl.gif

Max Minor Radius specifies the maximum length of the semi-minor axis describing the ellipses to detect.

ccclst.gif

Match Options are the match options used when detecting shapes.

cbool.gif

Rotation specifies whether or not to search for rotated versions of the shape.

cbool.gif

Scale specifies whether or not to search for scaled versions of the shape.

cbool.gif

Occlusion specifies whether or not to search for occluded versions of the shape.

c1dnclst.gif

Range Settings is an array that specifies the allowable ranges for rotation and scale.

cu32.gif

Match Constraints specifies the match option whose values you want to constrain by the given range. The following options are available:

Rotation Angle (degrees) (0)

Set a range for this option to specify the angles at which you expect the VI to find template matches in the inspection image. The VI ignores this range if the Rotation is not enabled.

Scale Factor (%) (1)

Set a range for this option to specify the sizes at which you expect the VI to find template matches in the inspection image. The size is expressed as the following percentage: the size of the match divided by size of the template image, multiplied by 100. The VI ignores this range if the Scale is not enabled.

Occlusion (%) (2)

Set a range for this option to specify the amount of occlusion you expect for a match in the inspection image. NI Vision can accurately detect matches that have up to 50% occlusion. The VI ignores this range if the Occlusion is not enabled.

cdbl.gif

Min is the minimum value of the range for a given Match Constraint.

cdbl.gif

Max is the maximum value of the range for a given Match Constraint.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

ccclst.gif

Curve Parameters contains information about how curves are extracted from the inspection image during the match phase.

cu32.gif

Extraction Mode specifies how the VI identifies curves in the image. Choose from the following options:

Normal (0)

(Default) Select Normal if you want the VI to make no assumptions about the uniformity of objects in the image or the image background.

Uniform Regions (1)

Select Uniform Regions if you want the VI to assume that either the objects in the image or the image background consist of uniform pixel values. This allows the VI to more accurately calculate the external curves of the objects.

ci32.gif

Edge Threshold specifies the minimum contrast a seed point must have for it to be begin a curve. Valid values range from 1 to 360. The default value is 75.

cu32.gif

Edge Filter Size specifies the width of the edge filter that the VI uses to identify curves in the image. The following options are available:

Fine (0)

Sets the Edge Filter Size to fine.

Normal (1)

(Default) Sets the Edge Filter Size to normal.

ci32.gif

Min Length specifies the length, in pixels, of the smallest curve that you want the VI to identify. The VI ignores any curves that have a length less than this value. The default value is 25.

ci32.gif

Row Search Step Size specifies the distance, in the y direction, between the image rows that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

ci32.gif

Col Search Step Size specifies the distance, in the x direction, between the image columns that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

ci32.gif

Max Endpoint Gap specifies the maximum gap, in pixels, between the endpoints of a curve that the VI identifies as a closed curve. If the gap is larger than this value, the VI identifies the curve as an open curve. The default value is 10.

cbool.gif

Closed specifies whether to identify only closed curves in the image. The default value is FALSE, which specifies that the VI should identify both open and closed curves.

cbool.gif

Subpixel is ignored by the VI.

cdbl.gif

Minimum match score is the minimum score a returned shape can have.

i1dcclst.gif

Ellipses is an array of ellipse clusters that describe each found ellipse.

inclst.gif

Position are the coordinates of the found ellipse center.

idbl.gif

Angle is the orientation of the major axis with respect to the horizontal.

idbl.gif

Major Radius is the length of the semi-major axis.

idbl.gif

Minor Radius is the length of the semi-minor axis.

idbl.gif

Score is the score of the found ellipse. Values range from 0 to 1000, where 1000 represents a perfect match.

ii32.gif

Number of Matches Returned is the number of matches found.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Detect Lines

Searches for lines in an image.

IMAQ Detect Lines

ccclst.gif

ROI Descriptor is the descriptor that defines the rectangle or rotated rectangle within which to detect shapes.

c1di32.gif

Global Rectangle contains the coordinates of the bounding rectangle.

c1dcclst.gif

Contours are each of the individual shapes that define an ROI.

cenum.gif

ID refers to whether the contour is the external or internal edge of an ROI.

cu32.gif

Type is the shape type of the contour.

c1di32.gif

Coordinates indicates the relative position of the contour.

cgenclasstagrefflat.gif

Image is a reference to the image in which you want to search.

cnclst.gif

Line Descriptor specifies the lengths of lines to detect.

cdbl.gif

Min Length specifies the minimum length of the described line.

cdbl.gif

Max Length specifies maximum length of the described line.

ccclst.gif

Match Options are the match options used when detecting shapes.

cbool.gif

Rotation specifies whether or not to search for rotated versions of the shape.

cbool.gif

Scale specifies whether or not to search for scaled versions of the shape.

cbool.gif

Occlusion specifies whether or not to search for occluded versions of the shape.

c1dnclst.gif

Range Settings is an array that specifies the allowable ranges for rotation and scale.

cu32.gif

Match Constraints specifies the match option whose values you want to constrain by the given range. The following options are available:

Rotation Angle (degrees) (0)

Set a range for this option to specify the angles at which you expect the VI to find template matches in the inspection image. The VI ignores this range if the Rotation is not enabled.

Scale Factor (%) (1)

Set a range for this option to specify the sizes at which you expect the VI to find template matches in the inspection image. The size is expressed as the following percentage: the size of the match divided by size of the template image, multiplied by 100. The VI ignores this range if the Scale is not enabled.

Occlusion (%) (2)

Set a range for this option to specify the amount of occlusion you expect for a match in the inspection image. NI Vision can accurately detect matches that have up to 50% occlusion. The VI ignores this range if the Occlusion is not enabled.

cdbl.gif

Min is the minimum value of the range for a given Match Constraint.

cdbl.gif

Max is the maximum value of the range for a given Match Constraint.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

ccclst.gif

Curve Parameters contains information about how curves are extracted from the inspection image during the match phase.

cu32.gif

Extraction Mode specifies how the VI identifies curves in the image. Choose from the following options:

Normal (0)

(Default) Select Normal if you want the VI to make no assumptions about the uniformity of objects in the image or the image background.

Uniform Regions (1)

Select Uniform Regions if you want the VI to assume that either the objects in the image or the image background consist of uniform pixel values. This allows the VI to more accurately calculate the external curves of the objects.

ci32.gif

Edge Threshold specifies the minimum contrast a seed point must have for it to be begin a curve. Valid values range from 1 to 360. The default value is 75.

cu32.gif

Edge Filter Size specifies the width of the edge filter that the VI uses to identify curves in the image. The following options are available:

Fine (0)

Sets the Edge Filter Size to fine.

Normal (1)

(Default) Sets the Edge Filter Size to normal.

ci32.gif

Min Length specifies the length, in pixels, of the smallest curve that you want the VI to identify. The VI ignores any curves that have a length less than this value. The default value is 25.

ci32.gif

Row Search Step Size specifies the distance, in the y direction, between the image rows that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

ci32.gif

Col Search Step Size specifies the distance, in the x direction, between the image columns that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

ci32.gif

Max Endpoint Gap specifies the maximum gap, in pixels, between the endpoints of a curve that the VI identifies as a closed curve. If the gap is larger than this value, the VI identifies the curve as an open curve. The default value is 10.

cbool.gif

Closed specifies whether to identify only closed curves in the image. The default value is FALSE, which specifies that the VI should identify both open and closed curves.

cbool.gif

Subpixel is ignored by the VI.

cdbl.gif

Minimum match score is the minimum score a returned shape can have.

i1dcclst.gif

Lines is an array of line clusters that describe each found line.

inclst.gif

Start Point The starting point of the line.

inclst.gif

End Point The ending point of the line.

idbl.gif

Length The length of the line measured in pixels from the start point to the end point.

idbl.gif

Angle The orientation of the line with respect to the horizontal.

idbl.gif

Score is the score of the found line. Values range from 0 to 1000, where 1000 represents a perfect match.

ii32.gif

Number of Matches Returned is the number of matches found.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Detect Rectangles

Searches for rectangles in an image.

IMAQ Detect Rectangles

ccclst.gif

ROI Descriptor is the descriptor that defines the rectangle or rotated rectangle within which to detect shapes.

c1di32.gif

Global Rectangle contains the coordinates of the bounding rectangle.

c1dcclst.gif

Contours are each of the individual shapes that define an ROI.

cenum.gif

ID refers to whether the contour is the external or internal edge of an ROI.

cu32.gif

Type is the shape type of the contour.

c1di32.gif

Coordinates indicates the relative position of the contour.

cgenclasstagrefflat.gif

Image is a reference to the image in which you want to search.

cnclst.gif

Rectangle Descriptor specifies the sizes of rectangles to detect.

Note   Width is defined as the length of the shorter side of a rectangle and height is defined as the longer side of the rectangle you want to search for.
cdbl.gif

Min Width is the minimum width describing the rectangles to detect.

cdbl.gif

Max Width is the maximum width describing the rectangles to detect.

cdbl.gif

Min Height is the minimum height describing the rectangles to detect.

cdbl.gif

Max Height is the maximum height describing the rectangles to detect.

ccclst.gif

Match Options are the match options used when detecting shapes.

cbool.gif

Rotation specifies whether or not to search for rotated versions of the shape.

cbool.gif

Scale specifies whether or not to search for scaled versions of the shape.

cbool.gif

Occlusion specifies whether or not to search for occluded versions of the shape.

c1dnclst.gif

Range Settings is an array that specifies the allowable ranges for rotation and scale.

cu32.gif

Match Constraints specifies the match option whose values you want to constrain by the given range. The following options are available:

Rotation Angle (degrees) (0)

Set a range for this option to specify the angles at which you expect the VI to find template matches in the inspection image. The VI ignores this range if the Rotation is not enabled.

Scale Factor (%) (1)

Set a range for this option to specify the sizes at which you expect the VI to find template matches in the inspection image. The size is expressed as the following percentage: the size of the match divided by size of the template image, multiplied by 100. The VI ignores this range if the Scale is not enabled.

Occlusion (%) (2)

Set a range for this option to specify the amount of occlusion you expect for a match in the inspection image. NI Vision can accurately detect matches that have up to 50% occlusion. The VI ignores this range if the Occlusion is not enabled.

cdbl.gif

Min is the minimum value of the range for a given Match Constraint.

cdbl.gif

Max is the maximum value of the range for a given Match Constraint.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

ccclst.gif

Curve Parameters contains information about how curves are extracted from the inspection image during the match phase.

cu32.gif

Extraction Mode specifies how the VI identifies curves in the image. Choose from the following options:

Normal (0)

(Default) Select Normal if you want the VI to make no assumptions about the uniformity of objects in the image or the image background.

Uniform Regions (1)

Select Uniform Regions if you want the VI to assume that either the objects in the image or the image background consist of uniform pixel values. This allows the VI to more accurately calculate the external curves of the objects.

ci32.gif

Edge Threshold specifies the minimum contrast a seed point must have for it to be begin a curve. Valid values range from 1 to 360. The default value is 75.

cu32.gif

Edge Filter Size specifies the width of the edge filter that the VI uses to identify curves in the image. The following options are available:

Fine (0)

Sets the Edge Filter Size to fine.

Normal (1)

(Default) Sets the Edge Filter Size to normal.

ci32.gif

Min Length specifies the length, in pixels, of the smallest curve that you want the VI to identify. The VI ignores any curves that have a length less than this value. The default value is 25.

ci32.gif

Row Search Step Size specifies the distance, in the y direction, between the image rows that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

ci32.gif

Col Search Step Size specifies the distance, in the x direction, between the image columns that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

ci32.gif

Max Endpoint Gap specifies the maximum gap, in pixels, between the endpoints of a curve that the VI identifies as a closed curve. If the gap is larger than this value, the VI identifies the curve as an open curve. The default value is 10.

cbool.gif

Closed specifies whether to identify only closed curves in the image. The default value is FALSE, which specifies that the VI should identify both open and closed curves.

cbool.gif

Subpixel is ignored by the VI.

cdbl.gif

Minimum match score is the minimum score a returned shape can have.

i1dcclst.gif

Rectangles is an array of rectangle clusters that describe each found rectangle.

Note  Width is defined as the length of the shorter side of a rectangle and height is defined as the longer side of the rectangle you want to search for.
i1dnclst.gif

Corners returns an array of coordinates that specify the corners of the rectangle.

idbl.gif

Angle is the orientation of the rectangle.

idbl.gif

Width is the width of the rectangle.

idbl.gif

Height is the height of the rectangle.

idbl.gif

Score is the score of the rectangle.

ii32.gif

Number of Matches Returned is the number of matches found.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.