Machine Vision Functions

NI Vision for LabWindows/CVI Function

Machine Vision Functions

Machine Vision functions allow you to perform common machine vision inspection tasks, including detecting the presence or absence of parts in an image and measuring the dimensions of parts to see if they meet specifications.

The Machine Vision functions are open source, which allows you to use the source code as examples for particular applications and to examine the operation of the code at run-time. The Machine Vision functions have a separate function panel from the other NI Vision functions (NIMachineVision.fp).

To load the Machine Vision functions, select Instrument»Load from the LabWindows/CVI project window, browse to the <CVI>\toolslib\vision directory, and select nimachinevision.fp. You can now access all of the function panels from the Instrument menu. Because the functions are open source, you can view the source by examining the NIMachineVision.c file.

Note  Do not make changes directly to the file because future installations may overwrite your changes. Instead, copy the function you want to modify to another source file and modify it there.

The following table lists the Machine Vision functions. The functions in the Machine Vision class are grouped according to the types of operations they perform. The first column contains the name of the class. The second column contains names of function subclasses. The third column contains names of individual function panels. Each Machine Vision function panel represents one function.


Coordinate Transform Functions

Coordinate Transform functions allow you to find various types of coordinate transforms in an image. Use these functions to find a coordinate transform using either edge detection or pattern matching.

Class Subclass LabWindows/CVI Equivalent Function Name
Machine VisionCoordinate TransformFind Transform PatternimaqFindTransformPattern

Count and Measure Objects Functions

Count and Measure Objects functions allow you to count and measure objects in an image.

Class Subclass LabWindows/CVI Equivalent Function Name
Machine VisionCount and Measure ObjectsCount ObjectsimaqCountObjects
Machine VisionCount and Measure ObjectsDispose Object ReportimaqDisposeObjectReport

Find Patterns Functions

Find Patterns functions allow you to find a pattern in an image.

Class Subclass LabWindows/CVI Equivalent Function Name
Machine VisionFind PatternsFind PatternimaqFindPattern

Locate Edges Functions

Locate Edges functions allow you to find straight or circular edges in an image.

Class Subclass LabWindows/CVI Equivalent Function Name
Machine VisionLocate EdgesDispose Circular Edge ReportimaqDisposeCircularEdgeReport
Machine VisionLocate EdgesDispose Straight Edge ReportimaqDisposeStraightEdgeReport
Machine VisionLocate EdgesFind Circular EdgeimaqFindCircularEdge
Machine VisionLocate EdgesFind Concentric EdgeimaqFindConcentricEdge

Measure Distances Functions

Measure Distances functions allow you to measure distances in an image, such as the minimum or maximum horizontal separation between two vertically oriented edges.

Class Subclass LabWindows/CVI Equivalent Function Name
Machine VisionMeasure DistancesClamp MaximaqClampMax
Machine VisionMeasure DistancesClamp MinimaqClampMin

Measure Intensities Functions

Measure Intensities functions allow you to measure the intensity of a specific region of an image.

Class Subclass LabWindows/CVI Equivalent Function Name
Machine VisionMeasure IntensitiesLight Meter LineimaqLightMeterLine
Machine VisionMeasure IntensitiesLight Meter PointimaqLightMeterPoint
Machine VisionMeasure IntensitiesLight Meter RectimaqLightMeterRect

Select Region of Interest Functions

Select Region of Interest functions allow you to select a specific region of an image.

Class Subclass LabWindows/CVI Equivalent Function Name
Machine VisionSelect Region of InterestSelect AnnulusimaqSelectAnnulus
Machine VisionSelect Region of InterestSelect LineimaqSelectLine
Machine VisionSelect Region of InterestSelect PointimaqSelectPoint
Machine VisionSelect Region of InterestSelect RectimaqSelectRect