NI Vision for LabWindows™/CVI™ Function Reference Help

July 2007, 370379F-01

NI Vision for LabWindows/CVI is a library of C functions that you can use to develop machine vision and scientific imaging applications.

For more information about this help file, refer to the following topics:

Using Help

Related Documentation

Glossary

Important Information

Technical Support and Professional Services

To comment on National Instruments documentation, refer to the National Instruments Web site.

© 2001–2007 National Instruments Corporation. All rights reserved.


Activating Your Software

How do I activate my software?

Use the NI Activation Wizard to obtain an activation code for your software. You can launch the NI Activation Wizard two ways:

  • Launch the product and choose to activate your software from the list of options presented.
  • Launch NI License Manager by selecting Start»All Programs»National Instruments»NI License Manager. Click the Activate button in the toolbar.
Note Note You do not need to activate your software if it is managed by NI Volume License Manager as a part of a Volume License Agreement.

What is activation?

Activation is the process of obtaining an activation code to enable your software to run on your computer. An activation code is an alphanumeric string that verifies the software, version, and computer ID to enable features on your computer. Activation codes are unique and are valid on only one computer.

What is the NI Activation Wizard?

The NI Activation Wizard is a part of NI License Manager that steps you through the process of enabling software to run on your machine.

What information do I need to activate?

You need your product serial number, user name, and organization. The NI Activation Wizard determines the rest of the information. Certain activation methods may require additional information for delivery. This information is used only to activate your product. Complete disclosure of National Instruments licensing privacy policy is available at ni.com/activate/privacy. If you optionally choose to register your software, your information is protected under the National Instruments privacy policy, available at ni.com/privacy.

How do I find my product serial number?

You can find your serial number on the proof-of-ownership and registration card that you received with your product, as shown in the following example.

Certificate of Ownership

If your software kit does not include a Certificate of Ownership, you can find your serial number on the product packing slip or on the shipping label.

What is a Computer ID?

The computer ID contains unique information about your computer. National Instruments requires this information to enable your software. You can find your computer ID through the NI Activation Wizard or by using NI License Manager, as follows:

  1. Launch NI License Manager by selecting Start»All Programs»National Instruments»NI License Manager.
  2. Click the Display Computer Information button in the toolbar.

For more information about product activation and licensing refer to ni.com/activate.


Related Documentation

Most NI Vision manuals also are available as PDFs. You must have Adobe Acrobat Reader with Search and Accessibility 5.0.5 or later installed to view the PDFs. Refer to the Adobe Systems Incorporated Web site to download Acrobat Reader. Refer to the National Instruments Product Manuals Library for updated documentation resources.

The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents by selecting Start»All Programs»National Instruments»Vision»Documentation»NI Vision.

  • NI Vision Development Module Readme—Contains information about new functionality, minimum system requirements, installation instructions, and descriptions of the documentation for the following: NI Vision for LabVIEW, NI Vision for LabWindows/CVI, NI Vision for Visual Basic, and Vision Assistant.
  • NI Vision for LabWindows/CVI User Manual—Describes how to create machine vision and image processing applications in LabWindows/CVI using the Vision Development Module. The manual guides you through tasks beginning with setting up your imaging system to taking measurements.
  • NI Vision Concepts Manual—Describes the basic concepts of image analysis, image processing, and machine vision. This document also contains in-depth discussions about imaging functions for advanced users.
  • NI OCR Training Interface Help—Contains information about how to use the OCR Training Interface to train characters, save character sets, and verify characters by comparing them to a reference character.
  • NI Classification Training Interface Help—Contains information about how to use the NI Classification Training Interface to train and classify binary samples.
  • NI Vision Template Editor Help—Contains information about how to use the NI Vision Template Editor to learn and edit template images that you can use with pattern matching, geometric matching, and golden template comparison functions.


Using Help

Conventions

Navigating Help

Searching Help

Printing Help File Topics


Conventions

This help file uses the following conventions:

< > | Angle brackets that contain numbers separated by an ellipsis represent a range of values associated with a bit or signal name—for example, DBIO<3..0>.
» | The » symbol leads you through nested menu items and dialog box options to a final action. The sequence File»Page Setup»Options directs you to pull down the File menu, select the Page Setup item, and select Options from the last dialog box.
 | This icon denotes a note, which alerts you to important information.
bold | Bold text denotes items that you must select or click on in the software, such as menu items and dialog box options. Bold text also denotes parameter names, emphasis, or an introduction to a key concept.
green | Underlined text in this color denotes a link to a help topic, help file, or Web address.
italic | Italic text denotes variables or cross references. This font also denotes text that is a placeholder for a word or value that you must supply.
monospace | Text in this font denotes text or characters that you should enter from the keyboard, sections of code, programming examples, and syntax examples. This font is also used for the proper names of disk drives, paths, directories, programs, subprograms, subroutines, device names, functions, operations, variables, filenames, and extensions.


Navigating Help (Windows Only)

To navigate this help file, use the Contents, Index, and Search tabs to the left of this window or use the following toolbar buttons located above the tabs:

  • Hide—Hides the navigation pane from view.
  • Locate—Locates the currently displayed topic in the Contents tab, allowing you to view related topics.
  • Back—Displays the previously viewed topic.
  • Forward—Displays the topic you viewed before clicking the Back button.
  • Options—Displays a list of commands and viewing options for the help file.


Searching Help (Windows Only)

Use the Search tab to the left of this window to locate content in this help file. If you want to search for words in a certain order, such as "related documentation," add quotation marks around the search words as shown in the example. Searching for terms on the Search tab allows you to quickly locate specific information and information in topics that are not included on the Contents tab.

Wildcards

You also can search using asterisk (*) or question mark (?) wildcards. Use the asterisk wildcard to return topics that contain a certain string. For example, a search for "prog*" lists topics that contain the words "program," "programmatically," "progress," and so on.

Use the question mark wildcard as a substitute for a single character in a search term. For example, "?ext" lists topics that contain the words "next," "text," and so on.

Note Note Wildcard searching will not work on Simplified Chinese, Traditional Chinese, Japanese, and Korean systems.

Nested Expressions

Use nested expressions to combine searches to further refine a search. You can use Boolean expressions and wildcards in a nested expression. For example, "example AND (program OR VI)" lists topics that contain "example program" or "example VI." You cannot nest expressions more than five levels.

Boolean Expressions

Click the Boolean Button button to add Boolean expressions to a search. The following Boolean operators are available:

  • AND (default)—Returns topics that contain both search terms. You do not need to specify this operator unless you are using nested expressions.
  • OR—Returns topics that contain either the first or second term.
  • NOT—Returns topics that contain the first term without the second term.
  • NEAR—Returns topics that contain both terms within eight words of each other.

Search Options

Use the following checkboxes on the Search tab to customize a search:

  • Search previous results—Narrows the results from a search that returned too many topics. You must remove the checkmark from this checkbox to search all topics.
  • Match similar words—Broadens a search to return topics that contain words similar to the search terms. For example, a search for "program" lists topics that include the words "programs," "programming," and so on.
  • Search titles only—Searches only in the titles of topics.


Printing Help File Topics (Windows Only)

Complete the following steps to print an entire book from the Contents tab:

  1. Right-click the book.
  2. Select Print from the shortcut menu to display the Print Topics dialog box.
  3. Select the Print the selected heading and all subtopics option.
    Note Note Select Print the selected topic if you want to print the single topic you have selected in the Contents tab.
  4. Click the OK button.

Printing PDF Documents

This help file may contain links to PDF documents. To print PDF documents, click the print button located on the Adobe Acrobat Viewer toolbar.


Acquisition Functions

Acquisition functions let you perform common acquisition tasks, such as ring acquisitions, sequence acquisitions, and grabs, directly into an NI Vision image. To perform more advanced acquisitions, such as triggered acquisitions, see the NI-IMAQ Function Reference Help. You can use the Acquisition functions with the Signal I/O functions described in the NI-IMAQ Function Reference Help. Functions in this section require NI-IMAQ 2.2 or higher.

The following table lists the Acquisition functions. The functions in the Acquisition 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 individual function panels. Each Acquisition function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Acquisition | Copy From Ring | imaqCopyFromRing
Acquisition | Easy Acquire | imaqEasyAcquire
Acquisition | Extract From Ring | imaqExtractFromRing
Acquisition | Grab | imaqGrab
Acquisition | Release Image | imaqReleaseImage
Acquisition | Setup Grab | imaqSetupGrab
Acquisition | Setup Ring | imaqSetupRing
Acquisition | Setup Sequence | imaqSetupSequence
Acquisition | Snap | imaqSnap
Acquisition | Start Acquisition | imaqStartAcquisition
Acquisition | Stop Acquisition | imaqStopAcquisition


Analytic Geometry Functions

The following functions are available only with a licensed version of NI Vision.

Analytic Geometry functions allow you to perform analytical geometry operations, such as obtaining points on a contour within an image or obtaining the angle between two lines.

The following table lists the Analytic Geometry functions. The functions in the Analytic Geometry 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 individual function panels. Each Analytic Geometry function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Analytic Geometry | Build Coordinate System | imaqBuildCoordinateSystem
Analytic Geometry | Fit Circle 2 | imaqFitCircle2
Analytic Geometry | Fit Ellipse 2 | imaqFitEllipse2
Analytic Geometry | Fit Line | imaqFitLine
Analytic Geometry | Get Angle | imaqGetAngle
Analytic Geometry | Get Bisecting Line | imaqGetBisectingLine
Analytic Geometry | Get Distance | imaqGetDistance
Analytic Geometry | Get Intersection | imaqGetIntersection
Analytic Geometry | Get Mid Line | imaqGetMidLine
Analytic Geometry | Get Perpendicular Line | imaqGetPerpendicularLine
Analytic Geometry | Get Points On Contour | imaqGetPointsOnContour
Analytic Geometry | Get Points On Line | imaqGetPointsOnLine
Analytic Geometry | Get Polygon Area | imaqGetPolygonArea
Analytic Geometry | Interpolate Points | imaqInterpolatePoints


Barcode Functions

The following functions are available only with a licensed version of NI Vision.

The following table lists the Barcode I/O functions. The functions in the Barcode I/O 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 individual function panels. Each Barcode I/O function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Barcode | Grade Data Matrix Barcode AIM | imaqGradeDataMatrixBarcodeAIM
Barcode | Read Barcode | imaqReadBarcode
Barcode | Read PDF417 Barcode | imaqReadPDF417Barcode
Barcode | Read Data Matrix Barcode | imaqReadDataMatrixBarcode2
Barcode | Read QR Code | imaqReadQRCode


Barcode2DCellShape

Specifies the shape of the cells inside the 2D barcode.

Elements

Name | Value | Description
IMAQ_SQUARE_CELLS | 0 | The function uses an algorithm for decoding the 2D barcode that works with square data cells.
IMAQ_ROUND_CELLS | 1 | The function uses an algorithm for decoding the 2D barcode that works with round data cells. Use this algorithm only when the data cells have clear, distinct round edges with a minimum of blurring.
IMAQ_BARCODE_2D_CELL_SHAPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


Barcode2DContrast

Specifies the contrast of the 2D barcode.

Elements

Name | Value | Description
IMAQ_ALL_BARCODE_2D_CONTRASTS | 0 | The function searches for barcodes of each contrast type. Using this option reduces the performance of the function.
IMAQ_BLACK_ON_WHITE_BARCODE_2D | 1 | The function searches for 2D barcodes containing black data on a white background.
IMAQ_WHITE_ON_BLACK_BARCODE_2D | 2 | The function searches for 2D barcodes containing white data on a black background.
IMAQ_BARCODE_2D_CONTRAST_SIZE_GUARD | 0xFFFFFFFF | Reserved


Barcode2DInfo

Contains information about a 2D barcode.

Elements

Name | Type | Description
type | Barcode2DType | The type of the 2D barcode.
binary | int | This element is TRUE if the 2D barcode contains binary data and FALSE if the 2D barcode contains text data.
data | unsigned char* | The data encoded in the 2D barcode.
dataLength | unsigned int | The length of the data array.
boundingBox[4] | PointFloat | An array of four points describing the rectangle surrounding the 2D barcode.
numErrorsCorrected | unsigned int | The number of errors the function corrected when decoding the 2D barcode.
numErasuresCorrected | unsigned int | The number of erasures the function corrected when decoding the 2D barcode.
rows | unsigned int | The number of rows in the 2D barcode.
columns | unsigned int | The number of columns in the 2D barcode.


Barcode2DSearchMode

Specifies the method the function uses to search for 2D barcodes.

Elements

Name | Value | Description
IMAQ_SEARCH_MULTIPLE | 0 | The function searches for multiple 2D barcodes.
IMAQ_SEARCH_SINGLE_CONSERVATIVE | 1 | The function searches for 2D barcodes using the same searching algorithm as IMAQ_SEARCH_MULTIPLE but stops searching after locating one valid barcode.
IMAQ_SEARCH_SINGLE_AGGRESSIVE | 2 | The function searches for a single 2D barcode using a method that assumes the barcode occupies a majority of the search region. This method skips some of the predictive portions of the search algorithm used by IMAQ_SEARCH_SINGLE_CONSERVATIVE, which can lead to improved performance. Using this search mode when the barcode does not occupy a majority of the search region, when the barcode is rotated or when the image is blurry, can lead to reduced performance.
IMAQ_BARCODE_2D_SEARCH_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


Barcode2DShape

Specifies the shape of the 2D barcode.

Elements

Name | Value | Description
IMAQ_SQUARE_BARCODE_2D | 0 | The function searches for square 2D barcodes.
IMAQ_RECTANGULAR_BARCODE_2D | 1 | The function searches for rectangular 2D barcodes.
IMAQ_BARCODE_2D_SHAPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


Barcode2DType

The type of 2D barcode.

Elements

Name | Value | Description
IMAQ_PDF417 | 0 | The 2D barcode is of type PDF417.
IMAQ_DATA_MATRIX_ECC_000 | 1 | The 2D barcode is of type Data Matrix ECC 000.
IMAQ_DATA_MATRIX_ECC_050 | 2 | The 2D barcode is of type Data Matrix ECC 050.
IMAQ_DATA_MATRIX_ECC_080 | 3 | The 2D barcode is of type Data Matrix ECC 080.
IMAQ_DATA_MATRIX_ECC_100 | 4 | The 2D barcode is of type Data Matrix ECC 100.
IMAQ_DATA_MATRIX_ECC_140 | 5 | The 2D barcode is of type Data Matrix ECC 140.
IMAQ_DATA_MATRIX_ECC_200 | 6 | The 2D barcode is of type Data Matrix ECC 200.
IMAQ_BARCODE_2D_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


BarcodeInfo

Contains information about a barcode.

Elements

Name | Type | Description
outputString | const char* | A string containing the decoded barcode data.
size | int | The size of the output string.
outputChar1 | char | The contents of this character depend on the barcode type. For IMAQ_CODABAR the function sets outputChar1 to the start character. For IMAQ_CODE128, the function sets outputChar1 to the FNC value. For IMAQ_EAN8 and IMAQ_EAN13, the function sets outputChar1 to the first country code. For all other barcode types, the function sets outputChar1 to 0.
outputChar2 | char | The contents of this character depend on the barcode type. For IMAQ_CODABAR, the function sets outputChar2 to the stop character. For IMAQ_EAN8 and IMAQ_EAN13, the function sets outputChar2 to the second country code. For IMAQ_UPCA, the function sets outputChar2 to the system number. For all other barcode types, the function sets outputChar2 to 0.
confidenceLevel | double | A quality measure of the decoded barcode ranging from 0 to 100, with 100 being the best. This value weighs the error in the widths of the bars and spaces with the size of the character in the barcode. In general, a confidenceLevel value of less than 80 means the decoded string is suspect. Note that confidenceLevelis particularly useful in decoding IMAQ_EAN13 barcodes because twelve of the thirteen data values are encoded as characters in the barcode, and the thirteenth value is encoded by the parity of the first 12 encoded characters.
type | BarcodeType | The type of barcode.


BarcodeType

The type of a barcode.

Elements

Name | Value | Description
IMAQ_INVALID | 0xFFFFFFFF | Reserved
IMAQ_CODABAR | 1 | The barcode is of type Codabar.
IMAQ_CODE39 | 2 | The barcode is of type Code 39.
IMAQ_CODE93 | 4 | The barcode is of type Code 93.
IMAQ_CODE128 | 8 | The barcode is of type Code 128.
IMAQ_EAN8 | 16 | The barcode is of type EAN 8.
IMAQ_EAN13 | 32 | The barcode is of type EAN 13.
IMAQ_I2_OF_5 | 64 | The barcode is of type Code 25.
IMAQ_MSI | 128 | The barcode is of type MSI code.
IMAQ_UPCA | 256 | The barcode is of type UPC A.
IMAQ_PHARMACODE | 512 | The barcode is of type Pharmacode.
IMAQ_RSS_LIMITED | 1024 | The barcode is of type RSS Limited.
IMAQ_BARCODE_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


Binary Processing Functions

The following functions are available only with a licensed version of NI Vision.

Use Binary Processing functions on binary and labeled images for applications in which the size, number, or shape of the objects in the image are important. Binary images have only two pixel values, unless you label the image.

Note Apply a threshold to a grayscale image to make an image binary. For more information about thresholding an image, refer to imaqThreshold() in the Grayscale Processing section.

The following table lists the Binary Processing functions. The functions in the Binary Processing 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 Binary Processing function panel represents one function.

Morphology Functions

The following functions are available only with a licensed version of NI Vision.

Morphology functions allow you to apply standard morphological transformations, such as dilations and erosions.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Binary Processing | Morphology | Convex Hull | imaqConvexHull
Binary Processing | Morphology | Danielsson Distance | imaqDanielssonDistance
Binary Processing | Morphology | Fill Holes | imaqFillHoles
Binary Processing | Morphology | Find Circles | imaqFindCircles
Binary Processing | Morphology | Label2 | imaqLabel2
Binary Processing | Morphology | Morphology | imaqMorphology
Binary Processing | Morphology | Reject Border | imaqRejectBorder
Binary Processing | Morphology | Segmentation | imaqSegmentation
Binary Processing | Morphology | Separation | imaqSeparation
Binary Processing | Morphology | Simple Distance | imaqSimpleDistance
Binary Processing | Morphology | Size Filter | imaqSizeFilter
Binary Processing | Morphology | Skeleton | imaqSkeleton

Particle Analysis Functions

The following functions are available only with a licensed version of NI Vision.

Particle Analysis functions allow you to calculate information about particles in an image and select particles using the information.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Binary Processing | Particle Analysis | Count Particles | imaqCountParticles
Binary Processing | Particle Analysis | Measure Particle | imaqMeasureParticle
Binary Processing | Particle Analysis | Particle Filter 3 | imaqParticleFilter3

Shape Matching Functions

The following functions are available only with a licensed version of NI Vision.

Shape Matching functions allow you to find shapes in an image.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Binary Processing | Shape Matching | Match Shape | imaqMatchShape


Calibration Functions

The following functions are available only with a licensed version of NI Vision.

Calibration functions allow you to spatially calibrate images. Spatial calibration converts pixel coordinates to real-world coordinates while compensating for potential perspective errors or nonlinear distortions in your imaging system.

The following table lists the Calibration functions. The functions in the Calibration 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 individual function panels. Each Calibration function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Calibration | Correct Calibrated Image | imaqCorrectCalibratedImage
Calibration | Get Calibration Info | imaqGetCalibrationInfo2
Calibration | Learn Calibration Grid | imaqLearnCalibrationGrid
Calibration | Learn Calibration Points | imaqLearnCalibrationPoints
Calibration | Set Coordinate System | imaqSetCoordinateSystem
Calibration | Set Simple Calibration | imaqSetSimpleCalibration
Calibration | Convert Pixel To Real World | imaqTransformPixelToRealWorld
Calibration | Transform Real World To Pixel | imaqTransformRealWorldToPixel
Calibration | Copy Calibration Info | imaqCopyCalibrationInfo2


CalibrationInfo

Information describing the calibration of an image.

Elements

Name | Type | Description
errorMap | float* | The error map for the calibration. The error map will be empty if the function did not calculate it when learning the calibration.
mapColumns | int | The number of columns in the error map.
mapRows | int | The number of rows in the error map.
userRoi | ROI* | Specifies the ROI the user provided when learning the calibration.
calibrationRoi | ROI* | Specifies the ROI that corresponds to the region of the image where the calibration information is accurate.
options | LearnCalibrationOptions | Specifies the calibration options the user provided when learning the calibration.
grid | GridDescriptor | Specifies the scaling constants for the image.
system | CoordinateSystem | Specifies the coordinate system for the real world coordinates.
range | RangeFloat | The range of the grayscale the function used to represent the circles in the grid image.
quality | float | The quality score of the learning process, which is a value between 0-1000. A quality of 1000 means that the function learned the feature points perfectly with the chosen algorithm. It does not necessarily reflect the absolute accuracy of the estimated calibration mapping, but instead reflects how well the calibration mapping adapts to the learned points.


CalibrationMode

Specifies the type of calibration a function uses to reduce distortion in an image or the calibration state of an image.

Elements

Name | Value | Description
IMAQ_PERSPECTIVE | 0 | Functions correct for distortion caused by the camera's perspective.
IMAQ_NONLINEAR | 1 | Functions correct for distortion caused by the camera's lens.
IMAQ_SIMPLE_CALIBRATION | 2 | Functions do not correct for distortion.
IMAQ_CORRECTED_IMAGE | 3 | The image is already corrected.
IMAQ_DISTORTION_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


CalibrationPoints

A set of reference points a function uses to learn calibration information.

Elements

Name | Type | Description
pixelCoordinates | PointFloat* | The array of pixel coordinates.
realWorldCoordinates | PointFloat* | The array of corresponding real-world coordinates.
numCoordinates | int | The number of coordinates in both of the arrays.


CalibrationROI

Specifies the ROI correction functions you can use when correcting an image.

Elements

Name | Value | Description
IMAQ_FULL_IMAGE | 0 | The correction function corrects the whole image, regardless of the user-defined or calibration-defined ROIs.
IMAQ_CALIBRATION_ROI | 1 | The correction function corrects the area defined by the calibration ROI. The calibration ROI corresponds to the area of the calibration template containing dots.
IMAQ_USER_ROI | 2 | The correction function corrects the area defined by the user-defined ROI.
IMAQ_CALIBRATION_AND_USER_ROI | 3 | The correction function corrects the area defined by the intersection of the user-defined ROI and the calibration ROI.
IMAQ_CALIBRATION_OR_USER_ROI | 4 | The correction function corrects the area defined by the union of the user-defined ROI and the calibration ROI.
IMAQ_CALIBRATION_ROI_SIZE_GUARD | 0xFFFFFFFF | Reserved


CalibrationUnit

The unit of measure for the image.

Elements

Name | Value | Description
IMAQ_UNDEFINED | 0 | The image does not have a defined unit of measurement.
IMAQ_ANGSTROM | 1 | The unit of measure for the image is angstroms.
IMAQ_MICROMETER | 2 | The unit of measure for the image is micrometers
IMAQ_MILLIMETER | 3 | The unit of measure for the image is millimeters.
IMAQ_CENTIMETER | 4 | The unit of measure for the image is centimeters.
IMAQ_METER | 5 | The unit of measure for the image is meters.
IMAQ_KILOMETER | 6 | The unit of measure for the image is kilometers.
IMAQ_MICROINCH | 7 | The unit of measure for the image is microinches.
IMAQ_INCH | 8 | The unit of measure for the image is inches.
IMAQ_FOOT | 9 | The unit of measure for the image is feet.
IMAQ_NAUTICMILE | 10 | The unit of measure for the image is nautical miles.
IMAQ_GROUNDMILE | 11 | The unit of measure for the image is ground miles.
IMAQ_STEP | 12 | The unit of measure for the image is steps.
IMAQ_CALIBRATION_UNIT_SIZE_GUARD | 0xFFFFFFFF | Reserved


Caliper Functions

The following functions are available only with a licensed version of NI Vision.

Caliper functions allow you to detect and measure features, such as edges and angles, along a path in an image.

The following table lists the Caliper functions. The functions in the Caliper 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 individual function panels. Each Caliper function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Caliper | Caliper Tool | imaqCaliperTool
Caliper | Concentric Rake | imaqConcentricRake
Caliper | Detect Extremes | imaqDetectExtremes
Caliper | Detect Rotation | imaqDetectRotation
Caliper | Edge Tool 3 | imaqEdgeTool3
Caliper | Line Gauge Tool | imaqLineGaugeTool2
Caliper | Rake | imaqRake
Caliper | Simple Edge | imaqSimpleEdge
Caliper | Spoke | imaqSpoke
Caliper | Straight Edge | imaqStraightEdge


CaliperOptions

Describes how you want the function to choose edge pairs.

Elements

Name | Type | Description
polarity | TwoEdgePolarityType | Specifies the edge polarity of the edge pairs.
separation | float | The distance between edge pairs. If the edge pair has a separation greater than this value plus or minus the separationDeviation, the function ignores the edge pair. Set this parameter to 0 to find all edge pairs.
separationDeviation | float | Sets the range around the separation value. If you set separation to 0, the function ignores separationDeviation.


CaliperReport

Information about a pair of edges.

Elements

Name | Type | Description
edge1Contrast | float | The contrast of the first edge.
edge1Coord | PointFloat | The coordinates of the first edge.
edge2Contrast | float | The contrast of the second edge.
edge2Coord | PointFloat | The coordinates of the second edge.
separation | float | The distance between the two edges.
reserved | float | This element is reserved.


Classification Functions

The following functions are available only with a licensed version of NI Vision.

Classification functions let you identify an unknown object by comparing a set of its significant features to a set of features that conceptually represent classes of known objects.

The following table lists the Classification functions. The functions in the Classification 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 individual function panels. Each Classification function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Classification | Add Classifier Sample | imaqAddClassifierSample
Classification | Classify | imaqClassify
Classification | Create Classifier | imaqCreateClassifier
Classification | Delete Classifier Sample | imaqDeleteClassifierSample
Classification | Get Classifier Accuracy | imaqGetClassifierAccuracy
Classification | Get Classifier Sample Info | imaqGetClassifierSampleInfo
Classification | Get Nearest Neighbor Options | imaqGetNearestNeighborOptions
Classification | Get Particle Classifier Options | imaqGetParticleClassifierOptions
Classification | Read Classifier File | imaqReadClassifierFile
Classification | Relabel Classifier Sample | imaqRelabelClassifierSample
Classification | Set Particle Classifier Options | imaqSetParticleClassifierOptions
Classification | Train Nearest Neighbor Classifier | imaqTrainNearestNeighborClassifier
Classification | Write Classifier File | imaqWriteClassifierFile


Color Processing Functions

The following functions are available only with a licensed version of NI Vision.

Color Processing functions allow you to analyze and process color images in different color spaces. Use Color Processing functions with applications in which color information is important. These functions work with color images in the Red, Green, Blue (RGB) domain and the Hue, Saturation, and Luminance (HSL) domain. For more information about color domains, refer to the NI Vision Concepts Manual.

The following table lists the Color Processing functions. The functions in the Color Processing 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 Color Processing function panel represents one function.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Color Processing | — | Change Color Space 2 | imaqChangeColorSpace2
Color Processing | — | Color BCG Transform | imaqColorBCGTransform
Color Processing | — | Color Equalize | imaqColorEqualize
Color Processing | — | Color Histogram 2 | imaqColorHistogram2
Color Processing | — | Color Lookup | imaqColorLookup
Color Processing | — | Color Threshold | imaqColorThreshold

Color Matching Functions

The following functions are available only with a licensed version of NI Vision.

Color Matching functions allow you to learn information about the colors in a template image and compare that information with the colors in other images.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Color Processing | Color Matching | Learn Color | imaqLearnColor
Color Processing | Color Matching | Match Color | imaqMatchColor


Display Functions

Display functions allow you to display images in image windows.

The following table lists the Display functions. The functions in the Display 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 Display function panel represents one function.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Display | — | Are Tools Context Sensitive | imaqAreToolsContextSensitive
Display | — | Close Window | imaqCloseWindow
Display | — | Display Image | imaqDisplayImage
Display | — | Get Last Key | imaqGetLastKey
Display | — | Get System Window Handle | imaqGetSystemWindowHandle
Display | — | Get Window Center Pos | imaqGetWindowCenterPos
Display | — | Set Tool Context Sensitivity | imaqSetToolContextSensitivity
Display | — | Show Window | imaqShowWindow

Tool Window Functions

Tool Windows functions allow you to manage the tool palette, which you use to select areas of an image in an image window.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Display | Tool Window | Close Tool Window | imaqCloseToolWindow
Display | Tool Window | Get Current Tool | imaqGetCurrentTool
Display | Tool Window | Get Last Event | imaqGetLastEvent
Display | Tool Window | Get Tool Window Handle | imaqGetToolWindowHandle
Display | Tool Window | Get Tool Window Position | imaqGetToolWindowPos
Display | Tool Window | Is Tool Window Visible | imaqIsToolWindowVisible
Display | Tool Window | Move Tool Window | imaqMoveToolWindow
Display | Tool Window | Set Current Tool | imaqSetCurrentTool
Display | Tool Window | Set Event Callback | imaqSetEventCallback
Display | Tool Window | Set Tool Color | imaqSetToolColor
Display | Tool Window | Setup Tool Window | imaqSetupToolWindow
Display | Tool Window | Show Tool Window | imaqShowToolWindow

Window Management Functions

Window Management functions allow you to configure, move, and resize image windows. You can control up to 16 image windows at a time.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Display | Window Management | Are Scrollbars Visible | imaqAreScrollbarsVisible
Display | Window Management | Bring Window To Top | imaqBringWindowToTop
Display | Window Management | Get Mouse Position | imaqGetMousePos
Display | Window Management | Get Window Background | imaqGetWindowBackground
Display | Window Management | Get Display Mapping | imaqGetWindowDisplayMapping
Display | Window Management | Get Window Grid | imaqGetWindowGrid
Display | Window Management | Get Window Handle | imaqGetWindowHandle
Display | Window Management | Get Window Position | imaqGetWindowPos
Display | Window Management | Get Window Size | imaqGetWindowSize
Display | Window Management | Get Window Title | imaqGetWindowTitle
Display | Window Management | Get Window Zoom | imaqGetWindowZoom
Display | Window Management | Get Window Zoom 2 | imaqGetWindowZoom2
Display | Window Management | Is Window Non-Tearing | imaqIsWindowNonTearing
Display | Window Management | Is Window Visible | imaqIsWindowVisible
Display | Window Management | Move Window | imaqMoveWindow
Display | Window Management | Setup Window | imaqSetupWindow
Display | Window Management | Set Window Background | imaqSetWindowBackground
Display | Window Management | Set Display Mapping | imaqSetWindowDisplayMapping
Display | Window Management | Set Window Grid | imaqSetWindowGrid
Display | Window Management | Set Window Non-Tearing | imaqSetWindowNonTearing
Display | Window Management | Set Window Max Contour Count | imaqSetWindowMaxContourCount
Display | Window Management | Set Window Palette | imaqSetWindowPalette
Display | Window Management | Set Window Size | imaqSetWindowSize
Display | Window Management | Set Window Thread Policy | imaqSetWindowThreadPolicy
Display | Window Management | Set Window Title | imaqSetWindowTitle
Display | Window Management | Show Scrollbars | imaqShowScrollbars
Display | Window Management | Zoom Window | imaqZoomWindow
Display | Window Management | Zoom Window 2 | imaqZoomWindow2

Tool Window

The examples of the tool palette in the following figure have four icons per line. The tool palette on the left automatically transforms to the palette on the right when you manipulate a region tool in an image window.

1 Pixel Intensity | 4 Anchoring Coordinates of a region
2 Image-Type Indicator (8-bit, 16-bit, RGB) | 5 Size of an Active Region
3 Coordinates of the Mouse on the Active Window | 6 Length and Horizontal Displacement Angle of a Line Region

Tips for Using the Tool Window

The following are tips you can apply when using the tool window:

  • Use imaqGetLastEvent() or register a callback with imaqSetEventCallback() to retrieve the draw events on a window and find the coordinates of a selected region.
  • Alter the functionality of region tools by pressing certain keyboard keys while using the tool:
    • To constrain the x and y dimensions of an ROI, hold down the <Shift> key while drawing. This forces rectangles into squares, ellipses into circles, and line segments into horizontal or vertical segments.
    • To add an ROI without erasing the previous ROI elements, hold down the <Ctrl> key when you click. The previous elements are erased if you do not use <Ctrl> when starting a new element.
    • To produce the last point of a polygon or broken line, double-click while drawing.
  • Use the selection tool to select an existing ROI by clicking its border. Once you select an ROI, you can manipulate it in the following ways:
    • To erase an ROI in an image window, select it and press the <Delete> key.
    • To resize a rectangle or ellipse, click in a grab handle and drag it to a new location.
    • To reposition a vertex in a line, broken line, or polygon, click in a grab handle and move it to a new location.
    • To reposition a rectangle or ellipse, click in the interior and drag it to a new location.
    • To reposition a point, click on it and drag it to a new location.
    • To reposition lines, broken lines, and polygons, click on any segment and drag it to a new location.
    • To reposition freehand lines and closed freehand lines, click anywhere on the line and drag it to a new location.
    • To rotate a rotated rectangle, click the interior handle bars and drag the rectangle. You can reposition and resize a rotated rectangle just as you would a normal rectangle.
    • To resize the interior or external radii of an annulus, click the internal or external edge, respectively, and drag it to a new location. You can reposition an annulus by clicking on the center of the annulus or the center of the annular region and drag it to a new location.
  • You can also achieve the selection tool functionality without using the selection tool by turning on context sensitivity using the imaqSetToolContextSensitivity() function.


DisplayMapping

Describes the display mapping policy for a selected window.

Elements

Name | Type | Description
method | MappingMethod | Describes the method for converting 16-bit pixels to 8-bit pixels.
minimumValue | int | When method is IMAQ_RANGE, minimumValue represents the value that is mapped to 0. When method is IMAQ_PERCENT_RANGE, minimumValue represents the percentage of the range used to compute the pixel value mapped to 0. Otherwise, minimumValue does not affect the mapping policy.
maximumValue | int | When method is IMAQ_RANGE, maximumValue represents the value that is mapped to 255. When method is IMAQ_PERCENT_RANGE, maximumValue represents the percentage of the range used to compute the pixel value mapped to 255. Otherwise, maximumValue does not affect the mapping policy.
shiftCount | int | When method is IMAQ_DOWNSHIFT, shiftCount represents the number of bits the function right-shifts the 16-bit pixel values. Otherwise, shiftCount does not affect the mapping policy. For more information, refer to the Display functions topic.


Error Management Functions

Error Management functions clear pending errors, return the last error, return the function in which the last error occurred, and set the error.

The following table lists the Error Management functions. The functions in the Error Management 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 individual function panels. Each Error Management function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Error Management | Clear Error | imaqClearError
Error Management | Get Error Text | imaqGetErrorText
Error Management | Get Last Error | imaqGetLastError
Error Management | Get Last Error Function | imaqGetLastErrorFunc
Error Management | Set Error | imaqSetError


File I/O Functions

File I/O functions allow you to read images from a hard drive or disk, write images to a hard drive or disk, and get information about images stored on a hard drive or disk.

The following table lists the File I/O functions. The functions in the File I/O 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 individual function panels. Each File I/O function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
File I/O | Close AVI | imaqCloseAVI
File I/O | Create AVI File | imaqCreateAVI
File I/O | Get AVI Info | imaqGetAVIInfo
File I/O | Get File Information | imaqGetFileInfo
File I/O | Get Filter Names | imaqGetFilterNames
File I/O | Load Image Popup | imaqLoadImagePopup
File I/O | Open AVI File | imaqOpenAVI
File I/O | Read AVI Frame | imaqReadAVIFrame
File I/O | Read File | imaqReadFile
File I/O | Read Vision File | imaqReadVisionFile
File I/O | Write AVI Frame | imaqWriteAVIFrame
File I/O | Write BMP File | imaqWriteBMPFile
File I/O | Write File | imaqWriteFile
File I/O | Write JPEG File | imaqWriteJPEGFile
File I/O | Write JPEG2000 File | imaqWriteJPEG2000File
File I/O | Write PNG File 2 | imaqWritePNGFile2
File I/O | Write TIFF File | imaqWriteTIFFFile
File I/O | Write Vision File | imaqWriteVisionFile


Frequency Domain Analysis Functions

The following functions are available only with a licensed version of NI Vision.

Frequency Domain Analysis functions allow you to convert images between the spatial and frequency domains and to analyze images in the frequency domain.

The following table lists the Frequency Domain Analysis functions. The functions in the Frequency Domain Analysis 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 individual function panels. Each Frequency Domain Analysis function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Frequency Domain Analysis | Attenuate | imaqAttenuate
Frequency Domain Analysis | Conjugate | imaqConjugate
Frequency Domain Analysis | FFT | imaqFFT
Frequency Domain Analysis | Flip Frequencies | imaqFlipFrequencies
Frequency Domain Analysis | Inverse FFT | imaqInverseFFT
Frequency Domain Analysis | Truncate | imaqTruncate


Grayscale Processing Functions

The following functions are available only with a licensed version of NI Vision.

Grayscale Processing functions enhance grayscale images for viewing or further processing.

The following table lists the Grayscale Processing functions. The functions in the Grayscale Processing 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 Grayscale Processing function panel represents one function.

Morphology Functions

The following functions are available only with a licensed version of NI Vision.

Morphology functions allow you to apply standard morphological transformations, such as dilations and erosions.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Grayscale Processing | Morphology | Gray Morphology | imaqGrayMorphology

Spatial Filters Functions

The following functions are available only with a licensed version of NI Vision.

Spatial Filters functions allow you to modify an image using neighborhood functions.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Grayscale Processing | Spatial Filters | Canny Edge Filter | imaqCannyEdgeFilter
Grayscale Processing | Spatial Filters | Convolve | imaqConvolve
Grayscale Processing | Spatial Filters | Correlate | imaqCorrelate
Grayscale Processing | Spatial Filters | Edge Filter | imaqEdgeFilter
Grayscale Processing | Spatial Filters | Lowpass | imaqLowPass
Grayscale Processing | Spatial Filters | Median Filter | imaqMedianFilter
Grayscale Processing | Spatial Filters | Nth Order Filter | imaqNthOrderFilter

Threshold Functions

The following functions are available only with a licensed version of NI Vision.

Threshold functions allow you to convert a grayscale image to a binary image.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Grayscale Processing | Threshold | Automatic Threshold | imaqAutoThreshold2
Grayscale Processing | Threshold | Local Threshold | imaqLocalThreshold
Grayscale Processing | Threshold | Magic Wand | imaqMagicWand
Grayscale Processing | Threshold | Multithreshold | imaqMultithreshold
Grayscale Processing | Threshold | Threshold | imaqThreshold

Transform Functions

The following functions are available only with a licensed version of NI Vision.

Transform functions allow you to replace each pixel in an image using a transfer function.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Grayscale Processing | Transform | BCG Transform | imaqBCGTransform
Grayscale Processing | Transform | Equalize | imaqEqualize
Grayscale Processing | Transform | Inverse | imaqInverse
Grayscale Processing | Transform | Lookup | imaqLookup
Grayscale Processing | Transform | Math Transform | imaqMathTransform
Grayscale Processing | Transform | Watershed Transform | imaqWatershedTransform


Image Analysis Functions

The following functions are available only with a licensed version of NI Vision.

Image Analysis functions allow you to calculate various statistics about the pixels of an image.

The following table lists the Image Analysis functions. The functions in the Image Analysis 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 individual function panels. Each Image Analysis function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Image Analysis | Centroid | imaqCentroid
Image Analysis | Extract Curves | imaqExtractCurves
Image Analysis | Histogram | imaqHistogram
Image Analysis | Linear Averages | imaqLinearAverages2
Image Analysis | Line Profile | imaqLineProfile
Image Analysis | Quantify | imaqQuantify


Image Management Functions

Image Management functions allow you to gather information about an image or manipulate the contents of an image.

The following table lists the Image Management functions. The functions in the Image Management 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 Image Management function panel represents one function.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Image Management | — | Array To Image | imaqArrayToImage
Image Management | — | Create Image | imaqCreateImage
Image Management | — | Image To Array | imaqImageToArray

Border Functions

Border functions allow you to fill an image border with a set of values, get the size of an image border, and set the size of image border.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Image Management | Border | Fill Border | imaqFillBorder
Image Management | Border | Get Border Size | imaqGetBorderSize
Image Management | Border | Set Border Size | imaqSetBorderSize

Clipboard Functions

The following functions are available only with a licensed version of NI Vision.

Clipboard functions allow you to copy images to and from the clipboard.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Image Management | Clipboard | Clipboard To Image | imaqClipboardToImage
Image Management | Clipboard | Image To Clipboard | imaqImageToClipboard

Drawing Functions

The following functions are available only with a licensed version of NI Vision.

Drawing functions allow you to draw lines, shapes, and text on images.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Image Management | Drawing | Draw Line On Image | imaqDrawLineOnImage
Image Management | Drawing | Draw Shape On Image | imaqDrawShapeOnImage
Image Management | Drawing | Draw Text On Image | imaqDrawTextOnImage

Image Information Functions

The following functions are available only with a licensed version of NI Vision.

Image Information functions allow you to gather information about pixels and images.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Image Management | Image Information | Enumerate Custom Keys | imaqEnumerateCustomKeys
Image Management | Image Information | Get Bit Depth | imaqGetBitDepth
Image Management | Image Information | Get Bytes Per Pixel | imaqGetBytesPerPixel
Image Management | Image Information | Get Image Information | imaqGetImageInfo
Image Management | Image Information | Get Image Size | imaqGetImageSize
Image Management | Image Information | Get Image Type | imaqGetImageType
Image Management | Image Information | Get Mask Offset | imaqGetMaskOffset
Image Management | Image Information | Get Pixel Address | imaqGetPixelAddress
Image Management | Image Information | Get Vision Info Types | imaqGetVisionInfoTypes
Image Management | Image Information | Is Image Empty | imaqIsImageEmpty
Image Management | Image Information | Read Custom Data | imaqReadCustomData
Image Management | Image Information | Remove Custom Data | imaqRemoveCustomData
Image Management | Image Information | Remove Vision Info 2 | imaqRemoveVisionInfo2
Image Management | Image Information | Set Bit Depth | imaqSetBitDepth
Image Management | Image Information | Set Image Size | imaqSetImageSize
Image Management | Image Information | Set Mask Offset | imaqSetMaskOffset
Image Management | Image Information | Write Custom Data | imaqWriteCustomData

Image Manipulation Functions

Image Manipulation functions allow you to manipulate images in their entirety. Functions in this subclass copy, scale, shift, and transpose images.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Image Management | Image Manipulation | Cast | imaqCast
Image Management | Image Manipulation | Copy Rectangle | imaqCopyRect
Image Management | Image Manipulation | Duplicate | imaqDuplicate
Image Management | Image Manipulation | Flatten | imaqFlatten
Image Management | Image Manipulation | Flip | imaqFlip
Image Management | Image Manipulation | Mask | imaqMask
Image Management | Image Manipulation | Resample | imaqResample
Image Management | Image Manipulation | Rotate 2 | imaqRotate2
Image Management | Image Manipulation | Scale | imaqScale
Image Management | Image Manipulation | Shift | imaqShift
Image Management | Image Manipulation | Transpose | imaqTranspose
Image Management | Image Manipulation | Unflatten | imaqUnflatten
Image Management | Image Manipulation | Unwrap Image | imaqUnwrapImage
Image Management | Image Manipulation | View 3D | imaqView3D

Interlacing Functions

The following functions are available only with a licensed version of NI Vision.

Interlacing functions allow you to combine two fields into one image frame or separate a frame into two fields.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Image Management | Interlacing | Interlace Combine | imaqInterlaceCombine
Image Management | Interlacing | Interlace Separate | imaqInterlaceSeparate

Pixel Manipulation Functions

The following functions are available only with a licensed version of NI Vision.

Pixel Manipulation functions allow you to manipulate images at the pixel level. You can use functions in the Pixel Manipulation subclass to extract image planes, replace image planes, set and return pixel values, and convert images to arrays and arrays to images.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Image Management | Pixel Manipulation | Array To Complex Plane | imaqArrayToComplexPlane
Image Management | Pixel Manipulation | Complex Plane To Array | imaqComplexPlaneToArray
Image Management | Pixel Manipulation | Extract Color Planes | imaqExtractColorPlanes
Image Management | Pixel Manipulation | Extract Complex Plane | imaqExtractComplexPlane
Image Management | Pixel Manipulation | Fill Image | imaqFillImage
Image Management | Pixel Manipulation | Get Line | imaqGetLine
Image Management | Pixel Manipulation | Get Pixel | imaqGetPixel
Image Management | Pixel Manipulation | Replace Color Planes | imaqReplaceColorPlanes
Image Management | Pixel Manipulation | Replace Complex Plane | imaqReplaceComplexPlane
Image Management | Pixel Manipulation | Set Line | imaqSetLine
Image Management | Pixel Manipulation | Set Pixel | imaqSetPixel


Inspection Functions

The following functions are available only with a licensed version of NI Vision.

Inspection functions allow you to compare images to a golden template image.

The following table lists the Inspection functions. The functions in the Inspection 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 individual function panels. Each Inspection function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Inspection | Compare Golden Template | imaqCompareGoldenTemplate
Inspection | Learn Golden Template | imaqLearnGoldenTemplate


InspectionAlignment

The location of the golden template in the target image.

Elements

Name | Type | Description
position | PointFloat | The location of the center of the golden template in the image under inspection.
rotation | float | The rotation of the golden template in the image under inspection, in degrees.
scale | float | The percentage of the size of the area under inspection compared to the size of the golden template.


InspectionOptions

Elements

Name | Type | Description
registrationMethod | RegistrationMethod | Specifies how the function registers the golden template and the target image.
normalizationMethod | NormalizationMethod | Specifies how the function normalizes the golden template to the target image.
edgeThicknessToIgnore | int | Specifies desired thickness of edges to be ignored. A value of 0 specifies that the algorithm will not ignore edges.
brightThreshold | float | Specifies the threshold for areas where the target image is brighter than the golden template.
darkThreshold | float | Specifies the threshold for areas where the target image is darker than the golden template.
binary | int | Specifies whether the function should return a binary image giving the location of defects, or a grayscale image giving the intensity of defects.


LCD Functions

The following functions are available only with a licensed version of NI Vision.

LCD functions allow you to isolate and read the value of a seven-segment LCD.

The following table lists the LCD functions. The functions in the LCD 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 individual function panels. Each LCD function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
LCD | Find LCD Segments | imaqFindLCDSegments
LCD | Read LCD | imaqReadLCD


LCDOptions

Describes how a function examines an LCD.

Elements

Name | Type | Description
litSegments | int | Set this parameter to TRUE if the segments are brighter than the background. Set this parameter to FALSE if the segments are darker than the background.
threshold | float | Determines whether a segment is ON or OFF. A segment is ON if the standard deviation of the pixels along a line profile across the segment is greater than threshold. Increase the value of threshold when using images with high contrast. Decrease the value of threshold when using images with low contrast.
sign | int | Indicates whether the function must read the sign of the indicator. Set this parameter to TRUE to search for the sign. Set this parameter to FALSE to not search for the sign.
decimalPoint | int | Determines whether to look for a decimal separator after each digit. Set this element to TRUE to search for the separator. Set this parameter to FALSE to not search for the separator.


LCDReport

Describes the state of an LCD.

Elements

Name | Type | Description
text | const char* | A string of the characters of the LCD.
segmentInfo | LCDSegments* | An array of LCDSegment structures describing which segments of each digit are on.
numCharacters | int | The number of characters that the function reads. Describes the number of elements in the segmentInfo array.
reserved | int | This element is reserved.


LCDSegments

Describes which segments of an LCD digit are on. The following figure shows the segments of an LCD.

Elements

Name | Type | Description
a:1 | unsigned | True if the a segment is on.
b:1 | unsigned | True if the b segment is on.
c:1 | unsigned | True if the c segment is on.
d:1 | unsigned | True if the d segment is on.
e:1 | unsigned | True if the e segment is on.
f:1 | unsigned | True if the f segment is on.
g:1 | unsigned | True if the g segment is on.
reserved:25 | unsigned | This element is reserved.


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 Vision | Coordinate Transform | Find Transform Pattern | imaqFindTransformPattern
Machine Vision | Coordinate Transform | Find Transform Rect | imaqFindTransformRect
Machine Vision | Coordinate Transform | Find Transform Rects | imaqFindTransformRects

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 Vision | Count and Measure Objects | Count Objects | imaqCountObjects
Machine Vision | Count and Measure Objects | Dispose Object Report | imaqDisposeObjectReport

Find Patterns Functions

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

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Machine Vision | Find Patterns | Find Pattern | imaqFindPattern

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 Vision | Locate Edges | Dispose Circular Edge Report | imaqDisposeCircularEdgeReport
Machine Vision | Locate Edges | Dispose Straight Edge Report | imaqDisposeStraightEdgeReport
Machine Vision | Locate Edges | Find Circular Edge | imaqFindCircularEdge
Machine Vision | Locate Edges | Find Concentric Edge | imaqFindConcentricEdge
Machine Vision | Locate Edges | Find Edge | imaqFindEdge

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 Vision | Measure Distances | Clamp Max | imaqClampMax
Machine Vision | Measure Distances | Clamp Min | imaqClampMin

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 Vision | Measure Intensities | Light Meter Line | imaqLightMeterLine
Machine Vision | Measure Intensities | Light Meter Point | imaqLightMeterPoint
Machine Vision | Measure Intensities | Light Meter Rect | imaqLightMeterRect

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 Vision | Select Region of Interest | Select Annulus | imaqSelectAnnulus
Machine Vision | Select Region of Interest | Select Line | imaqSelectLine
Machine Vision | Select Region of Interest | Select Point | imaqSelectPoint
Machine Vision | Select Region of Interest | Select Rect | imaqSelectRect


Memory Management Functions

The Memory Management function, imaqDispose(), deletes images, ROIs, arrays, and reports and then frees the space they occupied in memory.

The following table lists the Memory Management functions. The functions in the Memory Management 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 individual function panels. Each Memory Management function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Memory Management | Dispose | imaqDispose


Meter Functions

The following functions are available only with a licensed version of NI Vision.

Meter functions allow you to identify the arc information of a meter and then read that meter.

The following table lists the Meter functions. The functions in the Meter 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 individual function panels. Each Meter function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Meter | Get Meter Arc | imaqGetMeterArc
Meter | Read Meter | imaqReadMeter


MeterArc

Describes the arc across which a meter sweeps.

Elements

Name | Type | Description
needleBase | PointFloat | The coordinate location of the base of the meter needle.
arcCoordPoints | PointFloat* | An array of points describing the coordinate location of the meter arc.
numOfArcCoordPoints | int | The number of points in the arcCoordPoints array.
needleColor | int | This element is TRUE when the meter has a light-colored needle on a dark background. This element is FALSE when the meter has a dark-colored needle on a light background.


MeterArcMode

Describes how a function determines an arc.

Elements

Name | Value | Description
IMAQ_METER_ARC_ROI | 0 | The function uses the roi parameter and ignores the base, start, and end parameters.
IMAQ_METER_ARC_POINTS | 1 | The function uses the base,start, and end parameters and ignores the roi parameter.
IMAQ_METER_ARC_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


Obsolete Functions

Obsolete functions are functions from a previous version of NI Vision that have been replaced by newer functions. Though the current version of NI Vision still supports these functions, you should use the newer functions whenever possible.

The following table lists the Obsolete functions. The functions in the Obsolete 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 individual function panels. Each Obsolete function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Obsolete | Add Rotated Rect Contour | imaqAddRotatedRectContour
Obsolete | Automatic Threshold | imaqAutoThreshold
Obsolete | Best Circle | imaqBestCircle
Obsolete | Calculate Coefficient | imaqCalcCoeff
Obsolete | Change Color Space | imaqChangeColorSpace
Obsolete | Circles | imaqCircles
Obsolete | Color Histogram | imaqColorHistogram
Obsolete | Construct ROI | imaqConstructROI
Obsolete | Convex | imaqConvex
Obsolete | Coordinate Reference | imaqCoordinateReference
Obsolete | Set Calibration Info | imaqCopyCalibrationInfo
Obsolete | Create Overlay From Metafile | imaqCreateOverlayFromMetafile
Obsolete | Create Overlay From ROI | imaqCreateOverlayFromROI
Obsolete | Edge Tool | imaqEdgeTool
Obsolete | Edge Tool 2 | imaqEdgeTool2
Obsolete | Fit Circle | imaqFitCircle
Obsolete | Fit Ellipse | imaqFitEllipse
Obsolete | Get Calibration Information | imaqGetCalibrationInfo
Obsolete | Get Character Info | imaqGetCharInfo
Obsolete | Get Contour Information | imaqGetContourInfo
Obsolete | Get Particle Information | imaqGetParticleInfo
Obsolete | Is Vision Info Present | imaqIsVisionInfoPresent
Obsolete | Label | imaqLabel
Obsolete | Learn Pattern | imaqLearnPattern
Obsolete | Linear Averages | imaqLinearAverages
Obsolete | Line Gauge Tool | imaqLineGaugeTool
Obsolete | Load Pattern | imaqLoadPattern
Obsolete | Match Geometric Pattern | imaqMatchGeometricPattern
Obsolete | Match Pattern | imaqMatchPattern
Obsolete | Particle Filter | imaqParticleFilter
Obsolete | Particle Filter 2 | imaqParticleFilter2
Obsolete | Read Data Matrix Barcode | imaqReadDataMatrixBarcode
Obsolete | Read Text | imaqReadText
Obsolete | Rotate | imaqRotate
Obsolete | Save Pattern | imaqSavePattern
Obsolete | Select Particles | imaqSelectParticles
Obsolete | Set Calibration Information | imaqSetCalibrationInfo
Obsolete | Set Window Overlay | imaqSetWindowOverlay
Obsolete | Transform ROI | imaqTransformROI
Obsolete | Write PNG File | imaqWritePNGFile


OCR Functions

The following functions are available only with a licensed version of NI Vision.

Use the optical character recognition (OCR) functions to develop an OCR read application.

OCR is the process by which the machine vision software reads text and/or characters in an image. OCR consists of the following two procedures:

  • Training characters
  • Reading characters

Training characters is the process by which you teach the machine vision software the types of characters and/or patterns you want to read in the image during the reading procedure. You can use NI Vision to train any number of characters, creating a character set, which is the set of characters that you later compare with objects during the reading procedure. You store the character set you create in a character set file. Training might be a one-time process, or it might be a process you repeat several times, creating several character sets to broaden the scope of characters you want to detect in an image.

Reading characters is the process by which the machine vision application you create analyzes an image to determine if the objects match the characters you trained. The machine vision application reads characters in an image using the character set that you created when you trained characters.

The following table lists the OCR functions. The functions in the OCR 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 individual function panels. Each OCR function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
OCR | Create Character Set | imaqCreateCharSet
OCR | Delete Character | imaqDeleteChar
OCR | Get Character Count | imaqGetCharCount
OCR | Get Character Info 2 | imaqGetCharInfo2
OCR | Read OCR File | imaqReadOCRFile
OCR | Read Text 2 | imaqReadText2
OCR | Rename Character | imaqRenameChar
OCR | Set Reference Character | imaqSetReferenceChar
OCR | Train Characters | imaqTrainChars
OCR | Verify Patterns | imaqVerifyPatterns
OCR | Verify Text | imaqVerifyText
OCR | Write OCR File | imaqWriteOCRFile


OCRProcessingOptions

Configures how NI Vision processes the image before training or reading characters.

Refer to the NI OCR Training Interface Helpfor more information.

Elements

Name | Type | Description
mode | ThresholdMode | The thresholding mode.
lowThreshold | int | The low threshold value when you set mode to IMAQ_FIXED_RANGE. For other threshold modes, this parameter specifies the lower limit of the calculated threshold.
highThreshold | int | The high threshold value when you set mode to IMAQ_FIXED_RANGE. For other threshold modes, this parameter specifies the higher limit of the calculated threshold.
blockCount | int | The number of blocks for threshold calculation algorithms that require blocks. Valid values range from 4 to 50.
fastThreshold | int | Set this element to TRUE to use a faster, less accurate threshold calculation algorithm.
biModalCalculation | int | Set this element to TRUE to calculate both the low and high threshold values when using the fast thresholding method. Set this element to FALSE to calculate only the high threshold value when reading or training dark characters and to calculate only the low threshold value when reading or training light characters. This option is available only when fastThreshold is TRUE.
darkCharacters | int | Set this element to TRUE to read or train dark characters on a light background. Set this element to FALSE to read or train light characters on a dark background.
removeParticlesTouchingROI | int | Set this element to TRUE to remove the particles touching the ROI.
erosionCount | int | The number of erosions to perform. After performing the erosions, the function restores the remaining objects to their original uneroded size. Set this attribute to 0 if you do not want to remove small particles.


OCRSpacingOptions

Character size and spacing constraints you want to use during the training or reading process.

Refer to the NI OCR Training Interface Help for more information.

Elements

Name | Type | Description
minCharSpacing | int | The minimum number of pixels that must be between two characters for NI Vision to train or read the characters separately. This value cannot be less than maxHorizontalElementSpacing.
minCharSize | int | The minimum number of pixels required for an object to be a potentially identifiable character. The minimum acceptable value for this element is 1.
maxCharSize | int | The maximum number of pixels required for an object to be a potentially identifiable character. Set this element to 65536 to indicate that all character sizes greater than minCharSize are acceptable.
maxHorizontalElementSpacing | int | The maximum horizontal spacing, in pixels, allowed between character elements to train or read the character elements as a single character. This value cannot exceed minCharSpacing. The minimum acceptable value for this element is 0.
maxVerticalElementSpacing | int | The maximum vertical element spacing in pixels. Elements whose spacing from the main character element exceeds maxVerticalElementSpacing are not used for training or reading. Set this element to 0 to specify that any element in the ROI should be considered part of a character.
minBoundingRectWidth | int | The minimum possible width, in pixels, for a character bounding rectangle. The minimum acceptable value for this element is 1.
maxBoundingRectWidth | int | The maximum possible width, in pixels, for a character bounding rectangle. Set this property to 65,536 to specify that all widths greater than minBoundingRectWidth are acceptable.
minBoundingRectHeight | int | The minimum possible height, in pixels, for a character bounding rectangle. The minimum acceptable value for this element is 1.
maxBoundingRectHeight | int | The maximum possible height, in pixels, for a character bounding rectangle. Set this property to 65,536 to specify that all heights greater than minBoundingRectHeight are acceptable.
autoSplit | int | Set this element to TRUE to automatically adjust the location of the character bounding rectangle when characters overlap vertically. This element is useful when you are working with an image that contains slanted characters. If the characters are not slanted and/or do not overlap vertically, set this element to FALSE.


Operators Functions

Operator functions allow you to perform arithmetic or logical operations between two images or between an image and a constant.

The following table lists the Operators functions. The functions in the Operators 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 Operators function panel represents one function.

Arithmetic Functions

The following functions are available only with a licensed version of NI Vision.

Arithmetic functions allow you to perform arithmetic operations between two images or between an image and a constant.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Operators | Arithmetic | Absolute Difference | imaqAbsoluteDifference
Operators | Arithmetic | Absolute Difference Constant | imaqAbsoluteDifferenceConstant
Operators | Arithmetic | Add | imaqAdd
Operators | Arithmetic | Add Constant | imaqAddConstant
Operators | Arithmetic | Average | imaqAverage
Operators | Arithmetic | Average Constant | imaqAverageConstant
Operators | Arithmetic | Divide | imaqDivide
Operators | Arithmetic | Divide Constant | imaqDivideConstant
Operators | Arithmetic | Max | imaqMax
Operators | Arithmetic | Max Constant | imaqMaxConstant
Operators | Arithmetic | Min | imaqMin
Operators | Arithmetic | Min Constant | imaqMinConstant
Operators | Arithmetic | Modulo | imaqModulo
Operators | Arithmetic | Modulo Constant | imaqModuloConstant
Operators | Arithmetic | Multiply Divide | imaqMulDiv
Operators | Arithmetic | Multiply | imaqMultiply
Operators | Arithmetic | Multiply Constant | imaqMultiplyConstant
Operators | Arithmetic | Subtract | imaqSubtract
Operators | Arithmetic | Subtract Constant | imaqSubtractConstant

Logical Functions

The following functions are available only with a licensed version of NI Vision.

Logical functions allow you to perform logic operations between two images or between an image and a constant.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Operators | Logical | And | imaqAnd
Operators | Logical | And Constant | imaqAndConstant
Operators | Logical | Compare | imaqCompare
Operators | Logical | Compare Constant | imaqCompareConstant
Operators | Logical | Logical Difference | imaqLogicalDifference
Operators | Logical | Logical Difference Constant | imaqLogicalDifferenceConstant
Operators | Logical | Nand | imaqNand
Operators | Logical | Nand Constant | imaqNandConstant
Operators | Logical | Nor | imaqNor
Operators | Logical | Nor Constant | imaqNorConstant
Operators | Logical | Or | imaqOr
Operators | Logical | Or Constant | imaqOrConstant
Operators | Logical | Xnor | imaqXnor
Operators | Logical | Xnor Constant | imaqXnorConstant
Operators | Logical | Xor | imaqXor
Operators | Logical | Xor Constant | imaqXorConstant


Overlay Functions

Overlay functions allow you to create overlays and associate them with image windows.

The following table lists the Overlay functions. The functions in the Overlay 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 individual function panels. Each Overlay function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Overlay | Clear Overlay | imaqClearOverlay
Overlay | Copy Overlay | imaqCopyOverlay
Overlay | Merge Overlay | imaqMergeOverlay
Overlay | Overlay Arc | imaqOverlayArc
Overlay | Overlay Bitmap | imaqOverlayBitmap
Overlay | Overlay Closed Contour | imaqOverlayClosedContour
Overlay | Overlay Line | imaqOverlayLine
Overlay | Overlay Metafile | imaqOverlayMetafile
Overlay | Overlay Open Contour | imaqOverlayOpenContour
Overlay | Overlay Oval | imaqOverlayOval
Overlay | Overlay Points | imaqOverlayPoints
Overlay | Overlay Rect | imaqOverlayRect
Overlay | Overlay ROI | imaqOverlayROI
Overlay | Overlay Text | imaqOverlayText


OverlayTextOptions

Describes how a function overlays text.

Elements

Name | Type | Description
fontName | const char* | The name of the font to use. The function processes only the first 32 characters.
fontSize | int | The size of the font.
bold | int | Set this element to TRUE to bold the text.
italic | int | Set this element to TRUE to italicize the text.
underline | int | Set this element to TRUE to underline the text.
strikeout | int | Set this element to TRUE to strikeout the text.
horizontalTextAlignment | TextAlignment | Sets the alignment of the text.
verticalTextAlignment | VerticalTextAlignment | Sets the vertical alignment for the text.
backgroundColor | RGBValue | Sets the color for the text background pixels.
angle | double | The counterclockwise angle, in degrees, of the text relative to the x-axis.


Pattern Matching Functions

The following functions are available only with a licensed version of NI Vision.

Pattern Matching functions allow you to search for templates in an image.

The following table lists the Pattern Matching functions. The functions in the Pattern Matching 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 individual function panels. Each Pattern Matching function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Pattern Matching | Detect Circles | imaqDetectCircles
Pattern Matching | Detect Ellipses | imaqDetectEllipses
Pattern Matching | Detect Lines | imaqDetectLines
Pattern Matching | Detect Rectangles | imaqDetectRectangles
Pattern Matching | Get Geometric Features From Curves | imaqGetGeometricFeaturesFromCurves
Pattern Matching | Get Geometric Template Features | imaqGetGeometricTemplateFeatureInfo
Pattern Matching | Learn Color Pattern | imaqLearnColorPattern
Pattern Matching | Learn Geometric Pattern | imaqLearnGeometricPattern
Pattern Matching | Learn Multiple Geometric Patterns | imaqLearnMultipleGeometricPatterns
Pattern Matching | Learn Pattern 2 | imaqLearnPattern2
Pattern Matching | Match Color Pattern | imaqMatchColorPattern
Pattern Matching | Match Geometric Pattern 2 | imaqMatchGeometricPattern2
Pattern Matching | Match Multiple Geometric Pattern | imaqMatchMultipleGeometricPatterns
Pattern Matching | Match Pattern 2 | imaqMatchPattern2
Pattern Matching | Read Multiple Geometric Pattern File | imaqReadMultipleGeometricPatternFile
Pattern Matching | Refine Matches | imaqRefineMatches
Pattern Matching | Set Match Multiple Geometric Patterns Options | imaqSetMultipleGeometricPatternsOptions
Pattern Matching | Write Multiple Geometric Pattern File | imaqWriteMultipleGeometricPatternFile


Regions of Interest Functions

Regions of Interest functions allow you to create, modify, and extract information about regions of interest (ROIs).

The following table lists the Regions of Interest functions. The functions in the Regions of Interest 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 Regions of Interest function panel represents one function.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Regions of Interest | — | Construct ROI 2 | imaqConstructROI2
Regions of Interest | — | Create ROI | imaqCreateROI
Regions of Interest | — | Get ROI Bounding Box | imaqGetROIBoundingBox
Regions of Interest | — | Get ROI Color | imaqGetROIColor
Regions of Interest | — | Get Window ROI | imaqGetWindowROI
Regions of Interest | — | Set ROI Color | imaqSetROIColor
Regions of Interest | — | Set Window ROI | imaqSetWindowROI

Contours Functions

Contour functions allow you to create and modify individual contours of a region of interest.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Regions of Interest | Contours | Add Annulus Contour | imaqAddAnnulusContour
Regions of Interest | Contours | Add Closed Contour | imaqAddClosedContour
Regions of Interest | Contours | Add Line Contour | imaqAddLineContour
Regions of Interest | Contours | Add Open Contour | imaqAddOpenContour
Regions of Interest | Contours | Add Oval Contour | imaqAddOvalContour
Regions of Interest | Contours | Add Point Contour | imaqAddPointContour
Regions of Interest | Contours | Add Rect Contour | imaqAddRectContour
Regions of Interest | Contours | Add Rotated Rect Contour | imaqAddRotatedRectContour2
Regions of Interest | Contours | Copy Contour | imaqCopyContour
Regions of Interest | Contours | Get Contour | imaqGetContour
Regions of Interest | Contours | Get Contour Color | imaqGetContourColor
Regions of Interest | Contours | Get Contour Count | imaqGetContourCount
Regions of Interest | Contours | Get Contour Info | imaqGetContourInfo2
Regions of Interest | Contours | Move ROI | imaqMoveContour
Regions of Interest | Contours | Remove Contour | imaqRemoveContour
Regions of Interest | Contours | Set Contour Color | imaqSetContourColor

Regions of Interest Manipulation Functions

The following functions are available only with a licensed version of NI Vision.

Regions of Interest Manipulation functions allow you to transform regions of interest based on a coordinate system, convert mask images to and from regions of interest and extract region of interest profiles from images.

Class | Subclass | LabWindows/CVI Equivalent | Function Name
Regions of Interest | Regions of Interest Manipulation | Mask To ROI | imaqMaskToROI
Regions of Interest | Regions of Interest Manipulation | ROI Profile | imaqROIProfile
Regions of Interest | Regions of Interest Manipulation | ROI To Mask | imaqROIToMask
Regions of Interest | Regions of Interest Manipulation | Transform ROI | imaqTransformROI2


Utilities Functions

Utilities functions allow you to set up structures that you can embed in other functions to eliminate the need to declare certain types of variables such as Point, PointFloat, and Rect.

The following table lists the Utilities functions. The functions in the Utilities 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 individual function panels. Each Utilities function panel represents one function.

Class | LabWindows/CVI Equivalent | Function Name
Utilities | Get Kernel | imaqGetKernel
Utilities | Make Annulus | imaqMakeAnnulus
Utilities | Make Point | imaqMakePoint
Utilities | Make Point Float | imaqMakePointFloat
Utilities | Make Rect | imaqMakeRect
Utilities | Make Rect From Rotated Rect | imaqMakeRectFromRotatedRect
Utilities | Make Rotated Rect | imaqMakeRotatedRect
Utilities | Make Rotated Rect From Rect | imaqMakeRotatedRectFromRect


imaqAbsoluteDifference

Usage

int imaqAbsoluteDifference(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Subtracts one image from another and returns the absolute value of the difference.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first image to subtract.
sourceB | const Image* | The second image to subtract.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

The type of the sourceB image depends on the type of the sourceA, as follows:

  • If sourceA is IMAQ_IMAGE_U8, sourceB must be IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, or IMAQ_IMAGE_RGB.
  • If sourceA is IMAQ_IMAGE_I16 or IMAQ_IMAGE_SGL, sourceB must be IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, or IMAQ_IMAGE_SGL.
  • If sourceA is IMAQ_IMAGE_RGB, sourceB must be IMAQ_IMAGE_RGB or IMAQ_IMAGE_U8.


imaqAbsoluteDifferenceConstant

Usage

int imaqAbsoluteDifferenceConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Subtracts a constant from an image and returns the absolute value of the difference.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image from which the function subtracts a scalar constant.
value | PixelValue | The value to subtract from the source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

value must correspond to the image type, as follows:

  • If the image is IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, or IMAQ_IMAGE_SGL, use the grayscale value of the PixelValue union.
  • If the image is IMAQ_IMAGE_RGB, use the rgb value of the PixelValue union.


imaqAdd

Usage

int imaqAdd(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Adds two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first image to add.
sourceB | const Image* | The second image to add.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

The image type of sourceB depends on the image type of sourceA, as follows:

  • If sourceA is IMAQ_IMAGE_U8, sourceB must be IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, or IMAQ_IMAGE_RGB.
  • If sourceA is IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, or IMAQ_IMAGE_COMPLEX, sourceB must be IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, or IMAQ_IMAGE_COMPLEX.
  • If sourceA is IMAQ_IMAGE_RGB, sourceB must be IMAQ_IMAGE_RGB or IMAQ_IMAGE_U8.


imaqAddAnnulusContour

Usage

ContourID imaqAddAnnulusContour(ROI* roi, Annulus annulus);

Purpose

This function creates a new region of interest (ROI) contour that represents an annulus and then adds it to the provided ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI that will contain the new contour.
annulus | Annulus | Defines the location and size of the annulus.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddClassifierSample

Usage

int imaqAddClassifierSample(Image* image, ClassifierSession* session, const ROI* roi, const char* sampleClass, double* featureVector, unsigned int vectorSize);

Purpose

Adds a sample to a classifier. To add a sample to a custom classification session, use the featureVector and vectorSize parameters. To add a sample to any other type of classification session, use the image parameter.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image to add to the classifier. This parameter is optional if you are adding a sample to a custom classification session.
session | ClassifierSession* | The classifier session to use.
roi | const ROI* | The ROI containing the sample to add. Each contour of roi must be a rectangle, rotated rectangle, oval, annulus, or closed contour. Set this parameter to NULL to add the entire image.
sampleClass | const char* | The class to which this sample belongs.
featureVector | double* | The feature vector to add to the classifier. Use this parameter only when you are using a custom classifier. For any other type of classifier, set this parameter to NULL.
vectorSize | unsigned int | The number of elements in featureVector. Use this parameter only when you are using a custom classifier. For any other type of classifier, set this parameter to 0.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddClosedContour

Usage

ContourID imaqAddClosedContour(ROI* roi, const Point* points, int numPoints);

Purpose

Creates a new ROI contour based on the provided array of points. To make the contour, the function connects each point in the array to the next point in the array and connects the last point in the array to the first point in the array. The function adds the contour to the provided ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI to contain the new contour.
points | const Point* | An array of points describing the location and shape of the contour. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the array.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the added contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddConstant

Usage

int imaqAddConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Adds a constant value to each pixel in an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to which the function adds a scalar constant.
value | PixelValue | The value to add to the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddLineContour

Usage

ContourID imaqAddLineContour(ROI* roi, Point start, Point end);

Purpose

Creates a new line ROI contour and adds the line to the provided ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI to contain the new contour.
start | Point | The pixel location of the start of the line.
end | Point | The pixel location of the end of the line.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddOpenContour

Usage

ContourID imaqAddOpenContour(ROI* roi, const Point* points, int numPoints);

Purpose

Creates a new region of interest (ROI) contour based on the provided array of points. To make the contour, the function connects each point in the array to the next point in the array. The function does not connect the last point in the array to the first point in the array. The function adds the contour to the provided ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI to contain the new contour.
points | const Point* | An array of points describing the location and shape of the contour. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the array.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddOvalContour

Usage

ContourID imaqAddOvalContour(ROI* roi, Rect boundingBox);

Purpose

Creates a new oval region of interest (ROI) contour and adds the oval to the provided ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI to contain the new contour.
boundingBox | Rect | The pixel location information of the bounding rectangle of the oval.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddPointContour

Usage

ContourID imaqAddPointContour(ROI* roi, Point point);

Purpose

Creates a new single-point region of interest (ROI) contour and adds the point to the provided ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI to contain the new contour.
point | Point | The pixel location of the point.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddRectContour

Usage

ContourID imaqAddRectContour(ROI* roi, Rect rect);

Purpose

Creates a new rectangle region of interest (ROI) contour and adds the rectangle to the provided ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI to contain the new contour.
rect | Rect | The pixel location of the rectangle.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAddRotatedRectContour2

Usage

ContourID imaqAddRotatedRectContour2(ROI* roi, RotatedRect rect);

Purpose

This function creates a new region of interest (ROI) contour that represents a rotated rectangle and adds it to the provided ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI to contain the new contour.
rect | RotatedRect | The coordinate location information for the rotated rectangle.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAnd

Usage

int imaqAnd(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Computes a bitwise AND between two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAndConstant

Usage

int imaqAndConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Performs a bitwise AND between an image and a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to AND to the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAreScrollbarsVisible

Usage

int imaqAreScrollbarsVisible(int windowNumber, int* visible);

Purpose

Retrieves whether the scrollbars of the given image window are visible.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
visible | int* | On return, this parameter is TRUE if the scrollbars are visible and FALSE if the scrollbars are hidden. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAreToolsContextSensitive

Usage

int imaqAreToolsContextSensitive(int* sensitive);

Purpose

Returns the current status of context sensitive tool selection.

Parameters

Name | Type | Description
sensitive | int* | On return, TRUE if tool context sensitivity is enabled. FALSE if tools context sensitivity is disabled. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqArrayToComplexPlane

Usage

int imaqArrayToComplexPlane(Image* dest, const Image* source, const float* newPixels, ComplexPlane plane);

Purpose

Replaces a plane of a complex image with the given array of pixel values. The array must be the same size as the source image.

Image Types Supported

IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
newPixels | const float* | The two-dimensional array of pixel values. This array must be the same size as the source image. This parameter is required and cannot be NULL.
plane | ComplexPlane | The plane to replace. Specify IMAQ_REAL to replace the real plane or IMAQ_IMAGINARY to replace the imaginary plane.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqArrayToImage

Usage

int imaqArrayToImage(Image* image, const void* array, int numCols, int numRows);

Purpose

Sets the pixels of an image to the values in a given array. This function resizes the image to the size of the source array.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image whose pixels the function sets to match the input array.
array | const void* | The two-dimensional array of pixel values. This parameter is required and cannot be NULL.
numCols | int | The number of columns in the data array.
numRows | int | The number of rows in the data array.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

The type of the array you provide depends on the image type, as follows:

Image Type | Array Type
IMAQ_IMAGE_U8 | unsigned char
IMAQ_IMAGE_I16 | short
IMAQ_IMAGE_SGL | float
IMAQ_IMAGE_COMPLEX | Complex
IMAQ_IMAGE_RGB | RGBValue structures
IMAQ_IMAGE_HSL | HSLValue structures
IMAQ_IMAGE_RGB_U64 | RGBU64Value structures


imaqAttenuate

Usage

int imaqAttenuate(Image* dest, const Image* source, AttenuateMode highlow);

Purpose

Attenuates the frequencies of a complex image.

Image Types Supported

IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to attenuate.
highlow | AttenuateMode | The frequencies to attenuate.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAutoThreshold2

Usage

ThresholdData* imaqAutoThreshold2(Image* dest, const Image* source, int numClasses, ThresholdMethod method, const Image* mask);

Purpose

Automatically thresholds an image into multiple classes.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to threshold.
numClasses | int | The number of classes into which to threshold the image. Valid values range from 2 to 256.
method | ThresholdMethod | The method for binary thresholding. If numClasses is 2 (a binary threshold), method specifies how to calculate the classes. If numClasses is not 2, the function ignores this parameter.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. When calculating the auto threshold, the function considers only those pixels in image whose corresponding pixels in mask are non-zero. Set this parameter to NULL if you want the function to perform an auto threshold on the whole image.

Return Value

Type | Description
ThresholdData* | On success, this function returns an array of structures providing information about the threshold ranges that the function applied. The array contains a number of ThresholdData structures equal to numClasses. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().


imaqAverage

Usage

int imaqAverage(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Computes the average of two source images and places the result in the destination image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAverageConstant

Usage

int imaqAverageConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Computes the average between a source image and a constant and places the result into a destination image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to average with the source image. Use the grayscale member of the PixelValue union.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqBCGTransform

Usage

int imaqBCGTransform(Image* dest, const Image* source, const BCGOptions* options, const Image* mask);

Purpose

Applies brightness, contrast, and gamma correction to an image by computing and applying a lookup table. The function computes the lookup table based on the values in BCGOptions.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to transform.
options | const BCGOptions* | The parameters to use in the transform. This parameter is required and cannot be NULL.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function applies the transform only to those source pixels whose corresponding mask pixels are non-zero. All other pixel remain unchanged. Set this parameter to NULL to apply the transform to the whole source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—If NULL is passed, the function uses the following default parameters:

brightness | 128
contrast | 45
gamma | 1.0


imaqBestCircle

Usage

int imaqBestCircle(const PointFloat* points, int numPoints, PointFloat* center, double* radius);

Purpose

Returns the circle that best fits the given points.

Note This function is obsolete. You should use imaqFitCircle() instead, which incorporates the functionality of imaqBestCircle() but returns additional information such as the area of the circle.

Parameters

Name | Type | Description
points | const PointFloat* | The array of points to fit to the edge of the circle.
numPoints | int | The number of points in the supplied array. You must supply at least three points.
center | PointFloat* | On return, filled with the coordinates of the center of the circle. Set this parameter to NULL if you do not need this information.
radius | double* | On return, filled with the radius of the center of the circle. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqBringWindowToTop

Usage

int imaqBringWindowToTop(int windowNumber);

Purpose

Makes the given image window active.

Note If you are using Windows 2000, this function has no effect when your application is not the active application in the system.

Parameters

Name | Type | Description
windowNumber | int | The window number of the window you want to be active.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqBuildCoordinateSystem

Usage

int imaqBuildCoordinateSystem(const Point* points, ReferenceMode mode, AxisOrientation orientation, CoordinateSystem* system);

Purpose

Builds a reference for any arbitrary coordinate system with respect to the image plane. The reference of the coordinate system is specified as the position of the origin of the coordinate system, the orientation of its x-axis with respect to that of the image plane, and the direction of the y-axis, as shown in the following illustration.

Parameters

Name | Type | Description
points | const Point* | An array of points defining the coordinate system. If mode is IMAQ_COORD_X_Y, the points array must have three points. If mode is IMAQ_COORD_ORIGIN_X, the points array must have two points.
mode | ReferenceMode | Specifies the method that the function uses to calculate the coordinate system.
orientation | AxisOrientation | The direction of the y-axis of a coordinate system.
system | CoordinateSystem* | On return, contains the coordinate system defined by the point array. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCalcCoeff

Usage

int imaqCalcCoeff(const Image* image, const ParticleReport* report, MeasurementValue parameter, float* coefficient);

Purpose

Returns a coefficient associated with a particle. Call imaqGetParticleInfo() before calling imaqCalcCoeff() to get the particle reports you need to pass to this function.

Note This function is obsolete. The replacement function is imaqMeasureParticle(), which allows you to take both pixel and real-world measurements.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image containing the particle.
report | const ParticleReport* | The particle report you want to use to calculate the coefficient. You must generate this report using imaqGetParticleInfo() with the mode parameter set to IMAQ_ALL_INFO. This parameter is required and cannot be NULL.
parameter | MeasurementValue | The coefficient to calculate.
coefficient | float* | On return, the coefficient you request. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCaliperTool

Usage

CaliperReport* imaqCaliperTool(const Image* image, const Point* points, int numPoints, const EdgeOptions* edgeOptions, const CaliperOptions* caliperOptions, int* numEdgePairs);

Purpose

Finds edges along a path in an image, chooses pairs of the edges, and measures the distance between those pairs.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which the function finds edges.
points | const Point* | The path along which the function detects edges. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the points array.
edgeOptions | const EdgeOptions* | Describes how you want the function to find an edge. This parameter is required and cannot be NULL.
caliperOptions | const CaliperOptions* | Describes how you want the function to choose edge pairs. This parameter is required and cannot be NULL.
numEdgePairs | int* | On return, this parameter is set to the number of edge pairs found. If you do not need this information, set this parameter to NULL.

Return Value

Type | Description
CaliperReport* | On success, this function returns an array of information about each edge pair. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of this function by calling imaqDispose().


imaqCannyEdgeFilter

Usage

int imaqCannyEdgeFilter(Image* dest, const Image* source, const CannyOptions* options);

Purpose

Outlines edges in an image using the Canny algorithm, which is useful for images with poor signal-to-noise ratios.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image whose edges the function outlines.
options | const CannyOptions* | A description of filter parameters to use in the algorithm.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

sigma | 1.00
upperThreshold | 0.70
lowerThreshold | 0.20
windowSize | 9


imaqCast

Usage

int imaqCast(Image* dest, const Image* source, ImageType type, const float* lookup, int shift);

Purpose

Changes the type of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
dest | Image* | The destination image. Set this parameter equal to source or NULL to perform the change directly on the source image.
source | const Image* | The source image.
type | ImageType | The new type for the image. type is the new type for the dest image if it is being used, otherwise it is the new type for source.
lookup | const float* | An optional lookup table. If you do not wish to use a lookup table, this parameter may be NULL. See the description on how the lookup table is employed.
shift | int | The shift value for converting 16-bit images to 8-bit images. The function executes this conversion by shifting the 16-bit pixel values to the right by the specified number of shift operations, up to a maximum of 8 shift operations, and then truncating to get an 8-bit value. Enter a value of –1 to ignore the bit depth and shift 0. Enter a value of 0 to use the bit depth to cast the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

This function can perform the change directly on the source image, or it can leave the source image unchanged and instead copy the source image to a destination image and then convert the destination image. If dest is equal to source, the function changes the type of source. Otherwise, the function resizes dest to the size of source and then copies the pixels. If the source type and the type parameter are the same, the function copies pixels without modifications. You can also use imaqCopyRect() to copy pixels without modifying them. If the source type and the type parameter are not the same, the function casts the pixel values to the new type, as shown in the following table.

source Type | type Parameter | Result
IMAQ_IMAGE_U8 | IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL | If you provide a lookup table, the destination pixel will have the lookup value of the source pixel. The lookup table must contain 256 elements. If you do not provide a lookup table, the function copies the source value to the destination without modifications.
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL | IMAQ_IMAGE_RGB32 | Each color component of the destination is set to the source value. If the source value is greater than 255, the function sets each color component to 255. If the source value is less than 0, the function sets each color component to 0.
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL | IMAQ_IMAGE_HSL32 | The function sets the luminance component of the destination to the source value. If the source value is greater than 255, the function sets the luminance to 255. If the source value is less than 0, the function sets the luminance to 0. The function sets hue and saturation to 0.
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL | IMAQ_IMAGE_COMPLEX | The function sets the real component of the destination to the source value. The function sets the imaginary component of the destination to 0.
IMAQ_IMAGE_I16 | IMAQ_IMAGE_U8 | The function right-shifts the source value by the given shift value (divides each source pixel value by 2shift) and stores the value in the destination. If the shifted value is greater than 255, the function sets the destination value to 255.
IMAQ_IMAGE_I16 | IMAQ_IMAGE_SGL | If you provide a lookup table, the destination pixel will have the lookup value of the source pixel. The lookup table must contain 65,536 elements. If you do not provide a lookup table, the function copies the source value to the destination unmodified.
IMAQ_IMAGE_SGL | IMAQ_IMAGE_U8, IMAQ_IMAGE_I16 | The function sets the destination value to the source value. If the source value is out of the range of the destination, the function coerces the source to the range.
IMAQ_IMAGE_RGB | IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL | The function sets the destination value to the average of the three color components of the source.
IMAQ_IMAGE_RGB | IMAQ_IMAGE_HSL | The function converts each pixel from the RGB color space to the HSL color space.
IMAQ_IMAGE_RGB | IMAQ_IMAGE_COMPLEX | The function sets the real portion of the destination value to the average of the three color components of the source, and it sets the imaginary portion of the destination to 0.
IMAQ_IMAGE_HSL | IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL | The function sets the destination value to the luminance component of the source value.
IMAQ_IMAGE_HSL | IMAQ_IMAGE_RGB | The function converts each pixel from the HSL color space to the RGB color space.
IMAQ_IMAGE_HSL | IMAQ_IMAGE_COMPLEX | The function sets the real portion of the destination value to the value of the luminance component of the source, and it sets the imaginary portion of the destination to 0.
IMAQ_IMAGE_COMPLEX | IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL | The function sets the destination value to the magnitude of the source value.
IMAQ_IMAGE_COMPLEX | IMAQ_IMAGE_RGB | The function sets each color component of the destination value to the magnitude of the source value.
IMAQ_IMAGE_COMPLEX | IMAQ_IMAGE_HSL | The function sets the luminance component of the destination value to the magnitude of the source value, and it sets the hue and saturation components to 0.


imaqCentroid

Usage

int imaqCentroid(const Image* image, PointFloat* centroid, const Image* mask);

Purpose

Computes the centroid of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image whose centroid the function calculates.
centroid | PointFloat* | On return, the x- and y-coordinates of the centroid. This parameter is required and cannot be NULL.
mask | const Image* | An optional mask image. If NULL, the whole source image is used in the calculation. Otherwise, the function uses in the calculation only those pixels in the source whose corresponding pixels in the mask image are non-zero.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqChangeColorSpace2

Usage

Color2 imaqChangeColorSpace2(const Color2* sourceColor, ColorMode sourceSpace, ColorMode destSpace, double offset, const CIEXYZValue* whiteReference);

Purpose

Maps the value of a color in one color space into the value of the same color in another color space.

Parameters

Name | Type | Description
sourceColor | const Color2* | The color in the source space. This parameter is required and cannot be NULL.
sourceSpace | ColorMode | The source color space.
destSpace | ColorMode | The destination color space.
offset | double | If the destination space is HSL, the offset to add to the calculated hue (from 0 to 360). The default offset value of 0 results in a hue value of 0 for the color red (R=255, G=0, B=0). By changing the offset value, you can specify the RGB color that maps to a hue value of 0. When you want to analyze red or colors close to red in the HSL space, you can add an offset so that the hue values associated with these colors are not zero.
whiteReference | const CIEXYZValue* | If the destination space is CIE L*a*b*, the CIE XYZ components that map to white. If this parameter is set to NULL, the default values (0.950456,1,1.088754, 0), which map to the RGB values (255,255,255, 0), are used.

Return Value

Type | Description
Color2 | On success, this function returns the value of the color in the destination color space. On failure, this function returns black. To get extended error information, call imaqGetLastError().


imaqClampMax

Usage

int imaqClampMax(Image* image, RotatedRect searchRect, RakeDirection direction, float* distance, const FindEdgeOptions* options, const CoordinateTransform2* transform, PointFloat* firstEdge, PointFloat* lastEdge);

Purpose

Measures a distance from the sides of the search area towards the center of the search area. This function locates edges along a set of parallel search lines called a rake. The function detects the edges based on their contrast and slope. The function calculates a hit-line to the object through the first edge it detects. The function calculates a second hit-line to the object through the last edge it detects. The function measures the distance between those two lines.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image that the function uses for distance measurement.
searchRect | RotatedRect | The coordinate location of the rectangular search area of the distance measurement.
direction | RakeDirection | The direction the function search for edges along the search lines.
distance | float* | Upon return, the distance measured between the two parallel hit-lines. This parameter is required and cannot be NULL.
options | const FindEdgeOptions* | Describes how you want the function to detect edges and what information the function should overlay onto the image.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for searchRect. This parameter specifies how to transform the location of the distance measurement based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform searchRect.
firstEdge | PointFloat* | On return, the coordinate location of the first edge used to measure the distance. If you do not need this information, set this parameter to NULL.
lastEdge | PointFloat* | On return, the coordinate location of the last edge used to measure the distance. If you do not need this information, set this parameter to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqDispose().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
showSearchArea | FALSE
showSearchLines | FALSE
showEdgesFound | FALSE
showResult | TRUE


imaqClampMin

Usage

int imaqClampMin(Image* image, RotatedRect searchRect, RakeDirection direction, float* distance, const FindEdgeOptions* options, const CoordinateTransform2* transform, PointFloat* firstEdge, PointFloat* lastEdge);

Purpose

Measures a distance from the center of the search area towards the sides of the search area. This function locates edges along a set of parallel search lines called a rake. The function detects the edges based on their contrast and slope. The function calculates a hit-line to the object through the last edge in the first half of the search area. The function calculates a second hit-line to the object through the first edge detected in the last half of the search area. The function measures the distance between those two lines.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image that the function uses for distance measurement.
searchRect | RotatedRect | The coordinate location of the rectangular search area of the distance measurement.
direction | RakeDirection | The direction the function search for edges along the search lines.
distance | float* | Upon return, the distance measured between the two parallel hit-lines. This parameter is required and cannot be NULL.
options | const FindEdgeOptions* | Describes how you want the function to detect edges and what information the function should overlay onto the image.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for searchRect. This parameter specifies how to transform the location of the distance measurement based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform searchRect.
firstEdge | PointFloat* | On return, the coordinate location of the first edge used to measure the distance. If you do not need this information, set this parameter to NULL.
lastEdge | PointFloat* | On return, the coordinate location of the last edge used to measure the distance. If you do not need this information, set this parameter to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
showSearchArea | FALSE
showSearchLines | FALSE
showEdgesFound | FALSE
showResult | TRUE


imaqClassify

Usage

ClassifierReport* imaqClassify(Image* image, const ClassifierSession* session, const ROI* roi, double* featureVector, unsigned int vectorSize);

Purpose

Classifies an image or feature vector.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image to classify.
session | const ClassifierSession* | The classifier session to use.
roi | const ROI* | The ROI around the item to classify. Each contour of roi must be a rectangle, rotated rectangle, oval, annulus, or closed contour. Set this parameter to NULL to classify the entire image.
featureVector | double* | The feature vector to classify. Use this parameter only when you are using a custom classifier. For any other type of classifier, set this parameter to NULL.
vectorSize | unsigned int | The number of elements in featureVector. Use this parameter only when you are using a custom classifier. For any other type of classifier, set this parameter to 0. All feature vectors classified by a custom classifier must be the same size as the samples it contains

Return Value

Type | Description
ClassifierReport* | On success, this function returns a report containing the results of the classification. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the information by calling imaqDispose().


imaqClearError

Usage

int imaqClearError();

Purpose

Sets the NI Vision error status for the current thread to ERR_SUCCESS.

Return Value

Type | Description
int | This function returns a non-zero value.


imaqClearOverlay

Usage

int imaqClearOverlay(Image* image, void* reserved);

Purpose

Removes all overlay information associated with the image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | Image* | The image from which the function removes all overlay information.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqClipboardToImage

Usage

int imaqClipboardToImage(Image* dest, RGBValue* palette);

Purpose

Copies an image from the clipboard.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The image into which the function copies the clipboard image.
palette | RGBValue* | An array of 256 entries that receives the palette associated with the 8-bit clipboard image. If there is no palette associated with the image, the function fills in a gray palette. Set this parameter to NULL if you do not need the palette.

Return Value

Type | Description
int | On success, this function returns 1 if there was an image on the clipboard or –1 if there was no image on the clipboard. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCloseAVI

Usage

int imaqCloseAVI(AVISession session);

Purpose

This function closes an AVI file and makes it available to be read by other applications.

Parameters

Name | Type | Description
session | AVISession | The session to use.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCloseToolWindow

Usage

int imaqCloseToolWindow();

Purpose

Closes the tool window and frees all associated resources.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCloseWindow

Usage

int imaqCloseWindow(int windowNumber);

Purpose

Closes an image window and frees all associated resources.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window to close. Set this parameter to IMAQ_ALL_WINDOWS to close all of the image windows.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqColorBCGTransform

Usage

int imaqColorBCGTransform(Image* dest, const Image* source, const BCGOptions* redOptions, const BCGOptions* greenOptions, const BCGOptions* blueOptions, const Image* mask);

Purpose

Applies brightness, contrast, and gamma correction to each plane of a color image.

Image Types Supported

IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to transform.
redOptions | const BCGOptions* | The parameters to use in the transform of the red plane. Set this parameter to NULL to leave the red plane unchanged.
greenOptions | const BCGOptions* | The parameters to use in the transform of the green plane. Set this parameter to NULL to leave the green plane unchanged.
blueOptions | const BCGOptions* | The parameters to use in the transform of the blue plane. Set this parameter to NULL to leave the blue plane unchanged.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function transforms only those pixel in the source image whose corresponding pixels in the mask image are non-zero. Set this parameter to NULL to transform the whole image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqColorEqualize

Usage

int imaqColorEqualize(Image* dest, const Image* source, int colorEqualization);

Purpose

Calculates the histogram of each plane of a color image and redistributes pixel values across the desired range while maintaining pixel value groupings.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to equalize.
colorEqualization | int | Set this parameter to TRUE to equalize all three planes of the image. Set this parameter to FALSE to equalize only the luminance plane.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqColorHistogram2

Usage

ColorHistogramReport* imaqColorHistogram2(Image* image, int numClasses, ColorMode mode, const CIEXYZValue* whiteReference, Image* mask);

Purpose

Calculates the histogram, or pixel distribution, of a color image.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | Image* | The image whose histogram the function calculates.
numClasses | int | The number of classes into which the function separates the pixels.
mode | ColorMode | The color space in which to perform the histogram.
whiteReference | const CIEXYZValue* | If mode is CIE L*a*b*, the CIE XYZ components that map to white. If this parameter is set to NULL, the default values (0.950456,1,1.088754, 0), which map to the RGB values (255,255,255, 0), are used.
mask | Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function calculates the histogram using only those pixels in the image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to calculate the histogram of the entire image.

Return Value

Type | Description
ColorHistogramReport* | On success, this function returns a report describing the classification of each plane in a HistogramReport. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().When you are finished with the report, dispose of it by calling imaqDispose().


imaqColorLookup

Usage

int imaqColorLookup(Image* dest, const Image* source, ColorMode mode, const Image* mask, const short* plane1, const short* plane2, const short* plane3);

Purpose

Performs a transformation on an image by replacing each pixel value in a given color plane with the lookup table entry corresponding to that value.

Note This function does not support the CIE L*a*b* and CIE XYZ color modes.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to apply the lookup table to.
mode | ColorMode | The color space in which to apply the lookup table. If the image is not in the color space you specify, the function converts the pixels into the specified color space, applies the lookup table, and converts the pixels back to their original color space.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function applies the lookup to only those pixels in the source image whose corresponding pixels in the mask image are non-zero. Set this parameter to NULL to apply the lookup to the whole image.
plane1 | const short* | The lookup table for the first plane of the image. If you set this parameter, the lookup table must contain 256 values. Set this parameter to NULL to leave the first plane unchanged.
plane2 | const short* | The lookup table for the second plane of the image. If you set this parameter, the lookup table must contain 256 values. Set this parameter to NULL to leave the second plane unchanged.
plane3 | const short* | The lookup table for the third plane of the image. If you set this parameter, the lookup table must contain 256 values. Set this parameter to NULL to leave the third plane unchanged.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

plane1—The color plane depends on the mode, as follows:

IMAQ_RGB | red plane
IMAQ_HSL | hue plane
IMAQ_HSV | hue plane
IMAQ_HSI | hue plane

plane2—The color plane depends on mode, as follows:

IMAQ_RGB | green plane
IMAQ_HSL | saturation plane
IMAQ_HSV | saturation plane
IMAQ_HSI | saturation plane

plane3—The color plane depends on mode, as follows:

IMAQ_RGB | blue plane
IMAQ_HSL | luminance plane
IMAQ_HSV | value plane
IMAQ_HSI | intensity plane


imaqColorThreshold

Usage

int imaqColorThreshold(Image* dest, const Image* source, int replaceValue, ColorMode mode, const Range* plane1Range, const Range* plane2Range, const Range* plane3Range);

Purpose

Thresholds a color image. The function selects a pixel if all three color components fall within the specified range. The function replaces the value of selected pixels with the given replacement value and sets the value of unselected pixels to 0.

Note This function does not support the CIE L*a*b* and CIE XYZ color modes.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image. This image must be an IMAQ_IMAGE_U8 image.
source | const Image* | The image to threshold.
replaceValue | int | The value the function assigns to selected pixels.
mode | ColorMode | The color space to perform the threshold in.
plane1Range | const Range* | The selection range for the first plane of the image. Set this parameter to NULL to use a selection range from 0 to 255.
plane2Range | const Range* | The selection range for the second plane of the image. Set this parameter to NULL to use a selection range from 0 to 255.
plane3Range | const Range* | The selection range for the third plane of the image. Set this parameter to NULL to use a selection range from 0 to 255.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

plane1Range—The color plane depends on the mode, as follows:

IMAQ_RGB | red plane
IMAQ_HSL | hue plane
IMAQ_HSV | hue plane
IMAQ_HSI | hue plane

plane2Range—The color plane depends on mode, as follows:

IMAQ_RGB | green plane
IMAQ_HSL | saturation plane
IMAQ_HSV | saturation plane
IMAQ_HSI | saturation plane

plane3Range—The color plane depends on mode, as follows:

IMAQ_RGB | blue plane
IMAQ_HSL | luminance plane
IMAQ_HSV | value plane
IMAQ_HSI | intensity plane


imaqCompare

Usage

int imaqCompare(Image* dest, const Image* source, const Image* compareImage, ComparisonFunction compare);

Purpose

Copies the source image to the destination image in the following manner: If the given comparison between the source pixel value and its corresponding comparison image pixel value is true, the function sets the destination pixel value to 0. If the comparison is false, the function copies the source pixel value to the destination pixel.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
compareImage | const Image* | The image to which the function compares the source image. This image must be the same type of image as source.
compare | ComparisonFunction | The method in which the function compares images.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCompareConstant

Usage

int imaqCompareConstant(Image* dest, const Image* source, PixelValue value, ComparisonFunction compare);

Purpose

Copies the source image to the destination image in the following manner: If the given comparison between the source pixel value and the given constant is true, the function sets the destination pixel value to 0. If the comparison is false, the function copies the source pixel value to the destination.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to compare to the source image. Use the grayscale member of the PixelValue union.
compare | ComparisonFunction | The method in which the function compares images.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCompareGoldenTemplate

Usage

int imaqCompareGoldenTemplate(const Image* image, Image* goldenTemplate, Image* brightDefects, Image* darkDefects, const InspectionAlignment* alignment, const InspectionOptions* options);

Purpose

Compares the golden template to an image at a given alignment.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image to inspect for defects.
goldenTemplate | Image* | The golden template to compare against image.
brightDefects | Image* | The destination image for bright defects, or both kinds of defects if the same image is also passed to darkDefects.
darkDefects | Image* | The destination image for dark defects.
alignment | const InspectionAlignment* | The alignment within image where the goldenTemplate is located. This parameter is required and cannot be NULL.
options | const InspectionOptions* | is a cluster specifying the golden template comparison.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default match options, as follows:

registrationMethod | IMAQ_REGISTRATION_NONE
normalizationMethod | IMAQ_NORMALIZATION_NONE
edgeThicknessToIgnore | 0
brightThreshold | 30
darkThreshold | 30
binary | TRUE


imaqComplexPlaneToArray

Usage

float* imaqComplexPlaneToArray(const Image* image, ComplexPlane plane, Rect rect, int* columns, int* rows);

Purpose

Extracts a plane from a complex image into a two-dimensional array.

Image Types Supported

IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
image | const Image* | The image whose plane of pixel values are to be placed into an array.
plane | ComplexPlane | The plane to extract.
rect | Rect | Specifies a rectangular region of the image to return. Set this parameter to IMAQ_NO_RECT to return the specified plane of the entire image.
columns | int* | On return, the number of columns in the returned array. Set this parameter to NULL if you do not need this information.
rows | int* | On return, the number of rows in the returned array. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
float* | On success, this function returns a two-dimensional array of values corresponding to the pixel values of the extracted plane. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().


imaqConcentricRake

Usage

ConcentricRakeReport* imaqConcentricRake(const Image* image, const ROI* roi, ConcentricRakeDirection direction, EdgeProcess process, const RakeOptions* options);

Purpose

Finds edges along concentric circular or annular paths in the image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which to find edges.
roi | const ROI* | The annular region the function looks in for the edges. The first contour of roi must be an annulus.
direction | ConcentricRakeDirection | The direction the function search for edges along the search lines.
process | EdgeProcess | Defines the edges for which the function looks.
options | const RakeOptions* | Describes how to search for the edges.

Return Value

Type | Description
ConcentricRakeReport* | On success, this function returns information describing the calculated edges and the concentric rake used by the function. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDispose().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
subpixelType | IMAQ_QUADRATIC
subpixelDivisions | 1


imaqConjugate

Usage

int imaqConjugate(Image* dest, const Image* source);

Purpose

Computes the conjugate of a complex image.

Image Types Supported

IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image whose conjugate the function calculates.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqConstructROI2

Usage

int imaqConstructROI2(const Image* image, ROI* roi, Tool initialTool, const ToolWindowOptions* tools, const ConstructROIOptions2* options, int* okay);

Purpose

Displays the image in a modal window and allows the user to draw a region of interest (ROI) on it. After the user draws the ROI, the function closes the window.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | Specifies the image that the user selects an ROI from.
roi | ROI* | Specifies the ROI that initially appears in the ROI constructor window. The user can then modify this ROI by adding, removing, resizing, and moving contours. The function applies the results of these modifications to the ROI.
initialTool | Tool | Specifies the initially selected tool in the ROI constructor window. This tool must be available in the ROI constructor window.
tools | const ToolWindowOptions* | Determines the availability of tools in the ROI constructor window. Set tools to NULL to display all the tools.
options | const ConstructROIOptions2* | Describes how a function presents the ROI constructor window.
okay | int* | Upon return, this parameter is TRUE if the user pressed OK to end the selection of a line. Otherwise, this parameter is FALSE. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

windowNumber | IMAQ_MODAL_DIALOG
windowTitle | "ROI Constructor"
type | IMAQ_PALETTE_GRAY
palette | NULL
numColors | 0
maxContours | 1


imaqConvexHull

Usage

int imaqConvexHull(Image* dest, Image* source, int connectivity8);

Purpose

Computes the convex envelope for each labeled particle in the source image. If the source image contains more than one particle, you must label each particle with imaqLabel2() before calling this function.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image containing the labeled particles that the function calculates convex envelopes for.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqConvolve

Usage

int imaqConvolve(Image* dest, Image* source, const float* kernel, int matrixRows, int matrixCols, float normalize, const Image* mask);

Purpose

Applies a linear filter to an image by convolving the image with a filtering kernel. The convolution kernel must have an odd width and height.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image to filter. This function modifies the border of the source image. The border must be at least half as large as the larger dimension of the kernel.
kernel | const float* | The matrix representing the linear filter. This parameter is required and cannot be NULL.
matrixRows | int | The number of rows in the kernel matrix. This number must be odd.
matrixCols | int | The number of columns in the kernel matrix. This number must be odd.
normalize | float | The normalization factor. After performing the convolution, the function divides each pixel value by this value. Set this parameter to 0 to divide by the sum of the elements of the kernel.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function filters only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to filter the entire image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqCopyCalibrationInfo

Usage

int imaqCopyCalibrationInfo(Image* dest, const Image* source);

Purpose

Copies calibration information from a calibrated image to an uncalibrated image. Both images must be the same size.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The image whose calibration information the function sets.
source | const Image* | The calibrated image that contains the calibration information the function copies to the destination image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCopyCalibrationInfo2

Usage

int imaqCopyCalibrationInfo2(Image* dest, Image* source, Point offset);

Purpose

Copies calibration information from a calibrated image to an uncalibrated image. Both images must be the same size.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The image whose calibration information the function sets.
source | Image* | The calibrated image that contains the calibration information the function copies to the destination image.
offset | Point | The offset of dest within source.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCopyContour

Usage

ContourID imaqCopyContour(ROI* destRoi, const ROI* sourceRoi, ContourID id);

Purpose

Copies a contour existing in one region of interest (ROI) to another ROI. Copying the contour does not affect the original contour or the source ROI.

Parameters

Name | Type | Description
destRoi | ROI* | The ROI to which the function adds the contour.
sourceRoi | const ROI* | The ROI that contains the contour to copy.
id | ContourID | The contour to add to the ROI.

Return Value

Type | Description
ContourID | On success, this function returns the ContourID of the contour in the destination ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCopyFromRing

Usage

Image* imaqCopyFromRing(SESSION_ID sessionID, Image* image, int imageToCopy, int* imageNumber, Rect rect);

Purpose

Copies an area of a buffer to a user-specified image. This function is useful for ring acquisitions if you do not want to extract the buffer.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.
image | Image* | Receives the copied image. If you set this parameter to NULL, the function creates an image to receive the copy.
imageToCopy | int | The image to copy from the ring acquisition. The cumulative buffer index specifies the image to copy. If another image has overwritten imageToCopy, the function returns the next available image.
imageNumber | int* | The cumulative buffer index of the copied image. Set this parameter to NULL if you do not need this information.
rect | Rect | The rectangular area of the image in the ring that the function copies. If you set this parameter to IMAQ_NO_RECT, or if the area is larger than the image in the ring, the function copies the entire image.

Return Value

Type | Description
Image* | On success, this function returns the copied image. On failure, the function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the image, dispose of it by calling imaqDispose().


imaqCopyOverlay

Usage

int imaqCopyOverlay(Image* dest, const Image* source, void* reserved);

Purpose

Copies overlay information existing in one image to another image. This overlay is added to the existing overlay information on the destination image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCopyRect

Usage

int imaqCopyRect(Image* dest, const Image* source, Rect rect, Point destLoc);

Purpose

Copies an area of one image into another image. You can copy the source area to a new destination image or to another area in the source image. The source and destination images must be of the same type. If the source area is larger than the destination area, the source area is clipped. The size of the destination image and pixels outside the destination area remain unchanged. To make a duplicate of an image, including border and calibration information, use imaqDuplicate().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
rect | Rect | The area of the source to copy into the destination. Set this parameter to IMAQ_NO_RECT to copy the whole source image to the destination.
destLoc | Point | The coordinates of the top-left pixel in the destination image where the function copies the source area. This location can be anywhere on the image or on the border of the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCorrectCalibratedImage

Usage

int imaqCorrectCalibratedImage(Image* dest, const Image* source, PixelValue fill, InterpolationMethod method, const ROI* roi);

Purpose

Spatially corrects an image by applying the calibration information associated with the image.

Note You must first attach calibration information to this image by using one of the following functions:
imaqCopyCalibrationInfo()
imaqLearnCalibrationGrid()
imaqLearnCalibrationPoints()
imaqSetSimpleCalibration()

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The calibrated image that the function corrects.
fill | PixelValue | The value that the function fills pixels in a corrected image with. These pixels were not part of the original image.
method | InterpolationMethod | The method of interpolation. The valid interpolation methods for correction are IMAQ_ZERO_ORDER and IMAQ_BILINEAR.
roi | const ROI* | Specifies the region of the image the function corrects. Set this parameter to NULL to correct the whole image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCorrelate

Usage

int imaqCorrelate(Image* dest, Image* source, const Image* templateImage, Rect rect);

Purpose

Computes the normalized cross-correlation between a source image and a template image. This operation is time-intensive. To reduce the correlation time, use a small template, reduce the search area by using the area rectangle, and make the template image width a multiple of 4.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The source image. The correlation modifies the border of the source image. The border must be at least half as large as the larger dimension of the template image.
templateImage | const Image* | The template image to correlate against the source.
rect | Rect | The area of the source image on which to perform the correlation. Set this parameter to IMAQ_NO_RECT to perform the correlation on the whole source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqCountObjects

Usage

ObjectReport* imaqCountObjects(Image* image, RotatedRect searchRect, const CountObjectsOptions* options, const CoordinateTransform2* transform, int* numObjects);

Purpose

Locates, counts, and measures objects in a rectangular search area. This function uses a threshold on the pixel intensities to segment the objects from their background. The function then locates and measures the segmented objects.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image that the function uses for object analysis.
searchRect | RotatedRect | The coordinate location of the rectangular search area of the object analysis. Set this parameter to IMAQ_NO_ROTATED_RECT to search the entire image.
options | const CountObjectsOptions* | Defines the parameters of the algorithm the function uses to locate the objects and the information the function overlays to the image.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for searchRect. This parameter specifies how to transform the location of the object detection based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform searchRect.
numObjects | int* | On return, the number of objects that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
ObjectReport* | On success, this function returns an array of reports describing each of the objects found by the function. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDispose().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

type | IMAQ_BRIGHT_OBJECTS
threshold | 128
rejectBorder | FALSE
fillHoles | FALSE
useMinSize | FALSE
minSize | 0
useMaxSize | FALSE
maxSize | 0
showSearchArea | FALSE
showObjectCenter | TRUE
showBoundingBox | TRUE


imaqCountParticles

Usage

int imaqCountParticles(Image* image, int connectivity8, int* numParticles);

Purpose

Counts the number of particles in a binary image, and makes basic calculations about the particles to increase the efficiency of the imaqMeasureParticle() function.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image on which to count particles.
connectivity8 | int | Set this parameter to TRUE to use connectivity-8 to determine whether pixels are part of the same particle. Set this parameter to FALSE to use connectivity-4 to determine whether pixels are part of the same particle. For more information about connectivity, refer to Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.
numParticles | int* | On return, the number of particles in the image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCreateAVI

Usage

AVISession imaqCreateAVI(const char* fileName, const char* compressionFilter, int quality, unsigned int framesPerSecond, unsigned int maxDataSize);

Purpose

This function creates an AVI file so that images and data can be written to it.

Parameters

Name | Type | Description
fileName | const char* | The name of the AVI file to create. The file extension must be
compressionFilter | const char* | The name of the compression filter to use, if any. Call imaqGetFilterNames() for a list of available compression filters. Set this parameter to NULL to write uncompressed images.
quality | int | If compression is being used, the quality of the compression, between 0-1000. Use IMAQ_USE_DEFAULT_QUALITY to use the default for the compression filter. Note that not all compression filters allow you to set the quality.
framesPerSecond | unsigned int | The number of frames per second at which to play the AVI. Note that this parameter indicates the desired playback rate for the AVI you create. The AVI may play at a slower rate depending on the performance of the system on which it plays.
maxDataSize | unsigned int | The maximum size of the data attached to each frame. Set this parameter to 0 if you do not want to attach data to this AVI.

Return Value

Type | Description
AVISession | On success, this function returns a session ID associated with the given AVI file. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCreateCharSet

Usage

CharSet* imaqCreateCharSet();

Purpose

Creates a new, empty character set.

Return Value

Type | Description
CharSet* | On success, this function returns a pointer to a new, empty CharSet. On failure, this function returns NULL. To get extended error information, call imaqGetError(). When you finish with the character set, dispose of it by calling imaqDispose().


imaqCreateClassifier

Usage

ClassifierSession* imaqCreateClassifier(ClassifierType type);

Purpose

Creates a new classifier session.

Parameters

Name | Type | Description
type | ClassifierType | The type of the classifier session to create.

Return Value

Type | Description
ClassifierSession* | On success, this function returns a new classifier session. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the information by calling imaqDispose().


imaqCreateImage

Usage

Image* imaqCreateImage(ImageType type, int borderSize);

Purpose

Creates an image. The created image will be 0 x 0 pixels in size. To change the image size, use imaqSetImageSize().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
type | ImageType | The type of image to create.
borderSize | int | The size of the image border. For more information about borders, refer to Chapter 1, Digital Images, of the NI Vision Concepts Manual.

Return Value

Type | Description
Image* | On success, this function returns the created image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the created image, dispose of it by calling imaqDispose().


imaqCreateROI

Usage

ROI* imaqCreateROI();

Purpose

Creates a new, empty region of interest (ROI).

Return Value

Type | Description
ROI* | On success, this function returns a pointer to a new, empty ROI. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the ROI, dispose of the pointer by calling imaqDispose().


imaqDanielssonDistance

Usage

int imaqDanielssonDistance(Image* dest, Image* source);

Purpose

Creates a very accurate distance map based on the Danielsson distance algorithm. The function encodes the pixel value of a particle as a function of the distance of the pixel from the particle perimeter. For a faster but less precise algorithm, use imaqSimpleDistance().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image that the function uses to compute the distance map. The function modifies the border of the source image. The border must be at least one pixel wide.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqDeleteChar

Usage

int imaqDeleteChar(CharSet* set, int index);

Purpose

Deletes a character from the trained character set.

Parameters

Name | Type | Description
set | CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
index | int | The index of a character in the trained character set to delete. Set this parameter to IMAQ_ALL_CHARACTERS to clear the entire trained character set.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDeleteClassifierSample

Usage

int imaqDeleteClassifierSample(ClassifierSession* session, int index);

Purpose

Deletes a sample from a classifier session.

Parameters

Name | Type | Description
session | ClassifierSession* | The session containing the sample to delete.
index | int | The index of the sample to delete. Use IMAQ_ALL_SAMPLES to delete all samples from this session.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDetectCircles

Usage

CircleMatch* imaqDetectCircles(const Image* image, const CircleDescriptor* circleDescriptor, const CurveOptions* curveOptions, const ShapeDetectionOptions* shapeDetectionOptions, const ROI* roi, int* numMatchesReturned);

Purpose

Searches for circles in an image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image on which to detect circles.
circleDescriptor | const CircleDescriptor* | A structure that describes the circles to search for in the image. This parameter is required and cannot be NULL.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter.
shapeDetectionOptions | const ShapeDetectionOptions* | The options to use when detecting circles.
roi | const ROI* | The region of interest applied to the image that specifies where circles can be detected. Set this parameter to NULL to search the entire image.
numMatchesReturned | int* | On return, the number of circles that the function matched. Set this parameter to NULL if you do not wish to return information about the number of matched circles.

Return Value

Type | Description
CircleMatch* | On success, this function returns an array of information about each match found. On failure, the value is NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

curveOptions—Set curveOptions to NULL to use the default curve options, as follows:

extractionMode | IMAQ_NORMAL_IMAGE
threshold | 75
filterSize | IMAQ_NORMAL
minLength | 25
rowStepSize | 15
columnStepSize | 15
maxEndPointGap | 10
onlyClosed | FALSE
subpixelAccuracy | FALSE

shapeDetectionOptions—Set shapeDetectionOptions to NULL to use the default shape detection options, as follows:

mode | IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANT
orientationRanges | NULL
numOrientationRanges | 0
scaleRange | {75, 125}
minMatchScore | 800


imaqDetectEllipses

Usage

EllipseMatch* imaqDetectEllipses(const Image* image, const EllipseDescriptor* ellipseDescriptor, const CurveOptions* curveOptions, const ShapeDetectionOptions* shapeDetectionOptions, const ROI* roi, int* numMatchesReturned);

Purpose

Searches for ellipses in an image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image on which to detect ellipses.
ellipseDescriptor | const EllipseDescriptor* | A structure that describes the ellipses to search for in the image. This parameter is required and cannot be NULL.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter.
shapeDetectionOptions | const ShapeDetectionOptions* | The options to use when detecting ellipses.
roi | const ROI* | The region of interest applied to the image that specifies where ellipses can be detected. Set this parameter to NULL to search the entire image.
numMatchesReturned | int* | On return, the number of ellipses that the function matched. Set this parameter to NULL if you do not wish to return information about the number of matched ellipses.

Return Value

Type | Description
EllipseMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

curveOptions—Set curveOptions to NULL to use the default curve options, as follows:

extractionMode | IMAQ_NORMAL_IMAGE
threshold | 75
filterSize | IMAQ_NORMAL
minLength | 25
rowStepSize | 15
columnStepSize | 15
maxEndPointGap | 10
onlyClosed | FALSE
subpixelAccuracy | FALSE

shapeDetectionOptions—Set shapeDetectionOptions to NULL to use the default shape detection options, as follows:

mode | IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANT
orientationRanges | NULL
numOrientationRanges | 0
scaleRange | {75, 125}
minMatchScore | 800


imaqDetectExtremes

Usage

ExtremeReport* imaqDetectExtremes(const double* pixels, int numPixels, DetectionMode mode, const DetectExtremesOptions* options, int* numExtremes);

Purpose

Finds the location, amplitude, and second derivative of the extremes (either peaks or valleys) in the input array. This function uses an algorithm that fits a quadratic polynomial to sequential groups of data points.

Parameters

Name | Type | Description
pixels | const double* | The array of pixel data the function processes.
numPixels | int | The number of pixels in the supplied array. You must supply at least as many pixels as the value you supply for the width element in the options parameter.
mode | DetectionMode | Determines if the function detects peaks or detects valleys.
options | const DetectExtremesOptions* | Describes how the function calculates the extremes.
numExtremes | int* | On return, the number of extremes found by the function. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
ExtremeReport* | On success, this function returns an array of information about each extreme found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

threshold | 0
width | 3


imaqDetectLines

Usage

LineMatch* imaqDetectLines(const Image* image, const LineDescriptor* lineDescriptor, const CurveOptions* curveOptions, const ShapeDetectionOptions* shapeDetectionOptions, const ROI* roi, int* numMatchesReturned);

Purpose

Searches for lines in an image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image on which to detect lines.
lineDescriptor | const LineDescriptor* | A structure that describes the lines to search for in the image. This parameter is required and cannot be NULL.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter.
shapeDetectionOptions | const ShapeDetectionOptions* | The options to use when detecting lines.
roi | const ROI* | The region of interest applied to the image that specifies where lines can be detected. Set this parameter to NULL to search the entire image.
numMatchesReturned | int* | On return, the number of lines that the function matched. Set this parameter to NULL if you do not wish to return information about the number of matched lines.

Return Value

Type | Description
LineMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

curveOptions—Set curveOptions to NULL to use the default curve options, as follows:

extractionMode | IMAQ_NORMAL_IMAGE
threshold | 75
filterSize | IMAQ_NORMAL
minLength | 25
rowStepSize | 15
columnStepSize | 15
maxEndPointGap | 10
onlyClosed | FALSE
subpixelAccuracy | FALSE

shapeDetectionOptions—Set shapeDetectionOptions to NULL to use the default shape detection options, as follows:

mode | IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANT
orientationRanges | NULL
numOrientationRanges | 0
scaleRange | {75, 125}
minMatchScore | 800


imaqDetectRectangles

Usage

RectangleMatch* imaqDetectRectangles(const Image* image, const RectangleDescriptor* rectangleDescriptor, const CurveOptions* curveOptions, const ShapeDetectionOptions* shapeDetectionOptions, const ROI* roi, int* numMatchesReturned);

Purpose

Searches for rectangles in an image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image on which to detect rectangles.
rectangleDescriptor | const RectangleDescriptor* | A structure that describes the rectangles to search for in the image. This parameter is required and cannot be NULL.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter.
shapeDetectionOptions | const ShapeDetectionOptions* | The options to use when detecting rectangles.
roi | const ROI* | The region of interest applied to the image that specifies where rectangles can be detected. Set this parameter to NULL to search the entire image.
numMatchesReturned | int* | On return, the number of rectangles that the function matched. Set this parameter to NULL if you do not wish to return information about the number of matched rectangles.

Return Value

Type | Description
RectangleMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

curveOptions—Set curveOptions to NULL to use the default curve options, as follows:

extractionMode | IMAQ_NORMAL_IMAGE
threshold | 75
filterSize | IMAQ_NORMAL
minLength | 25
rowStepSize | 15
columnStepSize | 15
maxEndPointGap | 10
onlyClosed | FALSE
subpixelAccuracy | FALSE

shapeDetectionOptions—Set shapeDetectionOptions to NULL to use the default shape detection options, as follows:

mode | IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANT
orientationRanges | NULL
numOrientationRanges | 0
scaleRange | {75, 125}
minMatchScore | 800


imaqDetectRotation

Usage

int imaqDetectRotation(const Image* referenceImage, const Image* testImage, PointFloat referenceCenter, PointFloat testCenter, int radius, float precision, double* angle);

Purpose

Detects the rotational shift between two images, usually a reference image containing a part at a known orientation and another image containing the part in an unknown position. This function extracts pixel values around a circular region in the reference image and compares these values to the same region in the test image. The algorithm looks for the rotational shift between those two samples.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
referenceImage | const Image* | The reference image.
testImage | const Image* | The test image.
referenceCenter | PointFloat | The center point of the circular region in the reference image.
testCenter | PointFloat | The center point of the circular region in the test image.
radius | int | The radius of the circles used to detect rotation.
precision | float | The sampling period, in degrees, of the pixel values that the function extracts from the circular region.
angle | double* | On return, the angle, in degrees, between the two images. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

precision—The sampling period directly affects the speed of the function. If the sampling period is high (meaning that the number of samples along the circular region is small), the processing speed of the function increases at the cost of reduced accuracy in the computed rotational shift. In many cases, you do not need a precision higher than 5 degrees to position the regions of inspection of a part. If the sampling period is less than or equal to 0, the function returns an error.


imaqDisplayImage

Usage

int imaqDisplayImage(const Image* image, int windowNumber, int resize);

Purpose

Displays an image in an image window. The window becomes visible when you call the function. The window is associated with the image until you close the window, dispose of the image, or call this function again with the same window number. Call this function to refresh the display of the window, including overlays. Use imaqSetBitDepth() to set the bit depth of 16-bit monochrome and 64-bit RGB images. imaqDisplayImage uses this specified bit depth to display the image. Use imaqSetWindowDisplayMapping() to set the pixel mapping policy for displaying 16-bit monochrome images of an unspecified bit depth.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image to display in the window.
windowNumber | int | The window number of the window in which to display the image. There are 16 image windows, which have window numbers 0-15. To obtain a window number not in use, call imaqGetWindowHandle().
resize | int | If you set this parameter to TRUE, the function resizes the window to the size of the image. If you set this parameter to FALSE, the window size does not change.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDispose

Usage

int imaqDispose(void* object);

Purpose

Cleans up resources associated with images, regions of interest (ROIs), arrays, and reports that you no longer need. After you dispose of something, you can no longer use it.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
object | void* | The image, ROI, array, or report whose memory you want to free.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDisposeCircularEdgeReport

Usage

int imaqDisposeCircularEdgeReport(CircularEdgeReport* report);

Purpose

Cleans up resources associated with a CircularEdgeReport structure.

Parameters

Name | Type | Description
report | CircularEdgeReport* | The report whose memory you want to free.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDisposeObjectReport

Usage

int imaqDisposeObjectReport(ObjectReport* report);

Purpose

Cleans up resources associated with an array of ObjectReport structures.

Parameters

Name | Type | Description
report | ObjectReport* | The array of reports whose memory you want to free.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDisposeStraightEdgeReport

Usage

int imaqDisposeStraightEdgeReport(StraightEdgeReport* report);

Purpose

Cleans up resources associated with a StraightEdgeReport structure.

Parameters

Name | Type | Description
report | StraightEdgeReport* | The report whose memory you want to free.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDivide

Usage

int imaqDivide(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Divides two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first image to divide.
sourceB | const Image* | The second image to divide.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

The image type of sourceB depends on the image type of sourceA, as follows:

  • If sourceA is IMAQ_IMAGE_I16, sourceB must be IMAQ_IMAGE_I16 or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_SGL, sourceB must be IMAQ_IMAGE_SGL, IMAQ_IMAGE_I16, or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_COMPLEX, sourceB must be IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_SGL, IMAQ_IMAGE_I16, or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_RGB, sourceB must be IMAQ_IMAGE_RGB or IMAQ_IMAGE_U8.

Otherwise, sourceB must be the same type as sourceA.


imaqDivideConstant

Usage

int imaqDivideConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Divides each pixel in an image by a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image by which the function divides a scalar constant.
value | PixelValue | The value by which the function divides the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDrawLineOnImage

Usage

int imaqDrawLineOnImage(Image* dest, const Image* source, DrawMode mode, Point start, Point end, float newPixelValue);

Purpose

Draws a line on an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
mode | DrawMode | The method that the function uses to draw a line. Valid values are IMAQ_DRAW_VALUE or IMAQ_DRAW_INVERT.
start | Point | The coordinate location of the starting point of the line.
end | Point | The coordinate location of the ending point of the line.
newPixelValue | float | If you set mode to IMAQ_DRAW_VALUE, newPixelValue sets the pixel value in which the function draws the line. If you set mode to IMAQ_DRAW_INVERT, the function ignores this parameter.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDrawShapeOnImage

Usage

int imaqDrawShapeOnImage(Image* dest, const Image* source, Rect rect, DrawMode mode, ShapeMode shape, float newPixelValue);

Purpose

Draws a shape on an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
rect | Rect | The bounding rectangle of the shape.
mode | DrawMode | The method that the function uses to draw the shape.
shape | ShapeMode | The shape to draw.
newPixelValue | float | If you set mode to IMAQ_DRAW_VALUE or IMAQ_PAINT_VALUE, newPixelValue sets the pixel value that the function uses to draw a shape.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqDrawTextOnImage

Usage

int imaqDrawTextOnImage(Image* dest, const Image* source, Point coord, const char* text, const DrawTextOptions* options, int* fontNameUsed);

Purpose

Draws text on an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
coord | Point | The coordinates of the text reference point.
text | const char* | The text that the function draws. This parameter is required and cannot be NULL.
options | const DrawTextOptions* | The method that the function uses to draw text.
fontNameUsed | int* | On return, equals TRUE if the user supplied font name in options was used, and FALSE if the default font name was used.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

fontName | Arial
fontSize | 12
bold | FALSE
italic | FALSE
underline | FALSE
strikeout | FALSE
textAlignment | IMAQ_LEFT
fontColor | IMAQ_WHITE


imaqDuplicate

Usage

int imaqDuplicate(Image* dest, const Image* source);

Purpose

Copies the source image to the destination image, including the border size and vision information. To copy an area of one image to an area of another image, use imaqCopyRect().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
dest | Image* | The duplicated image.
source | const Image* | The image to copy.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqEasyAcquire

Usage

Image* imaqEasyAcquire(const char* interfaceName);

Purpose

Configures the image acquisition device specified by interfaceName, acquires one image, and returns the acquired image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
interfaceName | const char* | A null-terminated string that specifies the name of the interface to open. Examples of interfaces are img0 and img1. For more information about interfaces, refer to the NI Vision Hardware Help or the Measurement & Automation Explorer help.

Return Value

Type | Description
Image* | On success, this function returns the acquired image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the image, dispose of it by calling imaqDispose().


imaqEdgeFilter

Usage

int imaqEdgeFilter(Image* dest, Image* source, OutlineMethod method, const Image* mask);

Purpose

Applies a nonlinear filter to highlight edges.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image of which the function highlights edges. The convolution modifies the border of the source image. The border must be at least one pixel wide.
method | OutlineMethod | Method to use when outlining the edges.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function filters only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to filter the whole source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqEdgeTool3

Usage

EdgeReport2* imaqEdgeTool3(const Image* image, const ROI* roi, EdgeProcess processType, const EdgeOptions2* edgeOptions);

Purpose

Finds edges along an ROI in an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which to find the edges.
roi | const ROI* | The ROI to find edges along.
processType | EdgeProcess | The edge process type.
edgeOptions | const EdgeOptions2* | Specifies the parameters that are used to compute the edge profile and detect the edges.

Return Value

Type | Description
EdgeReport2* | On success, this function returns a structure of information about the edges found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this structure, dispose of it by calling imaqDispose().

Parameter Discussion

edgeOptions—Set edgeOptions to NULL to use the following default values:

polarity | IMAQ_SEARCH_FOR_ALL_EDGES
kernelSize | 3
width | 3
minThreshold | 10.0
interpolationType | IMAQ_BILINEAR_FIXED
columnProcessingMode | IMAQ_MEDIAN_COLUMNS

straightEdgeOptions—Set straightEdgeOptions to NULL to use the following default values:

numLines | 1
searchMode | IMAQ_USE_BEST_PROJECTION_EDGE
minScore | 10.0
maxSize | 1000.0
orientation | 0.0
angleRange | 10.0
angleTolerance | 1.0
stepSize | 3
minSignalToNoiseRatio | 0.0
minCoverage | 25.0
houghIterations | 5


imaqEnumerateCustomKeys

Usage

char** imaqEnumerateCustomKeys(const Image* image, unsigned int* size);

Purpose

Finds all the custom data keys associated with an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image from which to enumerate data keys.
size | unsigned int* | The number of keys found in the image.

Return Value

Type | Description
char** | This function returns an array containing a number of strings equal to the value returned in the size parameter. Each string is the key to one custom data item available in the image.


imaqEqualize

Usage

int imaqEqualize(Image* dest, const Image* source, float min, float max, const Image* mask);

Purpose

Calculates the histogram of an image and redistributes pixel values across the desired range to maintain the same pixel value distribution. Pixels whose values are the same before the redistribution also have common pixel values after the redistribution.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
min | float | The minimum value of the range to which the function equalizes the image.
max | float | The maximum value of the range to which the function equalizes the image.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function equalizes only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to equalize the whole image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqExtractColorPlanes

Usage

int imaqExtractColorPlanes(const Image* image, ColorMode mode, Image* plane1, Image* plane2, Image* plane3);

Purpose

Extracts the individual color planes from a color image. The plane you extract may be independent from the type of the image. For example, you can extract the hue plane from a 32-bit RGB image or the green plane from an HSL image.

Note This function does not support the CIE L*a*b* and CIE XYZ color modes. This function only supports the RGB color mode for 64-bit RGB images.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The source image that the function extracts the planes from.
mode | ColorMode | The color space that the function extracts the planes from.
plane1 | Image* | On return, the first extracted plane. Set this parameter to NULL if you do not need this information.
plane2 | Image* | On return, the second extracted plane. Set this parameter to NULL if you do not need this information.
plane3 | Image* | On return, the third plane. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

plane1—The data contained in plane1 depends on the mode, as follows:

Mode | Plane
IMAQ_RGB | Red
IMAQ_HSL | Hue
IMAQ_HSV | Hue
IMAQ_HSI | Hue

plane2—The data contained in plane2 depends on the mode, as follows:

Mode | Plane
IMAQ_RGB | Green
IMAQ_HSL | Saturation
IMAQ_HSV | Saturation
IMAQ_HSI | Saturation

plane3—The data contained in plane3 depends on the mode, as follows:

Mode | Plane
IMAQ_RGB | Blue
IMAQ_HSL | Luminance
IMAQ_HSV | Value
IMAQ_HSI | Intensity


imaqExtractComplexPlane

Usage

int imaqExtractComplexPlane(Image* dest, const Image* source, ComplexPlane plane);

Purpose

Extracts a plane from a complex image and places the plane into another image.

Image Types Supported

IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image. Valid image types for dest are IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAGE_IMAGE_SLG, and IMAQ_IMAGE_COMPLEX.
source | const Image* | The image whose plane the function extracts.
plane | ComplexPlane | The plane to extract.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqExtractCurves

Usage

Curve* imaqExtractCurves(const Image* image, const ROI* roi, const CurveOptions* curveOptions, unsigned int* numCurves);

Purpose

Finds curves in an image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image in which to find curves.
roi | const ROI* | The ROI that the function performs this operation on. Pass NULL to use the entire image for this operation.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter.
numCurves | unsigned int* | On return, the number of curves located in the image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
Curve* | On success, this function returns a pointer to an array of reports that describe the curves in the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

curveOptions—Set curveOptions to NULL to use the default curve options, as follows:

extractionMode | IMAQ_NORMAL_IMAGE
threshold | 75
filterSize | IMAQ_NORMAL
minLength | 25
rowStepSize | 15
columnStepSize | 15
maxEndPointGap | 10
onlyClosed | FALSE
subpixelAccuracy | FALSE

shapeDetectionOptions—Set shapeDetectionOptions to NULL to use the default shape detection options, as follows:

mode | IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANT
orientationRanges | NULL
numOrientationRanges | 0
scaleRange | {75, 125}
minMatchScore | 800


imaqExtractFromRing

Usage

Image* imaqExtractFromRing(SESSION_ID sessionID, int imageToExtract, int* imageNumber);

Purpose

Extracts an image from a live acquisition. This function lets you lock an image out of a continuous loop for processing during a ring acquisition. To unlock the image, call imaqReleaseImage(). The acquisition pauses when the continuous loop reaches the image you locked out.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.
imageToExtract | int | The cumulative buffer index of the image to extract. If another image has overwritten imageToExtract, the function returns the next available image.
imageNumber | int* | The cumulative buffer index of the extracted image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
Image* | On success, this function returns a pointer to the extracted image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). Because the return value is a pointer to an image that you provided to imaqSetupRing(), you should not dispose of the image until the acquisition is finished.


imaqFFT

Usage

int imaqFFT(Image* dest, const Image* source);

Purpose

Computes the Fourier transform of an image. The image can be any size, but the function works faster if the image dimensions are powers of 2. The destination image must be different than the source image to perform this operation.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image. The destination image must be a complex image and must be different than source image.
source | const Image* | The image whose Fourier transform the function computes.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqFillBorder

Usage

int imaqFillBorder(Image* image, BorderMethod method);

Purpose

Modifies the border of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAQ_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image whose border the function modifies.
method | BorderMethod | The method by which the function modifies the border.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqFillHoles

Usage

int imaqFillHoles(Image* dest, const Image* source, int connectivity8);

Purpose

Fills holes in particles. The function fills the holes with a pixel value of 1. The function does not fill areas touching the edge of the image that appear to be holes because these areas could be either holes or areas of concavity.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image containing particles with holes.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqFillImage

Usage

int imaqFillImage(Image* image, PixelValue value, const Image* mask);

Purpose

Sets each pixel in an image to a specified value.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image whose pixel values the function overwrites with the given value.
value | PixelValue | The value with which the function fills the image pixels.
mask | const Image* | A mask image. This image must be an IMAQ_IMAGE_U8 image. The function sets only those source pixels whose corresponding mask pixels are non-zero to the specified value. Set this parameter to NULL if you want the function to set every pixel in the source image to the specified value.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqFindCircles

Usage

CircleReport* imaqFindCircles(Image* dest, Image* source, float minRadius, float maxRadius, int* numCircles);

Purpose

Separates overlapping circular objects and classifies them depending on their radii. This function also draws the detected circles into the destination image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | On return, an image containing circles that the function located.
source | Image* | The image in which the function finds circles.
minRadius | float | The smallest radius (in pixels) to be detected. Circles with radii smaller than this value do not appear in the destination image or the returned report array.
maxRadius | float | The largest radius (in pixels) to be detected. Circles with radii larger than this value do not appear in the destination image or the returned report array.
numCircles | int* | On return, the number of circles that the function detected in the image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
CircleReport* | On success, this function returns an array of structures containing information about each of the found circles. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqFindCircularEdge

Usage

CircularEdgeReport* imaqFindCircularEdge(Image* image, Annulus searchArea, SpokeDirection direction, const FindEdgeOptions* options, const CoordinateTransform2* transform);

Purpose

Locates a circular edge in an annular search area. This function locates the intersection points between a set of search lines defined by a spoke and the edge of an object. The function determines the intersection points based on their contrast and slope and calculates a best-fit circle based on these points.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image which the function uses to compute the location of the edge.
searchArea | Annulus | The coordinate location of the annular search area the function looks in for the edge.
direction | SpokeDirection | The direction the function search for edges along the search lines.
options | const FindEdgeOptions* | Describes how to search for the edge and the information the function overlays to the image.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for searchArea. This parameter specifies how to transform the location of the edge detection based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform searchArea.

Return Value

Type | Description
CircularEdgeReport* | On success, this function returns information describing the calculated edge. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDisposeCircularEdgeReport().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
showSearchArea | FALSE
showSearchLines | FALSE
showEdgesFound | FALSE
showResult | TRUE


imaqFindConcentricEdge

Usage

StraightEdgeReport* imaqFindConcentricEdge(Image* image, Annulus searchArea, ConcentricRakeDirection direction, const FindEdgeOptions* options, const CoordinateTransform2* transform);

Purpose

Locates a straight edge in a annular search area. This function locates the intersection points between a set of concentric search lines and the edge of an object. The function determines the intersection points based on their contrast and slope and calculates a best-fit line based on these points.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image which the function uses to compute the location of the edge.
searchArea | Annulus | The coordinate location of the annular search area the function looks in for the edge.
direction | ConcentricRakeDirection | The direction the function search for edges along the search lines.
options | const FindEdgeOptions* | Describes how to search for the edge and the information the function overlays to the image.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for searchArea. This parameter specifies how to transform the location of the edge detection based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform searchArea.

Return Value

Type | Description
StraightEdgeReport* | On success, this function returns information describing the calculated edge. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDisposeStraightEdgeReport().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
showSearchArea | FALSE
showSearchLines | FALSE
showEdgesFound | FALSE
showResult | TRUE


imaqFindEdge

Usage

StraightEdgeReport* imaqFindEdge(Image* image, RotatedRect searchRect, RakeDirection direction, const FindEdgeOptions* options, const CoordinateTransform2* transform);

Purpose

Locates a straight edge in a rectangular search area. This function locates the intersection points between a set of parallel search lines and the edge of an object. The function determines the intersection points based on their contrast and slope and calculates a best-fit line based on these points. Use this function if you expect the angle between the calculated line and the search area to be less than 45 degrees.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image which the function uses to compute the location of the edge.
searchRect | RotatedRect | The coordinate location of the rectangular search area the function looks in for the edge.
direction | RakeDirection | The direction the function search for edges along the search lines.
options | const FindEdgeOptions* | Describes how to search for the edge and the information the function overlays to the image.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for searchRect. This parameter specifies how to transform the location of the edge detection based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform searchRect.

Return Value

Type | Description
StraightEdgeReport* | On success, this function returns information describing the calculated edge. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDisposeStraightEdgeReport().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
showSearchArea | FALSE
showSearchLines | FALSE
showEdgesFound | FALSE
showResult | TRUE
Note imaqFindEdge() only overlays the edges used in the best-fit line calculation.


imaqFindLCDSegments

Usage

int imaqFindLCDSegments(ROI* roi, const Image* image, const LCDOptions* options);

Purpose

Takes a region of interest (ROI) with a single rectangular contour around an entire seven-segment LCD and updates the ROI to contain several rectangular contours, each around a single LCD digit. You can then process this modified ROI with the imaqReadLCD() function.

Note All segments of the LCD must be on for this function to properly find the digits.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
roi | ROI* | The region of interest to transform. When necessary, the function converts a rectangular contour contained in roi to a rotated rectangle contour.
image | const Image* | The image containing the LCD. All segments of the LCD must be lit.
options | const LCDOptions* | Controls how the function performs the search.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

litSegments | FALSE
threshold | 8
sign | FALSE
decimalPoint | FALSE


imaqFindPattern

Usage

PatternMatch* imaqFindPattern(Image* image, Image* pattern, RotatedRect searchRect, const FindPatternOptions* options, const CoordinateTransform2* transform, int* numMatches);

Purpose

Searches for a template image in a rectangular search area of the image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image in which the function finds matches to the template image.
pattern | Image* | The template image which the function attempts to locate. Attach pattern matching information to this image using imaqLearnPattern(). If you have not attached pattern matching information to the image, the function learns the pattern and appends the pattern matching information to the image. If you attach pattern matching information to the image that does not contain the information specified by the mode element of the options parameter, the function generates an error.
searchRect | RotatedRect | The coordinate location of the rectangular search area the function looks in for the pattern. The function searches the bounding rectangle of searchRect. To search the entire image, set this parameter to IMAQ_NO_ROTATED_RECT.
options | const FindPatternOptions* | Describes how you want the function to search for the template image and the information the function overlays to the image. To use default options, set this parameter to NULL.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for searchRect. This parameter specifies how to transform the location of the pattern search based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform searchRect.
numMatches | int* | On return, the number of matches to the template image that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
PatternMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDispose().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

mode | IMAQ_MATCH_SHIFT_INVARIANT
numMatchesRequested | 1
minMatchScore | 800
subpixelAccuracy | FALSE
angleRanges | NULL
numRanges | 0
showSearchArea | FALSE
showResult | TRUE


imaqFindTransformPattern

Usage

int imaqFindTransformPattern(Image* image, Image* pattern, CoordinateTransform2* transform, RotatedRect searchRect, FindTransformMode mode, const FindTransformPatternOptions* options, AxisReport* report);

Purpose

Computes a coordinate transform based on the position of a template image in a search area of an image. The function uses the location and orientation of the coordinate system it finds to create the reference system of a coordinate transform or to update the measurement system of an existing coordinate transform.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image which the function uses to compute the coordinate transform.
pattern | Image* | The template image which the function attempts to locate. Attach pattern matching information to this image using imaqLearnPattern(). If you have not attached pattern matching information to the image, the function learns the pattern and appends the pattern matching information to the image. If you attach pattern matching information to the image that does not contain the information specified by the matchMode element of the options parameter, the function generates an error.
transform | CoordinateTransform2* | The coordinate transform the function updates based on the location and position of the pattern. This parameter is required and cannot be NULL.
searchRect | RotatedRect | The coordinate location of the rectangular search area the function looks in for the pattern. The function searches the bounding rectangle of searchRect. To search the entire image, set this parameter to IMAQ_NO_ROTATED_RECT.
mode | FindTransformMode | Specifies how the function updates the coordinate transform.
options | const FindTransformPatternOptions* | Defines the parameters of the algorithm the function uses to locate the pattern and the information the function overlays to the image.
report | AxisReport* | On return, a report describing the location of the pattern corresponding to the main axis and the secondary axis. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

matchMode | IMAQ_MATCH_SHIFT_INVARIANT
minMatchScore | 500
subpixelAccuracy | FALSE
angleRanges | NULL (all angles allowed)
numRanges | 0
showSearchArea | FALSE
showFeatureFound | FALSE
showResult | TRUE


imaqFindTransformRect

Usage

int imaqFindTransformRect(Image* image, RotatedRect searchRect, CoordinateTransform2* transform, FindTransformMode mode, const FindTransformRectOptions* options, AxisReport* report);

Purpose

Computes a coordinate transform based on the position of an object in a search area of an image. The function uses the location and orientation of the coordinate system it finds to create the reference system of a coordinate transform or to update the measurement system of an existing coordinate transform.

imaqFindTransformRect() uses the following algorithm. First the function determines the position of the main axis of the coordinate system. It locates the intersection points between a set of parallel search lines, or rake, and the edge of an object. The function determines the intersection points based on their contrast, width, and steepness. The function calculates a best-fit line using the points found. This line defines the main axis of the coordinate system. The function then locates the intersection points between a set of parallel search lines that are perpendicular to the main axis and the edge of the object. It calculates a hit-line to the object from the edge closest to the search area detected and perpendicular to the main axis. This line defines the secondary axis of the coordinate system. The intersection between the main axis and secondary axis is the origin of the coordinate system.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image which the function uses to compute the coordinate transform.
searchRect | RotatedRect | The coordinate location of the rectangular search area the function looks in for the object.
transform | CoordinateTransform2* | The coordinate transform the function updates based on the location and position of the object. This parameter is required and cannot be NULL.
mode | FindTransformMode | Specifies how the function updates the coordinate transform.
options | const FindTransformRectOptions* | Defines the parameters of the algorithm the function uses to locate the object and the information the function overlays to the image.
report | AxisReport* | On return, a report describing the location of the edges corresponding to the main axis and the secondary axis. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
mainAxisDirection | IMAQ_BOTTOM_TO_TOP
secondaryAxisDirection | IMAQ_LEFT_TO_RIGHT
showSearchArea | FALSE
showSearchLines | FALSE
showEdgesFound | FALSE
showResult | TRUE


imaqFindTransformRects

Usage

int imaqFindTransformRects(Image* image, RotatedRect primaryRect, RotatedRect secondaryRect, CoordinateTransform2* transform, FindTransformMode mode, const FindTransformRectsOptions* options, AxisReport* report);

Purpose

Computes a coordinate transform based on the position of an object in a search area of an image. The function uses the location and orientation of the coordinate system it finds to create the reference system of a coordinate transform or to update the measurement system of an existing coordinate transform.

imaqFindTransformRects() uses the following algorithm. First the function determines the position of the main axis of the coordinate system. It locates the intersection points between a set of parallel search lines in the primary rectangle and the edge of an object. The function determines the intersection points based on their contrast, width, and steepness. The function calculates a best-fit line through the points found. This line defines the main axis of the coordinate system. The process is repeated perpendicularly in the secondary rectangle in order to locate the secondary axis. The intersection between the main axis and the secondary axis is the origin of the coordinate system.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image which the function uses to compute the coordinate transform.
primaryRect | RotatedRect | Specifies the rectangular search area the function looks in for the object edge corresponding to the main axis .
secondaryRect | RotatedRect | Specifies the rectangular search area the function looks in for the object edge corresponding to the secondary axis .
transform | CoordinateTransform2* | The coordinate transform the function updates based on the location and position of the object. This parameter is required and cannot be NULL.
mode | FindTransformMode | Specifies how the function updates the coordinate transform.
options | const FindTransformRectsOptions* | Defines the parameters of the algorithm the function uses to locate the object and the information the function overlays to the image.
report | AxisReport* | On return, a report describing the location of the edges corresponding to the main axis and the secondary axis. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

primaryThreshold | 40
primaryWidth | 4
primarySteepness | 2
primarySubsamplingRatio | 5
secondaryThreshold | 40
secondaryWidth | 4
secondarySteepness | 2
secondarySubsamplingRatio | 5
mainAxisDirection | IMAQ_BOTTOM_TO_TOP
secondaryAxisDirection | IMAQ_LEFT_TO_RIGHT
showSearchArea | FALSE
showSearchLines | FALSE
showEdgesFound | FALSE
showResult | TRUE


imaqFitCircle2

Usage

BestCircle2* imaqFitCircle2(const PointFloat* points, int numPoints, const FitCircleOptions* options);

Purpose

Finds the circle that best represents the set of points.

Parameters

Name | Type | Description
points | const PointFloat* | The array of points to fit to the edge of the circle.
numPoints | int | The number of points in the supplied array. You must supply at least three points.
options | const FitCircleOptions* | Describes how the function calculates the best fit circle.

Return Value

Type | Description
BestCircle2* | On success, this function returns a structure describing the circle that best fit the points. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the structure, dispose of it by calling imaqDispose().


imaqFitEllipse2

Usage

BestEllipse2* imaqFitEllipse2(const PointFloat* points, int numPoints, const FitEllipseOptions* options);

Purpose

Finds the ellipse that best represents the set of points.

Parameters

Name | Type | Description
points | const PointFloat* | The array of points to fit to the edge of the ellipse.
numPoints | int | The number of points in the supplied array. If the rejectOutliers element of the options input is TRUE, you must supply at least five points. Otherwise, you must supply at least six points.
options | const FitEllipseOptions* | Describes how the function calculates the best fit ellipse.

Return Value

Type | Description
BestEllipse2* | On success, this function returns a structure describing the ellipse that best fit the points. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the structure, dispose of it by calling imaqDispose().


imaqFitLine

Usage

BestLine* imaqFitLine(const PointFloat* points, int numPoints, const FitLineOptions* options);

Purpose

Finds the line that best represents a set of points.

Parameters

Name | Type | Description
points | const PointFloat* | The array of points to fit to the line. The resulting line may take into account only a subset of the input points.
numPoints | int | The number of points in the supplied array. You must supply at least two points.
options | const FitLineOptions* | Describes how the function calculates the best fit line.

Return Value

Type | Description
BestLine* | On success, this function returns a structure describing the line that best fits the points. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the structure, dispose of it by calling imaqDispose().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

minScore | 900
pixelRadius | 3
numRefinements | 0


imaqFlatten

Usage

void* imaqFlatten(const Image* image, FlattenType type, CompressionType compression, int quality, unsigned int* size);

Purpose

Returns a data representation of an image. This representation can be converted back to an image with imaqUnflatten().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name

Type

Description

image | const Image* | The image to flatten.
type | FlattenType | What parts of the image to flatten.
compression | CompressionType | What type of compression to use on the pixel data of the image.
quality int If compression is being used, the quality of the compression, between 0-1000.
Note The quality parameter is only used if the compression is IMAQ_COMPRESSION_JPEG.
size | unsigned int* | On return, the size of the data, in bytes. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
void* | On success, this function returns a data representation of the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqFlip

Usage

int imaqFlip(Image* dest, const Image* source, FlipAxis axis);

Purpose

Flips an image over an axis.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image that the function flips over an axis.
axis | FlipAxis | The axis to flip the image over.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqFlipFrequencies

Usage

int imaqFlipFrequencies(Image* dest, const Image* source);

Purpose

Transposes the high and low frequencies of a complex image.

Image Types Supported

IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The complex image whose frequencies the function flips.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetAngle

Usage

int imaqGetAngle(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2, float* angle);

Purpose

Returns the angle, in degrees, between two lines. The returned angle represents the rotation around start1 required so that the line from start1 to end1 is parallel with the line from start2 to end2. The following figure illustrates how the function calculates the angle between two lines.

Parameters

Name | Type | Description
start1 | PointFloat | The start point of the first line.
end1 | PointFloat | The end point of the first line.
start2 | PointFloat | The start point of the second line.
end2 | PointFloat | The end point of the second line.
angle | float* | On return, the angle, in degrees, between the lines. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetAVIInfo

Usage

int imaqGetAVIInfo(AVISession session, AVIInfo* info);

Purpose

This function gets information about an AVI file that has been opened.

Parameters

Name | Type | Description
session | AVISession | The session to use.
info | AVIInfo* | On return, the information about the AVI file.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetBisectingLine

Usage

int imaqGetBisectingLine(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2, PointFloat* bisectStart, PointFloat* bisectEnd);

Purpose

Computes a line that bisects two lines.

Parameters

Name | Type | Description
start1 | PointFloat | The start point of the first line.
end1 | PointFloat | The end point of the first line.
start2 | PointFloat | The start point of the second line.
end2 | PointFloat | The end point of the second line.
bisectStart | PointFloat* | On return, filled with the coordinate location of the start of the bisecting line. This parameter is required and cannot be NULL.
bisectEnd | PointFloat* | On return, filled with the coordinate location of the end of the bisecting line. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetBitDepth

Usage

int imaqGetBitDepth(const Image* image, unsigned int* bitDepth);

Purpose

Returns the bit depth of the image. The bit depth of an image determines how NI Vision displays, saves, and converts images with more than 8 bits per channel.

Image Types Supported

IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image the function queries the bit depth for.
bitDepth | unsigned int* | On return, the bit depth of the image. A bit depth of 0 indicates that NI Vision is using the entire range of the image datatype. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetBorderSize

Usage

int imaqGetBorderSize(const Image* image, int* borderSize);

Purpose

Returns the border size of the given image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image whose border size the function queries.
borderSize | int* | On return, the border size of the image. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetBytesPerPixel

Usage

int imaqGetBytesPerPixel(const Image* image, int* byteCount);

Purpose

Returns the number of bytes that a single pixel occupies in the given image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image whose bytes per pixel the function queries.
byteCount | int* | On return, the number of bytes per pixel. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetCalibrationInfo2

Usage

CalibrationInfo* imaqGetCalibrationInfo2(const Image* image);

Purpose

Returns calibration information associated with an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The image the function returns calibration information for.

Return Value

Type | Description
CalibrationInfo* | On success, this function returns information describing the calibration of the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDispose().


imaqGetCharCount

Usage

int imaqGetCharCount(const CharSet* set);

Purpose

Returns the number of trained characters in a character set.

Parameters

Name | Type | Description
set | const CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns the number of trained characters in the character set. On failure, this function returns —1. To get extended error information, call imaqGetLastError().


imaqGetCharInfo2

Usage

CharInfo2* imaqGetCharInfo2(const CharSet* set, int index);

Purpose

Returns information about a particular trained character. The structure that the function returns contains a copy of the data from the character set. Modifications to the information in the structure do not affect the character set.

Parameters

Name | Type | Description
set | const CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
index | int | The index of a trained character in the character set from which the function gets information.

Return Value

Type | Description
CharInfo2* | On success, this function returns a report that contains information about the character. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you finish with the character information, call imaqDispose() to dispose of it.


imaqGetClassifierAccuracy

Usage

ClassifierAccuracyReport* imaqGetClassifierAccuracy(const ClassifierSession* session);

Purpose

Returns a report on the accuracy of a trained classifier.

Parameters

Name | Type | Description
session | const ClassifierSession* | The classifier session of which to get the accuracy.

Return Value

Type | Description
ClassifierAccuracyReport* | On success, this function returns a report on the accuracy of the classifier. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the information by calling imaqDispose().


imaqGetClassifierSampleInfo

Usage

ClassifierSampleInfo* imaqGetClassifierSampleInfo(const ClassifierSession* session, int index, int* numSamples);

Purpose

Get sample information from a classifier session.

Parameters

Name | Type | Description
session | const ClassifierSession* | The classifier session to use.
index | int | The index of the sample to get information about. Use a value of –1 to get only the number of samples in the classifier session.
numSamples | int* | On return, the total number of samples in the classifier session. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
ClassifierSampleInfo* | On success, this function returns information about the specified sample. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the information by calling imaqDispose().


imaqGetContour

Usage

ContourID imaqGetContour(const ROI* roi, unsigned int index);

Purpose

Returns the ContourID of the contour at the specified index location within a region of interest (ROI).

Parameters

Name | Type | Description
roi | const ROI* | The ROI containing the desired contour.
index | unsigned int | The zero-offset index of the contour to get.

Return Value

Type | Description
ContourID | On success, this function returns the ContourID of the requested contour. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetContourColor

Usage

int imaqGetContourColor(const ROI* roi, ContourID id, RGBValue* contourColor);

Purpose

Returns the color of a contour.

Parameters

Name | Type | Description
roi | const ROI* | The region of interest (ROI) containing the contour from which the function gets color information.
id | ContourID | The ContourID of the contour from which the function gets color information.
contourColor | RGBValue* | On return, the color of the contour.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetContourCount

Usage

int imaqGetContourCount(const ROI* roi);

Purpose

Returns the number of contours in a region of interest (ROI).

Parameters

Name | Type | Description
roi | const ROI* | The ROI from which the function gets the contour count.

Return Value

Type | Description
int | On success, this function returns the number of contours in the ROI. On failure, this function returns –1. To get extended error information, call imaqGetLastError().


imaqGetContourInfo2

Usage

ContourInfo2* imaqGetContourInfo2(const ROI* roi, ContourID id);

Purpose

Returns information about a particular contour. The structure that the function returns contains a copy of the data from the contour. Modifications to the information in the structure do not affect the contour.

Parameters

Name | Type | Description
roi | const ROI* | The region of interest (ROI) containing the contour from which the function gets the information.
id | ContourID | The ContourID of the contour about which the function gets information.

Return Value

Type | Description
ContourInfo2* | On success, this function returns a pointer to the structure containing information about the requested contour. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this structure, dispose of the pointer by calling imaqDispose().


imaqGetCurrentTool

Usage

int imaqGetCurrentTool(Tool* currentTool);

Purpose

Returns the currently selected tool from the tool window.

Parameters

Name | Type | Description
currentTool | Tool* | On return, contains the currently selected tool. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetDistance

Usage

int imaqGetDistance(PointFloat point1, PointFloat point2, float* distance);

Purpose

Computes the distance between two points.

Parameters

Name | Type | Description
point1 | PointFloat | The coordinate location of the first point.
point2 | PointFloat | The coordinate location of the second point.
distance | float* | On return, the distance between the two points. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetErrorText

Usage

char* imaqGetErrorText(int errorCode);

Purpose

Returns the error text corresponding to an error code. The error text is a description of what the error code signifies.

Parameters

Name | Type | Description
errorCode | int | The error code whose error text the function returns. You can obtain this error code by calling imaqGetLastError().

Return Value

Type | Description
char* | This function returns the error text corresponding to the error code input. This function returns UNKNOWN_ERROR if no error text corresponds to the error code you specified. When you are finished with this string, dispose of it by calling imaqDispose().


imaqGetFileInfo

Usage

int imaqGetFileInfo(const char* fileName, CalibrationUnit* calibrationUnit, float* calibrationX, float* calibrationY, int* width, int* height, ImageType* imageType);

Purpose

Returns information regarding the contents of an image file. You can retrieve information from the following image file formats: PNG, JPEG, JPEG2000, TIFF, AIPD, and BMP.

Parameters

Name | Type | Description
fileName | const char* | The name of the file from which the function gets information. This parameter is required and cannot be NULL.
calibrationUnit | CalibrationUnit* | On return, the calibration unit of the image. If the file does not have calibration information, the function sets calibrationUnit to IMAQ_UNDEFINED. Set this parameter to NULL if you do not need this information.
calibrationX | float* | On return, the interpixel distance in the x-direction. If the file does not have calibration information, the function sets calibrationX to 1. Set this parameter to NULL if you do not need this information.
calibrationY | float* | On return, the interpixel distance in the y-direction. If the file does not have calibration information, the function sets calibrationY to 1. Set this parameter to NULL if you do not need this information.
width | int* | On return, the width of the image. Set this parameter to NULL if you do not need this information.
height | int* | On return, the height of the image. Set this parameter to NULL if you do not need this information.
imageType | ImageType* | On return, the type of the image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetFilterNames

Usage

FilterName* imaqGetFilterNames(int* numFilters);

Purpose

Returns an array of the compression filters on this system available to be used to create AVI files.

Parameters

Name | Type | Description
numFilters | int* | On return, the number of filters in the returned array.

Return Value

Type | Description
FilterName* | On success, this function returns an array of names of compression filters that are available to compress AVI files on this system. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of it by calling imaqDispose().


imaqGetGeometricFeaturesFromCurves

Usage

FeatureData* imaqGetGeometricFeaturesFromCurves(const Curve* curves, unsigned int numCurves, const FeatureType* featureTypes, unsigned int numFeatureTypes, unsigned int* numFeatures);

Purpose

Returns the geometric features described by a set of curves.

Image Types Supported

IMAGE_U8

Parameters

Name | Type | Description
curves | const Curve* | The array of curve reports. Use imaqExtractCurves() to generate this array. The parameter is required and cannot be NULL.
numCurves | unsigned int | The number of curves in the supplied curves array.
featureTypes | const FeatureType* | An array of the types of geometric features to extract from the passed curves. Set this parameter to NULL to extract all of the features.
numFeatureTypes | unsigned int | The size of the passed featureTypes array.
numFeatures | unsigned int* | On return, the number of features described by the curves. Set this parameter to NULL if you do not wish to return information about the number of features described by the curves.

Return Value

Type | Description
FeatureData* | On success, this function returns an array of features described by the curves. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqGetGeometricTemplateFeatureInfo

Usage

FeatureData* imaqGetGeometricTemplateFeatureInfo(const Image* pattern, unsigned int* numFeatures);

Purpose

Returns the geometric features described by the template.

Image Types Supported

IMAGE_U8

Parameters

Name | Type | Description
pattern | const Image* | The template to extract features from.
numFeatures | unsigned int* | On return, the number of features described by the template. Set this parameter to NULL if you do not wish to return information about the number of features described by the template.

Return Value

Type | Description
FeatureData* | On success, this function returns an array of features described by the template. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqGetImageInfo

Usage

int imaqGetImageInfo(const Image* image, ImageInfo* info);

Purpose

Returns the size, border, type, calibration, and memory layout of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image whose information the function returns.
info | ImageInfo* | On return, the information about the image. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetImageSize

Usage

int imaqGetImageSize(const Image* image, int* width, int* height);

Purpose

Returns the size of a given image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image whose size the function queries.
width | int* | On return, the width of the image. Set this parameter to NULL if you do not need this information.
height | int* | On return, the height of the image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetImageType

Usage

int imaqGetImageType(const Image* image, ImageType* type);

Purpose

Returns the type of the given image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image whose type the function queries.
type | ImageType* | On return, the type of the image. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetIntersection

Usage

int imaqGetIntersection(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2, PointFloat* intersection);

Purpose

Computes the intersection point between two lines.

Parameters

Name | Type | Description
start1 | PointFloat | The start point of the first line.
end1 | PointFloat | The end point of the first line.
start2 | PointFloat | The start point of the second line.
end2 | PointFloat | The end point of the second line.
intersection | PointFloat* | On return, the coordinate location of the intersection of the two lines. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetKernel

Usage

const float* imaqGetKernel(KernelFamily family, int size, int number);

Purpose

Returns a pointer to a predefined convolution matrix. You can use the returned pointer in conjunction with imaqConvolve(). You cannot dispose of or alter the returned pointer because it is a reference to static memory. If you need to alter the kernel, copy the data from the supplied kernel to the memory space you have allocated yourself.

Parameters

Name | Type | Description
family | KernelFamily | The family of the kernel matrix.
size | int | The horizontal and vertical matrix size. Valid values are 3, 5, and 7, corresponding to the convolution matrix sizes of 3 x 3, 5 x 5, and 7 x 7.
number | int | References the particular desired matrix among the predefined matrices that are available for each family and size.

Return Value

Type | Description
const float* | On success, this function returns a pointer to the requested matrix. This pointer points to constant data in memory that you should not alter. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). You do not need to call imaqDispose() on the pointer.


imaqGetLastError

Usage

int imaqGetLastError();

Purpose

Returns the error code of the last NI Vision function executed in the calling thread.

Return Value

Type | Description
int | This function returns the last error code. This function returns ERR_SUCCESS if there is no pending error.


imaqGetLastErrorFunc

Usage

const char* imaqGetLastErrorFunc();

Purpose

Returns the name of the function in which the last error occurred.

Return Value

Type | Description
const char* | This function returns the name of the last function that failed. The function returns an empty string if there is no pending error. When you are finished with the return value, dispose of the string by calling imaqDispose().


imaqGetLastEvent

Usage

int imaqGetLastEvent(WindowEventType* type, int* windowNumber, Tool* tool, Rect* rect);

Purpose

Returns the last event that the user performed on an image window.

Note Do not use this function if you have registered an event callback with imaqSetEventCallback().

Parameters

Name | Type | Description
type | WindowEventType* | On return, the last event that occurred, such as IMAQ_DOUBLE_CLICK_EVENT - The user has double clicked in a window. Set this parameter to NULL if you do not need this information.
windowNumber | int* | On return, the window number of the window in which the last event occurred. Set this parameter to NULL if you do not need this information.
tool | Tool* | If the event was IMAQ_DRAW_EVENT, tool is the ROI tool that the user drew with. Tool information is also returned for the IMAQ_CLICK_EVENT and IMAQ_DOUBLE_CLICK_EVENT. If the event was not IMAQ_DRAW_EVENT, IMAQ_CLICK_EVENT, or IMAQ_DOUBLE_CLICK_EVENT, the function ignores this parameter. Set this parameter to NULL if you do not need this information.
rect | Rect* | A rectangle describing the location of the event. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

rect—For rect, the contents of the rectangle depend on the type, as follows:

  • IMAQ_CLICK_EVENT—The top left corner of the rectangle is the location of the click. The width and height of the rectangle are 0.
  • IMAQ_SCROLL_EVENT—The top left of the rectangle is the center of the displayed image. The width and height of the rectangle are 0.
  • IMAQ_DRAW_EVENT—The rectangle is the bounding rectangle of the drawn shape.
  • IMAQ_MOVE_EVENT or IMAQ_SIZE_EVENT—The rectangle is the new location of the window on the screen.

For all other events, the function ignores the rectangle.


imaqGetLastKey

Usage

int imaqGetLastKey(char* keyPressed, int* windowNumber, int* modifiers);

Purpose

Returns the last key pressed in an active image window.

Parameters

Name | Type | Description
keyPressed | char* | On return, keyPressed contains the last key pressed. The function sets keyPressed to -1 if there was no new key press to retrieve. Set this parameter to NULL if you do not need this information.
windowNumber | int* | On return, windowNum contains the window number of the window in which the key press was caught. The function sets windowNum to -1 if there was no new key press to retrieve. Set this parameter to NULL if you do not need this information.
modifiers | int* | On return, modifiers contains a bit-shifted value indicating what modifiers, if any, the function applied to the key press. The following are possible modifiers: IMAQ_SHIFT IMAQ_ALT IMAQ_CTRL IMAQ_CAPS_LOCK Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetLine

Usage

void* imaqGetLine(const Image* image, Point start, Point end, int* numPoints);

Purpose

Returns the pixel values along a given line in an image. If the starting or ending point of the line is outside the image, the line clips at the last visible pixel.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image containing a line whose pixels the function returns.
start | Point | The coordinate location of the starting point of the line.
end | Point | The coordinate location of the ending point of the line.
numPoints | int* | The number of elements in the returned array. Set this parameter to NULL if you do not need this information.

Return Value

Type

 Description
void* On success, this function returns the values of the pixels along the given line in the image. The type of array the function returns depends on the image type, as follows:

Image Type | Array Type
IMAQ_IMAGE_U8 | unsigned char
IMAQ_IMAGE_I16 | short
IMAQ_IMAGE_SGL | float
IMAQ_IMAGE_RGB | RGBValue structures
IMAQ_IMAGE_HSL | HSLValue structures
IMAQ_IMAGE_RGB_U64 | RGBU64Value structures

On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().


imaqGetMaskOffset

Usage

int imaqGetMaskOffset(const Image* image, Point* offset);

Purpose

Retrieves the point in the source image at which the function places the (0,0) pixel of the mask image, as set by imaqSetMaskOffset().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The mask image that the function retrieves the offset for.
offset | Point* | On return, the coordinates where the function applies the mask. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetMeterArc

Usage

MeterArc* imaqGetMeterArc(int lightNeedle, MeterArcMode mode, const ROI* roi, PointFloat base, PointFloat start, PointFloat end);

Purpose

Returns the arc information of a meter. imaqReadMeter() uses this information to read a meter.

Parameters

Name | Type | Description
lightNeedle | int | Set this parameter to TRUE to find a light-colored needle on a dark background. Set this parameter to FALSE to find a dark-colored needle on a light background.
mode | MeterArcMode | Describes how to determine the arc.
roi | const ROI* | A region consisting of two line contours, each drawn from the tip of the needle to its base. The first line contour represents the minimum position of the needle, and the second line contour represents the maximum position of the needle. If mode is IMAQ_METER_ARC_ROI, roi is required and cannot be NULL. If mode is IMAQ_METER_ARC_POINTS, the function ignores roi, and the parameter can be NULL.
base | PointFloat | The location of the base of the needle. If mode is IMAQ_METER_ARC_POINTS, base is required and cannot be NULL. If mode is IMAQ_METER_ARC_ROI, the function ignores base.
start | PointFloat | The location of the tip of the needle when the needle is at the minimum sweep position. If mode is IMAQ_METER_ARC_POINTS, start is required and cannot be NULL. If mode is IMAQ_METER_ARC_ROI, the function ignores start.
end | PointFloat | The location of the tip of the needle when the needle is at the maximum sweep position. If mode is IMAQ_METER_ARC_POINTS, end is required. If mode is IMAQ_METER_ARC_ROI, the function ignores end.

Return Value

Type | Description
MeterArc* | On success, this function returns a structure describing the arc across which a meter sweeps. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of it by calling imaqDispose().


imaqGetMidLine

Usage

int imaqGetMidLine(PointFloat refLineStart, PointFloat refLineEnd, PointFloat point, PointFloat* midLineStart, PointFloat* midLineEnd);

Purpose

Computes the mid line between a point and a reference line. The mid line is the line that is parallel to the reference line and lies midway between the point and the reference line.

Parameters

Name | Type | Description
refLineStart | PointFloat | The coordinate location of the start of the reference line.
refLineEnd | PointFloat | The coordinate location of the end of the reference line.
point | PointFloat | The coordinate location of the point.
midLineStart | PointFloat* | On return, the coordinate location of the start of the mid line. This parameter is required and cannot be NULL.
midLineEnd | PointFloat* | On return, the coordinate location of the end of the mid line. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetMousePos

Usage

int imaqGetMousePos(Point* position, int* windowNumber);

Purpose

Returns the mouse cursor coordinates and window number of the most recent instance that the mouse cursor was located over an active window.

Parameters

Name | Type | Description
position | Point* | On return, the coordinates of the mouse in the active image window. Set this parameter to NULL if you do not need this information.
windowNumber | int* | On return, contains the window number of the active window. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetNearestNeighborOptions

Usage

int imaqGetNearestNeighborOptions(const ClassifierSession* session, NearestNeighborOptions* options);

Purpose

Get options from the nearest neighbor engine that the classifier session was trained with.

Parameters

Name | Type | Description
session | const ClassifierSession* | The classifier session from which to get the options.
options | NearestNeighborOptions* | On return, the nearest neighbor options. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetParticleClassifierOptions

Usage

int imaqGetParticleClassifierOptions(const ClassifierSession* session, ParticleClassifierPreprocessingOptions* preprocessingOptions, ParticleClassifierOptions* options);

Purpose

Get options from a particle classifier session.

Parameters

Name | Type | Description
session | const ClassifierSession* | The classifier session from which to get the options.
preprocessingOptions | ParticleClassifierPreprocessingOptions* | On return, the options used to process particles before classification. Set this parameter to NULL if you do not need this information.
options | ParticleClassifierOptions* | On return, the options used to classify particles. Set this parameter to NULL if you do not require this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetPerpendicularLine

Usage

int imaqGetPerpendicularLine(PointFloat refLineStart, PointFloat refLineEnd, PointFloat point, PointFloat* perpLineStart, PointFloat* perpLineEnd, double* distance);

Purpose

Computes a line that passes through a point and is perpendicular to a reference line.

Parameters

Name | Type | Description
refLineStart | PointFloat | The coordinate location of the start of the reference line.
refLineEnd | PointFloat | The coordinate location of the end of the reference line.
point | PointFloat | The coordinate location of the point.
perpLineStart | PointFloat* | On return, the coordinate location of the start of the perpendicular line. This point is point. Set this parameter to NULL if you do not need this information.
perpLineEnd | PointFloat* | On return, the coordinate location of the end of the perpendicular line. This point lies on the reference line. Set this parameter to NULL if you do not need this information.
distance | double* | On return, the shortest (Euclidean) distance from the point to the reference line. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

perpLineStart,perpLineEnd—If point lies on the reference line, perpLineStart is not the same as point. perpLineEnd is point, and perpLineStart lies on the line perpendicular to the reference line.


imaqGetPixel

Usage

int imaqGetPixel(const Image* image, Point pixel, PixelValue* value);

Purpose

Returns the value of a pixel within an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image whose pixel value the function queries.
pixel | Point | The coordinates of the pixel that the function queries.
value | PixelValue* | On return, the value of the image pixel. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetPixelAddress

Usage

void* imaqGetPixelAddress(const Image* image, Point pixel);

Purpose

Returns the address of a given pixel in an image. If the requested pixel location is outside of the image, the function fails and returns NULL.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image containing the requested pixel.
pixel | Point | The coordinates of the pixel whose pointer the function retrieves.

Return Value

Type

 Description
void* On success, this function returns a pointer to the requested pixel in the image. The type of the pointer the function returns depends on the type of the image, as follows:

Image Type | Pointer Type
IMAQ_IMAGE_U8 | unsigned char
IMAQ_IMAGE_I16 | short
IMAQ_IMAGE_SGL | float
IMAQ_IMAGE_COMPLEX | Complex structure
IMAQ_IMAGE_RGB | RGBValue structure
IMAQ_IMAGE_HSL | HSLValue structure
IMAQ_IMAGE_RGB_U64 | RGBU64Value structure

On failure, this function returns NULL. To get extended error information, call imaqGetLastError().


imaqGetPointsOnContour

Usage

SegmentInfo* imaqGetPointsOnContour(const Image* image, int* numSegments);

Purpose

Finds the number of edge segments in an image and returns the coordinates of the pixels in each segment. Any pixel that is greater than zero is considered an edge location.

This function groups adjoining edge pixels into edge segments. An edge segment is considered closed if it forms a loop. Each edge segment is given a weight based on the pixel gray values along that edge. An edge segment with high gray values has a higher weight.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image in which to find the segments.
numSegments | int* | On return, the number of segments found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
SegmentInfo* | On success, this function returns an array of information about the segments. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().When you are finished with the information, dispose of it by calling imaqDispose().


imaqGetPointsOnLine

Usage

Point* imaqGetPointsOnLine(Point start, Point end, int* numPoints);

Purpose

Given the endpoints of a line, this function returns all the points comprising the line.

Parameters

Name | Type | Description
start | Point | The first point of the line.
end | Point | The last point of the line.
numPoints | int* | On return, the number of points put into the returned array. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
Point* | On success, this function returns an array of the points on the line. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this array, dispose of it by calling imaqDispose().


imaqGetPolygonArea

Usage

int imaqGetPolygonArea(const PointFloat* points, int numPoints, float* area);

Purpose

Computes the area of a polygon described by the coordinates of its vertices.

Parameters

Name | Type | Description
points | const PointFloat* | The array of points that describe the coordinate locations of the vertices of the polygon.
numPoints | int | The number of points in the supplied array. You must supply at least three points.
area | float* | On return, the area of the polygon. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetROIBoundingBox

Usage

int imaqGetROIBoundingBox(const ROI* roi, Rect* boundingBox);

Purpose

Returns the bounding rectangle for the region of interest (ROI). The bounding rectangle is the smallest rectangle that contains all of the contours that comprise the ROI.

Parameters

Name | Type | Description
roi | const ROI* | The ROI from which the function gets the bounding rectangle information.
boundingBox | Rect* | On return, the bounding rectangle. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetROIColor

Usage

int imaqGetROIColor(const ROI* roi, RGBValue* roiColor);

Purpose

Returns the color of a region of interest (ROI).

Parameters

Name | Type | Description
roi | const ROI* | The ROI from which the function gets color information.
roiColor | RGBValue* | On return, the color of the ROI. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetSystemWindowHandle

Usage

void* imaqGetSystemWindowHandle(int windowNumber);

Purpose

Returns the Windows HWND for a given NI Vision image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the window whose HWND to retrieve.

Return Value

Type | Description
void* | On success, this function returns the Windows HWND for the window. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().


imaqGetToolWindowHandle

Usage

void* imaqGetToolWindowHandle();

Purpose

Returns the Windows HWND of the tool window.

Return Value

Type | Description
void* | On success, this function returns the Windows HWND for the tool window. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().


imaqGetToolWindowPos

Usage

int imaqGetToolWindowPos(Point* position);

Purpose

Retrieves the current location of the tool window. The function behaves in the same manner as imaqGetWindowPos().

Parameters

Name | Type | Description
position | Point* | On return, the position of the upper left corner of the tool window. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetVisionInfoTypes

Usage

int imaqGetVisionInfoTypes(const Image* image, unsigned int* present);

Purpose

Retrieves all the types of Vision information associated with an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image that the function checks for the presence of Vision information.
present | unsigned int* | On return, this parameter has a bit flag set for each Vision information type present in the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetWindowBackground

Usage

int imaqGetWindowBackground(int windowNumber, WindowBackgroundFillStyle* fillStyle, WindowBackgroundHatchStyle* hatchStyle, RGBValue* fillColor, RGBValue* backgroundColor);

Purpose

Retrieves the background style and color information for the display window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
fillStyle | WindowBackgroundFillStyle* | On return, the fill style of the display window. Set this parameter to NULL if you do not need this information.
hatchStyle | WindowBackgroundHatchStyle* | On return, the hatch style of the display window. Set this parameter to NULL if you do not need this information.
fillColor | RGBValue* | On return, the fill color of the display window. Set this parameter to NULL if you do not need this information.
backgroundColor | RGBValue* | On return, the background color of the display window. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetWindowCenterPos

Usage

int imaqGetWindowCenterPos(int windowNumber, Point* centerPosition);

Purpose

This function gets the current position of the image in the center of the given window. This function is useful for determining what pixel location the user clicked when you detect a zoom event.

Parameters

Name | Type | Description
windowNumber | int | The number of the window.
centerPosition | Point* | On return, contains the current position of the image in the center of the given image window. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetWindowDisplayMapping

Usage

int imaqGetWindowDisplayMapping(int windowNum, DisplayMapping* mapping);

Purpose

Gets the pixel mapping policy for displaying 16-bit images of an unspecified bit depth. 16-bit grayscale images cannot be displayed with their full resolution on 32-bit color displays using common video adapters limited to 8-bit resolution/per pixel/color. You must map 16-bit images to the 8-bit range (0 to 255).

Parameters

Name | Type | Description
windowNum | int | The number of the window whose pixel mapping policy the function gets.
mapping | DisplayMapping* | On return, describes the mapping policy for the selected window. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetWindowGrid

Usage

int imaqGetWindowGrid(int windowNumber, int* xResolution, int* yResolution);

Purpose

Retrieves the grid resolution of the image window. Grid resolution is the number of pixels between grid lines. NI Vision uses the grid resolution when drawing regions of interest on the window using tools in the tool window. You can use the grid to trace a region of interest accurately.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
xResolution | int* | On return, the number of pixels between grid lines in the x direction. Set this parameter to NULL if you do not need this information.
yResolution | int* | On return, the number of pixels between grid lines in the y direction. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetWindowHandle

Usage

int imaqGetWindowHandle(int* handle);

Purpose

Returns an unused window number. You can use the window number in conjunction with functions such as imaqDisplayImage(). This function does not reserve the window number until you call a function that uses the window number.

Parameters

Name | Type | Description
handle | int* | On return, an unused window number. If no unused window numbers are available, the function sets this parameter to –1. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetWindowPos

Usage

int imaqGetWindowPos(int windowNumber, Point* position);

Purpose

Retrieves the current location of the given image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
position | Point* | On return, the position of the upper left corner of the given image window. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetWindowROI

Usage

ROI* imaqGetWindowROI(int windowNumber);

Purpose

Retrieves a copy of the region of interest (ROI) associated with a given image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.

Return Value

Type | Description
ROI* | On success, this function returns a copy of the ROI associated with the given window. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the ROI, dispose of it by calling imaqDispose().


imaqGetWindowSize

Usage

int imaqGetWindowSize(int windowNumber, int* width, int* height);

Purpose

Retrieves the size of a given image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
width | int* | On return, the width of the window. Set this parameter to NULL if you do not need this information.
height | int* | On return, the height of the window. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetWindowTitle

Usage

char* imaqGetWindowTitle(int windowNumber);

Purpose

Retrieves the current title of an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.

Return Value

Type | Description
char* | On success, this function returns the title of the given window. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the title, dispose of it by calling imaqDispose().


imaqGetWindowZoom2

Usage

int imaqGetWindowZoom2(int windowNumber, float* xZoom, float* yZoom);

Purpose

Retrieves the current zoom factors for a given image window. The zoom factor indicates an increase or decrease in the magnification of an image and this value is expressed as a ratio of the image size. A number greater than 1 indicates a magnification by the amount specified. For example, a zoom factor of 3 indicates that the image is displayed at three times its actual size (3:1). A number less than 1 indicates that the image is decreased in magnification by the specified amount. For example, a zoom factor of 0.2 indicates that the image is displayed at one-fifth its actual size (1:5).

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
xZoom | float* | On return, the current zoom factor in the x direction for the window.
yZoom | float* | On return, the current zoom factor in the y direction for the window

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGrab

Usage

Image* imaqGrab(SESSION_ID sessionID, Image* image, int immediate);

Purpose

Returns a copy of the current image in the grab buffer. A grab performs an acquisition that loops continually on one buffer. Call this function only after calling imaqSetupGrab().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.
image | Image* | A pointer to the acquired image. If image is NULL, imaqGrab() creates the image into which the function copies the grab buffer.
immediate | int | Determines the acquisition timing method. Set this parameter to FALSE if you want the grab operation to synchronize on the vertical blank. Set the parameter to TRUE if you want an immediate transfer. Refer to the NI Vision Hardware Help for more information about acquisition timing methods.

Return Value

Type | Description
Image* | On success, this function returns the acquired image. If you set image to NULL, the function returns a new image. Otherwise, the function returns a pointer to image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().


imaqGradeDataMatrixBarcodeAIM

Usage

int imaqGradeDataMatrixBarcodeAIM(const Image* image, AIMGradeReport* report);

Purpose

Grades a Data Matrix barcode using the AIM Print Quality metrics (included in the ISO 16022 specification).

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image containing the Data Matrix barcode to grade. You must first prepare this image for grading using imaqReadDataMatrixBarcode2().
report | AIMGradeReport* | Upon return, the AIM standard grades for the Data Matrix barcode and the raw scores used to derive the grades. If a Data Matrix barcode cannot be located by imaqReadDataMatrixBarcode2(), the function assigns the barcode IMAQ_AIM_GRADE_F for all grades and 0 for all raw scores. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGrayMorphology

Usage

int imaqGrayMorphology(Image* dest, Image* source, MorphologyMethod method, const StructuringElement* structuringElement);

Purpose

Applies morphological transformations to gray level images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image on which the function performs the morphological operation. The calculation modifies the border of the source image. The border must be at least half as large as the larger of the dimensions of the structuring element.
method | MorphologyMethod | The morphological transformation to apply.
structuringElement | const StructuringElement* | The structuring element used in the operation. Set this parameter to NULL if you do not want a custom structuring element.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqHistogram

Usage

HistogramReport* imaqHistogram(const Image* image, int numClasses, float min, float max, const Image* mask);

Purpose

Calculates the histogram, or pixel distribution, of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image whose histogram the function calculates.
numClasses | int | The number of classes into which the function separates the pixels.
min | float | The minimum pixel value to consider for the histogram. The function does not count pixels with values less than min.
max | float | The maximum pixel value to consider for the histogram. The function does not count pixels with values greater than max.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. When calculating the histogram, the function considers only those pixels in image whose corresponding pixels in mask are non-zero. Set this parameter to NULL if you want the function to perform a histogram on the whole image.

Return Value

Type | Description
HistogramReport* | On success, this function returns a report describing the pixel value classification. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the report, dispose of it by calling imaqDispose().

Parameter Discussion

min—Setting both min and max to 0 causes the function to set min to 0 for 8-bit images and to the actual minimum value of the image for all other image types.

max—Setting both min and max to 0 causes the function to set max to 255 for 8-bit images and to the actual maximum value of the image for all other image types.


imaqImageToArray

Usage

void* imaqImageToArray(const Image* image, Rect rect, int* columns, int* rows);

Purpose

Creates a two-dimensional array from an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image from which the function makes the array.
rect | Rect | Specifies a rectangular region of the image to return. Set this parameter to IMAQ_NO_RECT if you want the function to return the whole image.
columns | int* | The number of columns in the returned array. Set this parameter to NULL if you do not need this information.
rows | int* | The number of rows in the returned array. Set this parameter to NULL if you do not need this information.

Return Value

Type

 Description
void* On success, this function returns a two-dimensional array. The type of the returned array depends on the image type, as follows:

Image Type | Pointer Type
IMAQ_IMAGE_U8 | unsigned char
IMAQ_IMAGE_I16 | short
IMAQ_IMAGE_SGL | float
IMAQ_IMAGE_COMPLEX | Complex structures
IMAQ_IMAGE_RGB | RGBValue structures
IMAQ_IMAGE_HSL | HSLValue structures
IMAQ_IMAGE_RGB_U64 | RGBU64Value structures

On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().


imaqImageToClipboard

Usage

int imaqImageToClipboard(const Image* image, const RGBValue* palette);

Purpose

Copies an image onto the clipboard.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
image | const Image* | The image to copy onto the clipboard.
palette | const RGBValue* | An optional palette to associate with 8-bit images. If this parameter is not NULL, it must point to an array of 256 colors, which represent the color palette that the function associates with the image. If this parameter is NULL, the function associates a grayscale palette with the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqInterlaceCombine

Usage

int imaqInterlaceCombine(Image* frame, const Image* odd, const Image* even);

Purpose

Combines two field images to create a single frame image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
frame | Image* | On return, the combined image.
odd | const Image* | The odd field.
even | const Image* | The even field.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqInterlaceSeparate

Usage

int imaqInterlaceSeparate(const Image* frame, Image* odd, Image* even);

Purpose

Separates a frame image into two field images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
frame | const Image* | The frame image that the function separates into odd and even fields.
odd | Image* | The image into which the function places the odd field of the frame area. Set this parameter to NULL if you do not need the odd field.
even | Image* | The image into which the function places the even field of the frame area. Set this parameter to NULL if you do not need the even field.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqInterpolatePoints

Usage

float* imaqInterpolatePoints(const Image* image, const Point* points, int numPoints, InterpolationMethod method, int subpixel, int* interpCount);

Purpose

Interpolates the pixel values of an image over specified points.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image containing the values to interpolate.
points | const Point* | The points over which to interpolate. All the points in this array must be within the image. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the input points array.
method | InterpolationMethod | Specifies the method for the interpolation. The valid interpolation methods for rotation are IMAQ_BILINEAR, IMAQ_QUADRATIC and IMAQ_CUBIC_SPLINE.
subpixel | int | The number of subdivisions into which to interpolate. For example, a value of 0 causes the function to return only the pixel values at the given points, whereas a value of 1 returns the pixel values at the given points and at the midpoint of each pair.
interpCount | int* | On return, the number of interpolated values in the array returned by the function. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
float* | On success, this function returns an array of the interpolated values. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this array, dispose of it by calling imaqDispose().


imaqInverse

Usage

int imaqInverse(Image* dest, const Image* source, const Image* mask);

Purpose

Inverts the pixel intensities of an image using the following equation:

f(p) = dynamicMax - p + dynamicMin
where
p represents the value of a pixel.
dynamicMin represents 0 (8-bit images) or the smallest pixel value in the source image (16-bit and floating point images).
dynamicMax represents 255 (8-bit images) or the largest pixel value in the source image (16-bit and floating point images).

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to invert.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function inverts only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to invert the pixel intensities of the entire source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqInverseFFT

Usage

int imaqInverseFFT(Image* dest, const Image* source);

Purpose

Takes the inverse Fourier transform of an image. The destination image must be different than the source image to perform this operation.

Image Types Supported

IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image. Valid image types are IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, or IMAQ_IMAGE_COMPLEX. The destination image must be different from the source image.
source | const Image* | The image whose inverse Fourier transform the function takes.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqIsImageEmpty

Usage

int imaqIsImageEmpty(const Image* image, int* empty);

Purpose

Tests to see if the supplied image is empty. An empty image is an image that contains only pixels with a value equal to zero. Use this function in conjunction with imaqCompare() and imaqCompareConstant() to see if the compare operation cleared all of the pixels in an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image that the function checks for emptiness.
empty | int* | On return, this parameter equals TRUE if the image is empty and FALSE if the image contains pixels with values other than 0. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqIsToolWindowVisible

Usage

int imaqIsToolWindowVisible(int* visible);

Purpose

Retrieves whether the tool window is visible. This function behaves in the same manner as imaqIsWindowVisible().

Parameters

Name | Type | Description
visible | int* | On return, this parameter is TRUE if the tool window is visible and FALSE if the tool window is hidden. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqIsWindowNonTearing

Usage

int imaqIsWindowNonTearing(int windowNumber, int* nonTearing);

Purpose

Gets the current non-tearing status of the display window. For more information on non-tearing, refer to imaqSetWindowNonTearing().

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
nonTearing | int* | On return, this parameter is TRUE if the given window is non-tearing and FALSE if the window is operating normally. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqIsWindowVisible

Usage

int imaqIsWindowVisible(int windowNumber, int* visible);

Purpose

Retrieves whether the given window is visible.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
visible | int* | On return, this parameter is TRUE if the given window is visible and FALSE if the window is hidden. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLabel2

Usage

int imaqLabel2(Image* dest, Image* source, int connectivity8, int* particleCount);

Purpose

Labels the particles in a binary image by applying a unique value to all pixels within a particle. This value is encoded in 8 or 16 bits, depending on the image type. The function can label 255 particles in an 8-bit image and 65,535 particles in a 16-bit image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The source image. The labeling process modifies the border of the source image. The border must be at least one pixel wide if you use connectivity-4 or two pixels wide if you use connectivity-8.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual
particleCount | int* | On return, the number of particles that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqLearnCalibrationGrid

Usage

int imaqLearnCalibrationGrid(Image* image, const ROI* roi, const LearnCalibrationOptions* options, const GridDescriptor* grid, const CoordinateSystem* system, const RangeFloat* range, float* quality);

Purpose

Learns a calibration from an image of a grid of circles. The function attaches calibration information to the grid image, which you can then use with imaqCopyCalibrationInfo() to calibrate an uncalibrated image. Refer to Chapter 6, Calibrating Images, of the NI Vision for LabWindows/CVI User Manual. for more information about creating a grid image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name | Type | Description
image | Image* | The template used for calibrating your system. It should be an image of a grid of circles.
roi | const ROI* | Determines the region of the image that the function uses in the learning process. The function ignores all the circles in the grid that are outside the defined region when estimating the calibration transformation. To learn the entire image, set this parameter to NULL.
options | const LearnCalibrationOptions* | Describes how the function learns the calibration information.
grid | const GridDescriptor* | Contains scaling constants for the grid image that the function uses to learn the calibration.
system | const CoordinateSystem* | Defines the coordinate system for real world coordinates.
range | const RangeFloat* | The range of the grayscale the function uses to represent the circles in the grid image.
quality | float* | On return, the quality score of the learning process, which is a value between 0-1000. A quality of 1000 means that the function learned the feature points perfectly with the chosen algorithm. It does not necessarily reflect the absolute accuracy of the estimated calibration mapping, but instead reflects how well the calibration mapping adapts to the learned grid. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

mode | IMAQ_PERSPECTIVE
method | IMAQ_SCALE_TO_PRESERVE_AREA
roi | IMAQ_USER_ROI
learnMap | FALSE
learnTable | FALSE

grid—Set grid to NULL to use the following default scaling constants:

xStep | 1
yStep | 1
unit | IMAQ_UNDEFINED

system—Set system to NULL to use the following default coordinate system:

origin | {0, 0}
angle | 0
axisOrientation | IMAQ_INDIRECT

range—Set the range parameter to NULL to use the default range, as follows:

minValue | 0
maxValue | 180


imaqLearnCalibrationPoints

Usage

int imaqLearnCalibrationPoints(Image* image, const CalibrationPoints* points, const ROI* roi, const LearnCalibrationOptions* options, const GridDescriptor* grid, const CoordinateSystem* system, float* quality);

Purpose

Learns a calibration from a set of pixel coordinates and corresponding real-world coordinates. After removing coordinates outside the optional region of interest (ROI), the function requires at least four pixel coordinates and four real-world coordinates to successfully learn the calibration information.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | Image* | The image to which the function attaches calibration information.
points | const CalibrationPoints* | The set of reference points the function uses to learn the calibration information. This parameter is required and cannot be NULL.
roi | const ROI* | Determines which pixel coordinates the function uses in the learning process. The function ignores all pixel coordinates that are outside the defined region when estimating the calibration transformation. To learn all of the pixel coordinates, set this parameter to NULL.
options | const LearnCalibrationOptions* | Describes how the function learns the calibration information.
grid | const GridDescriptor* | Contains scaling constants for the real-world coordinates that the function uses to learn the calibration.
system | const CoordinateSystem* | Defines the coordinate system for real-world coordinates.
quality | float* | On return, the quality score of the learning process, which is a value between 0-1000. A quality of 1000 means that the function learned the feature points perfectly with the chosen algorithm. It does not necessarily reflect the absolute accuracy of the estimated calibration mapping, but instead reflects how well the calibration mapping adapts to the learned points. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

mode | IMAQ_PERSPECTIVE
method | IMAQ_SCALE_TO_FEATURES
roi | IMAQ_USER_ROI
learnMap | FALSE
learnTable | FALSE

grid—Set grid to NULL to use the following default scaling constants:

xStep | 1
yStep | 1
unit | IMAQ_UNDEFINED

system—Set system to NULL to use the following default coordinate system:

origin | The function places the origin at the point with a x-coordinate equal to the lowest x-coordinate value in the point list.
angle | 0
axisOrientation | IMAQ_INDIRECT


imaqLearnColor

Usage

ColorInformation* imaqLearnColor(const Image* image, const ROI* roi, ColorSensitivity sensitivity, int saturation);

Purpose

Extracts the color features of an image. Use these features for color matching with imaqMatchColor().

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The image containing the color information to learn.
roi | const ROI* | The region about which the function learns the color information. Set this parameter to NULL to learn color information about the whole image.
sensitivity | ColorSensitivity | Specifies the sensitivity of the color information in the image.
saturation | int | Sets a threshold value which the function uses to separate colors with similar hues. The function classifies colors below the given saturation value separately from colors above the given saturation value.

Return Value

Type | Description
ColorInformation* | On success, this function returns a color information structure which you can pass into imaqMatchColor(). On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this structure, dispose of it by calling imaqDispose().


imaqLearnColorPattern

Usage

int imaqLearnColorPattern(Image* image, const LearnColorPatternOptions* options);

Purpose

Prepares an image for use as a color template for imaqMatchColorPattern(). If you change the color template image after calling this function, you must call the function again to learn the modified image.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | Image* | The image about which the function learns pattern matching information. The function appends the pattern matching information to the image.
options | const LearnColorPatternOptions* | Describes the information the algorithm learns about the color pattern.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

learnMode | IMAQ_LEARN_SHIFT_INFORMATION
featureMode | IMAQ_COLOR_AND_SHAPE_FEATURES
threshold | 80
ignoreMode | IMAQ_IGNORE_NONE
colorsToIgnore | NULL (Use all colors)
numColorsToIgnore | 0


imaqLearnGoldenTemplate

Usage

int imaqLearnGoldenTemplate(Image* goldenTemplate, PointFloat originOffset, const Image* mask);

Purpose

Prepares an image for use in imaqCompareGoldenTemplate().

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
goldenTemplate | Image* | The golden template to learn for inspection.
originOffset | PointFloat | Specifies the number of pixels the function shifts the origin of the template from the center of the template image. Set this parameter to IMAQ_NO_OFFSET to use the center of the template image as the origin of the template.
mask | const Image* | An optional, 8-bit image of the same size as the template that specifies what regions and edges to ignore in the template.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

mask—Use one or more of the following pixel values when constructing the mask:

0–Maintains the default behavior.

1–The corresponding pixel in the template image should always be ignored.

2–The corresponding pixel in the template image is an edge and should be dilated according to the edgeThicknessToIgnore element of the options parameter of imaqCompareGoldenTemplate().


imaqLearnGeometricPattern

Usage

int imaqLearnGeometricPattern(Image* image, PointFloat originOffset, const CurveOptions* curveOptions, const LearnGeometricPatternAdvancedOptions* advancedLearnOptions, const Image* mask);

Purpose

Creates a description of the template image you want to search for during the matching phase.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image about which the function learns pattern matching information. The function appends the pattern matching information to this image.
originOffset | PointFloat | Specifies the number of pixels the function shifts the origin of the template from the center of the template image. The origin of the template is used by imaqMatchGeometricPattern() to set the position element of the resulting GeometricPatternMatch struct for each template match within a target image. Set this parameter to IMAQ_NO_OFFSET to use the center of the template image as the origin of the template.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image the function will use to create the template image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter.
advancedLearnOptions | const LearnGeometricPatternAdvancedOptions* | Advanced options for determining the information the algorithm learns about the geometric pattern.
mask | const Image* | An optional image, which is the same size as the template, that specifies where to search for curves in the template. mask must be an IMAQ_IMAGE_U8 image. To allow the function to process all of the pixels to determine if the pixels contain curves, set this parameter to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

curveOptions—Set curveOptions to NULL to use the default curve options, as follows:

extractionMode | IMAQ_NORMAL_IMAGE
threshold | 75
filterSize | IMAQ_NORMAL
minLength | 25
rowStepSize | 15
columnStepSize | 15
maxEndPointGap | 10
onlyClosed | FALSE
subpixelAccuracy | FALSE

advancedLearnOptions—Set advancedLearnOptions to NULL to use the default advanced learning options, as follows:

minRectLength | 10
minRectAspectRatio | 0.2
minRadius | 5
minLineLength | 15
minFeatureStrength | 0.5
maxFeaturesUsed | 25
maxPixelDistanceFromLine | 2

mask—Use one or more of the following pixel values when constructing the mask:

0–Maintains the default behavior. The corresponding pixel in the template image is considered part of a curve only if it meets the conditions specified by curveOptions.

1–The corresponding pixel in the template image is never considered part of a curve.

2–The corresponding pixel in the template image is always considered part of a curve.

4–The corresponding pixel in the template image is not used by imaqMatchGeometricPattern() when computing the correlationScore returned for each match. You can combine this pixel value with values 1 or 2 to control both the curve detection and scoring for the corresponding pixel.


imaqLearnMultipleGeometricPatterns

Usage

MultipleGeometricPattern* imaqLearnMultipleGeometricPatterns(const Image** patterns, unsigned int numberOfPatterns, const String255* labels);

Purpose

Combines the descriptions of the patterns you want to search for during the matching phase into a multiple geometric template. Use the multiple geometric template to search for these templates images in the target image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
patterns | const Image** | The array of patterns you want to search for in the target image. NI Vision must learn each of the template images in the array using imaqLearnGeometricPattern() before using it in this function.
numberOfPatterns | unsigned int | The number of patterns in patterns.
labels | const String255* | The array of labels that identify the patterns. The size of this array must be equal to numberOfPatterns.

Return Value

Type | Description
MultipleGeometricPattern* | On success, this function returns a multiple geometric template. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqLearnPattern2

Usage

int imaqLearnPattern2(Image* image, LearningMode learningMode, LearnPatternAdvancedOptions* advancedOptions);

Purpose

Creates a description of the template image you want to search for during the matching phase.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image about which the function learns pattern matching information. The function appends the pattern matching information to the image.
learningMode | LearningMode | The mode in which the function learns the template image.
advancedOptions | LearnPatternAdvancedOptions* | Advanced options to the algorithm.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLightMeterLine

Usage

LineProfile* imaqLightMeterLine(Image* image, Point start, Point end, int showMeasurement, const CoordinateTransform2* transform);

Purpose

Measures the pixel intensities on a line of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image that the function uses for intensity measurement.
start | Point | The coordinate location of the start of the line.
end | Point | The coordinate location of the end of the line.
showMeasurement | int | Set this parameter to TRUE to overlay the location of the intensity measurement on the image. Set this parameter to FALSE to leave the image unmodified.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for the line. This parameter specifies how to transform the location of the intensity measurement based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform the line.

Return Value

Type | Description
LineProfile* | On success, this function returns a report containing information about the line. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the line profile, dispose of it by calling imaqDispose().


imaqLightMeterPoint

Usage

int imaqLightMeterPoint(Image* image, Point point, int showMeasurement, float* intensity, const CoordinateTransform2* transform);

Purpose

Measures the pixel intensities in a 3 x 3 pixel neighborhood centered on a point of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image that the function uses for intensity measurement.
point | Point | The coordinate location of the intensity measurement. The intensity measurement is made in a 3 x 3 block centered on the point.
showMeasurement | int | Set this parameter to TRUE to overlay the location of the intensity measurement on the image. Set this parameter to FALSE to leave the image unmodified.
intensity | float* | On return, the average intensity of the pixels in a 3 x 3 neighborhood centered on the point. This parameter is required and cannot be NULL.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for point. This parameter specifies how to transform the location of the intensity measurement based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform point.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLightMeterRect

Usage

HistogramReport* imaqLightMeterRect(Image* image, RotatedRect rect, int showMeasurement, const CoordinateTransform2* transform);

Purpose

Measures the pixel intensities in a rectangle of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image that the function uses for intensity measurement.
rect | RotatedRect | The coordinate location of the rectangular area of the intensity measurement.
showMeasurement | int | Set this parameter to TRUE to overlay the location of the intensity measurement on the image. Set this parameter to FALSE to leave the image unmodified.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for rect. This parameter specifies how to transform the location of the intensity measurement based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform rect.

Return Value

Type | Description
HistogramReport* | On success, this function returns a report describing the pixel value classification. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the report, dispose of it by calling imaqDispose().


imaqLinearAverages2

Usage

LinearAverages* imaqLinearAverages2(Image* image, LinearAveragesMode mode, Rect rect);

Purpose

Computes the mean line profile of an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image on which the function calculates pixel value averages.
mode | LinearAveragesMode | The types of linear averages the function should compute.
rect | Rect | Sets the rectangular area in which the function calculates the averages. Set this parameter to IMAQ_NO_RECT to calculate the averages on the whole image.

Return Value

Type | Description
LinearAverages* | On success, this function returns a structure containing the linear averages of the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqLineGaugeTool2

Usage

int imaqLineGaugeTool2(const Image* image, Point start, Point end, LineGaugeMethod method, const EdgeOptions* edgeOptions, const CoordinateTransform2* transform, float* distance);

Purpose

Measures the distance between selected edges of a line with high-precision subpixel accuracy.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which the function measures the distance between edges.
start | Point | The starting point of the line.
end | Point | The ending point of the line.
method | LineGaugeMethod | The measurement method.
edgeOptions | const EdgeOptions* | Describes how you want the function to find edges. If you set method to IMAQ_POINT_TO_POINT, the function ignores edgeOptions. If you set method to anything other than IMAQ_POINT_TO_POINT, this parameter is required and cannot be NULL.
transform | const CoordinateTransform2* | An optional specification of the coordinate transform for the line. This parameter specifies how to transform the location of the edge detection based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform the line.
distance | float* | On return, the distance between edges and/or points. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLineProfile

Usage

LineProfile* imaqLineProfile(const Image* image, Point start, Point end);

Purpose

Computes the profile of a line of pixels.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image containing a line whose profile the function computes.
start | Point | The first point of the line.
end | Point | The last point of the line.

Return Value

Type | Description
LineProfile* | On success, this function returns a report containing information about the line. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the line profile, dispose of it by calling imaqDispose().


imaqLoadImagePopup

Usage

char** imaqLoadImagePopup(const char* defaultDirectory, const char* defaultFileSpec, const char* fileTypeList, const char* title, int allowMultiplePaths, ButtonLabel buttonLabel, int restrictDirectory, int restrictExtension, int allowCancel, int allowMakeDirectory, int* cancelled, int* numPaths);

Purpose

Displays a file selection dialog box that previews images and waits for the user to select an image file(s) or click Cancel.

Parameters

Name | Type | Description
defaultDirectory | const char* | The directory that the dialog box opens to.
defaultFileSpec | const char* | String that specifies the files to display. For example, a value of *.bmp displays all files with the .bmp extension.
fileTypeList | const char* | String that specifies other file types the user can choose to display, such as .jpg or .png. Use a semicolon (;) or delimiter between each file type extension.
title | const char* | The title of the dialog box.
allowMultiplePaths | int | Set this parameter to TRUE to allow the user to select multiple files. Set this parameter to FALSE to allow the user to only select one file.
buttonLabel | ButtonLabel | The label on the OK button.
restrictDirectory | int | Set this parameter to TRUE to prevent the user from changing directories or drives. Set this parameter to FALSE to allow the user to change directories or drives.
restrictExtension | int | Set this parameter to TRUE to limit the user to selecting files with the default extension specified by defaultFileSpec. Set this parameter to FALSE to allow the user to select files with any extension.
allowCancel | int | Set this parameter to TRUE to allow the user to cancel out of the dialog box. Set this parameter to FALSE to force the user to make a selection before closing the dialog box.
allowMakeDirectory | int | Set this parameter to TRUE to allow the user to make a new directory from within the dialog box. Set this parameter to FALSE to prevent the user from making a new directory.
cancelled | int* | On return, specifies whether the user cancelled the dialog box. Set this parameter to NULL if you do not need this information.
numPaths | int* | On return, the number of files the user selected. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
char** | On success, this function returns an array of file paths that the user selected. The array contains a number of strings equal to the value of numPaths. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().


imaqLocalThreshold

Usage

int imaqLocalThreshold(Image* dest, const Image* source, unsigned int windowWidth, unsigned int windowHeight, LocalThresholdMethod method, double deviationWeight, ObjectType type, float replaceValue);

Purpose

Automatically thresholds an image into a binary image based on the requested local adaptive thresholding method.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to threshold.
windowWidth | unsigned int | The width of the rectangular window around the pixel on which the function performs the local threshold. This number must be at least 3 and cannot be larger than the width of source.
windowHeight | unsigned int | The height of the rectangular window around the pixel on which the function performs the local threshold. This number must be at least 3 and cannot be larger than the height of source.
method | LocalThresholdMethod | Specifies the local thresholding method the function uses.
deviationWeight | double | Specifies the k constant used in the Niblack local thresholding algorithm, which determines the weight applied to the variance calculation. Valid k constants range from 0 to 1. Settings this value to 0 will increase the performance of the function because the function will not calculate the variance for any of the pixels. The function ignores this value if method is not set to IMAQ_NIBLACK.
type | ObjectType | Specifies the type of objects for which you want to look.
replaceValue | float | Specifies the replacement value the function uses for the pixels of the kept objects in the destination image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

windowWidth, windowHeight—The window should be sized as large as possible but small enough that each window contains pixels under similar lighting conditions. The function will produce inconsistent results for windows that contain uniform pixel values.


imaqLogicalDifference

Usage

int imaqLogicalDifference(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Computes a bitwise logical difference (A AND NOT B) between two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLogicalDifferenceConstant

Usage

int imaqLogicalDifferenceConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Performs a bitwise logical difference (A AND NOT B) between an image and a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to AND NOT to the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLookup

Usage

int imaqLookup(Image* dest, const Image* source, const short* table, const Image* mask);

Purpose

Performs a transformation on an image by replacing each pixel value with the lookup table entry corresponding to that value.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
table | const short* | The lookup table. For 8-bit images, the lookup table must contain 256 elements. The function replaces each pixel value v with table[v]. For 16-bit images, the lookup table must contain 65,536 elements. The function replaces each non-negative pixel value v with table[v] and replaces each negative pixel value v with table[65536+v].
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function applies the lookup only to those source pixels whose corresponding mask pixels are non-zero. All other pixels remain unchanged. Set this parameter to NULL to apply the lookup to the entire source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLowPass

Usage

int imaqLowPass(Image* dest, Image* source, int width, int height, float tolerance, const Image* mask);

Purpose

Filters an image using a non-linear filter. For each pixel, the algorithm considers the neighborhood specified by the given filter sizes. If the current pixel value varies from the value of its neighbors more than the specified tolerance, the function sets the pixel value to the average value of its neighborhood. If the current pixel value varies from the value of its neighbors less than the specified tolerance, the function does not change the value of the pixel.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image to filter. The filter modifies the border of the source image. The border must be at least half as large as the larger of the neighborhood dimensions.
width | int | The width of the rectangular neighborhood around the pixel on which the function operates. This number must be odd.
height | int | The height of the rectangular neighborhood around the pixel on which the function operates. This number must be odd.
tolerance | float | The maximum allowable variance.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function filters only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to apply the filter to the entire source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqMagicWand

Usage

int imaqMagicWand(Image* dest, const Image* source, Point coord, float tolerance, int connectivity8, float replaceValue);

Purpose

Creates a mask of a particle in an image by selecting a particle at the given location and setting all the pixels of that particle to a specified value. The function sets all other pixel values to 0.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | On return, the mask image. This image must be an IMAQ_IMAGE_U8 image.
source | const Image* | The source image containing the particle to mask.
coord | Point | The coordinates of the reference point in the particle to mask.
tolerance | float | Specifies the pixel value tolerance that the function uses to determine whether neighbors of the reference point are part of the particle.
connectivity8 | int | Set this parameter to TRUE to use connectivity-8 to determine whether pixels are part of the same particle. Set this parameter to FALSE to use connectivity-4 to determine whether pixels are part of the same particle. For more information about connectivity, refer to Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.
replaceValue | float | The value to which pixels in the selected object are set. Pixels not in the object are set to 0.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMakeAnnulus

Usage

Annulus imaqMakeAnnulus(Point center, int innerRadius, int outerRadius, double startAngle, double endAngle);

Purpose

Returns an Annulus structure with the values you specify. The Annulus structure defines the location and size rotation of an annulus. You can embed a call to imaqMakeAnnulus() in calls to other NI Vision functions that require Annulus structures as input parameters, thereby eliminating the need to declare an Annulus variable.

Parameters

Name | Type | Description
center | Point | The location of the center of the annulus.
innerRadius | int | The internal radius of the annulus.
outerRadius | int | The external radius of the annulus.
startAngle | double | The start angle, in degrees, of the annulus.
endAngle | double | The end angle, in degrees, of the annulus.

Return Value

Type | Description
Annulus | This function returns an Annulus structure containing the coordinate values you specify.


imaqMakePoint

Usage

Point imaqMakePoint(int xCoordinate, int yCoordinate);

Purpose

Returns a Point structure with the values you specify. The Point structure defines the location of a point. You can embed a call to imaqMakePoint() in calls to other NI Vision functions that require Point structures as input parameters, thereby eliminating the need to declare a Point variable.

Parameters

Name | Type | Description
xCoordinate | int | Horizontal location of the point.
yCoordinate | int | Vertical location of the point.

Return Value

Type | Description
Point | This function returns a Point structure containing the coordinate values you specify.


imaqMakePointFloat

Usage

PointFloat imaqMakePointFloat(float xCoordinate, float yCoordinate);

Purpose

Returns a PointFloat structure with the values you specify. The PointFloat structure defines the location of a point. You can embed a call to imaqMakePointFloat() in calls to other NI Vision functions that require PointFloat structures as input parameters, thereby eliminating the need to declare a PointFloat variable.

Parameters

Name | Type | Description
xCoordinate | float | Horizontal location of the point.
yCoordinate | float | Vertical location of the point.

Return Value

Type | Description
PointFloat | This function returns a PointFloat structure containing the coordinate values you specify.


imaqMakeRect

Usage

Rect imaqMakeRect(int top, int left, int height, int width);

Purpose

Returns a Rect structure with the values you specify. The Rect structure defines the location and size of a rectangle. You can embed a call to imaqMakeRect() in calls to other NI Vision functions that require Rect structures as input parameters, thereby eliminating the need to declare a Rect variable. If you are using LabWindows/CVI, note that this function duplicates the functionality of the LabWindows/CVI function MakeRect().

Parameters

Name | Type | Description
top | int | Location of the top edge of the rectangle.
left | int | Location of the left edge of the rectangle.
height | int | Height of the rectangle.
width | int | Width of the rectangle.

Return Value

Type | Description
Rect | This function returns a Rect structure containing the coordinate values you specify.


imaqMakeRectFromRotatedRect

Usage

Rect imaqMakeRectFromRotatedRect(RotatedRect rotatedRect);

Purpose

Returns a Rect structure that represents the bounding rectangle of the rotated rectangle with the values you specify. Note that if you supply a rotated rectangle with an angle other than 0, 90, 180, or 270 degrees, the function returns a bounding rectangle larger then the rotated rectangle. You can embed a call to imaqMakeRectFromRotatedRect() in calls to other NI Vision functions that require Rect structures as input parameters, thereby eliminating the need to declare a Rect variable.

Parameters

Name | Type | Description
rotatedRect | RotatedRect | The rotated rectangle for which the function returns the bounding rectangle.

Return Value

Type | Description
Rect | This function returns a Rect structure representing the bounding box of the rotated rectangle you specify.


imaqMakeRotatedRect

Usage

RotatedRect imaqMakeRotatedRect(int top, int left, int height, int width, double angle);

Purpose

Returns a RotatedRect structure with the values you specify. The RotatedRect structure defines the location, size, and rotation of a rectangle. You can embed a call to imaqMakeRotatedRect() in calls to other NI Vision functions that require RotatedRect structures as input parameters, thereby eliminating the need to declare a RotatedRect variable.

Parameters

Name | Type | Description
top | int | Location of the top edge of the rectangle before rotation.
left | int | Location of the left edge of the rectangle before rotation.
height | int | Height of the rectangle.
width | int | Width of the rectangle.
angle | double | The rotation, in degrees, of the rectangle.

Return Value

Type | Description
RotatedRect | This function returns a RotatedRect structure containing the coordinate values you specify.


imaqMakeRotatedRectFromRect

Usage

RotatedRect imaqMakeRotatedRectFromRect(Rect rect);

Purpose

Returns a RotatedRect structure equivalent in size and location to the rectangle you specify. The angle of the resulting rotated rectangle is always zero. The RotatedRect structure defines the location, size, and rotation of a rectangle. You can embed a call to imaqMakeRotatedRect() in calls to other NI Vision functions that require RotatedRect structures as input parameters, thereby eliminating the need to declare a RotatedRect variable.

Parameters

Name | Type | Description
rect | Rect | The rectangle the function converts into a rotated rectangle.

Return Value

Type | Description
RotatedRect | This function returns a RotatedRect equivalent in size and location to the rectangle you specify.


imaqMask

Usage

int imaqMask(Image* dest, const Image* source, const Image* mask);

Purpose

Copies the source image to the destination image in the following manner: If a pixel in the mask has a value of 0, the function sets the corresponding source pixel to 0. Otherwise, the function copies the corresponding source pixel to the destination image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
mask | const Image* | The mask image. This image must be an IMAQ_IMAGE_U8 image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMaskToROI

Usage

ROI* imaqMaskToROI(const Image* mask, int* withinLimit);

Purpose

Transforms a mask image into a region of interest (ROI) descriptor.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
mask | const Image* | The mask image that the function transforms into a ROI. This image must be an IMAQ_IMAGE_U8 image.
withinLimit | int* | On return, this parameter indicates whether the ROI is a true representation of the mask. If TRUE, the number of points is within the INT_MAX point limit. If FALSE, the number of points exceeds the INT_MAX point limit, and the ROI may not represent the mask completely. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
ROI* | On success, this function returns a pointer to the ROI descriptor. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this descriptor, dispose of the pointer by calling imaqDispose().


imaqMatchColor

Usage

int* imaqMatchColor(const Image* image, const ColorInformation* info, const ROI* roi, int* numScores);

Purpose

Determines how closely colors in an image match colors in the given color information.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The image containing colors you want to compare with the given color information.
info | const ColorInformation* | The color information. Call imaqLearnColor() to get the color information. This parameter is required and cannot be NULL.
roi | const ROI* | The region of the image in which to compare the colors. Set the parameter to NULL to compare colors in the entire image.
numScores | int* | On return, contains the number of values in the score array. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int* | On success, this function returns an array filled with scores describing the closeness of a match between each contour in the region of interest (ROI) and the color information. A score of 1,000 indicates a perfect match. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this array, dispose of it by calling imaqDispose().


imaqMatchColorPattern

Usage

PatternMatch* imaqMatchColorPattern(const Image* image, Image* pattern, const MatchColorPatternOptions* options, Rect searchRect, int* numMatches);

Purpose

Searches for areas in an image that match a given color template image.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The image in which the function finds matches to the color template image.
pattern | Image* | The color template image to find in the image. NI Vision must learn this template image in imaqLearnColorPattern() before using it in this function.
options | const MatchColorPatternOptions* | Describes how to search for the color template image.
searchRect | Rect | Specifies a rectangle in the image in which to search for the template image. Set this parameter to IMAQ_NO_RECT to search for the pattern image in the entire image.
numMatches | int* | On return, the number of matches to the template image that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
PatternMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

matchMode | IMAQ_MATCH_SHIFT_INVARIANT
featureMode | IMAQ_COLOR_AND_SHAPE
minContrast | 0
subpixelAccuracy | FALSE
angleRanges | NULL (all angles allowed)
numRanges | 0
colorScoreWeight | 500
colorSensitivity | IMAQ_SENSITIVITY_LOW
searchStrategy | IMAQ_CONSERVATIVE
numMatchesRequested | 1
minMatchScore | 800


imaqMatchGeometricPattern2

Usage

GeometricPatternMatch2* imaqMatchGeometricPattern2(const Image* image, const Image* pattern, const CurveOptions* curveOptions, const MatchGeometricPatternOptions* matchOptions, const MatchGeometricPatternAdvancedOptions2* advancedMatchOptions, const ROI* roi, int* numMatches);

Purpose

Searches for areas in an image that match a given geometric template image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image in which the function finds matches to the template image.
pattern | const Image* | The pattern to find in the image.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image the function will use to match the template image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter. Set this parameter to NULL to use the same curve options to match the template image as you used to learn the template image.
matchOptions | const MatchGeometricPatternOptions* | Describes how to search for the template image.
advancedMatchOptions | const MatchGeometricPatternAdvancedOptions2* | Specifies advanced behaviors of the function, which can be used to optimize the performance of the function or to fine-tune the matches located by the function.
roi | const ROI* | Specifies where, in image, the function searches for the template image. The first contour of roi must be a rectangle or a rotated rectangle. Set this parameter to NULL to specify that the function searches in the entire image.
numMatches | int* | On return, the number of matches to the template image that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
GeometricPatternMatch2* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

matchOptions—Set matchOptions to NULL to use the default match options, as follows:

mode | IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT
subpixelAccuracy | FALSE
angleRanges | NULL (all angles allowed)
numRanges | 0
scaleRange | {75, 125}
occlusionRange | {0, 25}
numMatchesRequested | 1
minMatchScore | 800

advancedMatchOptions—Set advancedMatchOptions to NULL to use the default advanced match options, as follows:

minFeaturesUsed | 5
maxFeaturesUsed | 5
subpixelIterations | 20
subpixelTolerance | 0
initialMatchListLength | 200
matchTemplateCurveScore | FALSE
correlationScore | TRUE
minMatchSeparationDistance | 20
minMatchSeparationAngle | 10
minMatchSeparationScale | 10
maxMatchOverlap | 80
coarseResult | FALSE
smoothContours | FALSE
enableCalibrationSupport | TRUE


imaqMatchMultipleGeometricPatterns

Usage

GeometricPatternMatch2* imaqMatchMultipleGeometricPatterns(const Image* image, const MultipleGeometricPattern* multiplePattern, const ROI* roi, int* numMatches);

Purpose

Searches for the areas in the image that match the template images in the given multiple geometric template.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image in which the function finds matches to the template images.
multiplePattern | const MultipleGeometricPattern* | The patterns to find in the image. You must learn this multiple geometric template using imaqLearnMultipleGeometricPatterns() before using it in this function. This parameter is required and cannot be NULL.
roi | const ROI* | Specifies where, in image, the function searches for the template images. The first and only contour of roi must be a rectangle or a rotated rectangle. Set this parameter to NULL to specify that the function searches in the entire image.
numMatches | int* | On return, the number of matches that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
GeometricPatternMatch2* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqMatchPattern2

Usage

PatternMatch* imaqMatchPattern2(const Image* image, const Image* pattern, const MatchPatternOptions* options, const MatchPatternAdvancedOptions* advancedOptions, Rect searchRect, int* numMatches);

Purpose

Searches for areas in an image that match a given template image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image in which the function finds matches to the template image.
pattern | const Image* | The pattern image to find in the image. Use imaqLearnPattern2() to learn the template image before using it with this function.
options | const MatchPatternOptions* | Describes how to search for the template image.
advancedOptions | const MatchPatternAdvancedOptions* | Describes additionally how to search for the template image.
searchRect | Rect | Specifies a rectangle in the image in which to search for the template image. Set this parameter to IMAQ_NO_RECT to search for the template image in the entire image.
numMatches | int* | On return, the number of matches to the template image that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
PatternMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

mode | IMAQ_MATCH_SHIFT_INVARIANT
minContrast | 10
subpixelAccuracy | FALSE
angleRanges | NULL (all angles allowed)
numRanges | 0
numMatchesRequested | 1
matchFactor | 0
minMatchScore | 800


imaqMatchShape

Usage

ShapeReport* imaqMatchShape(Image* dest, Image* source, const Image* templateImage, int scaleInvariant, int connectivity8, double tolerance, int* numMatches);

Purpose

Finds a shape in an image. In most cases, use imaqMatchPattern() instead of this function. For information about when to use shape matching, see Chapter 12, Pattern Matching, of the NI Vision Concepts Manual.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | On return, the objects in the source image that match the object in the template image.
source | Image* | The image in which the function searches for shapes.
templateImage | const Image* | The image containing the shape to find.
scaleInvariant | int | Set this parameter to TRUE to search for shapes regardless of size. Set this parameter to FALSE to search for shapes that are ±10 percent of the size of the template shape.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.
tolerance | double | Indicates the allowable difference between the template shape and similar shapes in the image. The difference is expressed as a value from 0 to 1.
numMatches | int* | On return, the number of matches to the template image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
ShapeReport* | On success, this function returns an array of reports describing the matches to the given template shape. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqMathTransform

Usage

int imaqMathTransform(Image* dest, const Image* source, MathTransformMethod method, float rangeMin, float rangeMax, float power, const Image* mask);

Purpose

Transforms an image by applying a transfer function to the value of each pixel. The function applies the transform T(x) over a specified input range [rangeMin, rangeMax] in the following manner:

T(x) = dynamicMin if x <= rangeMin
f(x) if rangeMin < x <= rangeMax
dynamicMax if x > rangeMax

where

dynamicMin = 0 (8-bit images) or the smallest initial pixel value (16-bit and floating point images)
dynamicMax = 255 (8-bit images) or the largest initial pixel value (16-bit and floating point images)
dynamicRange = dynamicMax - dynamicMin

The function scales f(x) so that f(rangeMin) = dynamicMin and f(rangeMax) = dynamicMax. f(x) behaves on (rangeMin, rangeMax) according to the method you select.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
method | MathTransformMethod | The transform function to use.
rangeMin | float | The smallest pixel value on which the function applies the transform.
rangeMax | float | The largest pixel value on which the function applies the transform.
power | float | If you set method to IMAQ_TRANSFORM_POWX or IMAQ_TRANSFORM_POW1X, power specifies the power to which the function raises the value.
mask | const Image* | An optional mask. This image must be an IMAQ_IMAGE_U8 image. The function transforms only those source pixels whose corresponding mask pixels are non-zero. All other pixels remain unchanged. Set this parameter to NULL to apply the transform to the entire source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMax

Usage

int imaqMax(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Copies the larger pixel value of the two sources into the destination for each pixel.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMaxConstant

Usage

int imaqMaxConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Copies the source image to the destination in the following manner: If the source image pixel value is greater than the given constant, the function copies the source pixel to the destination. Otherwise, the function copies the constant to the destination.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The first source image.
value | PixelValue | The value to use in the computation. Use the grayscale member of the PixelValue union.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMeasureParticle

Usage

int imaqMeasureParticle(Image* image, int particleNumber, int calibrated, MeasurementType measurement, double* value);

Purpose

Returns a measurement associated with a particle. Call imaqCountParticles() before calling imaqMeasureParticle().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | Image* | The image containing the particle to get information about.
particleNumber | int | The number of the particle to get information about.
calibrated | int | Specifies whether to return the measurement as a real-world value.
measurement | MeasurementType | The measurement to make on the particle.
value | double* | On return, the value of the requested measurement. This parameter can not be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqMedianFilter

Usage

int imaqMedianFilter(Image* dest, Image* source, int width, int height, const Image* mask);

Purpose

Filters an image using a nonlinear filter. For each pixel, the algorithm takes the neighborhood specified by the given filter sizes and replaces the pixel with the median value of the neighborhood.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image to filter. The filter modifies the border of the source image. The border must be at least half as large as the larger of the neighborhood dimensions.
width | int | The width of the rectangular neighborhood around the pixel on which the function operates. This number must be odd.
height | int | The height of the rectangular neighborhood around the pixel on which the function operates. This number must be odd.
mask | const Image* | An optional mask. This image must be an IMAQ_IMAGE_U8 image. The function filters only those source pixels whose corresponding mask pixels are non-zero. Set this parameter to NULL to apply the filter to the entire source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqMergeOverlay

Usage

int imaqMergeOverlay(Image* dest, const Image* source, const RGBValue* palette, unsigned int numColors, void* reserved);

Purpose

Makes a nondestructive overlay part of the image content. This process creates a destructive overlay. The VI then removes the nondestructive overlay. The resulting image is an RGB image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
palette | const RGBValue* | An optional palette to associate with 8-bit images. If this parameter is not NULL, it must point to an array of 256 colors, which represent the color palette that the function associates with the image. If this parameter is NULL, the function associates a grayscale palette with the image.
numColors | unsigned int | The number of RGBValues in the palette array. If there are less than 256 entries in palette, the function maps all pixel values past the last element in palette to the associated grayscale value.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMin

Usage

int imaqMin(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Copies the smaller pixel value of the two sources into the destination for each pixel.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMinConstant

Usage

int imaqMinConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Copies the source image to the destination in the following manner: If the source image pixel value is less than the given constant, the function copies the source pixel to the destination. Otherwise the function copies the constant to the destination.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The first source image.
value | PixelValue | The value to use in the computation. Use the grayscale member of the PixelValue union.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqModulo

Usage

int imaqModulo(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Modulo divides two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first image to modulo divide.
sourceB | const Image* | The second image to modulo divide.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

The image type of sourceB depends on the image type of sourceA, as follows:

  • If sourceA is IMAQ_IMAGE_I16, sourceB must be IMAQ_IMAGE_I16 or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_SGL, sourceB must be IMAQ_IMAGE_SGL, IMAQ_IMAGE_I16, or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_RGB, sourceB must be IMAQ_IMAGE_RGB or IMAQ_IMAGE_U8.

Otherwise, sourceB must be the same type as sourceA.


imaqModuloConstant

Usage

int imaqModuloConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Performs a modulo division operation with each pixel in an image by a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to be modulo divided by the scalar constant.
value | PixelValue | The value to use as the divisor in the operation. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMorphology

Usage

int imaqMorphology(Image* dest, Image* source, MorphologyMethod method, const StructuringElement* structuringElement);

Purpose

Applies morphological transformations to binary images.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image on which the function performs the morphological operations. The calculation modifies the border of the source image. The border must be at least half as large as the larger dimension of the structuring element.
method | MorphologyMethod | The morphological transform to apply.
structuringElement | const StructuringElement* | The structuring element used in the operation. Set this parameter to NULL if you do not want a custom structuring element.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqMoveContour

Usage

int imaqMoveContour(ROI* roi, ContourID id, int deltaX, int deltaY);

Purpose

Moves a contour.

Parameters

Name | Type | Description
roi | ROI* | The region of interest (ROI) containing the contour to move.
id | ContourID | The ContourID of the contour to move.
deltaX | int | The amount to move the contour in the x direction.
deltaY | int | The amount to move the contour in the y direction.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMoveToolWindow

Usage

int imaqMoveToolWindow(Point position);

Purpose

Moves the tool window.

Parameters

Name | Type | Description
position | Point | The new position, in screen coordinates, of the upper left corner of the tool window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMoveWindow

Usage

int imaqMoveWindow(int windowNumber, Point position);

Purpose

Moves an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
position | Point | The new position, in screen coordinates, of the upper left corner of the window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMulDiv

Usage

int imaqMulDiv(Image* dest, const Image* sourceA, const Image* sourceB, float value);

Purpose

Computes a ratio between the two source images. You find the ratio by multiplying each pixel value in the first source image by the constant value you supply. This result is divided by the corresponding pixel in the second source, and the final result is stored in the destination image. You can use this function to correct a background if the background is lighter than the image. In a background correction, the first source image is the acquired image and the second source image is the background image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.
value | float | The value by which the function multiplies the first image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMultiply

Usage

int imaqMultiply(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Multiplies two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first image to multiply.
sourceB | const Image* | The second image to multiply.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

The image type of sourceB depends on the image type of sourceA, as follows:

  • If sourceA is IMAQ_IMAGE_U8, sourceB must be IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, or IMAQ_IMAGE_RGB.
  • If sourceA is IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, or IMAQ_IMAGE_COMPLEX, sourceB must be IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, or IMAQ_IMAGE_COMPLEX.
  • If sourceA is IMAQ_IMAGE_RGB, sourceB must be IMAQ_IMAGE_RGB or IMAQ_IMAGE_U8.


imaqMultiplyConstant

Usage

int imaqMultiplyConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Multiplies each pixel in an image by a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The first source image.
value | PixelValue | The value by which to multiply. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMultithreshold

Usage

int imaqMultithreshold(Image* dest, const Image* source, const ThresholdData* ranges, int numRanges);

Purpose

Thresholds an image into multiple classes. The function classifies each pixel into the first threshold range of which it is a member. If a pixel is not a member of any of the given ranges, the function sets it to 0. For example, given two threshold ranges:

rangeMin | rangeMax | useNewValue | newValue
80 | 150 | TRUE | 10
120 | 200 | FALSE | ignored

The function operates as follows:

  • The function replaces pixel values below 80 with 0.
  • The function replaces pixel values from 80 to 150 with 10.
  • The function does not change pixel values from 151 to 200.
  • The function replaces pixel values above 200 with 0.

For more information about thresholding, refer to imaqThreshold().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
ranges | const ThresholdData* | An array of threshold ranges. This array is required and cannot be NULL.
numRanges | int | The number of elements in the ranges array.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqNand

Usage

int imaqNand(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Computes a bitwise NAND between two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqNandConstant

Usage

int imaqNandConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Performs a bitwise NAND between an image and a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to NAND with the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqNor

Usage

int imaqNor(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Computes a bitwise NOR between two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqNorConstant

Usage

int imaqNorConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Performs a bitwise NOR between an image and a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to NOR with the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqNthOrderFilter

Usage

int imaqNthOrderFilter(Image* dest, Image* source, int width, int height, int n, const Image* mask);

Purpose

Filters an image using a non-linear filter. For each pixel, the algorithm takes the neighborhood specified by the given filter sizes and replaces the pixel with the nth smallest value in the neighborhood.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image to filter. The filter modifies the border of the source image. The border must be at least half as large as the larger of the neighborhood dimensions.
width | int | The width of the rectangular neighborhood around the pixel on which the function operates. This number must be odd.
height | int | The height of the rectangular neighborhood around the pixel on which the function operates. This number must be odd.
n | int | Specifies which value in the neighborhood to place in the destination. Set n to 0 to select the smallest value in the neighborhood, set n to 1 to select the next smallest value, and so on.
mask | const Image* | An optional image mask. This image must be an IMAQ_IMAGE_U8 image. The function filters only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to filter the entire source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqOpenAVI

Usage

AVISession imaqOpenAVI(const char* fileName);

Purpose

This function opens an existing AVI file so that images and data can be read from it.

Parameters

Name | Type | Description
fileName | const char* | The name of the AVI file to open.

Return Value

Type | Description
AVISession | On success, this function returns a session ID associated with the given AVI file. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOr

Usage

int imaqOr(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Computes a bitwise OR between two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOrConstant

Usage

int imaqOrConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Performs a bitwise OR between an image and a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to OR to the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayArc

Usage

int imaqOverlayArc(Image* image, const ArcInfo* arc, const RGBValue* color, DrawMode drawMode, void* reserved);

Purpose

Overlays an arc onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the arc.
arc | const ArcInfo* | The location and size of the arc.
color | const RGBValue* | The color of the arc. This parameter is required and cannot be NULL.
drawMode | DrawMode | The mode by which to draw the overlay. Valid options are IMAQ_DRAW_VALUE and IMAQ_PAINT_VALUE.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayBitmap

Usage

int imaqOverlayBitmap(Image* image, Point destLoc, const RGBValue* bitmap, unsigned int numCols, unsigned int numRows, void* reserved);

Purpose

Overlays a bitmap onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the bitmap.
destLoc | Point | The coordinates of the pixel in the image where the function copies the top-left pixel of the bitmap.
bitmap | const RGBValue* | The two-dimensional array of bitmap values to overlay on the image. This parameter is required and cannot be NULL.
numCols | unsigned int | The number of columns in the bitmap array.
numRows | unsigned int | The number of rows in the bitmap array.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayClosedContour

Usage

int imaqOverlayClosedContour(Image* image, const Point* points, int numPoints, const RGBValue* color, DrawMode drawMode, void* reserved);

Purpose

Overlays an closed contour onto an image. To make the contour, the function connects each point in the array to the next point in the array, and it connects the last point in the array to the first point in the array.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the open contour.
points | const Point* | An array of points describing the location and shape of the contour. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the array.
color | const RGBValue* | The color of the contour. This parameter is required and cannot be NULL.
drawMode | DrawMode | The mode by which to draw the overlay. IMAQ_DRAW_VALUE and IMAQ_PAINT_VALUE are valid options.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayLine

Usage

int imaqOverlayLine(Image* image, Point start, Point end, const RGBValue* color, void* reserved);

Purpose

Overlays a line onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the line.
start | Point | The coordinate location of the start of the line.
end | Point | The coordinate location of the end of the line.
color | const RGBValue* | The color of the line. This parameter is required and cannot be NULL.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayMetafile

Usage

int imaqOverlayMetafile(Image* image, const void* metafile, Rect rect, void* reserved);

Purpose

Overlays a metafile onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the metafile.
metafile | const void* | The Windows handle to the metafile that you want to convert into an overlay. The handle may be either an HMETAFILE or HENHMETAFILE. This parameter is required and cannot be NULL.
rect | Rect | The location of rectangular region within the image that the function overlays the metafile. To use the bounding rectangle information stored in the metafile, set this parameter to IMAQ_NO_RECT.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayOpenContour

Usage

int imaqOverlayOpenContour(Image* image, const Point* points, int numPoints, const RGBValue* color, void* reserved);

Purpose

Overlays an open contour onto an image. To make the contour, the function connects each point in the array to the next point in the array. The function does not connect the last point in the array to the first point in the array.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the open contour.
points | const Point* | An array of points describing the location and shape of the contour. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the array.
color | const RGBValue* | The color of the contour. This parameter is required and cannot be NULL.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayOval

Usage

int imaqOverlayOval(Image* image, Rect boundingBox, const RGBValue* color, DrawMode drawMode, void* reserved);

Purpose

Overlays an oval onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the oval.
boundingBox | Rect | The coordinate location of the bounding rectangle of the oval.
color | const RGBValue* | The color of the oval. This parameter is required and cannot be NULL.
drawMode | DrawMode | The mode by which to draw the overlay. Valid options are IMAQ_DRAW_VALUE and IMAQ_PAINT_VALUE.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayPoints

Usage

int imaqOverlayPoints(Image* image, const Point* points, int numPoints, const RGBValue* colors, int numColors, PointSymbol symbol, const UserPointSymbol* userSymbol, void* reserved);

Purpose

Overlays a series of points onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the points.
points | const Point* | An array describing the coordinate location of each point to overlay. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the array.
colors | const RGBValue* | An array describing the color of each point to overlay. If the array of colors is smaller then the array of points, the function assigns the final color in the array to each point that does not have a corresponding color. This parameter is required and cannot be NULL.
numColors | int | The number of RGBValues in the array.
symbol | PointSymbol | The symbol the function uses to represent each point the function overlays.
userSymbol | const UserPointSymbol* | If symbol is IMAQ_POINT_AS_USER_DEFINED, this parameter defines the symbol. Otherwise, the function ignores this parameter and you should set it to NULL.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayRect

Usage

int imaqOverlayRect(Image* image, Rect rect, const RGBValue* color, DrawMode drawMode, void* reserved);

Purpose

Overlays a rectangle onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the rectangle.
rect | Rect | The coordinate location of the rectangle.
color | const RGBValue* | The color of the rectangle. This parameter is required and cannot be NULL.
drawMode | DrawMode | The mode by which to draw the overlay. Valid modes are IMAQ_DRAW_VALUE, IMAQ_PAINT_VALUE, and IMAQ_HIGHLIGHT_VALUE.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayROI

Usage

int imaqOverlayROI(Image* image, const ROI* roi, PointSymbol symbol, const UserPointSymbol* userSymbol, void* reserved);

Purpose

Overlays a region of interest onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the region of interest.
roi | const ROI* | The region of interest to overlay on to the image.
symbol | PointSymbol | The symbol to represent a point contour in the overlay.
userSymbol | const UserPointSymbol* | If symbol is IMAQ_POINT_AS_USER_DEFINED, this parameter defines the symbol. Otherwise, the function ignores this parameter and you should set it to NULL.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqOverlayText

Usage

int imaqOverlayText(Image* image, Point origin, const char* text, const RGBValue* color, const OverlayTextOptions* options, void* reserved);

Purpose

Overlays a string of text onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image on which to overlay the text.
origin | Point | The coordinate location of the text reference point.
text | const char* | The text that the function overlays. This parameter is required and cannot be NULL.
color | const RGBValue* | The color of the text. This parameter is required and cannot be NULL.
options | const OverlayTextOptions* | The method that the function uses to overlay text.
reserved | void* | This parameter is reserved. Set it to NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

fontName | Arial
fontSize | 12
bold | FALSE
italic | FALSE
underline | FALSE
strikeout | FALSE
horizontalTextAlignment | IMAQ_LEFT
verticalTextAlignment | IMAQ_BOTTOM
backgroundColor | IMAQ_RGB_TRANSPARENT
angle | 0


imaqParticleFilter2

Usage

int imaqParticleFilter2(Image* dest, Image* source, const ParticleFilterCriteria2* criteria, int criteriaCount, int rejectMatches, int connectivity8, int* numParticles);

Purpose

Filters particles based on their morphological measurements.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image that will contain only the filtered particles.
source | Image* | The image containing the particles to filter.
criteria | const ParticleFilterCriteria2* | An array of criteria to apply to the particles in the source image. This array cannot be NULL.
criteriaCount | int | The number of elements in the criteria array.
rejectMatches | int | Set this parameter to TRUE to transfer only those particles that do not meet all the criteria. Set this parameter to FALSE to transfer only those particles that meet all the criteria to the destination.
connectivity8 | int | 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 Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.
numParticles | int* | On return, the number of particles left in the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqParticleFilter3

Usage

int imaqParticleFilter3(Image* dest, Image* source, const ParticleFilterCriteria2* criteria, int criteriaCount, const ParticleFilterOptions* options, const ROI* roi, int* numParticles);

Purpose

Filters particles based on their morphological measurements.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image that will contain only the filtered particles.
source | Image* | The image containing the particles to filter.
criteria | const ParticleFilterCriteria2* | An array of criteria to apply to the particles in the source image. This array cannot be NULL.
criteriaCount | int | The number of elements in the criteria array.
options | const ParticleFilterOptions* | Options used by imaqParticleFilter to filter binary particles.
roi | const ROI* | The ROI whose contours a particle must be contained in to avoid being filtered out. If rejectBorder is true in options, any particle touching the border of a contour in roi will also be filtered out. Set this parameter to NULL to filter particles in the entire image based on the criteria array.
numParticles | int* | On return, the number of particles left in the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.

options—Set options to NULL to use the following default values:

rejectMatches | FALSE
rejectBorder | FALSE
connectivity8 | TRUE


imaqQuantify

Usage

QuantifyReport* imaqQuantify(const Image* image, const Image* mask);

Purpose

Calculates statistical parameters on an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image to quantify.
mask | const Image* | If provided, a labeled version of the source image specifying the regions to quantify. This image must be an IMAQ_IMAGE_U8 image or IMAQ_IMAGE_I16 image. Only the pixels in the original image that correspond to an equivalent pixel in the mask different from 0 are used for the quantification. Each pixel in this mask indicates, by its value, which region belongs to the corresponding pixel in the image. Up to 255 different regions for an IMAQ_IMAGE_U8 image, or 65,535 regions for an IMAQ_IMAGE_I16 image, can be quantified directly from the image. Set this parameter to NULL if you want the function to quantify the whole image as one region.

Return Value

Type | Description
QuantifyReport* | On success, this function returns a pointer to a report describing the statistical parameters of the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqRake

Usage

RakeReport* imaqRake(const Image* image, const ROI* roi, RakeDirection direction, EdgeProcess process, const RakeOptions* options);

Purpose

Finds edges along a set of parallel lines defined inside a rectangular region.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which to find edges.
roi | const ROI* | The rectangular region the function looks in for the edges. The first contour of roi must be a rectangle or a rotated rectangle.
direction | RakeDirection | The direction the function searches for edges along the search lines.
process | EdgeProcess | Defines the edges for which the function looks.
options | const RakeOptions* | Describes how to search for the edges.

Return Value

Type | Description
RakeReport* | On success, this function returns information describing the calculated edges and the rake used by the function. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDispose().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
subpixelType | IMAQ_QUADRATIC
subpixelDivisions | 1


imaqReadAVIFrame

Usage

int imaqReadAVIFrame(Image* image, AVISession session, unsigned int frameNum, void* data, unsigned int* dataSize);

Purpose

This function reads the image and any attached data from an AVI file.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
image | Image* | The image in which the frame is stored.
session | AVISession | The session to use.
frameNum | unsigned int | The frame number to read.
data | void* | If the AVI contains data attached to this frame, the data will be stored here.
dataSize | unsigned int* | The size of the data buffer passed in. On return, the size of the data. If NULL is passed in, no data will be returned.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqReadBarcode

Usage

BarcodeInfo* imaqReadBarcode(const Image* image, BarcodeType type, const ROI* roi, int validate);

Purpose

Reads a barcode from an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image containing the barcode to read.
type | BarcodeType | The type of the barcode to read.
roi | const ROI* | A region of interest specifying the location of the barcode in the image. The first contour of roi must be a rectangle. Set this parameter to NULL to use the entire image.
validate | int | If type is IMAQ_I2_OF_5, IMAQ_CODE39, or IMAQ_CODABAR, set validate to TRUE to use the error correction information of the barcode to validate the data. If type is not IMAQ_I2_OF_5, IMAQ_CODE39, or IMAQ_CODABAR, or if you set validate to FALSE, the function does not validate the data.

Return Value

Type | Description
BarcodeInfo* | On success, this function returns a structure containing information about the barcode. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this structure, dispose of it by calling imaqDispose().


imaqReadClassifierFile

Usage

ClassifierSession* imaqReadClassifierFile(ClassifierSession* session, const char* fileName, ReadClassifierFileMode mode, ClassifierType* type, ClassifierEngineType* engine, String255 description);

Purpose

Reads a classifier session from file.

Parameters

Name | Type | Description
session | ClassifierSession* | The session in which to load the classifier file, or NULL to create a new session.
fileName | const char* | The name of the file to read. This parameter is required and cannot be NULL.
mode | ReadClassifierFileMode | The mode to use when reading the classifier session from file.
type | ClassifierType* | The type of classifier session that was read from file. Set this parameter to NULL if you do not need this information.
engine | ClassifierEngineType* | The type of engine the session was trained with. Set this parameter to NULL if you do not need this information.
description | String255 | On return, the description of the classification session. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
ClassifierSession* | On success, this function returns a new classifier session. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the information by calling imaqDispose().


imaqReadCustomData

Usage

void* imaqReadCustomData(const Image* image, const char* key, unsigned int* size);

Purpose

Reads the custom data associated with a key in an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image that has the data to read.
key | const char* | The key used to find the data in the image.
size | unsigned int* | On return, the size of the data, in bytes. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
void* | If the key is found in the image, this function returns a copy of the data associated with that key. When you are finished with this data, dispose of it by calling imaqDispose().


imaqReadDataMatrixBarcode2

Usage

DataMatrixReport* imaqReadDataMatrixBarcode2(Image* image, const ROI* roi, DataMatrixGradingMode prepareForGrading, const DataMatrixDescriptionOptions* descriptionOptions, const DataMatrixSizeOptions* sizeOptions, const DataMatrixSearchOptions* searchOptions);

Purpose

Locates and then reads the value encoded in a Data Matrix barcode. You can compare the decoded data to a reference string or check whether the data contains a specific pattern. Many of the options provided by this function allow for automatic detection of properties of the Data Matrix barcode or what methods the function should use to locate and decode the barcode. Specifying specific properties and methods for these options will greatly increase the performance of the function.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image containing the Data Matrix barcode to read.
roi | const ROI* | A region of interest specifying the location of the barcode in the image. The first contour of roi must be a rectangle, rotated rectangle, or closed contour. If skipLocation of the searchOptions parameter is set to TRUE, a closed contour has an additional constraint of being four-sided. Set this parameter to NULL to use the entire image.
prepareForGrading | DataMatrixGradingMode | Specifies if the function should make calculations needed to prepare to grade the Data Matrix barcode.
descriptionOptions | const DataMatrixDescriptionOptions* | Describes the Data Matrix barcode the function should look for.
sizeOptions | const DataMatrixSizeOptions* | Describes sizing information for the Data Matrix barcode the function should look for.
searchOptions | const DataMatrixSearchOptions* | Describes the methods and limitations the function should use when searching for the Data Matrix barcode.

Return Value

Type | Description
DataMatrixReport* | On success, this function returns a structure containing information about the Data Matrix barcode. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this structure, dispose of it by calling imaqDispose().

Parameter Discussion

descriptionOptions—Set the descriptionOptions parameter to NULL to use the default options, as follows:

aspectRatio | 0.0
rows | 0
columns | 0
rectangle | FALSE
ecc | IMAQ_AUTO_DETECT_ECC
polarity | IMAQ_AUTO_DETECT_POLARITY
cellFillPercentage | IMAQ_AUTO_DETECT_CELL_FILL_PERCENTAGE
minBorderIntegrity | 80.0
mirrorMode | IMAQ_AUTO_DETECT_MIRROR

sizeOptions—Set the sizeOptions parameter to NULL to use the default options, as follows:

minSize | 0
maxSize | 0
quietZoneWidth | 10

searchOptions—Set the searchOptions parameter to NULL to use the default options, as follows:

rotationMode | IMAQ_UNLIMITED_ROTATION
skipLocation | FALSE
edgeThreshold | 30
demodulationMode | IMAQ_AUTO_DETECT_DEMODULATION_MODE
cellSampleSize | IMAQ_AUTO_DETECT_CELL_SAMPLE_SIZE
cellFilterMode | IMAQ_AUTO_DETECT_CELL_FILTER_MODE
skewDegreesAllowed | 5
maxIterations | 500
initialSearchVectorWidth | 5


imaqReadFile

Usage

int imaqReadFile(Image* image, const char* fileName, RGBValue* colorTable, int* numColors);

Purpose

Creates an NI Vision image from the information in a file. The file can be in one of the following formats: PNG, JPEG, JPEG2000, TIFF, AIPD, or BMP.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image in which the function stores data it reads from the file.
fileName | const char* | The name of the file to read. This parameter is required and cannot be NULL.
colorTable | RGBValue* | An optional array of up to 256 elements. If the file has a color table, the function fills this parameter with the color table values. If the file does not contain a color table, the function returns an empty array. Set this parameter to NULL if you do not want the function to load the color table.
numColors | int* | If colorTable is not NULL, the function fills this parameter with the number of colors in the color table. If colorTable is NULL, the function ignores this parameter. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqReadLCD

Usage

LCDReport* imaqReadLCD(const Image* image, const ROI* roi, const LCDOptions* options);

Purpose

Reads the numeric value of a seven-segment LCD.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image containing the LCD to read.
roi | const ROI* | A region of interest (ROI) consisting of rectangles around each of the digits of the LCD. Generate this ROI by calling imaqFindLCDSegments().
options | const LCDOptions* | Controls how the LCD is read.

Return Value

Type | Description
LCDReport* | On success, this function returns a structure describing the state of the LCD. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

litSegments
FALSE
threshold | 8
sign | FALSE
decimalPoint | FALSE


imaqReadMeter

Usage

int imaqReadMeter(const Image* image, const MeterArc* arcInfo, double* percentage, PointFloat* endOfNeedle);

Purpose

Reads a meter. You must have already determined the arc information with imaqGetMeterArc().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image of the meter to read.
arcInfo | const MeterArc* | Information about the meter's arc. This information is returned by imaqGetMeterArc()
percentage | double* | Returns the current sweep position of the needle in comparison to the maximum sweep position, expressed as a percentage. For example, a value of 100 indicates the needle is at the maximum sweep position. Set this parameter to NULL if you do not need this information.
endOfNeedle | PointFloat* | Returns the location of the endpoint of the needle. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqReadMultipleGeometricPatternFile

Usage

MultipleGeometricPattern* imaqReadMultipleGeometricPatternFile(const char* fileName, String255 description);

Purpose

Reads a multiple geometric pattern file.

Parameters

Name | Type | Description
fileName | const char* | The name of the file to read. This parameter is required and cannot be NULL.
description | String255 | The description of the multiple geometric pattern file. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
MultipleGeometricPattern* | On success, this function returns a multiple geometric template. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqReadOCRFile

Usage

int imaqReadOCRFile(const char* fileName, CharSet* set, String255 setDescription, ReadTextOptions* readOptions, OCRProcessingOptions* processingOptions, OCRSpacingOptions* spacingOptions);

Purpose

Reads a character set and the appropriate NI Vision structures from the file specified by fileName.

Parameters

Name | Type | Description
fileName | const char* | File that the function uses for this operation. This parameter is required and cannot be NULL.
set | CharSet* | The character set the function operates on. To create a character set use imaqCreateCharSet(). If the character set already contains trained characters, the function appends the trained characters from the file to the existing trained characters. Set this parameter to NULL if you do not need this information.
setDescription | String255 | On return, the description of the character set contained in the file. Set this parameter to NULL if you do not need this information.
readOptions | ReadTextOptions* | On return, the options used to read text contained in the file. Set this parameter to NULL if you do not need this information.
processingOptions | OCRProcessingOptions* | On return, the image processing options contained in the file. Set this parameter to NULL if you do not need this information.
spacingOptions | OCRSpacingOptions* | On return, the character size spacing options contained in the file. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqReadPDF417Barcode

Usage

Barcode2DInfo* imaqReadPDF417Barcode(const Image* image, const ROI* roi, Barcode2DSearchMode searchMode, unsigned int* numBarcodes);

Purpose

Reads PDF417 barcodes from an image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image containing the barcodes to read.
roi | const ROI* | A region of interest specifying the location of the barcodes in the image. The first contour of roi must be a rectangle, rotated rectangle, oval, annulus or closed contour. Set this parameter to NULL to use the entire image.
searchMode | Barcode2DSearchMode | Specifies the mode the function uses to search for barcodes. This function supports searchMode values of IMAQ_SEARCH_MULTIPLE and IMAQ_SEARCH_SINGLE_CONSERVATIVE.
numBarcodes | unsigned int* | On return, the number of barcodes that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
Barcode2DInfo* | On success, this function returns an array of structures containing information about the barcodes. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this array, dispose of it by calling imaqDispose().


imaqReadQRCode

Usage

QRCodeReport* imaqReadQRCode(Image* image, const ROI* roi, QRGradingMode reserved, const QRCodeDescriptionOptions* descriptionOptions, const QRCodeSizeOptions* sizeOptions, const QRCodeSearchOptions* searchOptions);

Purpose

Locates and reads the value encoded in a QR code. You can compare the decoded data to a reference string or check whether the data contains a specific pattern. Many of the options provided by this function allow for automatic detection of properties of the QR code or what methods the function should use to locate and decode the code. Selecting specific properties and methods for these options will greatly increase the performance of the function.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image containing the QR code to be detected.
roi | const ROI* | A region of interest specifying the location of the code in the image. The first contour of roi must be a rectangle, rotated rectangle, or closed contour. If skipLocation of the searchOptions parameter is set to TRUE, a closed contour has an additional constraint of being four-sided. Set this parameter to NULL to use the entire image.
reserved | QRGradingMode | This is reserved for future use. Set this parameter to IMAQ_QR_NO_GRADING.
descriptionOptions | const QRCodeDescriptionOptions* | Describes the QR code the function should look for.
sizeOptions | const QRCodeSizeOptions* | Describes sizing information for the QR code the function should look for.
searchOptions | const QRCodeSearchOptions* | Describes the methods and limitations the function should use when searching for the QR code.

Return Value

Type | Description
QRCodeReport* | On success, this function returns a structure containing information about the QR code. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this structure, dispose of it by calling imaqDispose().

Parameter Discussion

descriptionOptions—Set descriptionOptions to NULL to use the following default values:

dimensions | IMAQ_QR__DIMENSIONS_AUTO_DETECT
polarity | IMAQ_QR_POLARITY_AUTO_DETECT
mirror | IMAQ_QR_MIRROR_MODE_AUTO_DETECT
modelType | IMAQ_QR_MODELTYPE_AUTO_DETECT

sizeOptions—Set sizeOptions to NULL to use the following default values:

minSize | 0
maxSize | 0

searchOptions—Set searchOptions to NULL to use the following default values:

rotationMode | IMAQ_QR_ROTATION_MODE_UNLIMITED
skipLocation | FALSE
edgeThreshold | 30
demodulationMode | IMAQ_QR_DEMODULATION_MODE_AUTO_DETECT
cellSampleSize | IMAQ_QR_CELL_SAMPLE_SIZE_AUTO_DETECT
cellFilterMode | IMAQ_QR_CELL_FILTER_MODE_AUTO_DETECT
skewDegreesAllowed | 5


imaqReadText2

Usage

ReadTextReport2* imaqReadText2(const Image* image, const CharSet* set, const ROI* roi, const ReadTextOptions* readOptions, const OCRProcessingOptions* processingOptions, const OCRSpacingOptions* spacingOptions);

Purpose

Reads the text from the image. The function identifies all objects in the image based on the attributes that you set, and then compares each object with every trained character. For each object, the function selects the character that most closely matches the object. The function uses the substitution character for any object that does not match any of the trained characters.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The source image for this operation.
set | const CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
roi | const ROI* | The ROI that the function performs this operation on. Pass NULL to use the entire image for this operation.
readOptions | const ReadTextOptions* | The options you use to configure how the function reads text.
processingOptions | const OCRProcessingOptions* | The options you use to configure how the function processes the contents of the image before attempting to read text.
spacingOptions | const OCRSpacingOptions* | The size and spacing constraints you can apply to characters in the image.

Return Value

Type | Description
ReadTextReport2* | On success, this function returns a report that contains information about the text contained in the image. On failure, the function returns NULL. To get extended error information, call imaqGetLastError(). When you finish with the report, call imaqDispose() to dispose of it.

Parameter Discussion

readOptions—Set readOptions to NULL to use the following default reading options:

validChars | NULL
numValidChars | 0
substitutionChar | ?
readStrategy | IMAQ_READ_AGGRESSIVE
acceptanceLevel | 700
aspectRatio | 400
readResolution | IMAQ_LOW_RESOLUTION

processingOptions—Set processingOptions to NULL to use the following default processing options:

mode | IMAQ_COMPUTED_UNIFORM
lowThreshold | 0
highThreshold | 255
blockCount | 4
fastThreshold | FALSE
biModalCalculation | FALSE
darkCharacters | TRUE
removeObjectsTouchingROI | FALSE
erosionCount | 0

spacingOptions—Set spacingOptions to NULL to use the following default spacing options:

minCharSpacing | 1
minCharSize | 20
maxCharSize | 65536
maxHorizontalElementSpacing | 1
maxVerticalElementSpacing | 0
minBoundingRectWidth | 1
maxBoundingRectWidth | 65536
minBoundingRectHeight | 1
maxBoundingRectHeight | 65536
autoSplit | FALSE


imaqReadVisionFile

Usage

int imaqReadVisionFile(Image* image, const char* fileName, RGBValue* colorTable, int* numColors);

Purpose

Creates an image from the information in a file and then attaches additional Vision information contained in the file to the image. The file must be a PNG format file.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image in which the function stores data it reads from the file.
fileName | const char* | The name of the file to read. This parameter is required and cannot be NULL.
colorTable | RGBValue* | An optional array of up to 256 elements. If the file has a color table, the function fills this parameter with the color table values. If the file does not contain a color table, the function returns an empty array. Set this parameter to NULL if you do not want the function to load the color table.
numColors | int* | If colorTable is not NULL, the function fills this parameter with the number of colors in the color table. If colorTable is NULL, the function ignores this parameter. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqRefineMatches

Usage

PatternMatch* imaqRefineMatches(const Image* image, const Image* pattern, const PatternMatch* candidatesIn, int numCandidatesIn, MatchPatternOptions* options, MatchPatternAdvancedOptions* advancedOptions, int* numCandidatesOut);

Purpose

Refines matches returned from imaqMatchPattern2() using subpixel information learned with imaqLearnPattern().

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The inspection image in which you originally located the matches you want to refine.
pattern | const Image* | The template for which you want to search during the refinement phase. The template image is an output of imaqLearnPattern2().
candidatesIn | const PatternMatch* | The candidate matches to refine.
numCandidatesIn | int | The number of candidates being passed in.
options | MatchPatternOptions* | The options passed in to imaqMatchPattern2().
advancedOptions | MatchPatternAdvancedOptions* | The options passed in to imaqMatchPattern2().
numCandidatesOut | int* | On return, the number of candidates returned. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
PatternMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqRejectBorder

Usage

int imaqRejectBorder(Image* dest, Image* source, int connectivity8);

Purpose

Eliminates particles that touch the border of the image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The source image. If the image has a border, the function sets all border pixel values to 0.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqRelabelClassifierSample

Usage

int imaqRelabelClassifierSample(ClassifierSession* session, int index, const char* newClass);

Purpose

Relabels a sample in a classifier session and sets it to be in a different class.

Parameters

Name | Type | Description
session | ClassifierSession* | The session containing the sample to relabel.
index | int | The index of the sample to relabel.
newClass | const char* | The new class of the sample.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqReleaseImage

Usage

int imaqReleaseImage(SESSION_ID sessionID);

Purpose

Releases an image that imaqExtractFromRing() previously extracted. After the function releases the image, the live acquisition continues if the acquisition had paused.

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqRemoveContour

Usage

int imaqRemoveContour(ROI* roi, ContourID id);

Purpose

Deletes the specified contour from the specified region of interest (ROI), freeing all allocated memory associated with the contour.

Parameters

Name | Type | Description
roi | ROI* | The ROI containing the contour to remove.
id | ContourID | The ContourID of the contour to remove. After this operation, the ContourID no longer correlates to a valid contour. Set this parameter to IMAQ_ALL_CONTOURS to remove all contours.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqRemoveCustomData

Usage

int imaqRemoveCustomData(Image* image, const char* key);

Purpose

Removes a custom data key and its associated data from an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image to remove the custom data from.
key | const char* | The key to remove from the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqRemoveVisionInfo2

Usage

int imaqRemoveVisionInfo2(const Image* image, unsigned int info);

Purpose

Removes the specified Vision information types from the given image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image that the function removes Vision information from.
info | unsigned int | Flags representing which info types to remove. Combine values from the VisionInfoType2 enumeration to create this

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqRenameChar

Usage

int imaqRenameChar(CharSet* set, int index, const char* newCharValue);

Purpose

Renames a trained character.

Parameters

Name | Type | Description
set | CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
index | int | The index of a character to rename.
newCharValue | const char* | The new character value that you want to assign to the character. The length of this string must not exceed 255 characters.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqReplaceColorPlanes

Usage

int imaqReplaceColorPlanes(Image* dest, const Image* source, ColorMode mode, const Image* plane1, const Image* plane2, const Image* plane3);

Purpose

Replaces one or more of the color planes of a color image. The plane you replace may be independent of the image type. For example, you can replace the green plane of an RGB image or the hue plane of an HSL image.

Note This function does not support the CIE L*a*b* and CIE XYZ color modes. This function only supports the RGB color mode for 64-bit images.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
mode | ColorMode | The color space in which the function replaces planes.
plane1 | const Image* | The first plane of replacement data. Set this parameter to NULL if you do not want to change the first plane of the source image.
plane2 | const Image* | The second plane of replacement data. Set this parameter to NULL if you do not want to change the second plane of the source image.
plane3 | const Image* | The third plane of replacement data. Set this parameter to NULL if you do not want to change the third plane of the source image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

plane1—The data contained here depends on mode, as follows:

Mode | Plane
IMAQ_RGB | Red
IMAQ_HSL | Hue
IMAQ_HSV | Hue
IMAQ_HSI | Hue

plane2—The data contained here depends on mode, as follows:

Mode | Plane
IMAQ_RGB | Green
IMAQ_HSL | Saturation
IMAQ_HSV | Saturation
IMAQ_HSI | Saturation

plane3—The data contained here depends on mode, as follows:

Mode | Plane
IMAQ_RGB | Blue
IMAQ_HSL | Luminance
IMAQ_HSV | Value
IMAQ_HSI | Intensity


imaqReplaceComplexPlane

Usage

int imaqReplaceComplexPlane(Image* dest, const Image* source, const Image* newValues, ComplexPlane plane);

Purpose

Replaces a plane of a complex image with the pixel values from a given image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image whose data the function modifies.
newValues | const Image* | The image containing the replacement values. This image may be IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, or IMAQ_IMAGE_COMPLEX.
plane | ComplexPlane | The complex image plane to replace. Set this value to IMAQ_REAL or IMAQ_IMAGINARY. If source is a Complex image, then this parameter also selects which plane of the source image is used as the replacement.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqResample

Usage

int imaqResample(Image* dest, const Image* source, int newWidth, int newHeight, InterpolationMethod method, Rect rect);

Purpose

Resizes an image to a given resolution. The source image and destination image must be the same image type. After execution, the size of the destination image is newWidth x newHeight. For fast zero-order scaling, use imaqScale().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The image into which the function places the resampled data. The image may be the same as source.
source | const Image* | The image to resample.
newWidth | int | The width of the resampled area.
newHeight | int | The height of the resampled area.
method | InterpolationMethod | The method of interpolation.
rect | Rect | Specifies an area of the source image to resample. Set this parameter to IMAQ_NO_RECT to resample the entire image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqROIProfile

Usage

ROIProfile* imaqROIProfile(const Image* image, const ROI* roi);

Purpose

Calculates the profile of the pixels along the edge of each contour in a region of interest (ROI).

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image from which the function gets the profile.
roi | const ROI* | The ROI describing the pixels about which the function gets information.

Return Value

Type | Description
ROIProfile* | On success, this function returns a pointer to information about the points along the edge of each contour in the ROI. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of it by calling imaqDispose().


imaqROIToMask

Usage

int imaqROIToMask(Image* mask, const ROI* roi, int fillValue, const Image* imageModel, int* inSpace);

Purpose

Transforms a region of interest (ROI) into a mask image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
mask | Image* | The resulting mask image.
roi | const ROI* | The descriptor defining the ROI.
fillValue | int | The pixel value of the mask. All pixels inside the ROI receive this value.
imageModel | const Image* | An optional template for the destination mask image. This parameter can be any image type that NI Vision supports. If you supply an imageModel, the mask image is the size of the model. If you set imageModel to NULL, the size of mask is equal to the size of the bounding rectangle of the ROI, which reduces the amount of memory used. The function sets the offset of the mask image to reflect the real position of the ROI.
inSpace | int* | If you used imageModel, this parameter indicates on return whether the mask is a true representation of the ROI. If TRUE, the ROI data is completely within imageModel. If FALSE, some of the ROI data fell outside the space associated with imageModel. Set this parameter to NULL if you do not need this information, or if you did not use imageModel.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqRotate2

Usage

int imaqRotate2(Image* dest, const Image* source, float angle, PixelValue fill, InterpolationMethod method, int maintainSize);

Purpose

Rotates an image counterclockwise.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to rotate.
angle | float | The angle, in degrees, to rotate the image.
fill | PixelValue | The value the function applies to the image pixels not covered by the rotated image.
method | InterpolationMethod | The method of interpolation. The valid interpolation methods for rotation are IMAQ_ZERO_ORDER and IMAQ_BILINEAR.
maintainSize | int | Set this parameter to TRUE to maintain the size of the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqScale

Usage

int imaqScale(Image* dest, const Image* source, int xScale, int yScale, ScalingMode scaleMode, Rect rect);

Purpose

Scales an image or area of an image. The source image and destination image must be the same image type. This function makes an image larger by duplicating pixels, and it makes an image smaller by subsampling pixels. For more sophisticated scaling techniques, use imaqResample().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image to scale.
xScale | int | The scaling factor in the x direction. If you set scaleMode to IMAQ_SCALE_LARGER, xScale is a multiplication factor, meaning the function duplicates each source pixel xScale times. If you set scaleMode to IMAQ_SCALE_SMALLER, xScale is a division factor, meaning the function takes one pixel for every xScale pixels.
yScale | int | The scaling factor in the y direction. If you set scaleMode to IMAQ_SCALE_LARGER, yScale is a multiplication factor, meaning the function duplicates each source pixel yScale times. If you set scaleMode to IMAQ_SCALE_SMALLER, yScale is a division factor, meaning the function takes one pixel for every yScale pixels.
scaleMode | ScalingMode | The scaling mode.
rect | Rect | Specifies the rectangular region of the source image to scale. Set this parameter to IMAQ_NO_RECT to scale the whole image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSegmentation

Usage

int imaqSegmentation(Image* dest, Image* source);

Purpose

Calculates zones of influence around particles in a labeled image. The function finds the nearest particle of each pixel in the source image and sets the pixel value to the labeled value of that particle. Before calling imaqSegmentation(), you must label the particles with imaqLabel().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image to segment. The segmentation modifies the border of the source image. The border must be at least one pixel wide.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqSelectAnnulus

Usage

int imaqSelectAnnulus(const Image* image, Annulus* annulus, const ConstructROIOptions* options, int* okay);

Purpose

Displays the image in a modal window and allows the user to draw an annulus on it. After the user draws the annulus, the function hides the window.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image from which the user selects an annulus.
annulus | Annulus* | On return, this parameter specifies the coordinates of the annulus chosen by the user. If the user does not select an annulus, the function sets all of the elements of annulus to –1. This parameter is required and cannot be NULL.
options | const ConstructROIOptions* | Describes how a function presents the annulus constructor window.
okay | int* | On return, this parameter is TRUE if the user pressed the OK button to end the selection of an annulus. Otherwise, this parameter is FALSE. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

windowNumber | IMAQ_MODAL_DIALOG
windowTitle | "Select an Annulus"
type | IMAQ_PALETTE_GRAY
palette | NULL
numColors | 0


imaqSelectLine

Usage

int imaqSelectLine(const Image* image, Point* start, Point* end, const ConstructROIOptions* options, int* okay);

Purpose

Displays the image in a modal window and allows the user to draw a line on it. After the user draws the line, the function hides the window.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image from which the user selects a line.
start | Point* | On return, this parameter specifies the coordinates of the start of the line chosen by the user. If the user does not select a line, the function sets all of the elements of start to –1. This parameter is required and cannot be NULL.
end | Point* | On return, this parameter specifies the coordinates of the end of the line chosen by the user. If the user does not select a line, the function sets all of the elements of end to –1. This parameter is required and cannot be NULL.
options | const ConstructROIOptions* | Describes how a function presents the line constructor window.
okay | int* | On return, this parameter is TRUE if the user pressed the OK button to end the selection of a line. Otherwise, this parameter is FALSE. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

windowNumber | IMAQ_MODAL_DIALOG
windowTitle | "Select a Line"
type | IMAQ_PALETTE_GRAY
palette | NULL
numColors | 0


imaqSelectPoint

Usage

int imaqSelectPoint(const Image* image, Point* point, const ConstructROIOptions* options, int* okay);

Purpose

Displays the image in a modal window and allows the user to draw a point on it. After the user draws the point, the function hides the window.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image from which the user selects a point.
point | Point* | On return, this parameter specifies the coordinates of the point chosen by the user. If the user does not select a point, the function sets all of the elements of point to –1. This parameter is required and cannot be NULL.
options | const ConstructROIOptions* | Describes how a function presents the point constructor window.
okay | int* | On return, this parameter is TRUE if the user pressed the OK button to end the selection of a point. Otherwise, this parameter is FALSE. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

windowNumber | IMAQ_MODAL_DIALOG
windowTitle | "Select a Point"
type | IMAQ_PALETTE_GRAY
palette | NULL
numColors | 0


imaqSelectRect

Usage

int imaqSelectRect(const Image* image, RotatedRect* rect, const ConstructROIOptions* options, int* okay);

Purpose

Displays the image in a modal window and allows the user to draw a rectangle on it. After the user draws the rectangle, the function hides the window.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image from which the user selects a rectangle.
rect | RotatedRect* | On return, this parameter specifies the coordinates of the rectangle chosen by the user. If the user does not select a rectangle, the function sets all of the elements of rect to –1. This parameter is required and cannot be NULL.
options | const ConstructROIOptions* | Describes how a function presents the rectangle constructor window.
okay | int* | On return, this parameter is TRUE if the user pressed the OK button to end the selection of a rectangle. Otherwise, this parameter is FALSE. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

windowNumber | IMAQ_MODAL_DIALOG
windowTitle | "Select a Rectangle"
type | IMAQ_PALETTE_GRAY
palette | NULL
numColors | 0


imaqSeparation

Usage

int imaqSeparation(Image* dest, Image* source, int erosions, const StructuringElement* structuringElement);

Purpose

Separates touching particles by eroding the image to remove small isthmuses between the particles. After performing the erosion, the algorithm reconstructs the image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image containing particles to separate. The separation modifies the border of the source image. The border must be at least half as large as the larger dimension of the structuring element.
erosions | int | The number of erosions to perform.
structuringElement | const StructuringElement* | The structuring element used in the operation. Set this parameter to NULL if you do not want a custom structuring element.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqSetBitDepth

Usage

int imaqSetBitDepth(Image* image, unsigned int bitDepth);

Purpose

Sets the bit depth of the image. The bit depth of an image determines how NI Vision displays, saves and converts images with more than 8 bits per channel.

Image Types Supported

IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image whose bit depth the function sets.
bitDepth | unsigned int | The new bit depth of the image. The value must be from 8 to 15 for IMAQ_IMAGE_I16 images, from 8 to 16 for IMAQ_IMAGE_RGB_U64 images, or 0. A value of 0 indicates that NI Vision should use the entire range of the image datatype.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetBorderSize

Usage

int imaqSetBorderSize(Image* image, int size);

Purpose

Sets the border size of an image. This operation preserves image pixels.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image whose border size the function sets.
size | int | The new border size. Valid border sizes range from 0-50.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetContourColor

Usage

int imaqSetContourColor(ROI* roi, ContourID id, const RGBValue* color);

Purpose

Sets the color of a contour.

Parameters

Name | Type | Description
roi | ROI* | The region of interest (ROI) containing the contour whose color the function sets.
id | ContourID | The ContourID of the contour whose color the function sets.
color | const RGBValue* | The color to which the function sets the contour. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetCoordinateSystem

Usage

int imaqSetCoordinateSystem(Image* image, const CoordinateSystem* system);

Purpose

Sets the coordinate system and scaling constants for the calibrated real-world coordinates of the image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | Image* | The image whose coordinate system the function sets. This image must already contain calibration information.
system | const CoordinateSystem* | Defines the coordinate system for the calibrated real-world coordinates.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

system—Set system to NULL to use the following default coordinate system:

origin | {0, 0}
angle | 0
axisOrientation | IMAQ_INDIRECT


imaqSetCurrentTool

Usage

int imaqSetCurrentTool(Tool currentTool);

Purpose

Sets the currently selected tool in the tool window.

Parameters

Name | Type | Description
currentTool | Tool | The tool to make the selected region tool.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetError

Usage

int imaqSetError(int errorCode, const char* function);

Purpose

Sets the current error.

Parameters

Name | Type | Description
errorCode | int | The code of the error to set.
function | const char* | The name of the function in which the error occurred. Set this parameter to NULL to record no function.

Return Value

Type | Description
int | Sets the current error.


imaqSetEventCallback

Usage

int imaqSetEventCallback(EventCallback callback, int synchronous);

Purpose

Sets a callback function that NI Vision calls when an event occurs in a window. When a user generates an event, NI Vision calls the callback function using the following parameters: event, window number, tool, and location of the event. For a full description of these parameters, refer to imaqGetLastEvent().

Parameters

Name | Type | Description
callback | EventCallback | The function to call. Set this parameter to NULL if you want to disable event processing using a callback. If you disable callbacks, you can process events using imaqGetLastEvent().
synchronous | int | Set this parameter to TRUE to call the callback function in the thread that calls imaqSetEventCallback(). Set this parameter to FALSE to call the callback function asynchronously in a separate thread. To process callbacks synchronously, your application must have a message pump. In LabWindows/CVI, calling RunUserInterface() starts a message pump. The function ignores this parameter if callback is NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

callback—callback should have the following prototype: void IMAQ_CALLBACK MyCallback(WindowEventType, int windowNumber, Tool tool, Rect rect);


imaqSetImageSize

Usage

int imaqSetImageSize(Image* image, int width, int height);

Purpose

Sets the size of an image. The original pixels are not transferred to the new image. The new image will contain uninitialized pixels. To resize the image and retain the original information, use imaqScale() or imaqResample().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image to resize.
width | int | The new width of the image.
height | int | The new height of the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetLine

Usage

int imaqSetLine(Image* image, const void* array, int arraySize, Point start, Point end);

Purpose

Sets the pixel values along a line in an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name

Type

Description

image | Image* | The image whose line pixel values the function modifies.
array const void*

The one-dimensional array of pixel values that the function uses to replace the values in the line. The type of array you provide depends on the image type, as follows:

Image Type | Array Type
IMAQ_IMAGE_U8 | unsigned char
IMAQ_IMAGE_I16 | short
IMAQ_IMAGE_SGL | float
IMAQ_IMAGE_RGB | RGBValue structures
IMAQ_IMAGE_HSL | HSLValue structures
IMAQ_IMAGE_RGB_U64 | RGBU64Value structures
arraySize | int | The number of pixels in the array.
start | Point | The coordinate location of the starting point of the line.
end | Point | The coordinate location of the ending point of the line.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetMaskOffset

Usage

int imaqSetMaskOffset(Image* image, Point offset);

Purpose

When the given image is used as a mask, sets the location in the source image at which the function places the (0,0) pixel of the mask image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The mask image whose offset the function sets.
offset | Point | The coordinates where the function applies the mask.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetMultipleGeometricPatternsOptions

Usage

int imaqSetMultipleGeometricPatternsOptions(MultipleGeometricPattern* multiplePattern, const char* label, const CurveOptions* curveOptions, const MatchGeometricPatternOptions* matchOptions, const MatchGeometricPatternAdvancedOptions2* advancedMatchOptions);

Purpose

Sets the options used by imaqMatchMultipleGeometricPatterns() to match the template image corresponding to the specified label in multiplePattern.

Parameters

Name | Type | Description
multiplePattern | MultipleGeometricPattern* | The multiple geometric pattern that the template image is part of. This parameter is required and cannot be NULL.
label | const char* | The label identifying the template image for which you are setting the options. This parameter is required and cannot be NULL.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image the function will use to match the template image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter. Set this parameter to NULL to use the same curve options to match the template image as you used to learn the template image.
matchOptions | const MatchGeometricPatternOptions* | Describes how to search for the template image.
advancedMatchOptions | const MatchGeometricPatternAdvancedOptions2* | Specifies advanced behaviors of the function, which can be used to optimize the performance of the function or to fine-tune the matches located by the function.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

matchOptions—Set matchOptions to NULL to use the default match options, as follows:

mode | IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT
subpixelAccuracy | FALSE
angleRanges | NULL (all angles allowed)
numRanges | 0
scaleRange | {75, 125}
occlusionRange | {0, 25}
numMatchesRequested | 1
minMatchScore | 800

advancedMatchOptions—Set advancedMatchOptions to NULL to use the default advanced match options, as follows:

minFeaturesUsed | 5
maxFeaturesUsed | 5
subpixelIterations | 20
subpixelTolerance | 0
initialMatchListLength | 200
matchTemplateCurveScore | FALSE
correlationScore | TRUE
minMatchSeparationDistance | 20
minMatchSeparationAngle | 10
minMatchSeparationScale | 10
maxMatchOverlap | 80
coarseResult | FALSE
smoothContours | FALSE
enableCalibrationSupport | TRUE


imaqSetParticleClassifierOptions

Usage

int imaqSetParticleClassifierOptions(ClassifierSession* session, const ParticleClassifierPreprocessingOptions* preprocessingOptions, const ParticleClassifierOptions* options);

Purpose

Set options on a particle classifier session.

Parameters

Name | Type | Description
session | ClassifierSession* | The classifier session from which to set the options.
preprocessingOptions | const ParticleClassifierPreprocessingOptions* | The preprocessing options to set. Set this parameter to NULL if you do not want to set the preprocessing options.
options | const ParticleClassifierOptions* | The classification options to set. Set this parameter to NULL if you do not want to set the classification options.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetPixel

Usage

int imaqSetPixel(Image* image, Point coord, PixelValue value);

Purpose

Sets the value of a pixel within an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image whose pixel value the function sets.
coord | Point | The coordinates of the pixel the function sets.
value | PixelValue | The value to which the function sets the image pixel.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetReferenceChar

Usage

int imaqSetReferenceChar(const CharSet* set, int index, int isReferenceChar);

Purpose

Sets a character as the reference character for the character class. If the character class already has a reference character, the new character will replace the old character as the reference character.

Parameters

Name | Type | Description
set | const CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
index | int | The index of a character to set as the reference character for its character class.
isReferenceChar | int | Set this parameter to TRUE to set the character as the reference character. Set this parameter to FALSE to unset the character as the reference character.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetROIColor

Usage

int imaqSetROIColor(ROI* roi, const RGBValue* color);

Purpose

Sets the color of all the contours currently in a region of interest (ROI). All contours you add to the ROI become this color after you call this function. Use imaqSetContourColor() to change the color of individual contours within the ROI.

Parameters

Name | Type | Description
roi | ROI* | The ROI whose color the function sets.
color | const RGBValue* | The color to which the function sets the ROI. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetSimpleCalibration

Usage

int imaqSetSimpleCalibration(Image* image, ScalingMethod method, int learnTable, const GridDescriptor* grid, const CoordinateSystem* system);

Purpose

Sets a simple calibration for an image. In a simple calibration, a pixel coordinate is transformed to a real-world coordinate through scaling in the horizontal and vertical directions.

Note Simple calibration cannot correct for perspective distortion or nonlinear lens distortion.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image the function sets calibration information for. This image should either have no associated calibration information or simple calibration information.
method | ScalingMethod | Defines the scaling method correction functions used to correct the image. If the image has been calibrated previously, using the imaqLearnCalibrationPoints() or imaqLearnCalibrationGrid(), this parameter is ignored and the previously defined scaling is used. IMAQ_SCALE_TO_PRESERVE_AREA and IMAQ_SCALE_TO_FIT are valid options.
learnTable | int | Set this parameter to TRUE to process and store the correction table. The correction table accelerates the process of correcting an image and is useful if you plan to correct several images using this calibration setup.
grid | const GridDescriptor* | Defines scaling constants for the image. If the image has been calibrated previously, using the imaqLearnCalibrationPoints() or imaqLearnCalibrationGrid(), this parameter is ignored and the previously defined scaling constants are used.
system | const CoordinateSystem* | Defines the coordinate system for the calibrated real-world coordinates.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

grid—Set grid to NULL to use the following default scaling constants:

xStep | 1
yStep | 1
unit | IMAQ_UNDEFINED

system—Set system to NULL to use the following default coordinate system:

origin | {0, 0}
angle | 0
axisOrientation | IMAQ_INDIRECT


imaqSetToolColor

Usage

int imaqSetToolColor(const RGBValue* color);

Purpose

Sets the color in which the tools from the tool window draw.

Parameters

Name | Type | Description
color | const RGBValue* | The tool drawing color. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetToolContextSensitivity

Usage

int imaqSetToolContextSensitivity(int sensitive);

Purpose

Enable or disable the context sensitivity for all the tools.

Parameters

Name | Type | Description
sensitive | int | Set value to TRUE to enable context-sensitive tool selection. Set value to FALSE to disable context-sensitive tool selection.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetupGrab

Usage

int imaqSetupGrab(SESSION_ID sessionID, Rect rect);

Purpose

Configures and starts a grab acquisition. A grab performs an acquisition that loops continually on one buffer. Use imaqGrab() to copy an image out of the buffer. Use imaqStopAcquisition() to end the acquisition.

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.
rect | Rect | The area to acquire. If you set this parameter to IMAQ_NO_RECT, the function uses the entire acquisition window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetupRing

Usage

int imaqSetupRing(SESSION_ID sessionID, Image** images, int numImages, int skipCount, Rect rect);

Purpose

Configures a ring acquisition. A ring acquisition acquires images continuously and loops them into a buffer list. To start the acquisition, call imaqStartAcquisition(). To stop the acquisition, call imaqStopAcquisition(). To get an image from the ring, call imaqExtractFromRing() or imaqCopyFromRing(). Do not modify or dispose of the images in the ring until you end the acquisition with imaqStopAcquisition().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.
images | Image** | An array of images. Each element in the array must be a pointer to a valid image.
numImages | int | The number of images in the images array.
skipCount | int | The number of frames to skip between each acquired image. A skipCount of 0 acquires images continuously without skipping frames between acquired images.
rect | Rect | The area to acquire. Set this parameter to IMAQ_NO_RECT to acquire the entire acquisition window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetupSequence

Usage

int imaqSetupSequence(SESSION_ID sessionID, Image** images, int numImages, int skipCount, Rect rect);

Purpose

Configures a sequence acquisition. A sequence acquisition acquires a full sequence of images into the image array. To start the acquisition, call imaqStartAcquisition(). The acquisition finishes upon reaching the end of the sequence or when you call imaqStopAcquisition(). Do not modify or dispose of the images in the sequence until the acquisition has finished.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.
images | Image** | An array of images. Each element in the array must be a pointer to a valid image.
numImages | int | The number of images in the images array.
skipCount | int | The number of frames to skip between each acquired image. A skipCount of 0 acquires images continuously without skipping frames between acquired images.
rect | Rect | The area to acquire. Set this parameter to IMAQ_NO_RECT to acquire the entire acquisition window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetupToolWindow

Usage

int imaqSetupToolWindow(int showCoordinates, int maxIconsPerLine, const ToolWindowOptions* options);

Purpose

Configures the appearance and availability of the tools in the tool window.

Parameters

Name | Type | Description
showCoordinates | int | Determines whether active pixel coordinates are visible. Set this parameter to TRUE to display the active pixel coordinates. Set this parameter to FALSE if you do not want the coordinates to show.
maxIconsPerLine | int | The maximum number of tool icons to show on each line. The tool window uses the minimum number of lines needed to display all of the tools based on this parameter and distributes the tools as evenly as possible.
options | const ToolWindowOptions* | Determines the availability of tools in the tool window. Set options to NULL to display all the tools.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetupWindow

Usage

int imaqSetupWindow(int windowNumber, int configuration);

Purpose

Sets the properties of an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
configuration | int | Any of the WindowOptions flags combined together.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowBackground

Usage

int imaqSetWindowBackground(int windowNumber, WindowBackgroundFillStyle fillStyle, WindowBackgroundHatchStyle hatchStyle, const RGBValue* fillColor, const RGBValue* backgroundColor);

Purpose

Sets the background style and color information for the display window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
fillStyle | WindowBackgroundFillStyle | The fill style of the display window.
hatchStyle | WindowBackgroundHatchStyle | The hatch style of the display window.
fillColor | const RGBValue* | The fill color of the display window. Set this parameter to NULL to use the current fill color.
backgroundColor | const RGBValue* | The background color of the display window. Set this parameter to NULL to use the current background color.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowDisplayMapping

Usage

int imaqSetWindowDisplayMapping(int windowNumber, const DisplayMapping* mapping);

Purpose

Sets the pixel mapping policy for displaying 16-bit images of an unspecified bit depth. Because 16-bit grayscale images cannot be displayed with their full resolution on 32-bit color displays using common video adapters limited to 8-bit resolution/per pixel/color, 16-bit images need to be mapped to the 8-bit range (0 to 255).

Parameters

Name | Type | Description
windowNumber | int | The number of the window the function sets the pixel mapping policy for.
mapping | const DisplayMapping* | Describes the mapping policy the function sets for the windows.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

mapping—Set mapping to NULL to use the default options, as follows:

conversionMethod | IMAQ_FULL_DYNAMIC
minimumValue | 0
maximumValue | 0
shiftCount | 0


imaqSetWindowGrid

Usage

int imaqSetWindowGrid(int windowNumber, int xResolution, int yResolution);

Purpose

Sets the grid resolution of the image window. Grid resolution is the number of pixels between grid lines. NI Vision uses the grid resolution when drawing regions of interest on the window using tools in the tool window. You can use the grid to trace a region of interest accurately.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
xResolution | int | The x resolution of the grid.
yResolution | int | The y resolution of the grid.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowMaxContourCount

Usage

int imaqSetWindowMaxContourCount(int windowNumber, unsigned int maxContourCount);

Purpose

Sets the maximum number of region of interest (ROI) contours that can be drawn on an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
maxContourCount | unsigned int | The maximum number of contours the ROI this image window contains can have.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowNonTearing

Usage

int imaqSetWindowNonTearing(int windowNumber, int nonTearing);

Purpose

Enables or disables the non-tearing state of the display window. Tearing images can occur when the image display rate is not in sync with the refresh rate of the monitor. The difference between the display rate and the monitor refresh rate can cause parts of two different images to be displayed at the same time, which causes a split in the image. By enabling non-tearing, the image display is synced to the refresh of the monitor and tearing is eliminated.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
nonTearing | int | Set this parameter to TRUE if the given window should be non-tearing and FALSE if the window should operate normally.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowPalette

Usage

int imaqSetWindowPalette(int windowNumber, PaletteType type, const RGBValue* palette, int numColors);

Purpose

Sets the color palette to use when displaying a monochrome image in an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
type | PaletteType | The palette type to use.
palette | const RGBValue* | If type is IMAQ_PALETTE_USER, this array is the palette of colors to use with the window. If type is not IMAQ_PALETTE_USER, the function ignores this parameter, and you can set it to NULL. The maximum number of colors in a palette is 256. palette[n] maps to pixel value n. If there are less than 256 elements in palette, the function maps all pixel values past the last element in palette to the associated grayscale value.
numColors | int | If type is IMAQ_PALETTE_USER, this parameter is the number of colors in the palette array. If type is not IMAQ_PALETTE_USER, the function ignores this parameter.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowROI

Usage

int imaqSetWindowROI(int windowNumber, const ROI* roi);

Purpose

Sets the region of interest (ROI) associated with a given window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
roi | const ROI* | The ROI to associate with the window. Set this parameter to NULL to remove any ROIs from the window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowSize

Usage

int imaqSetWindowSize(int windowNumber, int width, int height);

Purpose

Sets the size of an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
width | int | The new width of the window.
height | int | The new height of the window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowThreadPolicy

Usage

int imaqSetWindowThreadPolicy(WindowThreadPolicy policy);

Purpose

Determines the thread in which NI Vision creates windows. By default, NI Vision uses IMAQ_CALLING_THREAD. This policy creates windows in the thread that makes the first display function call for a given window number. If that thread does not process messages, set the window thread policy to IMAQ_SEPARATE_THREAD. Using this policy, NI Vision creates windows in a separate thread and processes messages for the windows automatically.

Parameters

Name | Type | Description
policy | WindowThreadPolicy | The thread policy.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowTitle

Usage

int imaqSetWindowTitle(int windowNumber, const char* title);

Purpose

Sets the title of an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
title | const char* | The new title of the window. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqShift

Usage

int imaqShift(Image* dest, const Image* source, int shiftX, int shiftY, PixelValue fill);

Purpose

Shifts an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to shift.
shiftX | int | Specifies how many pixels to the right to shift the image.
shiftY | int | Specifies how many pixels down to shift the image.
fill | PixelValue | The value with which the function fills the uncovered image pixels.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqShowScrollbars

Usage

int imaqShowScrollbars(int windowNumber, int visible);

Purpose

Shows or hides the scrollbars on an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
visible | int | If TRUE, the scrollbars of the window are visible. If FALSE, the scrollbars of the window are hidden.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqShowToolWindow

Usage

int imaqShowToolWindow(int visible);

Purpose

Shows or hides the tool window.

Parameters

Name | Type | Description
visible | int | If TRUE, the tool window is visible. If FALSE, the tool window is hidden.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqShowWindow

Usage

int imaqShowWindow(int windowNumber, int visible);

Purpose

Shows or hides an image window.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
visible | int | If TRUE, the given window is visible. If FALSE, the given window is hidden.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSimpleDistance

Usage

int imaqSimpleDistance(Image* dest, Image* source, const StructuringElement* structuringElement);

Purpose

Creates a distance map. The function encodes a particle pixel value as a function of the distance of the pixel from the particle border. For a more precise but slower algorithm, use imaqDanielssonDistance().

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image that the function uses to compute the distance map. The function modifies the border of the source image. The border must be at least half as large as the larger of the structuring element dimensions.
structuringElement | const StructuringElement* | The structuring element used in the operation. Set this parameter to NULL if you do not want a custom structuring element.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqSimpleEdge

Usage

PointFloat* imaqSimpleEdge(const Image* image, const Point* points, int numPoints, const SimpleEdgeOptions* options, int* numEdges);

Purpose

Finds prominent edges along an array of pixel coordinates. This function can return the first edge, the first and the last edges, or all the edges.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which you want to find edges.
points | const Point* | The path along which the function detects edges. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the points array.
options | const SimpleEdgeOptions* | Describes how you want the function to find edges. This parameter is required and cannot be NULL.
numEdges | int* | On return, the number of edges that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
PointFloat* | On success, this function returns an array of points indicating the location of the edges. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the array by calling imaqDispose().


imaqSizeFilter

Usage

int imaqSizeFilter(Image* dest, Image* source, int connectivity8, int erosions, SizeType keepSize, const StructuringElement* structuringElement);

Purpose

Filters particles based on their size. The algorithm erodes the image a specified number of times and either keeps or discards the particles from the original image that remain in the eroded image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image on which the function applies the filter. The calculation modifies the border of the source image. The border must be at least half as large as the larger of the structuring element dimensions.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.
erosions | int | The number of erosions to perform.
keepSize | SizeType | Determines the size of the particles the function keeps after the erosion.
structuringElement | const StructuringElement* | The structuring element used in the operation. Set this parameter to NULL if you do not want a custom structuring element.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqSkeleton

Usage

int imaqSkeleton(Image* dest, Image* source, SkeletonMethod method);

Purpose

Calculates the skeleton of the particles inside the image. The skeleton is made up of lines separating the zones of influence in the image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image whose skeleton the function derives. The calculation modifies the border of the source image. The border must be at least one pixel wide.
method | SkeletonMethod | The method that the function uses to calculate the skeleton.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqSnap

Usage

Image* imaqSnap(SESSION_ID sessionID, Image* image, Rect rect);

Purpose

Acquires a single image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.
image | Image* | The image into which to acquire. If image is NULL, imaqSnap() creates a new image.
rect | Rect | The area to acquire. Set this parameter to IMAQ_NO_RECT to acquire the entire acquisition window.

Return Value

Type | Description
Image* | On success, this function returns the acquired image. If you set image to NULL, the function returns a new image. Otherwise, the function returns a pointer to image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().


imaqSpoke

Usage

SpokeReport* imaqSpoke(const Image* image, const ROI* roi, SpokeDirection direction, EdgeProcess process, const SpokeOptions* options);

Purpose

Finds edges along radial lines specified inside an annular region.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which to find edges.
roi | const ROI* | The annular region the function looks in for the edges. The first contour of roiI must be an annulus.
direction | SpokeDirection | The direction the function search for edges along the search lines.
process | EdgeProcess | Defines which edges the function looks for.
options | const SpokeOptions* | Describes how to search for the edges.

Return Value

Type | Description
SpokeReport* | On success, this function returns information describing the calculated edges and the spoke used by the function. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the information, dispose of it by calling imaqDispose().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

threshold | 40
width | 4
steepness | 2
subsamplingRatio | 5
subpixelType | IMAQ_QUADRATIC
subpixelDivisions | 1


imaqStartAcquisition

Usage

int imaqStartAcquisition(SESSION_ID sessionID);

Purpose

Starts an acquisition identified by sessionID. Use this function with sequence and ring functions.

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqStopAcquisition

Usage

int imaqStopAcquisition(SESSION_ID sessionID);

Purpose

Stops a session acquisition identified by sessionID. Use this function with grab, ring, and sequence functions.

Parameters

Name | Type | Description
sessionID | SESSION_ID | A valid session ID.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqStraightEdge

Usage

StraightEdgeReport2* imaqStraightEdge(const Image* image, const ROI* roi, SearchDirection searchDirection, const EdgeOptions2* edgeOptions, const StraightEdgeOptions* straightEdgeOptions);

Purpose

Finds straight edges inside an ROI in an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which to find edges.
roi | const ROI* | The ROI to find straight edges inside.
searchDirection | SearchDirection | The direction to search for straight lines. The first contour of roi must be a rectangle, rotated rectangle, or a 4-sided closed contour.
edgeOptions | const EdgeOptions2* | Specifies the parameters that are used to compute the edge profile and detect the edges.
straightEdgeOptions | const StraightEdgeOptions* | Specifies the parameters that are used to detect straight lines.

Return Value

Type | Description
StraightEdgeReport2* | On success, this function returns a structure of information about the edges found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this structure, dispose of it by calling imaqDispose().

Parameter Discussion

edgeOptions—Set edgeOptions to NULL to use the following default values:

polarity | IMAQ_SEARCH_FOR_ALL_EDGES
kernelSize | 3
width | 3
minThreshold | 10.0
interpolationType | IMAQ_BILINEAR_FIXED
columnProcessingMode | IMAQ_MEDIAN_COLUMNS

straightEdgeOptions—Set straightEdgeOptions to NULL to use the following default values:

numLines | 1
searchMode | IMAQ_USE_BEST_PROJECTION_EDGE
minScore | 10.0
maxSize | 1000.0
orientation | 0.0
angleRange | 10.0
angleTolerance | 1.0
stepSize | 3
minSignalToNoiseRatio | 0.0
minCoverage | 25.0
houghIterations | 5


imaqSubtract

Usage

int imaqSubtract(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Subtracts two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first image to subtract.
sourceB | const Image* | The second image to subtract.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

sourceB—The type of the sourceB image depends on the type of the sourceA, as follows:

  • If sourceA is IMAQ_IMAGE_I16, sourceB must be IMAQ_IMAGE_I16 or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_SGL, sourceB must be IMAQ_IMAGE_SGL, IMAQ_IMAGE_I16, or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_RGB, sourceB must be IMAQ_IMAGE_RGB or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_COMPLEX, sourceB must be IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_SGL, IMAQ_IMAGE_I16, or IMAQ_IMAGE_U8.

Otherwise, sourceB must be the same type as sourceA.


imaqSubtractConstant

Usage

int imaqSubtractConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Subtracts each pixel in an image by a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image from which the function subtracts a scalar constant.
value | PixelValue | The value to subtract from the source image pixels. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqThreshold

Usage

int imaqThreshold(Image* dest, const Image* source, float rangeMin, float rangeMax, int useNewValue, float newValue);

Purpose

Thresholds an image. The function sets pixels values outside of the given range to 0. The function sets pixel values within the range to a given value or leaves the values unchanged.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
rangeMin | float | The lower boundary of the range of pixel values to keep.
rangeMax | float | The upper boundary of the range of pixel values to keep.
useNewValue | int | Set this parameter to TRUE to set the pixel values within [rangeMin, rangeMax] to the value specified in newValue. Set this field to FALSE to leave the pixel values unchanged.
newValue | float | If you set useNewValue to TRUE, newValue is the replacement value for pixels within the range. If you set useNewValue to FALSE, the function ignores this parameter.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqTrainChars

Usage

int imaqTrainChars(const Image* image, CharSet* set, int index, const char* charValue, const ROI* roi, const OCRProcessingOptions* processingOptions, const OCRSpacingOptions* spacingOptions);

Purpose

Assigns character values to the identifiable objects in the image and appends the newly trained characters to the character set.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The source image for this operation.
set | CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
index | int | The index of the object identified within the ROI that you want to train. Pass IMAQ_ALL_OBJECTS to train all the objects that the function identifies in the ROI.
charValue | const char* | A null-terminated string of characters that specifies the value of the object at the index. The length of the string must not exceed 255 characters. If you set index to IMAQ_ALL_OBJECTS, each character in charValue is the value for the object at the corresponding index in the set of objects identified within the ROI. For example, the character in the first position of charValue is the value for the object at index 0. If you set index to IMAQ_ALL_OBJECTS, the length of charValue must match the number of objects identified within the ROI.
roi | const ROI* | The ROI that the function performs this operation on. Pass NULL to use the entire image for this operation.
processingOptions | const OCRProcessingOptions* | The options you use to configure how the function processes the contents of the image before attempting to read text.
spacingOptions | const OCRSpacingOptions* | The size and spacing constraints you can apply to characters in the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

processingOptions—Set the processingOptions parameter to NULL to use the following default processing options:

mode | IMAQ_COMPUTED_UNIFORM
lowThreshold | 0
highThreshold | 255
blockCount | 4
fastThreshold | FALSE
biModalCalculation | FALSE
darkCharacters | TRUE
removeObjectsTouchingROI | FALSE
erosionCount | 0

spacingOptions—Set the spacingOptions parameter to NULL to use the following default spacing options:

minCharSpacing | 1
minCharSize | 20
maxCharSize | 65536
maxHorizontalElementSpacing | 1
maxVerticalElementSpacing | 0
minBoundingRectWidth | 1
maxBoundingRectWidth | 65536
minBoundingRectHeight | 1
maxBoundingRectHeight | 65536
autoSplit | FALSE


imaqTrainNearestNeighborClassifier

Usage

NearestNeighborTrainingReport* imaqTrainNearestNeighborClassifier(ClassifierSession* session, const NearestNeighborOptions* options);

Purpose

Trains a classifier with the nearest neighbor engine.

Parameters

Name | Type | Description
session | ClassifierSession* | The classifier session to train.
options | const NearestNeighborOptions* | The options to use when training.

Return Value

Type | Description
NearestNeighborTrainingReport* | On success, this function returns a report containing the results of the training. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the report by calling imaqDispose().


imaqTransformPixelToRealWorld

Usage

TransformReport* imaqTransformPixelToRealWorld(const Image* image, const PointFloat* pixelCoordinates, int numCoordinates);

Purpose

Transforms pixel coordinates to real-world coordinates, according to the calibration information contained in an image.

Note You must first attach calibration information to this image by using one of the following functions:
imaqCopyCalibrationInfo()
imaqLearnCalibrationGrid()
imaqLearnCalibrationPoints()
imaqSetSimpleCalibration()

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The image whose calibration information the function uses to transform the pixel coordinates.
pixelCoordinates | const PointFloat* | The array of pixel coordinates the function transforms to real-world coordinates. This parameter is required and cannot be NULL.
numCoordinates | int | The number of coordinates in the array.

Return Value

Type | Description
TransformReport* | On success, this function returns a report describing the real world coordinates. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the report, dispose of it by calling imaqDispose().


imaqTransformRealWorldToPixel

Usage

TransformReport* imaqTransformRealWorldToPixel(const Image* image, const PointFloat* realWorldCoordinates, int numCoordinates);

Purpose

Transforms real-world coordinates to pixel coordinates, according to the calibration information contained in an image.

Note You must first attach calibration information to this image by using one of the following functions:
imaqCopyCalibrationInfo()
imaqLearnCalibrationGrid()
imaqLearnCalibrationPoints()
imaqSetSimpleCalibration()

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The image whose calibration information the function uses to transform the real-world coordinates.
realWorldCoordinates | const PointFloat* | The array of real-world coordinates the function transforms to pixel coordinate. This parameter is required and cannot be NULL.
numCoordinates | int | The number of coordinates in the array.

Return Value

Type | Description
TransformReport* | On success, this function returns a report describing the pixel coordinates. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the report, dispose of it by calling imaqDispose().


imaqTransformROI2

Usage

int imaqTransformROI2(ROI* roi, const CoordinateSystem* baseSystem, const CoordinateSystem* newSystem);

Purpose

Rotates and translates a region of interest (ROI) from one coordinate system to another coordinate system within an image.

Parameters

Name | Type | Description
roi | ROI* | The ROI to transform. This parameter is required and cannot be NULL.
baseSystem | const CoordinateSystem* | The description of the base coordinate system. This parameter is required and cannot be NULL.
newSystem | const CoordinateSystem* | The description of the new coordinate system. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

roi—If necessary, the function converts rectangle contours inside roi to rotated rectangle contours. If necessary, the function converts oval contours inside roi to closed contours.


imaqTranspose

Usage

int imaqTranspose(Image* dest, const Image* source);

Purpose

Transposes an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to transpose.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqTruncate

Usage

int imaqTruncate(Image* dest, const Image* source, TruncateMode highlow, float ratioToKeep);

Purpose

Truncates the frequencies of a complex image.

Image Types Supported

IMAQ_IMAGE_COMPLEX

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image whose frequencies the function truncates.
highlow | TruncateMode | Specifies which frequencies the function truncates.
ratioToKeep | float | Specifies the percentage of frequencies that the function retains. For example, set this parameter to 10.0 to retain 10 percent of the frequencies and attenuate 90 percent of the frequencies.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqUnflatten

Usage

int imaqUnflatten(Image* image, const void* data, unsigned int size);

Purpose

Converts data returned from imaqFlatten() to an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image in which the function stores the data.
data | const void* | The data to unflatten. This parameter is required and cannot be NULL.
size | unsigned int | Size of the data, in bytes.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqUnwrapImage

Usage

int imaqUnwrapImage(Image* dest, const Image* source, Annulus annulus, RectOrientation orientation, InterpolationMethod method);

Purpose

This function unwraps an annulus from an image into a rectangular image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image for the unwrapped pixels.
source | const Image* | The image containing the annulus of pixels to be unwrapped.
annulus | Annulus | The coordinate location of the annulus the function unwraps.
orientation | RectOrientation | Specifies the orientation of the resulting rectangular image relative to the annulus.
method | InterpolationMethod | Specifies the interpolation algorithm used in the unwrapping process. Valid methods are IMAQ_ZERO_ORDER and IMAQ_BILINEAR.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqVerifyPatterns

Usage

int* imaqVerifyPatterns(const Image* image, const CharSet* set, const String255* expectedPatterns, int patternCount, const ROI* roi, int* numScores);

Purpose

Verifies the accuracy of the text in the image. For each pattern, the function checks for the existence of a reference character for the expected character class and compares the character from the image to the reference character.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The source image for this operation.
set | const CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
expectedPatterns | const String255* | The array of expected patterns in the region of interest. This parameter is required and cannot be NULL.
patternCount | int | The number of patterns in the expectedPatterns array.
roi | const ROI* | The ROI that the function performs this operation on. Pass NULL to use the entire image for this operation. If the ROI has multiple contours, each contour is interpreted as a pattern location in the image. If the ROI only has one contour, the function searches the ROI for the expected patterns.
numScores | int* | On return, the number of scores returned by the function. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int* | On success, this function returns an array of verification scores for the first numScores elements of the expectedPatterns array. If a reference character does not exist for the character class of a character, the function sets the score corresponding to that character to 0. On failure, this function returns NULL. To get extended error information call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqVerifyText

Usage

int* imaqVerifyText(const Image* image, const CharSet* set, const char* expectedString, const ROI* roi, int* numScores);

Purpose

Verifies the accuracy of the text in the image. For each character, the function checks for the existence of a reference character for the expected character class and compares the character from the image to the reference character.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The source image for this operation.
set | const CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
expectedString | const char* | The expected character values in the region of interest. This parameter is required and cannot be NULL.
roi | const ROI* | The ROI that the function performs this operation on. Pass NULL to use the entire image for this operation. If the ROI has multiple contours, each contour is interpreted as a pattern location in the image. If the ROI only has one contour, the function searches the ROI for the expected patterns.
numScores | int* | On return, the number of scores returned by the function. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int* | On success, this function returns an array of verification scores for the first numScores characters in the expectedString array. If a reference character does not exist for the character class of a character, the function sets the score corresponding to that character to 0. On failure, this function returns NULL. To get extended error information call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqView3D

Usage

int imaqView3D(Image* dest, Image* source, const View3DOptions* options);

Purpose

This function creates a three-dimensional representation of an image for display purposes.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image of which to create a 3D representation.
options | const View3DOptions* | Specifies how to convert the image to a three-dimensional representation.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.

options—Set options to NULL to use the default options, as follows:

sizeReduction | 2
maxHeight | 64
direction | IMAQ_3D_NW
alpha | 30
beta | 30
border | 20
background | 85
plane | IMAQ_3D_MAGNITUDE


imaqWatershedTransform

Usage

int imaqWatershedTransform(Image* dest, const Image* source, int connectivity8, int* zoneCount);

Purpose

Computes the watershed transform on an image. Refer to the NI Vision Concepts Manual for more information about watershed transform.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
connectivity8 | int | Specifies how the watershed transform algorithm determines whether an adjacent pixel belongs to the same or different catchment or watershed line.
zoneCount | int* | On return, specifies the number of zones detected in the image. A zone is a region of the image in which all of the pixels belong to the same catchment basin. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

dest—If dest is of type IMAQ_IMAGE_U8, the function can store up to 255 unique labels not including the watershed line value of 0. If dest is of type IMAQ_IMAGE_I16, the function can store up to 32,767 unique labels not including the watershed line value of 0.


imaqWriteAVIFrame

Usage

int imaqWriteAVIFrame(Image* image, AVISession session, const void* data, unsigned int dataLength);

Purpose

This function writes an image to an AVI file, as well as data to attach to this image (if the AVI file was created to allow this).

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
image | Image* | The image to write to the AVI.
session | AVISession | The session to use.
data | const void* | If this AVI has data attached to it, the data to attach to this frame.
dataLength | unsigned int | If data is non-NULL, the length of the data to attach to this frame. This length must not exceed the maxDataLength parameter of imaqCreateAVI.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWriteBMPFile

Usage

int imaqWriteBMPFile(const Image* image, const char* fileName, int compress, const RGBValue* colorTable);

Purpose

Writes an image to a BMP file. The function also stores a CalibrationUnit of IMAQ_METER only. If you pass an image to this function that has a CalibrationUnit other than IMAQ_METER, the function converts xStep and yStep from the supplied unit into meters.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
image | const Image* | The image to write to a file.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
compress | int | Set this parameter to TRUE to compress the BMP. Set this parameter to FALSE to write an uncompressed BMP.
colorTable | const RGBValue* | An optional color table to associate with 8-bit images. If you want to provide a color table, the table must have 256 elements. Set this parameter to NULL to write a grayscale palette to the file.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWriteClassifierFile

Usage

int imaqWriteClassifierFile(const ClassifierSession* session, const char* fileName, WriteClassifierFileMode mode, const String255 description);

Purpose

Writes a classifier session to file.

Parameters

Name | Type | Description
session | const ClassifierSession* | The classifier session to write to file.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
mode | WriteClassifierFileMode | The mode to use when writing the classification session to file.
description | const String255 | A description of the classification session. Set this parameter to NULL if you do not need a description for this file.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWriteCustomData

Usage

int imaqWriteCustomData(Image* image, const char* key, const void* data, unsigned int size);

Purpose

Associates some data with a text key in an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | Image* | The image in which to write the custom data.
key | const char* | The key used to find the data in the image. This parameter is required and cannot be NULL.
data | const void* | The data associated with the key. This parameter is required and cannot be NULL.
size | unsigned int | Size of the data, in bytes.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWriteFile

Usage

int imaqWriteFile(const Image* image, const char* fileName, const RGBValue* colorTable);

Purpose

This function writes an image to a file. In addition to writing pixel information, the function writes calibration information if the file format supports calibration information. The following list details file formats that support calibration information.

  • AIPD Files—Stores any type of CalibrationUnit but stores only one step size. The function stores the xStep from the supplied image as the step size.
  • BMP and JPEG2000 Files—Stores a CalibrationUnit of IMAQ_METER only. If you pass an image to this function that has a CalibrationUnit other than IMAQ_METER, the function converts xStep and yStep from the supplied unit into meters.
  • JPEG and TIFF Files—Stores a CalibrationUnit of IMAQ_CENTIMETER or IMAQ_INCH only. If you pass an image to this function that has a metric CalibrationUnit other than IMAQ_CENTIMETER, the function converts xStep and yStep from the supplied unit into centimeters. If you pass an image to this function that has an English CalibrationUnit other than IMAQ_INCH, the function converts xStep and yStep from the supplied unit into inches.
  • PNG Files—Stores any type of CalibrationUnit.

To write specific file types with more flexibility, use imaqWriteBMPFile(), imaqWriteJPEGFile(), imaqWriteJPEG2000File, imaqWriteTIFFFile(), or imaqWritePNGFile2().

The file type is determined by the extension, as follows:

Extension | File Type
.aipd or .apd | AIPD
.bmp | BMP
.jpg or .jpeg | JPEG
.jp2 | JPEG2000
.png | PNG
.tif or .tiff | TIFF

The following are the supported image types for each file type:

File Types | Image Types
AIPD | all image types
BMP, JPEG | 8-bit, RGB
PNG, TIFF, JPEG2000 | 8-bit, 16-bit, RGB, RGBU64

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image to write to a file. The function cannot write all image types to all file types.
fileName | const char* | The name of the file. This parameter is required and cannot be NULL.
colorTable | const RGBValue* | An optional color table to associate with 8-bit images. If you provide a color table, the table must have 256 elements. Set this parameter to NULL to write a grayscale palette to the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWriteJPEG2000File

Usage

int imaqWriteJPEG2000File(const Image* image, const char* fileName, int lossless, float compressionRatio, const JPEG2000FileAdvancedOptions* advancedOptions, const RGBValue* colorTable);

Purpose

Writes an image to a JPEG2000 file.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image to write to a file.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
lossless | int | Set this parameter to TRUE to write the JPEG2000 file without loss of information. Set this parameter to FALSE to write the JPEG2000 file as an approximation to the image.
compressionRatio | float | Specifies the degree to which to compress the JPEG2000 file. For example, a compressionRatio of 50 means that the resulting JPEG2000 file will be 50 times smaller than the size of the image in memory. This parameter is ignored if lossless is TRUE.
advancedOptions | const JPEG2000FileAdvancedOptions* | Specifies advanced behaviors when writing a JPEG2000 file.
colorTable | const RGBValue* | An optional color table to associate with 8-bit images. If you provide a color table, the table must have 256 elements. Set this parameter to NULL to write a grayscale palette to the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

advancedOptions—Set advancedOptions to NULL to use the following default values:

waveletMode | IMAQ_WAVELET_TRANSFORM_INTEGER
useMultiComponentTransform | TRUE
maxWaveletTransformLevel | 5
quantizationStepSize | 0


imaqWriteJPEGFile

Usage

int imaqWriteJPEGFile(const Image* image, const char* fileName, unsigned int quality, void* colorTable);

Purpose

Writes an image to a JPEG file. The function also stores a CalibrationUnit of IMAQ_CENTIMETER or IMAQ_INCH only. If you pass an image to this function that has a metric CalibrationUnit other than IMAQ_CENTIMETER, the function converts xStep and yStep from the supplied unit into centimeters. If you pass an image to this function that has an English CalibrationUnit other than IMAQ_INCH, the function converts xStep and yStep from the supplied unit into inches.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB

Parameters

Name

Type

Description

image | const Image* | The image to write to a file.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
quality unsigned int

Represents the quality of the image. As quality increases, the function uses less lossy compression. Acceptable values range from 0 to 1,000, with 750 as the default.

Note This function uses lossy compression even if you set the quality to 1,000.
colorTable | void* | Reserved. JPEG files do not support color palettes for grayscale images.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWriteMultipleGeometricPatternFile

Usage

int imaqWriteMultipleGeometricPatternFile(const MultipleGeometricPattern* multiplePattern, const char* fileName, const char* description);

Purpose

Writes a multiple geometric template to file.

Parameters

Name | Type | Description
multiplePattern | const MultipleGeometricPattern* | The multiple geometric template to write to file. This parameter is required and cannot be NULL.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
description | const char* | A description of the classification session. Set this parameter to NULL if you do not need a description for this file.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWriteOCRFile

Usage

int imaqWriteOCRFile(const char* fileName, const CharSet* set, const char* setDescription, const ReadTextOptions* readOptions, const OCRProcessingOptions* processingOptions, const OCRSpacingOptions* spacingOptions);

Purpose

Stores a character set and the values of the appropriate NI Vision structures in the file specified by fileName.

Parameters

Name | Type | Description
fileName | const char* | File that the function uses for this operation. This parameter is required and cannot be NULL.
set | const CharSet* | The trained characters to store in the file. Set this parameter to NULL to write an empty character set to the file.
setDescription | const char* | The trained character set description to store in the file. The description must not exceed 255 characters. Set this parameter to NULL if you do not need to store this information.
readOptions | const ReadTextOptions* | The options for reading text to store in the file. Set this parameter to NULL to write the default reading options.
processingOptions | const OCRProcessingOptions* | The options for image processing to store in the file. Set this parameter to NULL to write the default processing options.
spacingOptions | const OCRSpacingOptions* | The character size and spacing options to store in the file. Set this parameter to NULL to write the default character size and spacing options.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

readOptions—Set readOptions to NULL to use the following default reading options:

validChars | NULL
numValidChars | 0
substitutionChar | ?
readStrategy | IMAQ_READ_AGGRESSIVE
acceptanceLevel | 700
aspectRatio | 400
readResolution | IMAQ_LOW_RESOLUTION

processingOptions—Set processingOptions to NULL to use the following default processing options:

mode | IMAQ_COMPUTED_UNIFORM
lowThreshold | 0
highThreshold | 255
blockCount | 4
fastThreshold | FALSE
biModalCalculation | FALSE
darkCharacters | TRUE
removeObjectsTouchingROI | FALSE
erosionCount | 0

spacingOptions—Set spacingOptions to NULL to use the following default spacing options:

minCharSpacing | 1
minCharSize | 20
maxCharSize | 65536
maxHorizontalElementSpacing | 1
maxVerticalElementSpacing | 0
minBoundingRectWidth | 1
maxBoundingRectWidth | 65536
minBoundingRectHeight | 1
maxBoundingRectHeight | 65536
autoSplit | FALSE


imaqWritePNGFile2

Usage

int imaqWritePNGFile2(const Image* image, const char* fileName, unsigned int compressionSpeed, const RGBValue* colorTable, int useBitDepth);

Purpose

Writes an image to a PNG file. This function stores any type of CalibrationUnit in a format that NI Vision can read. This function also converts calibration information into meters, which any PNG file reader can interpret.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image to write to a file.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
compressionSpeed | unsigned int | Represents the relative speed of the compression algorithm. As this value increases, the function spends less time compressing the image. Acceptable values range from 0 to 1,000, with 750 as the default. PNG format always stores images in a lossless fashion.
colorTable | const RGBValue* | An optional color table to associate with 8-bit images. If you provide a color table, the table must have 256 elements. Set this parameter to NULL to write a grayscale palette to the image.
useBitDepth | int | When saving a signed 16-bit image to a PNG file, NI Vision must convert the data to an unsigned format and shift the data so that the most significant bit is always the leftmost bit. Set this parameter to TRUE to use the bit depth information attached to image to perform these conversions. Set this parameter to FALSE to bias the image by adding a constant value to all the pixels in the image such that the lowest negative pixel value in the image maps to zero, and then shifting the image data based on the highest pixel value in the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWriteTIFFFile

Usage

int imaqWriteTIFFFile(const Image* image, const char* fileName, const TIFFFileOptions* options, const RGBValue* colorTable);

Purpose

Writes an image to a TIFF file. This function stores a CalibrationUnit of IMAQ_CENTIMETER or IMAQ_INCH only. If you pass an image to this function that has a metric CalibrationUnit other than IMAQ_CENTIMETER, the function converts xStep and yStep from the supplied unit into centimeters. If you pass an image to this function that has an English CalibrationUnit other than IMAQ_INCH, the function converts xStep and yStep from the supplied unit into inches.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image to write to a file.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
options | const TIFFFileOptions* | A structure defining the specific options to use while writing the TIFF file.
colorTable | const RGBValue* | An optional color table to associate with 8-bit images. If you provide a color table, the table must have 256 elements. Set this parameter to NULL to write a grayscale palette to the image. If the compressionType element of options is IMAQ_JPEG, the function ignores this parameter.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set options to NULL to use the default options, as follows:

rowsPerStrip | 0, which writes all data in one strip
photoInterp | IMAQ_BLACK_IS_ZERO
compressionType | IMAQ_NO_COMPRESSION


imaqWriteVisionFile

Usage

int imaqWriteVisionFile(const Image* image, const char* fileName, const RGBValue* colorTable);

Purpose

This function writes an image to a PNG file. In addition to writing pixel information, the function writes any Vision information contained in the image to the file.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name | Type | Description
image | const Image* | The image to write to a file.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
colorTable | const RGBValue* | An optional color table to associate with 8-bit images. If you provide a color table, the table must have 256 elements. Set this parameter to NULL to write a grayscale palette to the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqXnor

Usage

int imaqXnor(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Computes a bitwise XNOR between two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqXnorConstant

Usage

int imaqXnorConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Performs a bitwise XNOR between an image and a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to XNOR with the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqXor

Usage

int imaqXor(Image* dest, const Image* sourceA, const Image* sourceB);

Purpose

Computes a bitwise XOR between two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
sourceA | const Image* | The first source image.
sourceB | const Image* | The second source image, which must be the same type of image as sourceA.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqXorConstant

Usage

int imaqXorConstant(Image* dest, const Image* source, PixelValue value);

Purpose

Performs a bitwise XOR between an image and a constant.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The source image.
value | PixelValue | The value to XOR with the source image. Set the member of value that corresponds to the image type.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqZoomWindow2

Usage

int imaqZoomWindow2(int windowNumber, float xZoom, float yZoom, Point center);

Purpose

Sets the current zoom factors for a given image window. The zoom factor indicates an increase or decrease in the magnification of an image and this value is expressed as a ratio of the image size. A number greater than 1 indicates a magnification by the amount specified. For example, a zoom factor of 3 indicates that the image is displayed at three times its actual size (3:1). A number less than 1 indicates that the image is decreased in magnification by the specified amount. For example, a zoom factor of 0.2 indicates that the image is displayed at one-fifth its actual size (1:5).

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
xZoom | float | The zoom factor for the x direction. Set xZoom to zero to maintain the current zoom factor for the x direction.
yZoom | float | The zoom factor for the y direction. Set yZoom to zero to maintain the current zoom factor for the y direction.
center | Point | The center point around which to zoom. Set this parameter to IMAQ_NO_POINT to maintain the current center point.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


Error Codes

NI Vision can return the following error codes.

Code | Name | Description
0 | ERR_SUCCESS | No error.
-1074396160 | ERR_SYSTEM_ERROR | System error.
-1074396159 | ERR_OUT_OF_MEMORY | Not enough memory for requested operation.
-1074396158 | ERR_MEMORY_ERROR | Memory error.
-1074396157 | ERR_UNREGISTERED | Unlicensed copy of NI Vision.
-1074396156 | ERR_NEED_FULL_VERSION | The function requires an NI Vision 5.0 Advanced license.
-1074396155 | ERR_UNINIT | NI Vision did not initialize properly.
-1074396154 | ERR_IMAGE_TOO_SMALL | The image is not large enough for the operation.
-1074396153 | ERR_BARCODE_CODABAR | The barcode is not a valid Codabar barcode.
-1074396152 | ERR_BARCODE_CODE39 | The barcode is not a valid Code 3 of 9 barcode.
-1074396151 | ERR_BARCODE_CODE93 | The barcode is not a valid Code93 barcode.
-1074396150 | ERR_BARCODE_CODE128 | The barcode is not a valid Code128 barcode.
-1074396149 | ERR_BARCODE_EAN8 | The barcode is not a valid EAN8 barcode.
-1074396148 | ERR_BARCODE_EAN13 | The barcode is not a valid EAN13 barcode.
-1074396147 | ERR_BARCODE_I25 | The barcode is not a valid Interleaved 2 of 5 barcode.
-1074396146 | ERR_BARCODE_MSI | The barcode is not a valid MSI barcode.
-1074396145 | ERR_BARCODE_UPCA | The barcode is not a valid UPCA barcode.
-1074396144 | ERR_BARCODE_CODE93_SHIFT | The Code93 barcode contains invalid shift encoding.
-1074396143 | ERR_BARCODE_TYPE | The barcode type is invalid.
-1074396142 | ERR_BARCODE_INVALID | The image does not represent a valid linear barcode.
-1074396141 | ERR_BARCODE_CODE128_FNC | The FNC value in the Code128 barcode is not located before the first data value.
-1074396140 | ERR_BARCODE_CODE128_SET | The starting code set in the Code128 barcode is not valid.
-1074396139 | ERR_ROLLBACK_RESOURCE_OUT_OF_MEMORY | Not enough reserved memory in the timed environment for the requested operation.
-1074396138 | ERR_ROLLBACK_NOT_SUPPORTED | The function is not supported when a time limit is active.
-1074396137 | ERR_DIRECTX_DLL_NOT_FOUND | Quartz.dll not found. Install DirectX 8.1 or later.
-1074396136 | ERR_DIRECTX_INVALID_FILTER_QUALITY | The filter quality you provided is invalid. Valid quality values range from -1 to 1000.
-1074396135 | ERR_INVALID_BUTTON_LABEL | Invalid button label.
-1074396134 | ERR_THREAD_INITIALIZING | Could not execute the function in the separate thread because the thread has not completed initialization.
-1074396133 | ERR_THREAD_COULD_NOT_INITIALIZE | Could not execute the function in the separate thread because the thread could not initialize.
-1074396130 | ERR_NOT_RECT_OR_ROTATED_RECT | The ROI must only have either a single Rectangle contour or a single Rotated Rectangle contour.
-1074396129 | ERR_ROLLBACK_UNBOUNDED_INTERFACE | During timed execution, you must use the preallocated version of this operation.
-1074396128 | ERR_ROLLBACK_RESOURCE_CONFLICT_3 | An image being modified by one process cannot be requested by another process while a time limit is active.
-1074396127 | ERR_ROLLBACK_RESOURCE_CONFLICT_2 | An image with pattern matching, calibration, or overlay information cannot be manipulated while a time limit is active.
-1074396126 | ERR_ROLLBACK_RESOURCE_CONFLICT_1 | An image created before a time limit is started cannot be resized while a time limit is active.
-1074396125 | ERR_INVALID_CONTRAST_THRESHOLD | Invalid contrast threshold. The threshold value must be greater than 0.
-1074396124 | ERR_INVALID_CALIBRATION_ROI_MODE | NI Vision does not support the calibration ROI mode you supplied.
-1074396123 | ERR_INVALID_CALIBRATION_MODE | NI Vision does not support the calibration mode you supplied.
-1074396122 | ERR_DRAWTEXT_COLOR_MUST_BE_GRAYSCALE | Set the foreground and background text colors to grayscale to draw on a U8 image.
-1074396121 | ERR_SATURATION_THRESHOLD_OUT_OF_RANGE | The value of the saturation threshold must be from 0 to 255.
-1074396120 | ERR_NOT_IMAGE | Not an image.
-1074396117 | ERR_MATRIX_SIZE | Invalid matrix size in the structuring element.
-1074396116 | ERR_CALIBRATION_INSF_POINTS | Insufficient number of calibration feature points.
-1074396115 | ERR_CALIBRATION_IMAGE_CORRECTED | The operation is invalid in a corrected image.
-1074396114 | ERR_CALIBRATION_INVALID_ROI | The ROI contains an invalid contour type or is not contained in the ROI learned for calibration.
-1074396113 | ERR_CALIBRATION_IMAGE_UNCALIBRATED | The source/input image has not been calibrated.
-1074396112 | ERR_INCOMP_MATRIX_SIZE | The number of pixel and real-world coordinates must be equal.
-1074396111 | ERR_CALIBRATION_FAILED_TO_FIND_GRID | Unable to automatically detect grid because the image is too distorted.
-1074396110 | ERR_CALIBRATION_INFO_VERSION | Invalid calibration information version.
-1074396109 | ERR_CALIBRATION_INVALID_SCALING_FACTOR | Invalid calibration scaling factor.
-1074396108 | ERR_CALIBRATION_ERRORMAP | The calibration error map cannot be computed.
-1074396107 | ERR_CALIBRATION_INFO_1 | Invalid calibration template image.
-1074396106 | ERR_CALIBRATION_INFO_2 | Invalid calibration template image.
-1074396105 | ERR_CALIBRATION_INFO_3 | Invalid calibration template image.
-1074396104 | ERR_CALIBRATION_INFO_4 | Invalid calibration template image.
-1074396103 | ERR_CALIBRATION_INFO_5 | Invalid calibration template image.
-1074396102 | ERR_CALIBRATION_INFO_6 | Invalid calibration template image.
-1074396101 | ERR_CALIBRATION_INFO_MICRO_PLANE | Invalid calibration template image.
-1074396100 | ERR_CALIBRATION_INFO_PERSPECTIVE_PROJECTION | Invalid calibration template image.
-1074396099 | ERR_CALIBRATION_INFO_SIMPLE_TRANSFORM | Invalid calibration template image.
-1074396098 | ERR_RESERVED_MUST_BE_NULL | You must pass NULL for the reserved parameter.
-1074396097 | ERR_INVALID_PARTICLE_PARAMETER_VALUE | You entered an invalid selection in the particle parameter.
-1074396096 | ERR_NOT_AN_OBJECT | Not an object.
-1074396095 | ERR_CALIBRATION_DUPLICATE_REFERENCE_POINT | The reference points passed are inconsistent. At least two similar pixel coordinates correspond to different real-world coordinates.
-1074396094 | ERR_ROLLBACK_RESOURCE_CANNOT_UNLOCK | A resource conflict occurred in the timed environment. Two processes cannot manage the same resource and be time bounded.
-1074396093 | ERR_ROLLBACK_RESOURCE_LOCKED | A resource conflict occurred in the timed environment. Two processes cannot access the same resource and be time bounded.
-1074396092 | ERR_ROLLBACK_RESOURCE_NON_EMPTY_INITIALIZE | Multiple timed environments are not supported.
-1074396091 | ERR_ROLLBACK_RESOURCE_UNINITIALIZED_ENABLE | A time limit cannot be started until the timed environment is initialized.
-1074396090 | ERR_ROLLBACK_RESOURCE_ENABLED | Multiple timed environments are not supported.
-1074396089 | ERR_ROLLBACK_RESOURCE_REINITIALIZE | The timed environment is already initialized.
-1074396088 | ERR_ROLLBACK_RESIZE | The results of the operation exceeded the size limits on the output data arrays.
-1074396087 | ERR_ROLLBACK_STOP_TIMER | No time limit is available to stop.
-1074396086 | ERR_ROLLBACK_START_TIMER | A time limit could not be set.
-1074396085 | ERR_ROLLBACK_INIT_TIMER | The timed environment could not be initialized.
-1074396084 | ERR_ROLLBACK_DELETE_TIMER | No initialized timed environment is available to close.
-1074396083 | ERR_ROLLBACK_TIMEOUT | The time limit has expired.
-1074396082 | ERR_PALETTE_NOT_SUPPORTED | Only 8-bit images support the use of palettes. Either do not use a palette, or convert your image to an 8-bit image before using a palette.
-1074396081 | ERR_BAD_PASSWORD | Incorrect password.
-1074396080 | ERR_INVALID_IMAGE_TYPE | Invalid image type.
-1074396079 | ERR_INVALID_METAFILE_HANDLE | Invalid metafile handle.
-1074396077 | ERR_INCOMP_TYPE | Incompatible image type.
-1074396074 | ERR_INCOMP_SIZE | Incompatible image size.
-1074396073 | ERR_MASK_OUTSIDE_IMAGE | When the mask's offset was applied, the mask was entirely outside of the image.
-1074396072 | ERR_INVALID_BORDER | Invalid image border.
-1074396070 | ERR_INVALID_FUNCTION | Unsupported function.
-1074396069 | ERR_INVALID_COLOR_MODE | NI Vision does not support the color mode you specified.
-1074396068 | ERR_INVALID_ACTION | The function does not support the requested action.
-1074396067 | ERR_IMAGES_NOT_DIFF | The source image and destination image must be different.
-1074396066 | ERR_INVALID_POINTSYMBOL | Invalid point symbol.
-1074396065 | ERR_CANT_RESIZE_EXTERNAL | Cannot resize an image in an acquisition buffer.
-1074396064 | ERR_EXTERNAL_NOT_SUPPORTED | This operation is not supported for images in an acquisition buffer.
-1074396063 | ERR_EXTERNAL_ALIGNMENT | The external buffer must be aligned on a 4-byte boundary. The line width and border pixels must be 4-byte aligned, as well.
-1074396062 | ERR_INVALID_TOLERANCE | The tolerance parameter must be greater than or equal to 0.
-1074396061 | ERR_INVALID_WINDOW_SIZE | The size of each dimension of the window must be greater than 2 and less than or equal to the size of the image in the corresponding dimension.
-1074396060 | ERR_JPEG2000_LOSSLESS_WITH_FLOATING_POINT | Lossless compression cannot be used with the floating point wavelet transform mode. Either set the wavelet transform mode to integer, or use lossy compression.
-1074396059 | ERR_INVALID_MAX_ITERATIONS | Invalid maximum number of iterations. Maximum number of iterations must be greater than zero.
-1074396058 | ERR_INVALID_ROTATION_MODE | Invalid rotation mode.
-1074396057 | ERR_INVALID_SEARCH_VECTOR_WIDTH | Invalid search vector width. The width must be an odd number greater than zero.
-1074396056 | ERR_INVALID_MATRIX_MIRROR_MODE | Invalid matrix mirror mode.
-1074396055 | ERR_INVALID_ASPECT_RATIO | Invalid aspect ratio. Valid aspect ratios must be greater than or equal to zero.
-1074396054 | ERR_INVALID_CELL_FILL_TYPE | Invalid cell fill type.
-1074396053 | ERR_INVALID_BORDER_INTEGRITY | Invalid border integrity. Valid values range from 0 to 100.
-1074396052 | ERR_INVALID_DEMODULATION_MODE | Invalid demodulation mode.
-1074396051 | ERR_INVALID_CELL_FILTER_MODE | Invalid cell filter mode.
-1074396050 | ERR_INVALID_ECC_TYPE | Invalid ECC type.
-1074396049 | ERR_INVALID_MATRIX_POLARITY | Invalid matrix polarity.
-1074396048 | ERR_INVALID_CELL_SAMPLE_SIZE | Invalid cell sample size.
-1074396047 | ERR_INVALID_LINEAR_AVERAGE_MODE | Invalid linear average mode.
-1074396046 | ERR_INVALID_2D_BARCODE_CONTRAST_FOR_ROI | When using a region of interest that is not a rectangle, you must specify the contrast mode of the barcode as either black on white or white on black.
-1074396045 | ERR_INVALID_2D_BARCODE_SUBTYPE | Invalid 2-D barcode Data Matrix subtype.
-1074396044 | ERR_INVALID_2D_BARCODE_SHAPE | Invalid 2-D barcode shape.
-1074396043 | ERR_INVALID_2D_BARCODE_CELL_SHAPE | Invalid 2-D barcode cell shape.
-1074396042 | ERR_INVALID_2D_BARCODE_CONTRAST | Invalid 2-D barcode contrast.
-1074396041 | ERR_INVALID_2D_BARCODE_TYPE | Invalid 2-D barcode type.
-1074396040 | ERR_DRIVER | Cannot access NI-IMAQ driver.
-1074396039 | ERR_IO_ERROR | I/O error.
-1074396037 | ERR_TIMEOUT | Trigger timeout.
-1074396036 | ERR_INVALID_SKELETONMODE | The Skeleton mode you specified is invalid.
-1074396035 | ERR_TEMPLATEIMAGE_NOCIRCLE | The template image does not contain enough information for learning the aggressive search strategy.
-1074396034 | ERR_TEMPLATEIMAGE_EDGEINFO | The template image does not contain enough edge information for the sample size(s) requested.
-1074396033 | ERR_TEMPLATEDESCRIPTOR_LEARNSETUPDATA | Invalid template descriptor.
-1074396032 | ERR_TEMPLATEDESCRIPTOR_ROTATION_SEARCHSTRATEGY | The template descriptor does not contain data required for the requested search strategy in rotation-invariant matching.
-1074396026 | ERR_INVALID_PROCESS_TYPE_FOR_EDGE_DETECTION | Invalid process type for edge detection.
-1074396025 | ERR_INVALID_ANGLE_RANGE_FOR_STRAIGHT_EDGE | Angle range value should be equal to or greater than zero.
-1074396024 | ERR_INVALID_MIN_COVERAGE_FOR_STRAIGHT_EDGE | Minimum coverage value should be greater than zero.
-1074396023 | ERR_INVALID_ANGLE_TOL_FOR_STRAIGHT_EDGE | The angle tolerance should be equal to or greater than 0.001.
-1074396022 | ERR_INVALID_SEARCH_MODE_FOR_STRAIGHT_EDGE | Invalid search mode for detecting straight edges
-1074396021 | ERR_INVALID_KERNEL_SIZE_FOR_EDGE_DETECTION | Invalid kernel size for edge detection. The minimum kernel size is 3, the maximum kernel size is 1073741823 and the kernel size must be odd.
-1074396020 | ERR_INVALID_GRADING_MODE | Invalid grading mode.
-1074396019 | ERR_INVALID_THRESHOLD_PERCENTAGE | Invalid threshold percentage. Valid values range from 0 to 100.
-1074396018 | ERR_INVALID_EDGE_POLARITY_SEARCH_MODE | Invalid edge polarity search mode.
-1074396017 | ERR_OPENING_NEWER_AIM_GRADING_DATA | The AIM grading data attached to the image you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file.
-1074396016 | ERR_NO_VIDEO_DRIVER | No video driver is installed.
-1074396015 | ERR_RPC_EXECUTE_IVB | Unable to establish network connection with remote system.
-1074396014 | ERR_INVALID_VIDEO_BLIT | RT Video Out does not support displaying the supplied image type at the selected color depth.
-1074396013 | ERR_INVALID_VIDEO_MODE | Invalid video mode.
-1074396012 | ERR_RPC_EXECUTE | Unable to display remote image on network connection.
-1074396011 | ERR_RPC_BIND | Unable to establish network connection.
-1074396010 | ERR_INVALID_FRAME_NUMBER | Invalid frame number.
-1074396009 | ERR_DIRECTX | An internal DirectX error has occurred. Try upgrading to the latest version of DirectX.
-1074396008 | ERR_DIRECTX_NO_FILTER | An appropriate DirectX filter to process this file could not be found. Install the filter that was used to create this AVI. Upgrading to the latest version of DirectX may correct this error. NI Vision requires DirectX 8.1 or higher.
-1074396007 | ERR_DIRECTX_INCOMPATIBLE_COMPRESSION_FILTER | Incompatible compression filter.
-1074396006 | ERR_DIRECTX_UNKNOWN_COMPRESSION_FILTER | Unknown compression filter.
-1074396005 | ERR_INVALID_AVI_SESSION | Invalid AVI session.
-1074396004 | ERR_DIRECTX_CERTIFICATION_FAILURE | A software key is restricting the use of this compression filter.
-1074396003 | ERR_AVI_DATA_EXCEEDS_BUFFER_SIZE | The data for this frame exceeds the data buffer size specified when creating the AVI file.
-1074396002 | ERR_INVALID_LINEGAUGEMETHOD | Invalid line gauge method.
-1074396001 | ERR_TOO_MANY_AVI_SESSIONS | There are too many AVI sessions open. You must close a session before you can open another one.
-1074396000 | ERR_FILE_FILE_HEADER | Invalid file header.
-1074395999 | ERR_FILE_FILE_TYPE | Invalid file type.
-1074395998 | ERR_FILE_COLOR_TABLE | Invalid color table.
-1074395997 | ERR_FILE_ARGERR | Invalid parameter.
-1074395996 | ERR_FILE_OPEN | File is already open for writing.
-1074395995 | ERR_FILE_NOT_FOUND | File not found.
-1074395994 | ERR_FILE_TOO_MANY_OPEN | Too many files open.
-1074395993 | ERR_FILE_IO_ERR | File I/O error.
-1074395992 | ERR_FILE_PERMISSION | File access denied.
-1074395991 | ERR_FILE_INVALID_TYPE | NI Vision does not support the file type you specified.
-1074395990 | ERR_FILE_GET_INFO | Could not read Vision info from file.
-1074395989 | ERR_FILE_READ | Unable to read data.
-1074395988 | ERR_FILE_WRITE | Unable to write data.
-1074395987 | ERR_FILE_EOF | Premature end of file.
-1074395986 | ERR_FILE_FORMAT | Invalid file format.
-1074395985 | ERR_FILE_OPERATION | Invalid file operation.
-1074395984 | ERR_FILE_INVALID_DATA_TYPE | NI Vision does not support the file data type you specified.
-1074395983 | ERR_FILE_NO_SPACE | Disk full.
-1074395982 | ERR_INVALID_FRAMES_PER_SECOND | The frames per second in an AVI must be greater than zero.
-1074395981 | ERR_INSUFFICIENT_BUFFER_SIZE | The buffer that was passed in is not big enough to hold all of the data.
-1074395980 | ERR_COM_INITIALIZE | Error initializing COM.
-1074395979 | ERR_INVALID_PARTICLE_INFO | The image has invalid particle information. Call imaqCountParticles on the image to create particle information.
-1074395978 | ERR_INVALID_PARTICLE_NUMBER | Invalid particle number.
-1074395977 | ERR_AVI_VERSION | The AVI file was created in a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this AVI file.
-1074395976 | ERR_NUMBER_OF_PALETTE_COLORS | The color palette must have exactly 0 or 256 entries.
-1074395975 | ERR_AVI_TIMEOUT | DirectX has timed out reading or writing the AVI file. When closing an AVI file, try adding an additional delay. When reading an AVI file, try reducing CPU and disk load.
-1074395974 | ERR_UNSUPPORTED_JPEG2000_COLORSPACE_METHOD | NI Vision does not support reading JPEG2000 files with this colorspace method.
-1074395973 | ERR_JPEG2000_UNSUPPORTED_MULTIPLE_LAYERS | NI Vision does not support reading JPEG2000 files with more than one layer.
-1074395972 | ERR_DIRECTX_ENUMERATE_FILTERS | DirectX is unable to enumerate the compression filters. This is caused by a third-party compression filter that is either improperly installed or is preventing itself from being enumerated. Remove any recently installed compression filters and try again.
-1074395971 | ERR_INVALID_OFFSET | The offset you specified must be size 2.
-1074395960 | ERR_INIT | Initialization error.
-1074395959 | ERR_CREATE_WINDOW | Unable to create window.
-1074395958 | ERR_WINDOW_ID | Invalid window ID.
-1074395957 | ERR_ARRAY_SIZE_MISMATCH | The array sizes are not compatible.
-1074395956 | ERR_INVALID_QUALITY | The quality you provided is invalid. Valid quality values range from -1 to 1000.
-1074395955 | ERR_INVALID_MAX_WAVELET_TRANSFORM_LEVEL | Invalid maximum wavelet transform level. Valid values range from 0 to 255.
-1074395954 | ERR_INVALID_QUANTIZATION_STEP_SIZE | The quantization step size must be greater than or equal to 0.
-1074395953 | ERR_INVALID_WAVELET_TRANSFORM_MODE | Invalid wavelet transform mode.
-1074395920 | ERR_NUMBER_CLASS | Invalid number of classes.
-1074395880 | ERR_PARTICLE | Invalid particle.
-1074395879 | ERR_BAD_MEASURE | Invalid measure number.
-1074395878 | ERR_PROP_NODE_WRITE_NOT_SUPPORTED | The Image Display control does not support writing this property node.
-1074395877 | ERR_COLORMODE_REQUIRES_CHANGECOLORSPACE2 | The specified color mode requires the use of imaqChangeColorSpace2.
-1074395876 | ERR_UNSUPPORTED_COLOR_MODE | This function does not currently support the color mode you specified.
-1074395875 | ERR_BARCODE_PHARMACODE | The barcode is not a valid Phamacode symbol
-1074395840 | ERR_BAD_INDEX | Invalid handle table index.
-1074395837 | ERR_INVALID_COMPRESSION_RATIO | The compression ratio must be greater than or equal to 1.
-1074395801 | ERR_TOO_MANY_CONTOURS | The ROI contains too many contours.
-1074395800 | ERR_PROTECTION | Protection error.
-1074395799 | ERR_INTERNAL | Internal error.
-1074395798 | ERR_INVALID_CUSTOM_SAMPLE | The size of the feature vector in the custom sample must match the size of those you have already added.
-1074395797 | ERR_INVALID_CLASSIFIER_SESSION | Not a valid classifier session.
-1074395796 | ERR_INVALID_KNN_METHOD | You requested an invalid Nearest Neighbor classifier method.
-1074395795 | ERR_K_TOO_LOW | The k parameter must be greater than two.
-1074395794 | ERR_K_TOO_HIGH | The k parameter must be <= the number of samples in each class.
-1074395793 | ERR_INVALID_OPERATION_ON_COMPACT_SESSION_ATTEMPTED | This classifier session is compact. Only the Classify and Dispose functions may be called on a compact classifier session.
-1074395792 | ERR_CLASSIFIER_SESSION_NOT_TRAINED | This classifier session is not trained. You may only call this function on a trained classifier session.
-1074395791 | ERR_CLASSIFIER_INVALID_SESSION_TYPE | This classifier function cannot be called on this type of classifier session.
-1074395790 | ERR_INVALID_DISTANCE_METRIC | You requested an invalid distance metric.
-1074395789 | ERR_OPENING_NEWER_CLASSIFIER_SESSION | The classifier session you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file.
-1074395788 | ERR_NO_SAMPLES | This operation cannot be performed because you have not added any samples.
-1074395787 | ERR_INVALID_CLASSIFIER_TYPE | You requested an invalid classifier type.
-1074395786 | ERR_INVALID_PARTICLE_OPTIONS | The sum of Scale Dependence and Symmetry Dependence must be less than 1000.
-1074395785 | ERR_NO_PARTICLE | The image yielded no particles.
-1074395784 | ERR_INVALID_LIMITS | The limits you supplied are not valid.
-1074395783 | ERR_BAD_SAMPLE_INDEX | The Sample Index fell outside the range of Samples.
-1074395782 | ERR_DESCRIPTION_TOO_LONG | The description must be <= 255 characters.
-1074395781 | ERR_CLASSIFIER_INVALID_ENGINE_TYPE | The engine for this classifier session does not support this operation.
-1074395780 | ERR_INVALID_PARTICLE_TYPE | You requested an invalid particle type.
-1074395779 | ERR_CANNOT_COMPACT_UNTRAINED | You may only save a session in compact form if it is trained.
-1074395778 | ERR_INVALID_KERNEL_SIZE | The Kernel size must be smaller than the image size.
-1074395777 | ERR_INCOMPATIBLE_CLASSIFIER_TYPES | The session you read from file must be the same type as the session you passed in.
-1074395776 | ERR_INVALID_USE_OF_COMPACT_SESSION_FILE | You can not use a compact classification file with read options other than Read All.
-1074395775 | ERR_ROI_HAS_OPEN_CONTOURS | The ROI you passed in may only contain closed contours.
-1074395774 | ERR_NO_LABEL | You must pass in a label.
-1074395773 | ERR_NO_DEST_IMAGE | You must provide a destination image.
-1074395772 | ERR_INVALID_REGISTRATION_METHOD | You provided an invalid registration method.
-1074395771 | ERR_OPENING_NEWER_INSPECTION_TEMPLATE | The golden template you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file.
-1074395770 | ERR_INVALID_INSPECTION_TEMPLATE | Invalid golden template.
-1074395769 | ERR_INVALID_EDGE_THICKNESS | Edge Thickness to Ignore must be greater than zero.
-1074395768 | ERR_INVALID_SCALE | Scale must be greater than zero.
-1074395767 | ERR_INVALID_ALIGNMENT | The supplied scale is too small for your template.
-1074395766 | ERR_DEPRECATED_FUNCTION | This backwards-compatibility function can not be used with this session. Use newer, supported functions instead.
-1074395763 | ERR_INVALID_NORMALIZATION_METHOD | You must provide a valid normalization method.
-1074395762 | ERR_INVALID_NIBLACK_DEVIATION_FACTOR | The deviation factor for Niblack local threshold must be between 0 and 1.
-1074395760 | ERR_BOARD_NOT_FOUND | Board not found.
-1074395758 | ERR_BOARD_NOT_OPEN | Board not opened.
-1074395757 | ERR_DLL_NOT_FOUND | DLL not found.
-1074395756 | ERR_DLL_FUNCTION_NOT_FOUND | DLL function not found.
-1074395754 | ERR_TRIG_TIMEOUT | Trigger timeout.
-1074395728 | ERR_INVALID_2D_BARCODE_SEARCH_MODE | NI Vision does not support the search mode you provided.
-1074395727 | ERR_UNSUPPORTED_2D_BARCODE_SEARCH_MODE | NI Vision does not support the search mode you provided for the type of 2D barcode for which you are searching.
-1074395726 | ERR_MATCHFACTOR_OBSOLETE | matchFactor has been obsoleted. Instead, set the initialMatchListLength and matchListReductionFactor in the MatchPatternAdvancedOptions structure.
-1074395725 | ERR_DATA_VERSION | The data was stored with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this data.
-1074395724 | ERR_CUSTOMDATA_INVALID_SIZE | The size you specified is out of the valid range.
-1074395723 | ERR_CUSTOMDATA_KEY_NOT_FOUND | The key you specified cannot be found in the image.
-1074395722 | ERR_CLASSIFIER_CLASSIFY_IMAGE_WITH_CUSTOM_SESSION | Custom classifier sessions only classify feature vectors. They do not support classifying images.
-1074395721 | ERR_INVALID_BIT_DEPTH | NI Vision does not support the bit depth you supplied for the image you supplied.
-1074395720 | ERR_BAD_ROI | Invalid ROI.
-1074395719 | ERR_BAD_ROI_BOX | Invalid ROI global rectangle.
-1074395718 | ERR_LAB_VERSION | The version of LabVIEW or BridgeVIEW you are running does not support this operation.
-1074395717 | ERR_INVALID_RANGE | The range you supplied is invalid.
-1074395716 | ERR_INVALID_SCALING_METHOD | NI Vision does not support the scaling method you provided.
-1074395715 | ERR_INVALID_CALIBRATION_UNIT | NI Vision does not support the calibration unit you supplied.
-1074395714 | ERR_INVALID_AXIS_ORIENTATION | NI Vision does not support the axis orientation you supplied.
-1074395713 | ERR_VALUE_NOT_IN_ENUM | Value not in enumeration.
-1074395712 | ERR_WRONG_REGION_TYPE | You selected a region that is not of the right type.
-1074395711 | ERR_NOT_ENOUGH_REGIONS | You specified a viewer that does not contain enough regions.
-1074395710 | ERR_TOO_MANY_PARTICLES | The image has too many particles for this process.
-1074395709 | ERR_AVI_UNOPENED_SESSION | The AVI session has not been opened.
-1074395708 | ERR_AVI_READ_SESSION_REQUIRED | The AVI session is a write session, but this operation requires a read session.
-1074395707 | ERR_AVI_WRITE_SESSION_REQUIRED | The AVI session is a read session, but this operation requires a write session.
-1074395706 | ERR_AVI_SESSION_ALREADY_OPEN | This AVI session is already open. You must close it before calling the Create or Open functions.
-1074395705 | ERR_DATA_CORRUPTED | The data is corrupted and cannot be read.
-1074395704 | ERR_INVALID_COMPRESSION_TYPE | Invalid compression type.
-1074395703 | ERR_INVALID_TYPE_OF_FLATTEN | Invalid type of flatten.
-1074395702 | ERR_INVALID_LENGTH | The length of the edge detection line must be greater than zero.
-1074395701 | ERR_INVALID_MATRIX_SIZE_RANGE | The maximum Data Matrix barcode size must be equal to or greater than the minimum Data Matrix barcode size.
-1074395700 | ERR_REQUIRES_WIN2000_OR_NEWER | The function requires the operating system to be Microsoft Windows 2000 or newer.
-1074395656 | ERR_SMOOTH_CONTOURS_MUST_BE_SAME | You must specify the same value for the smooth contours advanced match option for all templates you want to match.
-1074395655 | ERR_ENABLE_CALIBRATION_SUPPORT_MUST_BE_SAME | You must specify the same value for the enable calibration support advanced match option for all templates you want to match.
-1074395654 | ERR_GRADING_INFORMATION_NOT_FOUND | The source image does not contain grading information. You must prepare the source image for grading when reading the Data Matrix, and you cannot change the contents of the source image between reading and grading the Data Matrix.
-1074395653 | ERR_OPENING_NEWER_MULTIPLE_GEOMETRIC_TEMPLATE | The multiple geometric matching template you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file.
-1074395652 | ERR_OPENING_NEWER_GEOMETRIC_MATCHING_TEMPLATE | The geometric matching template you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file.
-1074395651 | ERR_EDGE_FILTER_SIZE_MUST_BE_SAME | You must specify the same edge filter size for all the templates you want to match.
-1074395650 | ERR_CURVE_EXTRACTION_MODE_MUST_BE_SAME | You must specify the same curve extraction mode for all the templates you want to match.
-1074395649 | ERR_INVALID_GEOMETRIC_FEATURE_TYPE | The geometric feature type specified is invalid.
-1074395648 | ERR_TEMPLATE_NOT_LEARNED | You supplied a template that was not learned.
-1074395647 | ERR_INVALID_MULTIPLE_GEOMETRIC_TEMPLATE | Invalid multiple geometric template.
-1074395646 | ERR_NO_TEMPLATE_TO_LEARN | Need at least one template to learn.
-1074395645 | ERR_INVALID_NUMBER_OF_LABELS | You supplied an invalid number of labels.
-1074395644 | ERR_LABEL_TOO_LONG | Labels must be <= 255 characters.
-1074395643 | ERR_INVALID_NUMBER_OF_MATCH_OPTIONS | You supplied an invalid number of match options.
-1074395642 | ERR_LABEL_NOT_FOUND | Cannot find a label that matches the one you specified.
-1074395641 | ERR_DUPLICATE_LABEL | Duplicate labels are not allowed.
-1074395640 | ERR_TOO_MANY_ZONES | The number of zones found exceeded the capacity of the algorithm.
-1074395639 | ERR_INVALID_HATCH_STYLE | The hatch style for the window background is invalid.
-1074395638 | ERR_INVALID_FILL_STYLE | The fill style for the window background is invalid.
-1074395637 | ERR_HARDWARE_DOESNT_SUPPORT_NONTEARING | Your hardware is not supported by DirectX and cannot be put into NonTearing mode.
-1074395636 | ERR_DIRECTX_NOT_FOUND | DirectX is required for this feature. Please install the latest version..
-1074395635 | ERR_INVALID_SHAPE_DESCRIPTOR | The passed shape descriptor is invalid.
-1074395634 | ERR_INVALID_MAX_MATCH_OVERLAP | Invalid max match overlap. Values must be between -1 and 100.
-1074395633 | ERR_INVALID_MIN_MATCH_SEPARATION_SCALE | Invalid minimum match separation scale. Values must be greater than or equal to -1.
-1074395632 | ERR_INVALID_MIN_MATCH_SEPARATION_ANGLE | Invalid minimum match separation angle. Values must be between -1 and 360.
-1074395631 | ERR_INVALID_MIN_MATCH_SEPARATION_DISTANCE | Invalid minimum match separation distance. Values must be greater than or equal to -1.
-1074395630 | ERR_INVALID_MAXIMUM_FEATURES_LEARNED | Invalid maximum number of features learn. Values must be integers greater than zero.
-1074395629 | ERR_INVALID_MAXIMUM_PIXEL_DISTANCE_FROM_LINE | Invalid maximum pixel distance from line. Values must be positive real numbers.
-1074395628 | ERR_INVALID_GEOMETRIC_MATCHING_TEMPLATE | Invalid geometric matching template image.
-1074395627 | ERR_NOT_ENOUGH_TEMPLATE_FEATURES_1 | The template does not contain enough features for geometric matching.
-1074395626 | ERR_NOT_ENOUGH_TEMPLATE_FEATURES | The template does not contain enough features for geometric matching.
-1074395625 | ERR_INVALID_MATCH_CONSTRAINT_TYPE | You specified an invalid value for the match constraint value of the range settings.
-1074395624 | ERR_INVALID_OCCLUSION_RANGE | Invalid occlusion range. Valid values for the bounds range from 0 to 100 and the upper bound must be greater than or equal to the lower bound.
-1074395623 | ERR_INVALID_SCALE_RANGE | Invalid scale range. Values for the lower bound must be a positive real numbers and the upper bound must be greater than or equal to the lower bound.
-1074395622 | ERR_INVALID_MATCH_GEOMETRIC_PATTERN_SETUP_DATA | Invalid match geometric pattern setup data.
-1074395621 | ERR_INVALID_LEARN_GEOMETRIC_PATTERN_SETUP_DATA | Invalid learn geometric pattern setup data.
-1074395620 | ERR_INVALID_CURVE_EXTRACTION_MODE | Invalid curve extraction mode.
-1074395619 | ERR_TOO_MANY_OCCLUSION_RANGES | You can specify only one occlusion range.
-1074395618 | ERR_TOO_MANY_SCALE_RANGES | You can specify only one scale range.
-1074395617 | ERR_INVALID_NUMBER_OF_FEATURES_RANGE | The minimum number of features must be less than or equal to the maximum number of features.
-1074395616 | ERR_INVALID_EDGE_FILTER_SIZE | Invalid edge filter size.
-1074395615 | ERR_INVALID_MINIMUM_FEATURE_STRENGTH | Invalid minimum strength for features. Values must be positive real numbers.
-1074395614 | ERR_INVALID_MINIMUM_FEATURE_ASPECT_RATIO | Invalid aspect ratio for rectangular features. Values must be positive real numbers in the range 0.01 to 1.0.
-1074395613 | ERR_INVALID_MINIMUM_FEATURE_LENGTH | Invalid minimum length for linear features. Values must be integers greater than 0.
-1074395612 | ERR_INVALID_MINIMUM_FEATURE_RADIUS | Invalid minimum radius for circular features. Values must be integers greater than 0.
-1074395611 | ERR_INVALID_MINIMUM_RECTANGLE_DIMENSION | Invalid minimum rectangle dimension. Values must be integers greater than 0.
-1074395610 | ERR_INVALID_INITIAL_MATCH_LIST_LENGTH | Invalid initial match list length. Values must be integers greater than 5.
-1074395609 | ERR_INVALID_SUBPIXEL_TOLERANCE | Invalid subpixel tolerance. Values must be positive real numbers.
-1074395608 | ERR_INVALID_SUBPIXEL_ITERATIONS | Invalid number of subpixel iterations. Values must be integers greater 10.
-1074395607 | ERR_INVALID_MAXIMUM_FEATURES_PER_MATCH | Invalid maximum number of features used per match. Values must be integers greater than or equal to zero.
-1074395606 | ERR_INVALID_MINIMUM_FEATURES_TO_MATCH | Invalid minimum number of features used for matching. Values must be integers greater than zero.
-1074395605 | ERR_INVALID_MAXIMUM_END_POINT_GAP | Invalid maximum end point gap. Valid values range from 0 to 32767.
-1074395604 | ERR_INVALID_COLUMN_STEP | Invalid column step. Valid range is 1 to 255.
-1074395603 | ERR_INVALID_ROW_STEP | Invalid row step. Valid range is 1 to 255.
-1074395602 | ERR_INVALID_MINIMUM_CURVE_LENGTH | Invalid minimum length. Valid values must be greater than or equal to zero.
-1074395601 | ERR_INVALID_EDGE_THRESHOLD | Invalid edge threshold. Valid values range from 1 to 360.
-1074395600 | ERR_INFO_NOT_FOUND | You must provide information about the subimage within the browser.
-1074395598 | ERR_NIOCR_INVALID_ACCEPTANCE_LEVEL | The acceptance level is outside the valid range of 0 to 1000.
-1074395597 | ERR_NIOCR_NOT_A_VALID_SESSION | Not a valid OCR session.
-1074395596 | ERR_NIOCR_INVALID_CHARACTER_SIZE | Invalid character size. Character size must be >= 1.
-1074395595 | ERR_NIOCR_INVALID_THRESHOLD_MODE | Invalid threshold mode value.
-1074395594 | ERR_NIOCR_INVALID_SUBSTITUTION_CHARACTER | Invalid substitution character. Valid substitution characters are ASCII values that range from 1 to 254.
-1074395593 | ERR_NIOCR_INVALID_NUMBER_OF_BLOCKS | Invalid number of blocks. Number of blocks must be >= 4 and <= 50.
-1074395592 | ERR_NIOCR_INVALID_READ_STRATEGY | Invalid read strategy.
-1074395591 | ERR_NIOCR_INVALID_CHARACTER_INDEX | Invalid character index.
-1074395590 | ERR_NIOCR_INVALID_NUMBER_OF_VALID_CHARACTER_POSITIONS | Invalid number of character positions. Valid values range from 0 to 255.
-1074395589 | ERR_NIOCR_INVALID_LOW_THRESHOLD_VALUE | Invalid low threshold value. Valid threshold values range from 0 to 255.
-1074395588 | ERR_NIOCR_INVALID_HIGH_THRESHOLD_VALUE | Invalid high threshold value. Valid threshold values range from 0 to 255.
-1074395587 | ERR_NIOCR_INVALID_THRESHOLD_RANGE | The low threshold must be less than the high threshold.
-1074395586 | ERR_NIOCR_INVALID_LOWER_THRESHOLD_LIMIT | Invalid lower threshold limit. Valid lower threshold limits range from 0 to 255.
-1074395585 | ERR_NIOCR_INVALID_UPPER_THRESHOLD_LIMIT | Invalid upper threshold limit. Valid upper threshold limits range from 0 to 255.
-1074395584 | ERR_NIOCR_INVALID_THRESHOLD_LIMITS | The lower threshold limit must be less than the upper threshold limit.
-1074395583 | ERR_NIOCR_INVALID_MIN_CHAR_SPACING | Invalid minimum character spacing value. Character spacing must be >= 0 pixels.
-1074395582 | ERR_NIOCR_INVALID_MAX_HORIZ_ELEMENT_SPACING | Invalid maximum horizontal element spacing value. Maximum horizontal element spacing must be >= 0.
-1074395581 | ERR_NIOCR_INVALID_MAX_VERT_ELEMENT_SPACING | Invalid maximum vertical element spacing value. Maximum vertical element spacing must be >= 0.
-1074395580 | ERR_NIOCR_INVALID_MIN_BOUNDING_RECT_WIDTH | Invalid minimum bounding rectangle width. Minimum bounding rectangle width must be >= 1.
-1074395579 | ERR_NIOCR_INVALID_ASPECT_RATIO | Invalid aspect ratio value. The aspect ratio must be zero or >= 100.
-1074395578 | ERR_NIOCR_INVALID_CHARACTER_SET_FILE | Invalid or corrupt character set file.
-1074395577 | ERR_NIOCR_CHARACTER_VALUE_CANNOT_BE_EMPTYSTRING | The character value must not be an empty string.
-1074395576 | ERR_NIOCR_CHARACTER_VALUE_TOO_LONG | Character values must be <=255 characters.
-1074395575 | ERR_NIOCR_INVALID_NUMBER_OF_EROSIONS | Invalid number of erosions. The number of erosions must be >= 0.
-1074395574 | ERR_NIOCR_CHARACTER_SET_DESCRIPTION_TOO_LONG | The character set description must be <=255 characters.
-1074395573 | ERR_NIOCR_INVALID_CHARACTER_SET_FILE_VERSION | The character set file was created by a newer version of NI Vision. Upgrade to the latest version of NI Vision to read the character set file.
-1074395572 | ERR_NIOCR_INTEGER_VALUE_FOR_STRING_ATTRIBUTE | You must specify characters for a string. A string cannot contain integers.
-1074395571 | ERR_NIOCR_GET_ONLY_ATTRIBUTE | This attribute is read-only.
-1074395570 | ERR_NIOCR_INTEGER_VALUE_FOR_BOOLEAN_ATTRIBUTE | This attribute requires a Boolean value.
-1074395569 | ERR_NIOCR_INVALID_ATTRIBUTE | Invalid attribute.
-1074395568 | ERR_NIOCR_STRING_VALUE_FOR_INTEGER_ATTRIBUTE | This attribute requires integer values.
-1074395567 | ERR_NIOCR_STRING_VALUE_FOR_BOOLEAN_ATTRIBUTE | String values are invalid for this attribute. Enter a boolean value.
-1074395566 | ERR_NIOCR_BOOLEAN_VALUE_FOR_INTEGER_ATTRIBUTE | Boolean values are not valid for this attribute. Enter an integer value.
-1074395565 | ERR_NIOCR_MUST_BE_SINGLE_CHARACTER | Requires a single-character string.
-1074395564 | ERR_NIOCR_INVALID_PREDEFINED_CHARACTER | Invalid predefined character value.
-1074395563 | ERR_NIOCR_UNLICENSED | This copy of NI OCR is unlicensed.
-1074395562 | ERR_NIOCR_BOOLEAN_VALUE_FOR_STRING_ATTRIBUTE | String values are not valid for this attribute. Enter a Boolean value.
-1074395561 | ERR_NIOCR_INVALID_NUMBER_OF_CHARACTERS | The number of characters in the character value must match the number of objects in the image.
-1074395560 | ERR_NIOCR_INVALID_OBJECT_INDEX | Invalid object index.
-1074395559 | ERR_NIOCR_INVALID_READ_OPTION | Invalid read option.
-1074395558 | ERR_NIOCR_INVALID_CHARACTER_SIZE_RANGE | The minimum character size must be less than the maximum character size.
-1074395557 | ERR_NIOCR_INVALID_BOUNDING_RECT_WIDTH_RANGE | The minimum character bounding rectangle width must be less than the maximum character bounding rectangle width.
-1074395556 | ERR_NIOCR_INVALID_BOUNDING_RECT_HEIGHT_RANGE | The minimum character bounding rectangle height must be less than the maximum character bounding rectangle height.
-1074395555 | ERR_NIOCR_INVALID_SPACING_RANGE | The maximum horizontal element spacing value must not exceed the minimum character spacing value.
-1074395554 | ERR_NIOCR_INVALID_READ_RESOLUTION | Invalid read resolution.
-1074395553 | ERR_NIOCR_INVALID_MIN_BOUNDING_RECT_HEIGHT | Invalid minimum bounding rectangle height. The minimum bounding rectangle height must be >= 1.
-1074395552 | ERR_NIOCR_NOT_A_VALID_CHARACTER_SET | Not a valid character set.
-1074395551 | ERR_NIOCR_RENAME_REFCHAR | A trained OCR character cannot be renamed while it is a reference character.
-1074395550 | ERR_NIOCR_INVALID_CHARACTER_VALUE | A character cannot have an ASCII value of 255.
-1074395549 | ERR_NIOCR_INVALID_NUMBER_OF_OBJECTS_TO_VERIFY | The number of objects found does not match the number of expected characters or patterns to verify.
-1074395410 | ERR_INVALID_ICONS_PER_LINE | NI Vision does not support less than one icon per line.
-1074395409 | ERR_INVALID_SUBPIXEL_DIVISIONS | Invalid subpixel divisions.
-1074395408 | ERR_INVALID_DETECTION_MODE | Invalid detection mode.
-1074395407 | ERR_INVALID_CONTRAST | Invalid contrast value. Valid contrast values range from 0 to 255.
-1074395406 | ERR_COORDSYS_NOT_FOUND | The coordinate system could not be found on this image.
-1074395405 | ERR_INVALID_TEXTORIENTATION | NI Vision does not support the text orientation value you supplied.
-1074395404 | ERR_INVALID_INTERPOLATIONMETHOD_FOR_UNWRAP | UnwrapImage does not support the interpolation method value you supplied. Valid interpolation methods are zero order and bilinear.
-1074395403 | ERR_EXTRAINFO_VERSION | The image was created in a newer version of NI Vision. Upgrade to the latest version of NI Vision to use this image.
-1074395402 | ERR_INVALID_MAXPOINTS | The function does not support the maximum number of points that you specified.
-1074395401 | ERR_INVALID_MATCHFACTOR | The function does not support the matchFactor that you specified.
-1074395397 | ERR_COMPLEX_IMAGE_REQUIRED | A complex image is required.
-1074395395 | ERR_COLOR_IMAGE_REQUIRED | The input image must be a color image.
-1074395394 | ERR_COLOR_SPECTRUM_MASK | The color mask removes too much color information.
-1074395393 | ERR_COLOR_TEMPLATE_IMAGE_TOO_SMALL | The color template image is too small.
-1074395392 | ERR_COLOR_TEMPLATE_IMAGE_TOO_LARGE | The color template image is too large.
-1074395391 | ERR_COLOR_TEMPLATE_IMAGE_HUE_CONTRAST_TOO_LOW | The contrast in the hue plane of the image is too low for learning shape features.
-1074395390 | ERR_COLOR_TEMPLATE_IMAGE_LUMINANCE_CONTRAST_TOO_LOW | The contrast in the luminance plane of the image is too low to learn shape features.
-1074395389 | ERR_COLOR_LEARN_SETUP_DATA | Invalid color learn setup data.
-1074395388 | ERR_COLOR_LEARN_SETUP_DATA_SHAPE | Invalid color learn setup data.
-1074395387 | ERR_COLOR_MATCH_SETUP_DATA | Invalid color match setup data.
-1074395386 | ERR_COLOR_MATCH_SETUP_DATA_SHAPE | Invalid color match setup data.
-1074395385 | ERR_COLOR_ROTATION_REQUIRES_SHAPE_FEATURE | Rotation-invariant color pattern matching requires a feature mode including shape.
-1074395384 | ERR_COLOR_TEMPLATE_DESCRIPTOR | Invalid color template image.
-1074395383 | ERR_COLOR_TEMPLATE_DESCRIPTOR_1 | Invalid color template image.
-1074395382 | ERR_COLOR_TEMPLATE_DESCRIPTOR_2 | Invalid color template image.
-1074395381 | ERR_COLOR_TEMPLATE_DESCRIPTOR_3 | Invalid color template image.
-1074395380 | ERR_COLOR_TEMPLATE_DESCRIPTOR_4 | Invalid color template image.
-1074395379 | ERR_COLOR_TEMPLATE_DESCRIPTOR_5 | Invalid color template image.
-1074395378 | ERR_COLOR_TEMPLATE_DESCRIPTOR_6 | Invalid color template image.
-1074395377 | ERR_COLOR_TEMPLATE_DESCRIPTOR_SHIFT | Invalid color template image.
-1074395376 | ERR_COLOR_TEMPLATE_DESCRIPTOR_NOSHIFT | The color template image does not contain data required for shift-invariant color matching.
-1074395375 | ERR_COLOR_TEMPLATE_DESCRIPTOR_SHIFT_1 | Invalid color template image.
-1074395374 | ERR_COLOR_TEMPLATE_DESCRIPTOR_SHIFT_2 | Invalid color template image.
-1074395373 | ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION | Invalid color template image.
-1074395372 | ERR_COLOR_TEMPLATE_DESCRIPTOR_NOROTATION | The color template image does not contain data required for rotation-invariant color matching.
-1074395371 | ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_1 | Invalid color template image.
-1074395370 | ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_2 | Invalid color template image.
-1074395369 | ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_3 | Invalid color template image.
-1074395368 | ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_4 | Invalid color template image.
-1074395367 | ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_5 | Invalid color template image.
-1074395366 | ERR_COLOR_TEMPLATE_DESCRIPTOR_NOSHAPE | The color template image does not contain data required for color matching in shape feature mode.
-1074395365 | ERR_COLOR_TEMPLATE_DESCRIPTOR_NOSPECTRUM | The color template image does not contain data required for color matching in color feature mode.
-1074395364 | ERR_IGNORE_COLOR_SPECTRUM_SET | The ignore color spectra array is invalid.
-1074395363 | ERR_INVALID_SUBSAMPLING_RATIO | Invalid subsampling ratio.
-1074395362 | ERR_INVALID_WIDTH | Invalid pixel width.
-1074395361 | ERR_INVALID_STEEPNESS | Invalid steepness.
-1074395360 | ERR_COMPLEX_PLANE | Invalid complex plane.
-1074395357 | ERR_INVALID_COLOR_IGNORE_MODE | Invalid color ignore mode.
-1074395356 | ERR_INVALID_MIN_MATCH_SCORE | Invalid minimum match score. Acceptable values range from 0 to 1000.
-1074395355 | ERR_INVALID_NUM_MATCHES_REQUESTED | Invalid number of matches requested. You must request a minimum of one match.
-1074395354 | ERR_INVALID_COLOR_WEIGHT | Invalid color weight. Acceptable values range from 0 to 1000.
-1074395353 | ERR_INVALID_SEARCH_STRATEGY | Invalid search strategy.
-1074395352 | ERR_INVALID_FEATURE_MODE | Invalid feature mode.
-1074395351 | ERR_INVALID_RECT | NI Vision does not support rectangles with negative widths or negative heights.
-1074395350 | ERR_INVALID_VISION_INFO | NI Vision does not support the vision information type you supplied.
-1074395349 | ERR_INVALID_SKELETONMETHOD | NI Vision does not support the SkeletonMethod value you supplied.
-1074395348 | ERR_INVALID_3DPLANE | NI Vision does not support the 3DPlane value you supplied.
-1074395347 | ERR_INVALID_3DDIRECTION | NI Vision does not support the 3DDirection value you supplied.
-1074395346 | ERR_INVALID_INTERPOLATIONMETHOD_FOR_ROTATE | imaqRotate does not support the InterpolationMethod value you supplied.
-1074395345 | ERR_INVALID_FLIPAXIS | NI Vision does not support the axis of symmetry you supplied.
-1074395343 | ERR_FILE_FILENAME_NULL | You must pass a valid file name. Do not pass in NULL.
-1074395340 | ERR_INVALID_SIZETYPE | NI Vision does not support the SizeType value you supplied.
-1074395334 | ERR_INVALID_CONVERSIONSTYLE | NI Vision does not support the Conversion Method value you supplied.
-1074395333 | ERR_INVALID_VERTICAL_TEXT_ALIGNMENT | NI Vision does not support the VerticalTextAlignment value you supplied.
-1074395332 | ERR_INVALID_COMPAREFUNCTION | NI Vision does not support the CompareFunction value you supplied.
-1074395331 | ERR_INVALID_BORDERMETHOD | NI Vision does not support the BorderMethod value you supplied.
-1074395330 | ERR_INVALID_BORDER_SIZE | Invalid border size. Acceptable values range from 0 to 50.
-1074395329 | ERR_INVALID_OUTLINEMETHOD | NI Vision does not support the OutlineMethod value you supplied.
-1074395328 | ERR_INVALID_INTERPOLATIONMETHOD | NI Vision does not support the InterpolationMethod value you supplied.
-1074395327 | ERR_INVALID_SCALINGMODE | NI Vision does not support the ScalingMode value you supplied.
-1074395326 | ERR_INVALID_DRAWMODE_FOR_LINE | imaqDrawLineOnImage does not support the DrawMode value you supplied.
-1074395325 | ERR_INVALID_DRAWMODE | NI Vision does not support the DrawMode value you supplied.
-1074395324 | ERR_INVALID_SHAPEMODE | NI Vision does not support the ShapeMode value you supplied.
-1074395323 | ERR_INVALID_FONTCOLOR | NI Vision does not support the FontColor value you supplied.
-1074395322 | ERR_INVALID_TEXTALIGNMENT | NI Vision does not support the TextAlignment value you supplied.
-1074395321 | ERR_INVALID_MORPHOLOGYMETHOD | NI Vision does not support the MorphologyMethod value you supplied.
-1074395320 | ERR_TEMPLATE_EMPTY | The template image is empty.
-1074395319 | ERR_INVALID_SUBPIX_TYPE | NI Vision does not support the interpolation type you supplied.
-1074395318 | ERR_INSF_POINTS | You supplied an insufficient number of points to perform this operation.
-1074395317 | ERR_UNDEF_POINT | You specified a point that lies outside the image.
-1074395316 | ERR_INVALID_KERNEL_CODE | Invalid kernel code.
-1074395312 | ERR_LCD_CALIBRATE | The input image does not seem to be a valid LCD or LED calibration image.
-1074395311 | ERR_INVALID_COLOR_SPECTRUM | The color specturm array you provided does not contain enough elements or contains an element set to not-a-number (NaN).
-1074395310 | ERR_INVALID_PALETTE_TYPE | NI Vision does not support the PaletteType value you supplied.
-1074395309 | ERR_INVALID_WINDOW_THREAD_POLICY | NI Vision does not support the WindowThreadPolicy value you supplied.
-1074395308 | ERR_INVALID_COLORSENSITIVITY | NI Vision does not support the ColorSensitivity value you supplied.
-1074395307 | ERR_PRECISION_NOT_GTR_THAN_0 | The precision parameter must be greater than 0.
-1074395306 | ERR_INVALID_TOOL | NI Vision does not support the Tool value you supplied.
-1074395305 | ERR_INVALID_REFERENCEMODE | NI Vision does not support the ReferenceMode value you supplied.
-1074395304 | ERR_INVALID_MATHTRANSFORMMETHOD | NI Vision does not support the MathTransformMethod value you supplied.
-1074395303 | ERR_INVALID_NUM_OF_CLASSES | Invalid number of classes for auto threshold. Acceptable values range from 2 to 256.
-1074395302 | ERR_INVALID_THRESHOLDMETHOD | NI Vision does not support the threshold method value you supplied.
-1074395301 | ERR_ROI_NOT_2_LINES | The ROI you passed into imaqGetMeterArc must consist of two lines.
-1074395300 | ERR_INVALID_METERARCMODE | NI Vision does not support the MeterArcMode value you supplied.
-1074395299 | ERR_INVALID_COMPLEXPLANE | NI Vision does not support the ComplexPlane value you supplied.
-1074395298 | ERR_COMPLEXPLANE_NOT_REAL_OR_IMAGINARY | You can perform this operation on a real or an imaginary ComplexPlane only.
-1074395297 | ERR_INVALID_PARTICLEINFOMODE | NI Vision does not support the ParticleInfoMode value you supplied.
-1074395296 | ERR_INVALID_BARCODETYPE | NI Vision does not support the BarcodeType value you supplied.
-1074395295 | ERR_INVALID_INTERPOLATIONMETHOD_INTERPOLATEPOINTS | imaqInterpolatePoints does not support the InterpolationMethod value you supplied.
-1074395294 | ERR_CONTOUR_INDEX_OUT_OF_RANGE | The contour index you supplied is larger than the number of contours in the ROI.
-1074395293 | ERR_CONTOURID_NOT_FOUND | The supplied ContourID did not correlate to a contour inside the ROI.
-1074395292 | ERR_POINTS_ARE_COLLINEAR | Do not supply collinear points for this operation.
-1074395291 | ERR_SHAPEMATCH_BADIMAGEDATA | Shape Match requires the image to contain only pixel values of 0 or 1.
-1074395290 | ERR_SHAPEMATCH_BADTEMPLATE | The template you supplied for ShapeMatch contains no shape information.
-1074395287 | ERR_INVALID_LINE | The line you provided contains two identical points, or one of the coordinate locations for the line is not a number (NaN).
-1074395286 | ERR_INVALID_CONCENTRIC_RAKE_DIRECTION | Invalid concentric rake direction.
-1074395285 | ERR_INVALID_SPOKE_DIRECTION | Invalid spoke direction.
-1074395284 | ERR_INVALID_EDGE_PROCESS | Invalid edge process.
-1074395283 | ERR_INVALID_RAKE_DIRECTION | Invalid rake direction.
-1074395282 | ERR_CANT_DRAW_INTO_VIEWER | Unable to draw to viewer. You must have the latest version of the control.
-1074395281 | ERR_IMAGE_SMALLER_THAN_BORDER | Your image must be larger than its border size for this operation.
-1074395280 | ERR_ROI_NOT_RECT | ROI is not a rectangle.
-1074395279 | ERR_ROI_NOT_POLYGON | ROI is not a polygon.
-1074395278 | ERR_LCD_NOT_NUMERIC | LCD image is not a number.
-1074395277 | ERR_BARCODE_CHECKSUM | The decoded barcode information did not pass the checksum test.
-1074395276 | ERR_LINES_PARALLEL | You specified parallel lines for the meter ROI.
-1074395275 | ERR_INVALID_BROWSER_IMAGE | Invalid browser image.
-1074395270 | ERR_DIV_BY_ZERO | Cannot divide by zero.
-1074395269 | ERR_NULL_POINTER | Null pointer.
-1074395268 | ERR_LINEAR_COEFF | The linear equations are not independent.
-1074395267 | ERR_COMPLEX_ROOT | The roots of the equation are complex.
-1074395265 | ERR_BARCODE | The barcode does not match the type you specified.
-1074395263 | ERR_LCD_NO_SEGMENTS | No lit segment.
-1074395262 | ERR_LCD_BAD_MATCH | The LCD does not form a known digit.
-1074395261 | ERR_GIP_RANGE | An internal error occurred while attempting to access an invalid coordinate on an image.
-1074395260 | ERR_HEAP_TRASHED | An internal memory error occurred.
-1074395258 | ERR_BAD_FILTER_WIDTH | The filter width must be odd for the Canny operator.
-1074395257 | ERR_INVALID_EDGE_DIR | You supplied an invalid edge direction in the Canny operator.
-1074395256 | ERR_EVEN_WINDOW_SIZE | The window size must be odd for the Canny operator.
-1074395253 | ERR_INVALID_LEARN_MODE | Invalid learn mode.
-1074395252 | ERR_LEARN_SETUP_DATA | Invalid learn setup data.
-1074395251 | ERR_INVALID_MATCH_MODE | Invalid match mode.
-1074395250 | ERR_MATCH_SETUP_DATA | Invalid match setup data.
-1074395249 | ERR_ROTATION_ANGLE_RANGE_TOO_LARGE | At least one range in the array of rotation angle ranges exceeds 360 degrees.
-1074395248 | ERR_TOO_MANY_ROTATION_ANGLE_RANGES | The array of rotation angle ranges contains too many ranges.
-1074395247 | ERR_TEMPLATE_DESCRIPTOR | Invalid template descriptor.
-1074395246 | ERR_TEMPLATE_DESCRIPTOR_1 | Invalid template descriptor.
-1074395245 | ERR_TEMPLATE_DESCRIPTOR_2 | Invalid template descriptor.
-1074395244 | ERR_TEMPLATE_DESCRIPTOR_3 | Invalid template descriptor.
-1074395243 | ERR_TEMPLATE_DESCRIPTOR_4 | The template descriptor was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to use this template.
-1074395242 | ERR_TEMPLATE_DESCRIPTOR_ROTATION | Invalid template descriptor.
-1074395241 | ERR_TEMPLATE_DESCRIPTOR_NOROTATION | The template descriptor does not contain data required for rotation-invariant matching.
-1074395240 | ERR_TEMPLATE_DESCRIPTOR_ROTATION_1 | Invalid template descriptor.
-1074395239 | ERR_TEMPLATE_DESCRIPTOR_SHIFT | Invalid template descriptor.
-1074395238 | ERR_TEMPLATE_DESCRIPTOR_NOSHIFT | The template descriptor does not contain data required for shift-invariant matching.
-1074395237 | ERR_TEMPLATE_DESCRIPTOR_SHIFT_1 | Invalid template descriptor.
-1074395235 | ERR_TEMPLATE_IMAGE_CONTRAST_TOO_LOW | The template image does not contain enough contrast.
-1074395234 | ERR_TEMPLATE_IMAGE_TOO_SMALL | The template image is too small.
-1074395233 | ERR_TEMPLATE_IMAGE_TOO_LARGE | The template image is too large.
-1074395212 | ERR_OCR_TEMPLATE_WRONG_SIZE | The size of the template string must match the size of the string you are trying to correct.
-1074395211 | ERR_OCR_BAD_TEXT_TEMPLATE | The supplied text template contains nonstandard characters that cannot be generated by OCR.
-1074395210 | ERR_OCR_CANNOT_MATCH_TEXT_TEMPLATE | At least one character in the text template was of a lexical class that did not match the supplied character reports.
-1074395203 | ERR_OCR_LIB_INIT | The OCR library cannot be initialized correctly.
-1074395201 | ERR_OCR_LOAD_LIBRARY | There was a failure when loading one of the internal OCR engine or LabView libraries.
-1074395200 | ERR_OCR_INVALID_PARAMETER | One of the parameters supplied to the OCR function that generated this error is invalid.
-1074395179 | ERR_OCR_PREPROCESSING_FAILED | The OCR engine failed during the preprocessing stage.
-1074395178 | ERR_OCR_RECOGNITION_FAILED | The OCR engine failed during the recognition stage.
-1074395175 | ERR_OCR_BAD_USER_DICTIONARY | The provided filename is not valid user dictionary filename.
-1074395174 | ERR_OCR_INVALID_AUTOORIENTMODE | NI Vision does not support the AutoOrientMode value you supplied.
-1074395173 | ERR_OCR_INVALID_LANGUAGE | NI Vision does not support the Language value you supplied.
-1074395172 | ERR_OCR_INVALID_CHARACTERSET | NI Vision does not support the CharacterSet value you supplied.
-1074395171 | ERR_OCR_INI_FILE_NOT_FOUND | The system could not locate the initialization file required for OCR initialization.
-1074395170 | ERR_OCR_INVALID_CHARACTERTYPE | NI Vision does not support the CharacterType value you supplied.
-1074395169 | ERR_OCR_INVALID_RECOGNITIONMODE | NI Vision does not support the RecognitionMode value you supplied.
-1074395168 | ERR_OCR_INVALID_AUTOCORRECTIONMODE | NI Vision does not support the AutoCorrectionMode value you supplied.
-1074395167 | ERR_OCR_INVALID_OUTPUTDELIMITER | NI Vision does not support the OutputDelimiter value you supplied.
-1074395166 | ERR_OCR_BIN_DIR_NOT_FOUND | The system could not locate the OCR binary directory required for OCR initialization.
-1074395165 | ERR_OCR_WTS_DIR_NOT_FOUND | The system could not locate the OCR weights directory required for OCR initialization.
-1074395164 | ERR_OCR_ADD_WORD_FAILED | The supplied word could not be added to the user dictionary.
-1074395163 | ERR_OCR_INVALID_CHARACTERPREFERENCE | NI Vision does not support the CharacterPreference value you supplied.
-1074395162 | ERR_OCR_INVALID_CORRECTIONMODE | NI Vision does not support the CorrectionMethod value you supplied.
-1074395161 | ERR_OCR_INVALID_CORRECTIONLEVEL | NI Vision does not support the CorrectionLevel value you supplied.
-1074395160 | ERR_OCR_INVALID_MAXPOINTSIZE | NI Vision does not support the maximum point size you supplied. Valid values range from 4 to 72.
-1074395159 | ERR_OCR_INVALID_TOLERANCE | NI Vision does not support the tolerance value you supplied. Valid values are non-negative.
-1074395158 | ERR_OCR_INVALID_CONTRASTMODE | NI Vision does not support the ContrastMode value you supplied.
-1074395156 | ERR_OCR_SKEW_DETECT_FAILED | The OCR attempted to detected the text skew and failed.
-1074395155 | ERR_OCR_ORIENT_DETECT_FAILED | The OCR attempted to detected the text orientation and failed.
-1074395151 | ERR_OCR_CORRECTION_FAILED | The OCR engine failed during the correction stage.
-1074395147 | ERR_BARCODE_RSSLIMITED | The barcode is not a valid RSS Limited symbol
-1074395146 | ERR_QR_DETECTION_VERSION | Couldn't determine the correct version of the QR code.
-1074395145 | ERR_QR_INVALID_READ | Invalid read of the QR code.
-1074395144 | ERR_QR_INVALID_BARCODE | The barcode that was read contains invalid parameters.
-1074395143 | ERR_QR_DETECTION_MODE | The data stream that was demodulated could not be read because the mode was not detected.
-1074395142 | ERR_QR_DETECTION_MODELTYPE | Couldn't determine the correct model of the QR code.
-1074395141 | ERR_OCR_NO_TEXT_FOUND | The OCR engine could not find any text in the supplied region.
-1074395140 | ERR_OCR_CHAR_REPORT_CORRUPTED | One of the character reports is no longer usable by the system.
-1074395139 | ERR_IMAQ_QR_DIMENSION_INVALID | Invalid Dimensions.
-1074395138 | ERR_OCR_REGION_TOO_SMALL | The OCR region provided was too small to have contained any characters.


Kernels

A kernel is a structure that represents a pixel and its relationship to its neighbors.

Predefined Gradient Kernels

Prewitt Filters

Prewitt filters have the following kernels. The notations West (W), South (S), East (E), and North (N) indicate which edges of bright regions they outline.

Sobel Filters

The Sobel filters are similar to the Prewitt filters, except they highlight light intensity variations along a particular axis that is assigned a stronger weight. The Sobel filters have the following kernels.

The following table lists the predefined gradient 5 x 5 kernels.

The following table lists the predefined gradient 7 x 7 kernels.

Predefined Laplacian Kernels

The following tables list the predefined Laplacian kernels.

Laplacian 3 x 3

Laplacian 5 x 5

Laplacian 7 x 7

Predefined Smoothing Kernels

The following tables list the predefined smoothing kernels.

Smoothing 3 x 3

Smoothing 5 x 5

Smoothing 7 x 7

Predefined Gaussian Kernels

The following tables list the predefined Gaussian kernels.

Gaussian 3 x 3

Gaussian 5 x 5

Gaussian 7 x 7


Structures

A structure stores a collection of multiple data types and values as a single unit.

AIMGradeReport

Annulus

ArcInfo

AVIInfo

AxisReport

Barcode2DInfo

BarcodeInfo

BCGOptions

BestCircle

BestCircle2

BestEllipse

BestEllipse2

BestLine

BrowserOptions

CalibrationInfo

CalibrationPoints

CaliperOptions

CaliperReport

CannyOptions

CharInfo

CharInfo2

CharReport

CharReport2

CIELabValue

CIEXYZValue

CircleDescriptor

CircleFeature

CircleMatch

CircleReport

CircularEdgeReport

ClassifierAccuracyReport

ClassifierReport

ClassifierSampleInfo

ClassScore

ClosedContour

ClosedCurveFeature

ColorHistogramReport

ColorInformation

Complex

ConcentricRakeReport

ConstCurveFeature

ConstructROIOptions

ConstructROIOptions2

ContourInfo

ContourInfo2

ContourPoint

CoordinateSystem

CoordinateTransform

CoordinateTransform2

CornerFeature

CountObjectsOptions

Curve

CurveOptions

DataMatrixDescriptionOptions

DataMatrixOptions

DataMatrixReport

DataMatrixSearchOptions

DataMatrixSizeOptions

DetectExtremesOptions

DisplayMapping

DrawTextOptions

EdgeInfo

EdgeLocationReport

EdgeOptions

EdgeOptions2

EdgeReport

EdgeReport2

EllipseDescriptor

EllipseFeature

EllipseMatch

ExtremeReport

FeatureData

FindEdgeOptions

FindPatternOptions

FindTransformPatternOptions

FindTransformRectOptions

FindTransformRectsOptions

FitCircleOptions

FitEllipseOptions

FitLineOptions

GeometricPatternMatch

GeometricPatternMatch2

GridDescriptor

HistogramReport

HSIValue

HSLValue

HSVValue

ImageInfo

InspectionAlignment

InspectionOptions

JPEG2000FileAdvancedOptions

LCDOptions

LCDReport

LCDSegments

LearnCalibrationOptions

LearnColorPatternOptions

LearnGeometricPatternAdvancedOptions

LearnPatternAdvancedOptions

LearnPatternAdvancedRotationOptions

LearnPatternAdvancedShiftOptions

LegFeature

Line

LinearAverages

LineDescriptor

LineEquation

LineFeature

LineFloat

LineMatch

LineProfile

MatchColorPatternOptions

MatchGeometricPatternAdvancedOptions

MatchGeometricPatternAdvancedOptions2

MatchGeometricPatternOptions

MatchPatternAdvancedOptions

MatchPatternOptions

MeterArc

NearestNeighborClassResult

NearestNeighborOptions

NearestNeighborTrainingReport

ObjectReport

OCRProcessingOptions

OCRSpacingOptions

OpenContour

OverlayTextOptions

PairOfParallelLinePairsFeature

ParallelLinePairFeature

ParticleClassifierOptions

ParticleClassifierPreprocessingOptions

ParticleFilterCriteria

ParticleFilterCriteria2

ParticleFilterOptions

ParticleReport

PatternMatch

Point

PointFloat

QRCodeDataToken

QRCodeDescriptionOptions

QRCodeReport

QRCodeSearchOptions

QRCodeSizeOptions

QuantifyData

QuantifyReport

RakeOptions

RakeReport

Range

RangeFloat

ReadTextOptions

ReadTextReport

ReadTextReport2

Rect

RectangleDescriptor

RectangleFeature

RectangleMatch

RGBU64Value

RGBValue

ROIProfile

RotatedRect

RotationAngleRange

SearchLineInfo

SegmentInfo

SelectParticleCriteria

ShapeDetectionOptions

ShapeReport

SimpleEdgeOptions

SpokeOptions

SpokeReport

StraightEdge

StraightEdgeOptions

StraightEdgeReport

StraightEdgeReport2

StructuringElement

ThresholdData

TIFFFileOptions

ToolWindowOptions

TransformReport

UserPointSymbol

View3DOptions


Unions

Unions are data types that allow different member variables to be stored in the same memory location. Only one member can be active at any given time.

Color

Color2

ContourUnion

GeometricFeature

PixelValue


Enumerations

Enumerations are data types consisting of a named set of values.

AIMGrade

AttenuateMode

AxisOrientation

Barcode2DCellShape

Barcode2DContrast

Barcode2DSearchMode

Barcode2DShape

Barcode2DType

BarcodeType

BorderMethod

BrowserFrameStyle

BrowserLocation

ButtonLabel

CalibrationMode

CalibrationROI

CalibrationUnit

ClassifierEngineType

ClassifierType

ColorIgnoreMode

ColorMode

ColorSensitivity

ColumnProcessingMode

ComparisonFunction

ComplexPlane

CompressionType

ConcentricRakeDirection

ContourType

DataMatrixCellFillMode

DataMatrixCellFilterMode

DataMatrixCellSampleSize

DataMatrixDemodulationMode

DataMatrixECC

DataMatrixGradingMode

DataMatrixMirrorMode

DataMatrixPolarity

DataMatrixRotationMode

DataMatrixSubtype

DetectionMode

Direction3D

DrawMode

EdgeFilterSize

EdgePolaritySearchMode

EdgeProcess

ExtractionMode

FeatureType

FindTransformMode

FlattenType

FlipAxis

FontColor

GeometricMatchingMode

ImageFeatureMode

ImageType

InterpolationMethod

KernelFamily

LearningMode

LevelType

LinearAveragesMode

LineGaugeMethod

LocalThresholdMethod

MappingMethod

MatchingMode

MathTransformMethod

MeasurementType

MeasurementValue

MeterArcMode

MorphologyMethod

NearestNeighborMethod

NearestNeighborMetric

NormalizationMethod

ObjectType

OutlineMethod

PaletteType

ParticleClassifierType

ParticleInfoMode

ParticleType

PhotometricMode

Plane3D

PointSymbol

PolarityType

QRCellFilterMode

QRCellSampleSize

QRDemodulationMode

QRDimensions

QRGradingMode

QRMirrorMode

QRModelType

QRPolarities

QRRotationMode

QRStreamMode

RakeDirection

ReadClassifierFileMode

ReadResolution

ReadStrategy

RectOrientation

ReferenceMode

RegistrationMethod

ScalingMethod

ScalingMode

SearchDirection

SearchStrategy

ShapeMode

SizeType

SkeletonMethod

SpokeDirection

StraightEdgeSearchMode

TextAlignment

ThresholdMethod

ThresholdMode

TIFFCompressionType

Tool

TruncateMode

TwoEdgePolarityType

VerticalTextAlignment

VisionInfoType

VisionInfoType2

WaveletTransformMode

WindowBackgroundFillStyle

WindowBackgroundHatchStyle

WindowEventType

WindowOptions

WindowThreadPolicy

WriteClassifierFileMode


Glossary

A

AIPD | National Instruments internal image file format used for saving complex and HSL images and calibration information associated with an image. AIPD images have the file extension APD.
alignment | The process by which a machine vision application determines the location, orientation, and scale of a part being inspected.
area threshold | Detects objects based on their size, which can fall within a user-specified range.
arithmetic operators | The image operations multiply, divide, add, subtract, and remainder.
asynchronous | Property of a function or operation that begins an operation and returns control to the program before the completion or termination of the operation.
auto-median function | A function that uses dual combinations of opening and closing operations to smooth the boundaries of objects.

B

barycenter | The barycenter of a range of an image's grayscale values is the grayscale value representing the centroid of that range in the image histogram.
binary image | An image containing objects usually represented with a pixel intensity of 1(or 255) and the background of 0.
binary morphology | Functions that perform morphological operations on a binary image.
blob | Binary large object. A particle, or object, present in a binary image.
blurring | Reduces the amount of detail in an image. Blurring commonly occurs because the camera is out of focus. You can blur an image intentionally by applying a lowpass frequency filter.
BMP | Bitmap. Image file format commonly used for 8-bit and color images. BMP images have the file extension BMP.
border function | Removes objects (or particles) that touch the image border in a binary image.

C

caliper | Finds edge pairs along a specified path in the image. This function performs an edge extraction and then finds edge pairs based on specified criteria such as the distance between the leading and trailing edges, edge contrasts, and so forth.
cell | A single module that encodes one bit of data in a 2D barcode.
CIE L*a*b* | Color encoding scheme that classifies colors according to the human vision system by mimicking the logarithmic response of the eye.
CIE XYZ | Color encoding scheme that classifies colors according to the human vision system.
circle function | Detects circular objects in a binary image.
class | A category representing a collection of similar samples.
classification | An operation that assigns samples to classes based on predefined features.
classification accuracy | Probability that a sample is classified into the class to which it belongs.
classification confidence | Degree of certainty that a sample is assigned to one class instead of other classes. See also class and sample.
classification predictive value | Probability that a sample classified into a given class belongs to that class.
classifier | A function that assigns a sample to a class.
closed contour | An ROI that describes an inclusive area in an image. Types of closed contours include the following: Rectangle, Oval, Polygon, Freehand Region, Annulus, and Rotated Rectangle.
closing | A dilation followed by an erosion. A closing fills small holes in objects and smooths the boundaries of objects.
CLUT | Color lookup table. Table for converting the value of a pixel in an image into a red, green, and blue (RGB) intensity.
code word | Numeric value of the printed bar/space pattern in a 1D or 2D barcode.
color images | Images containing color information, usually encoded in the RGB form.
complex images | Save information obtained from the FFT of an image. The complex numbers that compose the FFT plane are encoded in 64-bit floating-point values: 32 bits for the real part and 32 bits for the imaginary part.
connectivity | Defines which of the surrounding pixels of a given pixel constitute its neighborhood.
connectivity-4 | Only pixels adjacent in the horizontal and vertical directions are considered neighbors.
connectivity-8 | All adjacent pixels are considered as neighbors.
convex hull function | Computes the convex hulls of objects in a binary image.
convolution | See linear filter.
convolution kernel | 2D matrices (or templates) used to represent the filter in the filtering process. The contents of these kernels are a discrete two-dimensional representation of the impulse response of the filter that they represent.
curve extraction | The process of finding curves or connected edge points in a grayscale image. Curves usually represent the boundaries of objects in the image.

D

Danielsson function | Similar to the distance functions, but with more accurate results.
densitometry | Determination of optical or photographic density.
density function | For each gray level in a linear histogram, it gives the number of pixels in the image that have the same gray level.
device | Plug-in data acquisition board that can contain multiple channels and conversion devices.
differentiation filter | Extracts the contours (edge detection) in gray level.
digital image | An image f (x, y) that has been converted into a discrete number of pixels. Both spatial coordinates and brightness are specified.
dilation | Increases the size of an object along its boundary and removes tiny holes in the object.
distance calibration | Determination of the physical dimensions of a pixel by defining the physical dimensions of a line in the image.
distance function | Assigns, to each pixel in an object, a gray-level value equal to its shortest Euclidean distance from the border of the object.

E

edge | Defined by a sharp change (transition) in the pixel intensities in an image or along an array of pixels.
edge contrast | The difference between the average pixel intensity before and the average pixel intensity after the edge.
edge hysteresis | The difference in threshold levels between a rising and a falling edge.
edge steepness | The number of pixels that correspond to the slope or transition area of an edge.
entropy | A measure of the randomness in an image. An image with high entropy contains more pixel value variation than an image with low entropy.
equalize function | See histogram equalization.
erasure | Missing or undecodable codeword at a known position in a 2D barcode.
erosion | Reduces the size of an object along its boundary and eliminates isolated points in the image.
exponential and gamma corrections | Expand the high gray-level information in an image while suppressing low gray-level information.
exponential function | Decreases the brightness and increases the contrast in bright regions of an image and decreases contrast in dark regions.

F

feature | A measurement from or attribute of a sample.
feature extraction | An operation that computes features of a sample.
feature vector | A 1D array in which each element represents a different feature of a sample.
FFT | Fast Fourier Transform. A method used to compute the Fourier Transform of an image.
fiducial | A reference pattern on a part that helps a machine vision application find the part's location and orientation in an image.
Fourier spectrum | The magnitude information of the Fourier Transform of an image.
Fourier Transform | Transforms an image from the spatial domain to the frequency domain.
frequency filters | Counterparts of spatial filters in the frequency domain. For images, frequency information is in the form of spatial frequency.

G

gauging | Measurement of an object or distances between objects.
Gaussian filter | A filter similar to the smoothing filter, but using a Gaussian kernel in the filter operation. The blurring in a Gaussian filter is more gentle than a smoothing filter.
geometric matching | The technique used to locate a grayscale template that is characterized by distinct geometric or shape information within a grayscale image.
geometric features | The information extracted from a grayscale template that is used to locate the template in the target image. Geometric features in an image range from low-level features, such as edges or curves detected in the image, to high-level features, such as the geometric shapes made by curves in the image.
golden template | An image containing an ideal representation of an object under inspection.
gradient convolution filter | See gradient filter.
gradient filter | Extracts the contours (edge detection) in gray-level values. Gradient filters include the Prewitt and Sobel filters.
gray level | The brightness of a point (pixel) in an image.
gray-level dilation | Increases the brightness of pixels in an image that are surrounded by other pixels with a higher intensity.
gray-level erosion | Reduces the brightness of pixels in an image that are surrounded by other pixels with a lower intensity.
gray-level images | Images with monochrome information.
gray-level morphology | Functions that perform morphological operations on a gray-level image.

H

highpass attenuation | Applies a linear attenuation to the frequencies in an image, with no attenuation at the highest frequency and full attenuation at the lowest frequency.
highpass FFT filter | Removes or attenuates low frequencies present in the FFT domain of an image.
highpass filter | Emphasizes the intensity variations in an image, detects edges (or object boundaries), and enhances fine details in an image.
highpass frequency filter | Attenuates or removes (truncates) low frequencies present in the frequency domain of the image. A highpass frequency filter suppresses information related to slow variations of light intensities in the spatial image.
highpass truncation | Removes all frequencies below a certain frequency.
histogram | Indicates the quantitative distribution of the pixels of an image per gray-level value.
histogram equalization | Transforms the gray-level values of the pixels of an image to occupy the entire range (0 to 255 in an 8-bit image) of the histogram, increasing the contrast of the image.
histogram inversion | Finds the photometric negative of an image. The histogram of a reversed image is equal to the original histogram flipped horizontally around the center of the histogram.
hit-miss function | Locates objects in the image similar to the pattern defined in the structuring element.
hole filling function | Fills all holes in objects that are present in a binary image.
HSI | Color encoding scheme in Hue, Saturation, and, Intensity.
HSL | Color encoding scheme using Hue, Saturation, and Luminance information where each image in the pixel is encoded using 32-bits: 8 bits for hue, 8 bits for saturation, 8 bits for luminance, and 8 unused bits.
HSV | Color encoding scheme in Hue, Saturation, and Value.

I

image | A two-dimensional light intensity function f (x, y), where, x and y denote spatial coordinates and the value f at any point (x, y) is proportional to the brightness at that point.
image file | A file containing image information and data.
image processing | Encompasses various processes and analysis functions that you can apply to an image.
image understanding | A technique that interprets the content of the image at a symbolic level rather than a pixel level.
image visualization | The presentation (display) of an image (image data) to the user.
inner gradient | Finds the inner boundary of objects.
inspection | The process by which parts are tested for simple defects such as missing parts or cracks on part surfaces.
inspection functions | Detects specific features in an image, including edges, peaks, and rotational shifts.
intensity calibration | Assigning user-defined quantities such as optical densities or concentrations to the gray-level values in an image.
intensity profile | The gray-level distribution of the pixels along an ROI in an image.
intensity range | Defines the range of gray-level values in an object of an image.
intensity threshold | Characterizes an object based on the range of gray-level values in the object. If the intensity range of the object falls within the user-specified range, it is considered an object; otherwise it is considered part of the background.
interpolation | The technique used to find values between known values when resampling an image or array of pixels.
invariant feature | A feature vector that is invariant to variations such as the scale, rotation, and mirror symmetry of samples.

J

JPEG | Joint Photographic Experts Group. Image file format for storing 8-bit and color images with lossy compression. JPEG images have the file extension JPG.
JPEG2000 | An image file format for storing 8-bit, 16-bit, or color images with either lossy or lossless compression. JPEG2000 images have the file extension JP2.

L

labeling | A morphology operation that identifies each object in a binary image and assigns a unique pixel value to all the pixels in an object. This process is useful for identifying the number of objects in the image and giving each object a unique pixel intensity.
Laplacian filter | Extracts the contours of objects in the image by highlighting the variation of light intensity surrounding a pixel.
line gauge | Measures the distance between selected edges with high-precision subpixel accuracy along a line in an image. For example, this function can be used to measure distances between points and edges and vice versa. This function also can step and repeat its measurements across the image.
line profile | Represents the gray-level distribution along a line of pixels in an image.
linear filter | A special algorithm that calculates the value of a pixel based on its own pixel value as well as the pixel values of its neighbors. The sum of this calculation is divided by the sum of the elements in the matrix to obtain a new pixel value.
local threshold | A method of image segmentation that categorizes a pixel as part of a particle or the background based on the intensity statistics of the particle's neighboring pixels.
logarithmic and inverse gamma corrections | Expand low gray-level information in an image while compressing information from the high gray-level ranges.
logarithmic function | Increases the brightness and contrast in dark regions of an image and decreases the contrast in bright regions of the image.
logic operators | The image operations AND, NAND, OR, NOR, XOR, XNOR, difference, mask, mean, max, and min.
lossless compression | Compression in which the decompressed image is identical to the original image.
lossy compression | Compression in which the decompressed image is visually similar but not identical to the original image.
lowpass attenuation | Applies a linear attenuation to the frequencies in an image, with no attenuation at the lowest frequency and full attenuation at the highest frequency.
lowpass compression | Removes or attenuates high frequencies present in the FFT domain of an image.
lowpass FFT filter | Attenuates intensity variations in an image. You can use these filters to smooth an image by eliminating fine details and blurring edges.
lowpass frequency filter | Attenuates high frequencies present in the frequency domain of the image. A lowpass frequency filter suppresses information related to fast variations of light intensities in the spatial image.
lowpass truncation | Removes all frequency information above a certain frequency.
L-skeleton function | Uses an L-shaped structuring element in the Skeleton function.
LUT | Lookup table. Table containing values used to transform the gray-level values of an image. For each gray-level value in the image, the corresponding new value is obtained from the lookup table.

M

machine vision application | An inspection or measurement application that uses images acquired from a 2D sensor (typically a CCD camera) to help with inspection or measurement.
mask | Isolates parts of an image for further processing.
mask FFT filter | Removes frequencies contained in a mask (range) specified by the user.
mask image | An image containing a value of 1 and values of 0. Pixels in the source image with a corresponding mask image value of 1 are processed, while the others are left unchanged.
match score | A number ranging from 0 to 1000 that indicates how closely an acquired image matches the template image. A match score of 1000 indicates a perfect match. A match score of 0 indicates no match.
median filter | A lowpass filter that assigns to each pixel the median value of its neighbors. This filter effectively removes isolated pixels without blurring the contours of objects.
MMX | Multimedia Extensions. Intel chip-based technology that allows parallel operations on integers, which results in accelerated processing of 8-bit images.
morphological transformations | Extract and alter the structure of objects in an image. You can use these transformations for expanding (dilating) or reducing (eroding) objects, filling holes, closing inclusions, or smoothing borders. They mainly are used to delineate objects and prepare them for quantitative inspection analysis.
M-skeleton | Uses an M-shaped structuring element in the skeleton function.
multiple template matching | The technique used to simultaneously locate multiple grayscale templates within a grayscale image.

N

neighbor | A pixel whose value affects the values of nearby pixels when an image is processed. The neighbors of a pixel are usually defined by a kernel.
neighborhood operations | Operations on a point in an image that take into consideration the values of the pixels neighboring that point.
nonlinear filter | Replaces each pixel value with a nonlinear function of its surrounding pixels.
nonlinear gradient filter | A highpass edge-extraction filter that favors vertical edges.
nonlinear Prewitt filter | A highpass edge-extraction filter that favors horizontal and vertical edges in an image.
nonlinear Sobel filter | A highpass edge-extraction filter that favors horizontal and vertical edges in an image.
Nth order filter | Filters an image using a nonlinear filter. This filter orders (or classifies) the pixel values surrounding the pixel being processed. The pixel being processed is set to the Nth pixel value, where N is the order of the filter.

O

open contour | An ROI that describes a point or area in an image. Types of open contours include the following: Point, Line, Broken Line, and Free Hand Line.
opening | An erosion followed by a dilation. An opening removes small objects and smooths boundaries of objects in the image.
operators | Allow masking, combination, and comparison of images. You can use arithmetic and logic operators in NI Vision.
occlusion invariant matching | A geometric matching technique in which the reference pattern can be partially obscured in the target image.
OCR | Opticle character recognition. The process of analyzing an image to detect and recognize characters/text in the image.
OCV | Optical character verification. A machine vision application that inspects the quality of printed characters.
optical representation | Contains the low-frequency information at the center and the high-frequency frequency information at the corners of an FFT-transformed image.
outer gradient | Finds the outer boundary of objects.

P

palette | The gradation of colors used to display an image on screen, usually defined by a color lookup table.
particle | A connected region or grouping of pixels in an image in which all pixels have the same intensity level.
particle classifier | A classifier that classifies particles. See also classifier and particle.
pattern matching | The technique used to locate quickly known reference patterns or fiducials in an image.
picture element | An element of a digital image.
pixel | Picture element.
pixel calibration | Directly calibrating the physical dimensions of a pixel in an image.
pixel depth | The number of bits used to represent the gray level of a pixel.
PNG | Portable Network Graphic. Image file format for storing 8-bit, 16-bit, and color images with lossless compression.
Power 1/Y function | Similar to a logarithmic function but with a weaker effect.
Power Y function | See exponential function.
Prewitt filter | Extracts the contours (edge detection) in gray-level values using a 3 × 3 filter kernel.
probability function | Defines the probability that a pixel in an image has a certain gray-level value.
proper-closing | A finite combination of successive closing and opening operations that you can use to fill small holes and smooth the boundaries of objects.
proper-opening | A finite combination of successive opening and closing operations that you can use to remove small particles and smooth the boundaries of objects.
pyramidal matching | A technique used to increase the speed of a pattern matching algorithm by matching subsampled versions of the image and the reference pattern.

Q

quantitative analysis | Obtaining various measurements of objects in an image.

R

Reverse function | Inverts the pixel values in an image, producing a photometric negative of the image.
RGB | Color encoding scheme using red, green and blue (RGB) color information where each pixel in the color image is encoded using 32 bits: 8 bits for red, 8 bits for green, 8 bits for blue, and 8 bits for the alpha value (unused).
RGB U64 | Color encoding scheme using red, green, and blue (RGB) color information where each pixel in the color image is encoded using 64 bits: 16 bits for red, 16 bits for green, 16 bits for blue, and 16 bits for the alpha value (unused).
Roberts filter | Extracts the contours (edge detection) in gray level, favoring diagonal edges.
ROI | Region of interest. An area of the image that is graphically selected from a window displaying the image. This area can be used to focus further processing. This region can also be defined programmatically.
rotation-invariant matching | A pattern matching technique in which the reference pattern can be at any orientation in the test image.
rotational shift | The amount by which one image is rotated with respect to a reference image. This rotation is computed with respect to the center of the image.

S

sample | An object in an image that you want to classify.
scale-invariant matching | A pattern matching technique in which the reference pattern can be any size in the test image.
segmentation function | Fully partitions a labeled binary image into non-overlapping segments, with each segment containing a unique object.
separation function | Separates objects that touch each other by narrow isthmuses.
shape descriptor | A feature vector that describes the shape of a sample. See also feature vector and particle analysis.
shape matching | Finds objects in an image whose shape matches the shape of the object specified by a template. The matching process is invariant to rotation and can be set to be invariant to the scale of the objects.
shift-invariant matching | A pattern matching technique in which the reference pattern can be located anywhere in the test image but cannot be rotated or scaled.
Sigma filter | A highpass filter that outlines edges.
skeleton function | Applies a succession of thinning operations to an object until its width becomes one pixel.
skiz | Obtains lines in an image that separate each object from the others and are equidistant from the objects that they separate.
smoothing filter | Blurs an image by attenuating variations of light intensity in the neighborhood of a pixel.
Sobel filter | Extracts the contours (edge detection) in gray-level values using a 3 × 3 filter kernel.
spatial calibration | Assigning physical dimensions to the area of a pixel in an image.
spatial filters | Alter the intensity of a pixel with respect to variations in intensities of its neighboring pixels. You can use these filters for edge detection, image enhancement, noise reduction, smoothing, and so forth.
spatial resolution | The number of pixels in an image, in terms of the number of rows and columns in the image.
Square function | See exponential function.
Square Root function | See logarithmic function.
standard representation | Contains the low-frequency information at the corners and high-frequency information at the center of an FFT-transformed image.
structuring element | A binary mask used in most morphological operations. A structuring element is used to determine which neighboring pixels contribute in the operation.
subpixel analysis | Used to find the location of the edge coordinates or pattern matching results in terms of fractions of a pixel.
substitution error | Erroneously decoded codeword at an unknown position in a 2D barcode.
synchronous | Property or operation that begins an operation and returns control to the program only when the operation is complete.
syntax | Set of rules to which statements must conform in a particular programming language.

T

thickening | Alters the shape of objects by adding parts to the object that match the pattern specified in the structuring element.
thinning | Alters the shape of objects by eliminating parts of the object that match the pattern specified in the structuring element.
threshold | Separates objects from the background by assigning all pixels with intensities within a specified range to the object and the rest of the pixels to the background. In the resulting binary image, objects are represented with a pixel intensity of 255 and the background is set to 0.
threshold interval | Two parameters, the lower threshold gray-level value and the upper threshold gray-level value.
TIFF | Tagged Image File Format. Image format commonly used for encoding 8-bit and color images. TIFF images have the file extension TIF.
truth table | A table associated with a logic operator that describes the rules used for that operation.

V

virtual corner | A corner that would be created if two non-intersecting lines are extended until they intersect.

W

watershed transform | A method of image segmentation that partitions an image based on the topographic surface of the image. The image is separated into non-overlapping segments with each segment containing a unique particle.


Important Information

Warranty

Copyright

Trademarks

Patents

Warning Regarding Use of NI Products


Warranty

The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period. National Instruments does not warrant that the operation of the software shall be uninterrupted or error free.

A Return Material Authorization (RMA) number must be obtained from the factory and clearly marked on the outside of the package before any equipment will be accepted for warranty work. National Instruments will pay the shipping costs of returning to the owner parts which are covered by warranty.

National Instruments believes that the information in this document is accurate. The document has been carefully reviewed for technical accuracy. In the event that technical or typographical errors exist, National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it.

EXCEPT AS SPECIFIED HEREIN, NATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. CUSTOMER'S RIGHT TO RECOVER DAMAGES CAUSED BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER. NATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS, OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. This limitation of the liability of National Instruments will apply regardless of the form of action, whether in contract or tort, including negligence. Any action against National Instruments must be brought within one year after the cause of action accrues. National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control. The warranty provided herein does not cover damages, defects, malfunctions, or service failures caused by owner's failure to follow the National Instruments installation, operation, or maintenance instructions; owner's modification of the product; owner's abuse, misuse, or negligent acts; and power failure or surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.


Copyright

Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.

National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.


Trademarks

National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks.

FireWire® is the registered trademark of Apple Computer, Inc.

Handle Graphics®, MATLAB®, Real-Time Workshop®, Simulink®, Stateflow®, and xPC TargetBox® are registered trademarks, and TargetBox™ and Target Language Compiler™ are trademarks of The MathWorks, Inc.

Tektronix® and Tek are registered trademarks of Tektronix, Inc.

Other product and company names mentioned herein are trademarks or trade names of their respective companies.

Members of the National Instruments Alliance Partner Program are business entities independent from National Instruments and have no agency, partnership, or joint-venture relationship with National Instruments.


Patents

For patents covering National Instruments products, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your CD, or ni.com/patents.


WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS

(1) NATIONAL INSTRUMENTS PRODUCTS ARE NOT DESIGNED WITH COMPONENTS AND TESTING FOR A LEVEL OF RELIABILITY SUITABLE FOR USE IN OR IN CONNECTION WITH SURGICAL IMPLANTS OR AS CRITICAL COMPONENTS IN ANY LIFE SUPPORT SYSTEMS WHOSE FAILURE TO PERFORM CAN REASONABLY BE EXPECTED TO CAUSE SIGNIFICANT INJURY TO A HUMAN.

(2) IN ANY APPLICATION, INCLUDING THE ABOVE, RELIABILITY OF OPERATION OF THE SOFTWARE PRODUCTS CAN BE IMPAIRED BY ADVERSE FACTORS, INCLUDING BUT NOT LIMITED TO FLUCTUATIONS IN ELECTRICAL POWER SUPPLY, COMPUTER HARDWARE MALFUNCTIONS, COMPUTER OPERATING SYSTEM SOFTWARE FITNESS, FITNESS OF COMPILERS AND DEVELOPMENT SOFTWARE USED TO DEVELOP AN APPLICATION, INSTALLATION ERRORS, SOFTWARE AND HARDWARE COMPATIBILITY PROBLEMS, MALFUNCTIONS OR FAILURES OF ELECTRONIC MONITORING OR CONTROL DEVICES, TRANSIENT FAILURES OF ELECTRONIC SYSTEMS (HARDWARE AND/OR SOFTWARE), UNANTICIPATED USES OR MISUSES, OR ERRORS ON THE PART OF THE USER OR APPLICATIONS DESIGNER (ADVERSE FACTORS SUCH AS THESE ARE HEREAFTER COLLECTIVELY TERMED "SYSTEM FAILURES"). ANY APPLICATION WHERE A SYSTEM FAILURE WOULD CREATE A RISK OF HARM TO PROPERTY OR PERSONS (INCLUDING THE RISK OF BODILY INJURY AND DEATH) SHOULD NOT BE RELIANT SOLELY UPON ONE FORM OF ELECTRONIC SYSTEM DUE TO THE RISK OF SYSTEM FAILURE. TO AVOID DAMAGE, INJURY, OR DEATH, THE USER OR APPLICATION DESIGNER MUST TAKE REASONABLY PRUDENT STEPS TO PROTECT AGAINST SYSTEM FAILURES, INCLUDING BUT NOT LIMITED TO BACK-UP OR SHUT DOWN MECHANISMS. BECAUSE EACH END-USER SYSTEM IS CUSTOMIZED AND DIFFERS FROM NATIONAL INSTRUMENTS' TESTING PLATFORMS AND BECAUSE A USER OR APPLICATION DESIGNER MAY USE NATIONAL INSTRUMENTS PRODUCTS IN COMBINATION WITH OTHER PRODUCTS IN A MANNER NOT EVALUATED OR CONTEMPLATED BY NATIONAL INSTRUMENTS, THE USER OR APPLICATION DESIGNER IS ULTIMATELY RESPONSIBLE FOR VERIFYING AND VALIDATING THE SUITABILITY OF NATIONAL INSTRUMENTS PRODUCTS WHENEVER NATIONAL INSTRUMENTS PRODUCTS ARE INCORPORATED IN A SYSTEM OR APPLICATION, INCLUDING, WITHOUT LIMITATION, THE APPROPRIATE DESIGN, PROCESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION.


Technical Support and Professional Services

Visit the following sections of the National Instruments Web site at ni.com for technical support and professional services:

  • Support—Online technical support resources at ni.com/support include the following:
    • Self-Help Resources—For answers and solutions, visit the award-winning National Instruments Web site for software drivers and updates, a searchable KnowledgeBase, product manuals, step-by-step troubleshooting wizards, thousands of example programs, tutorials, application notes, instrument drivers, and so on.
    • Free Technical Support—All registered users receive free Basic Service, which includes access to hundreds of Applications Engineers worldwide in the NI Discussion Forums at ni.com/forums. National Instruments Applications Engineers make sure every question receives an answer.

      For information about other technical support options in your area, visit ni.com/services or contact your local office at ni.com/contact.

  • Training and Certification—Visit ni.com/training for self-paced training, eLearning virtual classrooms, interactive CDs, and Certification program information. You also can register for instructor-led, hands-on courses at locations around the world.
  • System Integration—If you have time constraints, limited in-house technical resources, or other project challenges, National Instruments Alliance Partner members can help. To learn more, call your local NI office or visit ni.com/alliance.

If you searched ni.com and could not find the answers you need, contact your local office or NI corporate headquarters. You also can visit the Worldwide Offices section of ni.com/niglobal to access the branch office Web sites, which provide up-to-date contact information, support phone numbers, email addresses, and current events.


AIMGrade

The letter grade assigned to a Data Matrix barcode based on the AIM Print Quality standard, where IMAQ_AIM_GRADE_A represents the best grade and IMAQ_AIM_GRADE_F represents the worst grade.

Elements

Name | Value | Description
IMAQ_AIM_GRADE_F | 0 | The Data Matrix barcode received a grade of F.
IMAQ_AIM_GRADE_D | 1 | The Data Matrix barcode received a grade of D.
IMAQ_AIM_GRADE_C | 2 | The Data Matrix barcode received a grade of C.
IMAQ_AIM_GRADE_B | 3 | The Data Matrix barcode received a grade of B.
IMAQ_AIM_GRADE_A | 4 | The Data Matrix barcode received a grade of A.
IMAQ_DATA_MATRIX_AIM_GRADE_SIZE_GUARD | 0xFFFFFFFF | Reserved


AIMGradeReport

Details the AIM grading information for the Data Matrix barcode. If a Data Matrix barcode could not be located by imaqReadDataMatrixBarcode2(), the function will assign the Data Matrix barcode the value IMAQ_AIM_GRADE_F for all grades and the value 0 for all raw scores.

Elements

Name | Type | Description
overallGrade | AIMGrade | The overall letter grade, which is equal to the lowest of the other five letter grades.
decodingGrade | AIMGrade | The letter grade assigned to a Data Matrix barcode based on the success of the function in decoding the Data Matrix barcode. The function sets this grade to IMAQ_AIM_GRADE_A if the function could decode the data matrix, otherwise the function sets this grade to IMAQ_AIM_GRADE_F.
symbolContrastGrade | AIMGrade | The letter grade assigned to a Data Matrix barcode based on the symbol contrast raw score.
symbolContrast | float | The symbol contrast raw score representing the percentage difference between the mean of the reflectance of the darkest 10 percent and lightest 10 percent of the Data Matrix barcode.
printGrowthGrade | AIMGrade | The print growth letter grade for the Data Matrix barcode.
printGrowth | float | The print growth raw score for the barcode, which is based on the extent to which dark or light markings appropriately fill their module boundaries.
axialNonuniformityGrade | AIMGrade | The axial nonuniformity grade for the Data Matrix barcode.
axialNonuniformity | float | The axial nonuniformity raw score for the barcode, which is based on how much the sampling point spacing differs from one axis to another.
unusedErrorCorrectionGrade | AIMGrade | The unused error correction letter grade for the Data Matrix barcode.
unusedErrorCorrection | float | The unused error correction raw score for the Data Matrix barcode, which is based on the extent to which regional or spot damage in the Data Matrix barcode has eroded the reading safety margin provided by the error correction.


Annulus

Defines the location and size of an annulus, as shown in the following illustration.

Elements

Name | Type | Description
center | Point | The coordinate location of the center of the annulus.
innerRadius | int | The internal radius of the annulus.
outerRadius | int | The external radius of the annulus.
startAngle | double | The start angle, in degrees, of the annulus.
endAngle | double | The end angle, in degrees, of the annulus.


ArcInfo

Defines the location and size of an arc.

Elements

Name | Type | Description
boundingBox | Rect | The coordinate location of the bounding box of the arc.
startAngle | double | The counterclockwise angle from the x-axis in degrees to the start of the arc.
endAngle | double | The counterclockwise angle from the x-axis in degrees to the end of the arc.


AttenuateMode

Controls which frequencies a function attenuates.

Elements

Name | Value | Description
IMAQ_ATTENUATE_LOW | 0 | The function attenuates low frequencies.
IMAQ_ATTENUATE_HIGH | 1 | The function attenuates high frequencies.
IMAQ_ATTENUATE_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


AVIInfo

Information about an AVI.

Elements

Name | Type | Description
width | unsigned int | The width of each frame.
height | unsigned int | The height of each frame.
imageType | ImageType | The type of images this AVI contains.
numFrames | unsigned int | The number of frames in the AVI.
framesPerSecond | unsigned int | The number of frames per second this AVI should be shown at. The AVI may play at a slower rate, depending on the performance of the system on which it plays.
filterName | char* | The name of the compression filter used to create this AVI.
hasData | int | Specifies whether this AVI has data attached to each frame or not.
maxDataSize | unsigned int | If this AVI has data, the maximum size of the data in each frame.


AxisOrientation

The direction of the y-axis of a coordinate system, as shown in the following illustration.

Elements

Name | Value | Description
IMAQ_DIRECT | 0 | The y-axis direction corresponds to the y-axis direction of the Cartesian coordinate system.
IMAQ_INDIRECT | 1 | The y-axis direction corresponds to the y-axis direction of an image.
IMAQ_AXIS_ORIENTATION_SIZE_GUARD | 0xFFFFFFFF | Reserved


AxisReport

Specifies the coordinates of the main axis and the secondary axis of a coordinate system.

Elements

Name | Type | Description
origin | PointFloat | The origin of the coordinate system, which is the intersection of the two axes of the coordinate system.
mainAxisEnd | PointFloat | The end of the main axis, which is the result of the computation of the intersection of the main axis with the rectangular search area.
secondaryAxisEnd | PointFloat | The end of the secondary axis, which is the result of the computation of the intersection of the secondary axis with the rectangular search area.


BCGOptions

The parameters a function uses to transform an image.

Elements

Name | Type | Description
brightness | float | Adjusts the brightness of the image. A value of 128 leaves the brightness unchanged. Values below 128 darken the image, and values above 128 brighten the image.
contrast | float | Adjusts the contrast of the image. A value of 45 leaves the contrast unchanged. Values below 45 decrease the contrast, and values above 45 increase the contrast.
gamma | float | Performs gamma correction. A value of 1.0 leaves the image unchanged. Values below 1.0 enhance contrast for darker pixel at the expense of the brighter pixels. Values above 1.0 enhance contrast for brighter pixels at the expense of darker pixels.


BestCircle

Describes a circle that best fits a set of points.

Elements

Name | Type | Description
center | PointFloat | The coordinate location of the center of the circle.
radius | double | The radius of the circle.
area | double | The area of the circle.
perimeter | double | The length of the perimeter of the circle.
error | double | Represents the least square error of the fitted circle to the entire set of points.


BestCircle2

Describes a circle that best fits a set of points.

Elements

Name | Type | Description
center | PointFloat | The coordinate location of the center of the circle.
radius | double | The radius of the circle.
area | double | The area of the circle.
perimeter | double | The length of the perimeter of the circle.
error | double | Represents the least square error of the fitted circle to the entire set of points.
valid | int | This element is TRUE if the function achieved the minimum score within the number of allowed refinement iterations and FALSE if the function did not achieve the minimum score.
pointsUsed | int* | An array of the indexes for the points array indicating which points the function used to fit the circle. If rejectOutliers is FALSE, this array is set to NULL.
numPointsUsed | int | The number of points the function used to fit the circle.


BestEllipse

Describes an ellipse that best fits a set of points.

Elements

Name | Type | Description
center | PointFloat | The coordinate location of the center of the ellipse.
majorAxisStart | PointFloat | The coordinate location of the start of the major axis of the ellipse.
majorAxisEnd | PointFloat | The coordinate location of the end of the major axis of the ellipse.
minorAxisStart | PointFloat | The coordinate location of the start of the minor axis of the ellipse.
minorAxisEnd | PointFloat | The coordinate location of the end of the minor axis of the ellipse.
area | double | The area of the ellipse.
perimeter | double | The length of the perimeter of the ellipse.


BestEllipse2

Describes an ellipse that best fits a set of points.

Elements

Name | Type | Description
center | PointFloat | The coordinate location of the center of the ellipse.
majorAxisStart | PointFloat | The coordinate location of the start of the major axis of the ellipse.
majorAxisEnd | PointFloat | The coordinate location of the end of the major axis of the ellipse.
minorAxisStart | PointFloat | The coordinate location of the start of the minor axis of the ellipse.
minorAxisEnd | PointFloat | The coordinate location of the end of the minor axis of the ellipse.
area | double | The area of the ellipse.
perimeter | double | The length of the perimeter of the ellipse.
error | double | Represents the least square error of the fitted ellipse to the entire set of points.
valid | int | This element is TRUE if the function achieved the minimum score within the number of allowed refinement iterations and FALSE if the function did not achieve the minimum score.
pointsUsed | int* | An array of the indexes for the points array indicating which points the function used to fit the ellipse. If rejectOutliers is FALSE, this array is set to NULL.
numPointsUsed | int | The number of points the function used to fit the ellipse.


BestLine

Describes a line that best fits a set of points.

Elements

Name | Type | Description
start | PointFloat | The coordinate location of the start of the line.
end | PointFloat | The coordinate location of the end of the line.
equation | LineEquation | Defines the three coefficients of the equation of the best fit line.
valid | int | This element is TRUE if the function achieved the minimum score within the number of allowed refinement iterations and FALSE if the function did not achieve the minimum score.
error | double | Represents the least square error of the fitted line to the entire set of points.
pointsUsed | int* | An array of the indexes for the points array indicating which points the function used to fit the line.
numPointsUsed | int | The number of points the function used to fit the line.


BorderMethod

The method by which a function modifies the border.

Elements

Name | Value | Description
IMAQ_BORDER_MIRROR | 0 | Symmetrically copies pixel values from the image into the border.
IMAQ_BORDER_COPY | 1 | Copies the value of the pixel closest to the edge of the image into the border.
IMAQ_BORDER_CLEAR | 2 | Sets all pixels in the border to 0.
IMAQ_BORDER_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


Branch Offices

Office | Telephone Number
Australia | 1800 300 800
Austria | 43 662 457990-0
Belgium | 32 (0) 2 757 0020
Brazil | 55 11 3262 3599
Canada | 800 433 3488
China | 86 21 5050 9800
Czech Republic | 420 224 235 774
Denmark | 45 45 76 26 00
Finland | 358 (0) 9 725 72511
France | 33 (0) 1 57 66 24 24
Germany | 49 89 7413130
India | 91 80 41190000
Israel | 972 0 3 6393737
Italy | 39 02 413091
Japan | 81 3 5472 2970
Korea | 82 02 3451 3400
Lebanon | 961 (0) 1 33 28 28
Malaysia | 1800 887710
Mexico | 01 800 010 0793
Netherlands | 31 (0) 348 433 466
New Zealand | 0800 553 322
Norway | 47 (0) 66 90 76 60
Poland | 48 22 3390150
Portugal | 351 210 311 210
Russia | 7 495 783 6851
Singapore | 1800 226 5886
Slovenia | 386 3 425 42 00
South Africa | 27 0 11 805 8197
Spain | 34 91 640 0085
Sweden | 46 (0) 8 587 895 00
Switzerland | 41 56 2005151
Taiwan | 886 02 2377 2222
Thailand | 662 278 6777
Turkey | 90 212 279 3031
United Kingdom | 44 (0) 1635 523545
United States (Corporate) | 512 683 0100


BrowserFrameStyle

The style for the frame around each thumbnail.

Elements

Name | Value | Description
IMAQ_RAISED_FRAME | 0 | Each thumbnail has a raised frame.
IMAQ_BEVELLED_FRAME | 1 | Each thumbnail has a beveled frame.
IMAQ_OUTLINE_FRAME | 2 | Each thumbnail has an outlined frame.
IMAQ_HIDDEN_FRAME | 3 | Each thumbnail has a hidden frame.
IMAQ_STEP_FRAME | 4 | Each thumbnail has a stepped frame.
IMAQ_RAISED_OUTLINE_FRAME | 5 | Each thumbnail has a raised, outlined frame.
IMAQ_BROWSER_FRAME_STYLE_SIZE_GUARD | 0xFFFFFFFF | Reserved


BrowserLocation

Specifies which cell to use in the browser.

Elements

Name | Value | Description
IMAQ_INSERT_FIRST_FREE | 0 | Inserts the thumbnail in the first available cell.
IMAQ_INSERT_END | 1 | Inserts the thumbnail after the last occupied cell.
IMAQ_BROWSER_LOCATION_SIZE_GUARD | 0xFFFFFFFF | Reserved


BrowserOptions

Specifies how to set up the browser.

Elements

Name | Type | Description
width | int | The width to make the browser.
height | int | The height to make the browser image.
imagesPerLine | int | The number of images to place on a single line.
backgroundColor | RGBValue | The background color of the browser.
frameSize | int | Specifies the number of pixels with which to border each thumbnail.
style | BrowserFrameStyle | The style for the frame around each thumbnail.
ratio | float | Specifies the width to height ratio of each thumbnail.
focusColor | RGBValue | The color to use to display focused cells.


ButtonLabel

Specifies the label on the OK button of an image dialog.

Elements

Name | Value | Description
IMAQ_BUTTON_OK | 0 | The label "OK".
IMAQ_BUTTON_SAVE | 1 | The label "Save".
IMAQ_BUTTON_SELECT | 2 | The label "Select".
IMAQ_BUTTON_LOAD | 3 | The label "Load".
IMAQ_BUTTON_LABEL_SIZE_GUARD | 0xFFFFFFFF | Reserved


CannyOptions

A description of filter parameters to use in the algorithm.

Elements

Name | Type | Description
sigma | float | The sigma of the Gaussian smoothing filter that the function applies to the image before edge detection.
upperThreshold | float | The upper fraction of pixel values in the image from which the function chooses a seed or starting point of an edge segment. This value must be between 0 and 1.
lowerThreshold | float | The function multiplies this value by upperThreshold to determine the lower threshold for all the pixels in an edge segment.
windowSize | int | The window size of the Gaussian filter that the function applies to the image. This value must be odd.


CharInfo

Contains information about a trained character.

Elements

Name | Type | Description
charValue | const char* | Retrieves the character value of the corresponding character in the character set.
charImage | const Image* | The image you used to train this character.
internalImage | const Image* | The internal representation that NI Vision uses to match objects to this character. This information is helpful when you are not sure why NI Vision does not recognize a segmented character in the ROI. This information shows how NI Vision interprets the character, which may be different from how the human eye interprets it.


CharInfo2

Contains information about a trained character.

Elements

Name | Type | Description
charValue | const char* | Retrieves the character value of the corresponding character in the character set.
charImage | const Image* | The image you used to train this character.
internalImage | const Image* | The internal representation that NI Vision uses to match objects to this character. This information is helpful when you are not sure why NI Vision does not recognize a segmented character in the ROI. This information shows how NI Vision interprets the character, which may be different from how the human eye interprets it.
isReferenceChar | int | This element is TRUE if the character is the reference character for the character class.


CharReport

Contains information about a character.

Elements

Name | Type | Description
character | const char* | The character value.
corner[4] | PointFloat | An array of four points that describes the rectangle that surrounds the character.
reserved | int | This element is reserved.
lowThreshold | int | The minimum value of the threshold range used for this character.
highThreshold | int | The maximum value of the threshold range used for this character.


CharReport2

Contains information about a character.

Elements

Name | Type | Description
character | const char* | The character value.
corner[4] | PointFloat | An array of four points that describes the rectangle that surrounds the character.
lowThreshold | int | The minimum value of the threshold range used for this character.
highThreshold | int | The maximum value of the threshold range used for this character.
classificationScore | int | The degree to which the assigned character class represents the object better than the other character classes in the character set.
verificationScore | int | The similarity of the character and the reference character for the character class. If a reference character does not exist for the character class, the score will be 0.
verified | int | This element is TRUE if a reference character was found for the character class and FALSE if a reference character was not found.


CIELabValue

The information needed to describe a color in the CIE L*a*b* color space.

Elements

Name | Type | Description
b | double | The yellow/blue information of the color.
a | double | The red/green information of the color.
L | double | The color lightness.
alpha | unsigned char | The alpha value of the color, which represents extra information about a color image, such as gamma correction.


CIEXYZValue

The information needed to describe a color in the CIE XYZ color space.

Elements

Name | Type | Description
Z | double | The Z color information.
Y | double | The color luminance.
X | double | The X color information.
alpha | unsigned char | The alpha value of the color, which represents extra information about a color image, such as gamma correction.


CircleDescriptor

Describes the circles the function searches for.

Elements

Name | Type | Description
minRadius | double | Specifies the minimum radius of a circle the function will return.
maxRadius | double | Specifies the maximum radius of a circle the function will return.


CircleFeature

A circle feature.

Elements

Name | Type | Description
position | PointFloat | The location of the center of the circle.
radius | double | The radius of the circle.


CircleMatch

Information describing a matched circle.

Elements

Name | Type | Description
position | PointFloat | The location of the center of the matched circle.
radius | double | The radius of the matched circle.
score | double | The score of the matched circle.


CircleReport

Information about a circle.

Elements

Name | Type | Description
center | Point | The coordinate point of the center of the circle.
radius | int | The radius of the circle, in pixels. If the radius of the circle is not within the given range, this value is negative.
area | int | The area of the circle, in pixels.


CircularEdgeReport

Information describing a calculated circular edge.

Elements

Name | Type | Description
center | PointFloat | The center of the circle that best fits the circular edge. If the function does not detect any edges or the edges do not fit to a valid circle, it sets center to {0, 0}.
radius | double | The radius of the circle that best fits the circular edge. If the function does not detect any edges or the edges do not fit to a valid circle, it sets radius to 0.
roundness | double | The roundness of the calculated circular edge. This calculation is based on the location of the edges detected by the function. If the function does not detect any edges or the edges do not fit to a valid circle, it sets roundness to 0.
coordinates | PointFloat* | An array of points indicating the location of the detected edge.
numCoordinates | int | The number of detected edge coordinates.


ClassifierAccuracyReport

A report on the accuracy of the classifier.

Elements

Name | Type | Description
size | int | The size of the arrays in this structure.
accuracy | float | The overall accuracy of the classifier, from 0 to 1000. Refer to the Determining the Quality of a Trained Classifier section of Chapter 15, Binary Processing, in the NI Vision Concepts Manual.
classNames | char** | The names of the classes of this classifier. Each name in the array is a NULL-terminated string.
classAccuracy | double* | An array of size elements that contains accuracy information for each class. The class accuracy indicates the probability that the classifier classifies a sample into the correct class. Each row shows how the classifier classified all of the samples known to be in a certain class. Refer to the Classifier Accuracy section of Chapter 15, Binary Particle Classification, in the NI Vision Concepts Manual for more information about this field.
classPredictiveValue | double* | An array containing size elements that contains the predictive values of each class. The predictive values indicate the probability that a sample classified into a given class belongs to that class. Refer to the Classifier Predictability section of Chapter 15, Binary Particle Classification, in the NI Vision Concepts Manual for more information about this field.
classificationDistribution | int** | A two-dimensional array containing information about how the classifier classifies its samples. This array is a square array, with both dimensions containing size elements. Refer to the Determining the Quality of a Trained Classifier section of Chapter 15, Binary Particle Classification, in the NI Vision Concepts Manual for more information about this field.


ClassifierEngineType

The type of an engine on a classifier session.

Elements

Name | Value | Description
IMAQ_ENGINE_NONE | 0 | No engine has been set on this classifier session.
IMAQ_ENGINE_NEAREST_NEIGHBOR | 1 | Nearest neighbor engine.
IMAQ_CLASSIFIER_ENGINE_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ClassifierReport

A report of the results of classification.

Elements

Name | Type | Description
bestClassName | char* | The name of the best class for the sample.
classificationScore | float | The similarity of the sample and the two closest classes in the classifier.
identificationScore | float | The similarity of the sample and the assigned class.
allScores | ClassScore* | All classes and their scores.
allScoresSize | int | The number of entries in allScores.


ClassifierSampleInfo

Information about a sample in a classifier.

Elements

Name | Type | Description
className | char* | The name of the class this sample is in.
featureVector | double* | The feature vector of this sample, or NULL if this is not a custom classifier session.
featureVectorSize | int | The number of elements in the feature vector.
thumbnail | Image* | A thumbnail image of this sample, or NULL if no image was specified.


ClassifierType

The type of a classifier session.

Elements

Name | Value | Description
IMAQ_CLASSIFIER_CUSTOM | 0 | The classifier session classifies vectors of doubles.
IMAQ_CLASSIFIER_PARTICLE | 1 | The classifier session classifies particles in binary images.
IMAQ_CLASSIFIER_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ClassScore

The distance from a class to the item that was classified.

Elements

Name | Type | Description
className | char* | The name of the class.
distance | float | The distance from the item to this class.


ClosedContour

Defines the location and size of a closed contour, which is a series of connected points where the last point connects to the first.

Elements

Name | Type | Description
points | Point* | The points that make up the closed contour.
numPoints | int | The number of points in the array.


ClosedCurveFeature

A closed curve feature.

Elements

Name | Type | Description
position | PointFloat | The center of the closed curve feature.
arcLength | double | The arc length of the closed curve feature.


Color

The information necessary to describe a color in a particular color space.

Elements

Name | Type | Description
rgb | RGBValue | The information needed to describe a color in the RGB (Red, Green, and Blue) color space.
hsl | HSLValue | The information needed to describe a color in the HSL (Hue, Saturation, and Luminance) color space.
hsv | HSVValue | The information needed to describe a color in the HSI (Hue, Saturation, and Value) color space.
hsi | HSIValue | The information needed to describe a color in the HSI (Hue, Saturation, and Intensity) color space.
rawValue | int | The integer value for the data in the color union. This value is not valid for the CIE L*a*b* and CIE XYZ color spaces.


Color2

The information necessary to describe a color in a particular color space.

Elements

Name | Type | Description
rgb | RGBValue | The information needed to describe a color in the RGB (Red, Green, and Blue) color space.
hsl | HSLValue | The information needed to describe a color in the HSL (Hue, Saturation, and Luminance) color space.
hsv | HSVValue | The information needed to describe a color in the HSI (Hue, Saturation, and Value) color space.
hsi | HSIValue | The information needed to describe a color in the HSI (Hue, Saturation, and Intensity) color space.
cieLab | CIELabValue | The information needed to describe a color in the CIE L*a*b* (L, a, b) color space.
cieXYZ | CIEXYZValue | The information needed to describe a color in the CIE XYZ (X, Y, Z) color space.
rawValue | int | The integer value for the data in the color union. This value is not valid for the CIE L*a*b* and CIE XYZ color spaces.


ColorHistogramReport

A report describing the classification of each plane of a color image. The data of each plane depends on the ColorMode the function used to generate the report, as follows:

  • IMAQ_RGB—plane1 is the red plane, plane2 is the green plane, plane3 is the blue plane.
  • IMAQ_HSL—plane1 is the hue plane, plane2 is the saturation plane, plane3 is the luminance plane.
  • IMAQ_HSV—plane1 is the hue plane, plane2 is the saturation plane, plane3 is the value plane.
  • IMAQ_HSI—plane1 is the hue plane, plane2 is the saturation plane, plane3 is the intensity plane.
  • IMAQ_CIE—plane1 is the luminance plane, plane2 is the red/green plane, plane3 is the yellow/blue plane.
  • IMAQ_CIEXYZ—plane1 is the X color plane, plane2 is the Y color plane, plane3 is the Z color plane.
    Note ColorHistogramReport can take in the CIE L*a*b* and CIE XYZ color planes when you are using imaqColorHistogram2.

Elements

Name | Type | Description
plane1 | HistogramReport | The histogram report of the first color plane.
plane2 | HistogramReport | The histogram report of the second plane.
plane3 | HistogramReport | The histogram report of the third plane.


ColorIgnoreMode

Specifies whether the function excludes certain colors from the color features of the template image. Any color the function excludes during the learning process is also excluded in the match phase.

Elements

Name | Value | Description
IMAQ_IGNORE_NONE | 0 | Specifies that the function does not ignore any pixels.
IMAQ_IGNORE_BLACK | 1 | Specifies that the function ignores black pixels.
IMAQ_IGNORE_WHITE | 2 | Specifies that the function ignores white pixels.
IMAQ_IGNORE_BLACK_AND_WHITE | 3 | Specifies that the function ignores black pixels and white pixels.
IMAQ_BLACK_WHITE_IGNORE_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ColorInformation

Information about the color features contained in a region of an image.

Elements

Name | Type | Description
infoCount | int | The size of the info array.
saturation | int | The saturation level the function uses to learn the color information.
info | double* | An array of color information that represents the color spectrum analysis of a region of an image in a compact form.


ColorMode

Designates in which color space the function should operate. For more information about color spaces, refer to the NI Vision Concepts Manual.

Elements

Name | Value | Description
IMAQ_RGB | 0 | The function operates in the RGB (Red, Blue, Green) color space.
IMAQ_HSL | 1 | The function operates in the HSL (Hue, Saturation, Luminance) color space.
IMAQ_HSV | 2 | The function operates in the HSV (Hue, Saturation, Value) color space.
IMAQ_HSI | 3 | The function operates in the HSI (Hue, Saturation, Intensity) color space.
IMAQ_CIE | 4 | The function operates in the CIE L*a*b* color space.
IMAQ_CIEXYZ | 5 | The function operates in the CIE XYZ color space.
IMAQ_COLOR_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ColorSensitivity

Specifies the complexity of the color information in the image. In most cases, set this parameter to IMAQ_SENSITIVITY_LOW. However, set this parameter to IMAQ_SENSITIVITY_HIGH to use more information and better distinguish colors in highly complex images. As complexity increases, so does sensitivity. Two similar colors that may be identified as being the same with IMAQ_SENSITIVITY_LOW may be identified as different colors with IMAQ_SENSITIVITY_HIGH. Refer to the NI Vision Concepts Manual for more information about color sensitivity.

Elements

Name | Value | Description
IMAQ_SENSITIVITY_LOW | 0 | Instructs the algorithm to divide the hue plane into a low number of sectors, allowing for simple color analysis.
IMAQ_SENSITIVITY_MED | 1 | Instructs the algorithm to divide the hue plane into a medium number of sectors, allowing for color analysis that balances sensitivity and complexity.
IMAQ_SENSITIVITY_HIGH | 2 | Instructs the algorithm to divide the hue plane into a high number of sectors, allowing for complex, sensitive color analysis.
IMAQ_COLOR_SENSITIVITY_SIZE_GUARD | 0xFFFFFFFF | Reserved


ColumnProcessingMode

Specifies the method that the function uses to process the data extracted for edge detection.

Elements

Name | Value | Description
IMAQ_AVERAGE_COLUMNS | 0 | Averages the data extracted for edge detection.
IMAQ_MEDIAN_COLUMNS | 1 | Takes the median of the data extracted for edge detection.
IMAQ_COLUMN_PROCESSING_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ComparisonFunction

The method in which the function compares images.

Elements

Name | Value | Description
IMAQ_CLEAR_LESS | 0 | The comparison is true if the source pixel value is less than the comparison image pixel value.
IMAQ_CLEAR_LESS_OR_EQUAL | 1 | The comparison is true if the source pixel value is less than or equal to the comparison image pixel value.
IMAQ_CLEAR_EQUAL | 2 | The comparison is true if the source pixel value is equal to the comparison image pixel value.
IMAQ_CLEAR_GREATER_OR_EQUAL | 3 | The comparison is true if the source pixel value is greater than or equal to the comparison image pixel value.
IMAQ_CLEAR_GREATER | 4 | The comparison is true if the source pixel value is greater than the comparison image pixel value.
IMAQ_COMPARE_FUNCTION_SIZE_GUARD | 0xFFFFFFFF | Reserved


Complex

A complex value.

Elements

Name | Type | Description
r | float | The real part of the value.
i | float | The imaginary part of the value.


ComplexPlane

Designates on which complex plane the function should operate.

Elements

Name | Value | Description
IMAQ_REAL | 0 | The function operates on the real plane of the complex image.
IMAQ_IMAGINARY | 1 | The function operates on the imaginary plane of the complex image.
IMAQ_MAGNITUDE | 2 | The function operates on the magnitude plane of the complex image.
IMAQ_PHASE | 3 | The function operates on the phase plane of the complex image.
IMAQ_COMPLEX_PLANE_SIZE_GUARD | 0xFFFFFFFF | Reserved


CompressionType

Indicates how to compress the image for flattening.

Elements

Name | Value | Description
IMAQ_COMPRESSION_NONE | 0 | Specifies that the function should not compress the image.
IMAQ_COMPRESSION_JPEG | 1 | Specifies that the function should use lossy JPEG compression on the image. JPEG compression may cause data degradation in the flattened data.
IMAQ_COMPRESSION_PACKED_BINARY | 2 | Specifies that the function should use lossless binary packing on the image. This setting is ideal for preserving data integrity when flattening binary images. Do not use this setting for nonbinary images.
IMAQ_COMPRESSION_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ConcentricRakeDirection

The direction in which the function searches for edges along the search lines.

Elements

Name | Value | Description
IMAQ_COUNTER_CLOCKWISE | 0 | The function searches the search area in a counter-clockwise direction.
IMAQ_CLOCKWISE | 1 | The function searches the search area in a clockwise direction.
IMAQ_CONCENTRIC_RAKE_DIRECTION_SIZE_GUARD | 0xFFFFFFFF | Reserved


ConcentricRakeReport

Information describing the concentric rake used by the function and the edges the function calculated with the concentric rake.

Elements

Name | Type | Description
rakeArcs | ArcInfo* | An array containing the location of each concentric arc line used for edge detection.
numArcs | int | The number of arc lines in the rakeArcs array.
firstEdges | PointFloat* | The coordinate location of all edges detected as first edges.
numFirstEdges | int | The number of points in the first edges array.
lastEdges | PointFloat* | The coordinate location of all edges detected as last edges.
numLastEdges | int | The number of points in the last edges array.
allEdges | EdgeLocationReport* | An array of reports describing the location of the edges located by each concentric rake arc line.
linesWithEdges | int* | An array of indices into the rakeArcs array indicating the concentric rake arc lines on which the function detected at least one edge.
numLinesWithEdges | int | The number of concentric rake arc lines along which the function detected edges. This number represents the size of the lineWithEdges array and the number of EdgeLocationReports in the allEdges array.


ConstCurveFeature

A constant curve feature.

Elements

Name | Type | Description
position | PointFloat | The center of the circle that this constant curve lies upon.
radius | double | The radius of the circle that this constant curve lies upon.
startAngle | double | When traveling along the constant curve from one endpoint to the next in a counterclockwise manner, this is the angular component of the vector originating at the center of the constant curve and pointing towards the first endpoint of the constant curve.
endAngle | double | When traveling along the constant curve from one endpoint to the next in a counterclockwise manner, this is the angular component of the vector originating at the center of the constant curve and pointing towards the second endpoint of the constant curve.


ConstructROIOptions

Describes how a function presents the ROI constructor window.

Elements

Name | Type | Description
windowNumber | int | The window number of the image window. The function displays the image in the specified window and temporarily sets the window to modal mode. When the user clicks OK or Cancel, the attributes of the window reset to their initial values. Set this parameter to IMAQ_MODAL_DIALOG to display a modal dialog window centered in the screen.
windowTitle | const char* | Specifies the message string that the function displays in the title bar of the window. Use this element to provide the user with instructions describing the object to select.
type | PaletteType | The palette type to use.
palette | RGBValue* | If type is IMAQ_PALETTE_USER, this array is the palette of colors to use with the window. If type is not IMAQ_PALETTE_USER, the function ignores this element, and you may set it to NULL. The maximum number of colors in a palette is 256. palette[n] maps to pixel value n. If there are fewer than 256 elements in palette, the function maps all pixel values past the last element in palette to the associated grayscale value.
numColors | int | If type is IMAQ_PALETTE_USER, this element is the number of colors in the palette array. If type is not IMAQ_PALETTE_USER, the function ignores this element.


ConstructROIOptions2

Describes how a function presents the ROI constructor window.

Elements

Name | Type | Description
windowNumber | int | The window number of the image window. The function displays the image in the specified window and temporarily sets the window to modal mode. When the user clicks OK or Cancel, the attributes of the window reset to their initial values. Set this parameter to IMAQ_MODAL_DIALOG to display a modal dialog window centered in the screen.
windowTitle | const char* | Specifies the message string that the function displays in the title bar of the window. Use this element to provide the user with instructions describing the object to select.
type | PaletteType | The palette type to use.
palette | RGBValue* | If type is IMAQ_PALETTE_USER, this array is the palette of colors to use with the window. If type is not IMAQ_PALETTE_USER, the function ignores this element, and you may set it to NULL. The maximum number of colors in a palette is 256. palette[n] maps to pixel value n. If there are fewer than 256 elements in palette, the function maps all pixel values past the last element in palette to the associated grayscale value.
numColors | int | If type is IMAQ_PALETTE_USER, this element is the number of colors in the palette array. If type is not IMAQ_PALETTE_USER, the function ignores this element.
maxContours | unsigned int | The maximum number of contours the user will be able to select.


ContourInfo

Information about a contour.

Elements

Name | Type | Description
type | ContourType | The contour type.
numPoints | unsigned | The number of points that make up the contour.
points | Point* | The points describing the contour.
contourColor | RGBValue | The contour color.


ContourInfo2

Information about a contour.

Elements

Name | Type | Description
type | ContourType | The contour type.
color | RGBValue | The contour color.
structure | ContourUnion | The information necessary to describe the contour in coordinate space.


ContourPoint

Describes a point along an edge segment.

Elements

Name | Type | Description
x | double | The x-coordinate value in the image.
y | double | The y-coordinate value in the image.
curvature | double | The change in slope at this edge point of the segment.
xDisplacement | double | The x displacement of the current edge pixel from a cubic spline fit of the current edge segment.
yDisplacement | double | The y displacement of the current edge pixel from a cubic spline fit of the current edge segment.


ContourType

The type of a contour.

Elements

Name | Value | Description
IMAQ_EMPTY_CONTOUR | 0 | The contour is empty.
IMAQ_POINT | 1 | The contour represents a point.
IMAQ_LINE | 2 | The contour represents a line.
IMAQ_RECT | 3 | The contour represents a rectangle.
IMAQ_OVAL | 4 | The contour represents an oval.
IMAQ_CLOSED_CONTOUR | 5 | The contour represents a series of connected points where the last point connects to the first.
IMAQ_OPEN_CONTOUR | 6 | The contour represents a series of connected points where the last point does not connect to the first.
IMAQ_ANNULUS | 7 | The contour represents an annulus.
IMAQ_ROTATED_RECT | 8 | The contour represents a rotated rectangle.
IMAQ_CONTOUR_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ContourUnion

The information necessary to describe a contour in coordinate space. The valid field of the ContourUnion depends on the contour type.

Elements

Name | Type | Description
point | Point* | Use this member when the contour is of type IMAQ_POINT.
line | Line* | Use this member when the contour is of type IMAQ_LINE.
rect | Rect* | Use this member when the contour is of type IMAQ_RECT.
ovalBoundingBox | Rect* | Use this member when the contour is of type IMAQ_OVAL.
closedContour | ClosedContour* | Use this member when the contour is of type IMAQ_CLOSED_CONTOUR.
openContour | OpenContour* | Use this member when the contour is of type IMAQ_OPEN_CONTOUR.
annulus | Annulus* | Use this member when the contour is of type IMAQ_ANNULUS.
rotatedRect | RotatedRect* | Use this member when the contour is of type IMAQ_ROTATED_RECT.


CoordinateSystem

Defines a set of coordinate axes.

Elements

Name | Type | Description
origin | PointFloat | The origin of the coordinate system.
angle | float | The angle, in degrees, of the x-axis of the coordinate system relative to the image x-axis.
axisOrientation | AxisOrientation | The direction of the y-axis of the coordinate reference system.


CoordinateTransform

Specifies how to transform pixel coordinates based on the difference between the initial coordinate system and the final coordinate system.

Elements

Name | Type | Description
initialOrigin | Point | The origin of the initial coordinate system.
initialAngle | float | The angle, in degrees, of the x-axis of the initial coordinate system relative to the image x-axis.
finalOrigin | Point | The origin of the final coordinate system.
finalAngle | float | The angle, in degrees, of the x-axis of the final coordinate system relative to the image x-axis.


CoordinateTransform2

Specifies how to transform pixel coordinates based on the difference between the reference coordinate system and the measurement coordinate system

Elements

Name | Type | Description
referenceSystem | CoordinateSystem | Defines the coordinate system for input coordinates.
measurementSystem | CoordinateSystem | Defines the coordinate system in which the function should perform measurements.


CornerFeature

A corner feature.

Elements

Name | Type | Description
position | PointFloat | The location of the corner feature.
rotation | double | The angular component of the vector bisecting the corner from position.
enclosedAngle | double | The measure of the enclosed angle of the corner.
isVirtual | int | This element is TRUE if the corner is virtual and FALSE if the corner is not virtual. A virtual corner is a corner that would be created if two non-intersecting lines are extended until they intersect.


CountObjectsOptions

Defines the parameters of the algorithm the function uses to locate the objects and the information the function overlays to the image.

Elements

Name | Type | Description
type | ObjectType | Specifies the types of objects the function detects.
threshold | float | Specifies the grayscale intensity that is used as threshold level. When type is IMAQ_BRIGHT_OBJECTS, threshold indicates the lowest pixel value that defines a bright object. When type is IMAQ_DARK_OBJECTS, threshold indicates the highest pixel value that defines a dark object.
rejectBorder | int | If TRUE, the function ignores objects touching the boarder of the search area. If you do not want the function to ignore border objects, set this element to FALSE.
fillHoles | int | If TRUE, the function fills the holes in the objects. If you do not want the function to fill the holes in objects, set this element to FALSE.
useMinSize | int | If TRUE, the function ignores objects the same size or smaller than minSize. If you do not want the function to ignore small objects, set this element to FALSE.
minSize | int | The function ignores objects this size and smaller when useMinSize is TRUE.
useMaxSize | int | If TRUE, the function ignores objects the same size or larger than maxSize. If you do not want the function to ignore large objects, set this element to FALSE.
maxSize | int | The function ignores objects this size and larger when useMaxSize is TRUE.
showSearchArea | int | If TRUE, the function overlays the search area on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showObjectCenter | int | If TRUE, the function overlays the location of the center of mass of the objects on the result image. If you do not want this information overlaid onto the image, set this element to FALSE.
showBoundingBox | int | If TRUE, the function overlays the bounding boxes of the objects on the result image. If you do not want this information overlaid onto the image, set this element to FALSE.


Curve

Information about a curve.

Elements

Name | Type | Description
points | PointFloat* | The points on the curve.
numPoints | unsigned int | The number of points in the curve.
closed | int | This element is TRUE if the curve is closed and FALSE if the curve is open.
curveLength | double | The length of the curve.
minEdgeStrength | double | The lowest edge strength detected on the curve.
maxEdgeStrength | double | The highest edge strength detected on the curve.
averageEdgeStrength | double | The average of all edge strengths detected on the curve.


CurveOptions

Describes how a function identifies curves in an image.

Elements

Name | Type | Description
extractionMode | ExtractionMode | Specifies the method the function uses to identify curves in the image.
threshold | int | Specifies the minimum contrast a seed point must have in order to begin a curve.
filterSize | EdgeFilterSize | Specifies the width of the edge filter the function uses to identify curves in the image.
minLength | int | Specifies the length, in pixels, of the smallest curve the function will extract. The function will ignore any curves that have a length less than minLength.
rowStepSize | int | Specifies the distance, in the y direction, between lines the function inspects for curve seed points.
columnStepSize | int | Specifies the distance, in the x direction, between columns the function inspects for curve seed points.
maxEndPointGap | int | Specifies the maximum gap, in pixels, between the endpoints of a curve that the function identifies as a closed curve. If the gap is larger than maxEndPointGap, the function identifies the curve as an open curve.
onlyClosed | int | Set this element to TRUE to specify that the function should only identify closed curves in the image. Set this element to FALSE to specify that the function should identify both open and closed curves in the image.
subpixelAccuracy | int | Set this element to TRUE to specify that the function identifies the location of curves with subpixel accuracy by interpolating between points to find the crossing of threshold. Set this element to FALSE to specify that the function identifies the location of curves as the point nearest the crossing of threshold.


DataMatrixCellFillMode

Specifies the fill percentage for a cell that is in the "ON" state.

Elements

Name | Value | Description
IMAQ_AUTO_DETECT_CELL_FILL_MODE | -2 | Sets the function to determine the Data Matrix barcode cell fill percentage automatically.
IMAQ_LOW_FILL | 0 | Sets the function to read Data Matrix barcodes with a cell fill percentage of less than 30 percent.
IMAQ_NORMAL_FILL | 1 | Sets the function to read Data Matrix barcodes with a cell fill percentage greater than or equal to 30 percent.
IMAQ_DATA_MATRIX_CELL_FILL_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixCellFilterMode

Specifies the mode the function uses to determine the pixel value for each cell.

Elements

Name | Value | Description
IMAQ_AUTO_DETECT_CELL_FILTER_MODE | -2 | The function will try all filter modes and uses the one that decodes the Data Matrix barcode within the fewest iterations and utilizing the least amount of error correction.
IMAQ_AVERAGE_FILTER | 0 | The function sets the pixel value for the cell to the average of the sampled pixels.
IMAQ_MEDIAN_FILTER | 1 | The function sets the pixel value for the cell to the median of the sampled pixels.
IMAQ_CENTRAL_AVERAGE_FILTER | 2 | The function sets the pixel value for the cell to the average of the pixels in the center of the cell sample.
IMAQ_HIGH_AVERAGE_FILTER | 3 | The function sets the pixel value for the cell to the average value of the half of the sampled pixels with the highest pixel values.
IMAQ_LOW_AVERAGE_FILTER | 4 | The function sets the pixel value for the cell to the average value of the half of the sampled pixels with the lowest pixel values.
IMAQ_VERY_HIGH_AVERAGE_FILTER | 5 | The function sets the pixel value for the cell to the average value of the ninth of the sampled pixels with the highest pixel values.
IMAQ_VERY_LOW_AVERAGE_FILTER | 6 | The function sets the pixel value for the cell to the average value of the ninth of the sampled pixels with the lowest pixel values.
IMAQ_ALL_CELL_FILTERS | 8 | The function tries each filter mode, starting with IMAQ_AVERAGE_FILTER and ending with IMAQ_VERY_LOW_AVERAGE_FILTER, stopping once a filter mode decodes correctly.
IMAQ_DATA_MATRIX_CELL_FILTER_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixCellSampleSize

Specifies the sample size, in pixels, the function should take to determine if each cell is on or off.

Elements

Name | Value | Description
IMAQ_AUTO_DETECT_CELL_SAMPLE_SIZE | -2 | The function will try each sample size and use the one which decodes the Data Matrix barcode within the fewest iterations and utilizing the least amount of error correction.
IMAQ_1x1 | 1 | The function will use a 1×1 sized sample from each cell.
IMAQ_2x2 | 2 | The function will use a 2×2 sized sample from each cell.
IMAQ_3x3 | 3 | The function will use a 3×3 sized sample from each cell.
IMAQ_4x4 | 4 | The function will use a 4×4 sized sample from each cell.
IMAQ_5x5 | 5 | The function will use a 5×5 sized sample from each cell.
IMAQ_6x6 | 6 | The function will use a 6×6 sized sample from each cell.
IMAQ_7x7 | 7 | The function will use a 7×7 sized sample from each cell.
IMAQ_DATA_MATRIX_CELL_SAMPLE_SIZE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixDemodulationMode

Specifies the mode the function should use to demodulate (determine which cells are on and which cells are off) the Data Matrix barcode.

Elements

Name | Value | Description
IMAQ_AUTO_DETECT_DEMODULATION_MODE | -2 | The function will try each demodulation mode and use the one which decodes the Data Matrix barcode within the fewest iterations and utilizing the least amount of error correction.
IMAQ_HISTOGRAM | 0 | The function uses a histogram of all of the Data Matrix cells to calculate a threshold. This threshold determines if a cell is on or off. This is the fastest mode, but requires images with consistent levels of contrast.
IMAQ_LOCAL_CONTRAST | 1 | The function examines each of the cell's neighbors to determine if the cell is on or off. This mode is slower, but works with images that have inconsistent levels of contrast.
IMAQ_COMBINED | 2 | The function uses the histogram of the Data Matrix barcode to calculate a threshold. For cells with pixel values that are sufficiently below or above this threshold, the function will use the threshold to determine if the cell is on or off. If the cell pixel values are close to the threshold, the function will use the IMAQ_LOCAL_CONTRAST mode to determine if the cell is on or off. This mode is slower, but works with images that contain a Data Matrix barcode with extremely low cell fill percentages or gross print growth errors.
IMAQ_ALL_DEMODULATION_MODES | 3 | The function tries IMAQ_HISTOGRAM, then IMAQ_LOCAL_CONTRAST and then IMAQ_COMBINATION, stopping once one mode is successful.
IMAQ_DATA_MATRIX_DEMODULATION_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixDescriptionOptions

Specifies the description options the function uses when searching for the Data Matrix barcode in the image.

Elements

Name | Type | Description
aspectRatio | float | Specifies the ratio of the width of each Data Matrix barcode cell (in pixels) to the height of the Data Matrix barcode (in pixels). Setting this value to 0 indicates the function should determine the aspect ratio.
rows | unsigned int | Specifies the number of rows in the Data Matrix barcode. Setting this value to 0 indicates the function should determine the number of rows.
columns | unsigned int | Specifies the number of columns in the Data Matrix barcode. Setting this value to 0 indicates the function should determine the number of columns.
rectangle | int | Set this element to TRUE to specify that the Data Matrix barcode is rectangular. Set this element to FALSE to specify that the Data Matrix barcode is square. If both rows and columns are non-zero, the function will ignore this element.
ecc | DataMatrixECC | Specifies the ECC used for this Data Matrix barcode.
polarity | DataMatrixPolarity | Specifies the data-to-background contrast for the Data Matrix barcode.
cellFill | DataMatrixCellFillMode | Specifies the fill percentage for a cell of the Data Matrix barcode that is in the "ON" state.
minBorderIntegrity | float | Specifies the minimum percentage of the border (locator pattern and timing pattern) the function should expect in the Data Matrix barcode. During the location phase, the function will ignore possible Data Matrix barcode candidates that do not have at least this level of border integrity.
mirrorMode | DataMatrixMirrorMode | Specifies if the Data Matrix barcode appears normally in the image or if the barcode appears mirrored in the image.


DataMatrixECC

Specifies the ECC used for the Data Matrix barcode in the image.

Elements

Name | Value | Description
IMAQ_AUTO_DETECT_ECC | -2 | Sets the function to determine the Data Matrix barcode ECC automatically.
IMAQ_ECC_000 | 0 | Sets the function to read Data Matrix barcodes of ECC 000 only.
IMAQ_ECC_050 | 50 | Sets the function to read Data Matrix barcodes of ECC 050 only.
IMAQ_ECC_080 | 80 | Sets the function to read Data Matrix barcodes of ECC 080 only.
IMAQ_ECC_100 | 100 | Sets the function to read Data Matrix barcodes of ECC 100 only.
IMAQ_ECC_140 | 140 | Sets the function to read Data Matrix barcodes of ECC 140 only.
IMAQ_ECC_000_140 | 190 | Sets the function to read Data Matrix barcodes of ECC 000, ECC 050, ECC 080, ECC 100, and ECC 140 only.
IMAQ_ECC_200 | 200 | Sets the function to read Data Matrix barcodes of ECC 200 only.
IMAQ_DATA_MATRIX_ECC_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixGradingMode

Specifies if the function should make calculations needed to prepare to grade the Data Matrix barcode.

Elements

Name | Value | Description
IMAQ_NO_GRADING | 0 | The function does not make any preparatory calculations. Attempts to grade this Data Matrix barcode will generate an error.
IMAQ_PREPARE_FOR_AIM | 1 | The function prepares the image for grading using the AIM Print Quality metrics.
IMAQ_DATA_MATRIX_GRADING_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixMirrorMode

Specifies if the Data Matrix barcode appears normally in the image or if the Data Matrix barcode appears mirrored in the image.

Elements

Name | Value | Description
IMAQ_AUTO_DETECT_MIRROR | -2 | Specifies that the function should determine if the Data Matrix barcode is mirrored.
IMAQ_APPEARS_NORMAL | 0 | Specifies that the function should expect the Data Matrix barcode to appear normal.
IMAQ_APPEARS_MIRRORED | 1 | Specifies that the function should expect the Data Matrix barcode to appear mirrored.
IMAQ_DATA_MATRIX_MIRROR_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixOptions

Defines how the function searches for and decodes Data Matrix barcodes.

Elements

Name | Type | Description
searchMode | Barcode2DSearchMode | Specifies the mode the function uses to search for barcodes.
contrast | Barcode2DContrast | Specifies the contrast of the barcodes that the function searches for.
cellShape | Barcode2DCellShape | Specifies the shape of the barcode data cells, which affects how the function decodes the barcode.
barcodeShape | Barcode2DShape | Specifies the shape of the barcodes that the function searches for.
subtype | DataMatrixSubtype | Specifies the Data Matrix subtypes of the barcodes that the function searches for.


DataMatrixPolarity

Specifies the data-to-background contrast for the Data Matrix barcode.

Elements

Name | Value | Description
IMAQ_AUTO_DETECT_POLARITY | -2 | Sets the function to determine the Data Matrix barcode polarity automatically.
IMAQ_BLACK_DATA_ON_WHITE_BACKGROUND | 0 | Sets the function to read Data Matrix barcodes with dark data on a bright background.
IMAQ_WHITE_DATA_ON_BLACK_BACKGROUND | 1 | Sets the function to read Data Matrix barcodes with bright data on a dark background.
IMAQ_DATA_MATRIX_POLARITY_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixReport

Describes the Data Matrix barcode that the function read.

Elements

Name | Type | Description
found | int | This element is TRUE if the function located and decoded a Data Matrix barcode and FALSE if the function failed to locate and decode a Data Matrix barcode.
binary | int | This element is TRUE if the Data Matrix barcode contains binary data and FALSE if the Data Matrix barcode contains text data.
data | unsigned char* | The data encoded in the Data Matrix barcode.
dataLength | unsigned int | The length of the data array.
boundingBox[4] | PointFloat | An array of four points describing the rectangle surrounding the Data Matrix barcode.
numErrorsCorrected | unsigned int | The number of errors the function corrected when decoding the Data Matrix barcode.
numErasuresCorrected | unsigned int | The number of erasures the function corrected when decoding the Data Matrix barcode.
aspectRatio | float | Specifies the aspect ratio of the Data Matrix barcode in the image, which equals the ratio of the width of a Data Matrix barcode cell (in pixels) to the height of a Data Matrix barcode cell (in pixels).
rows | unsigned int | The number of rows in the Data Matrix barcode.
columns | unsigned int | The number of columns in the Data Matrix barcode.
ecc | DataMatrixECC | The Error Correction Code (ECC) used by the Data Matrix barcode.
polarity | DataMatrixPolarity | The polarity of the Data Matrix barcode.
cellFill | DataMatrixCellFillMode | The cell fill percentage of the Data Matrix barcode.
borderIntegrity | float | The percentage of the Data Matrix barcode border that appears correctly in the image.
mirrored | int | This element is TRUE if the Data Matrix barcode appears mirrored in the image and FALSE if the Data Matrix barcode appears normally in the image.
minimumEdgeStrength | unsigned int | The strength of the weakest edge the function used to find the coarse location of the Data Matrix barcode in the image. Use this value as a guide for setting the edgeThreshold element of the searchOptions parameter of imaqReadDataMatrixBarcode2().
demodulationMode | DataMatrixDemodulationMode | The demodulation mode the function used to locate the Data Matrix barcode. If demodulationMode is set to IMAQ_AUTO_DETECT_DEMODULATION_MODE in the searchOptions parameter of imaqReadDataMatrixBarcode2(), this element indicates the recommended demodulation mode for this image.
cellSampleSize | DataMatrixCellSampleSize | The cell sample size the function used to locate the Data Matrix barcode. If cellSampleSize is set to IMAQ_AUTO_DETECT_CELL_SAMPLE_SIZE in the searchOptions parameter of imaqReadDataMatrixBarcode2(), this element indicates the recommended cell sample size for this image.
cellFilterMode | DataMatrixCellFilterMode | The cell filter mode the function used to locate the Data Matrix barcode. If cellFilterMode was set to IMAQ_AUTO_DETECT_CELL_FILTER_MODE in the searchOptions parameter of imaqReadDataMatrixBarcode2(), this element indicates the recommended cell filter mode for this image.
iterations | unsigned int | The number of iterations the function took in attempting to locate the Data Matrix barcode. If this number is equal to the maximumIterations element of the searchOptions parameter of imaqReadDataMatrixBarcode2(), and the function failed to locate the Data Matrix barcode, you may be able to locate the Data Matrix barcode by increasing maximumIterations.


DataMatrixRotationMode

Specifies the amount of Data Matrix barcode rotation the function should allow for.

Elements

Name | Value | Description
IMAQ_UNLIMITED_ROTATION | 0 | The function allows for unlimited rotation.
IMAQ_0_DEGREES | 1 | The function allows for between -5 and 5 degrees of rotation.
IMAQ_90_DEGREES | 2 | The function allows for between 85 and 95 degrees of rotation.
IMAQ_180_DEGREES | 3 | The function allows for between 175 and 185 degrees of rotation.
IMAQ_270_DEGREES | 4 | The function allows for between 265 and 275 degrees of rotation.
IMAQ_DATA_MATRIX_ROTATION_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DataMatrixSearchOptions

Specifies the search options the function uses when searching for the Data Matrix barcode in the image.

Elements

Name | Type | Description
rotationMode | DataMatrixRotationMode | Specifies the amount of Data Matrix barcode rotation the function should allow for.
skipLocation | int | If set to TRUE, specifies that the function should assume that the Data Matrix barcode occupies the entire image (or the entire search region). The function then skips the location phase, moving immediately to extraction and decoding. If FALSE, the function does not make any assumptions about the percentage of the image occupied by the Data Matrix barcode.
edgeThreshold | unsigned int | Specifies the minimum contrast a pixel must have in order to be considered part of a matrix cell edge. The lower this value, the more potential edge candidates the function will examine during the location phase. Setting this value too low will decrease the performance of the function because the function will examine too many potential edge candidates. Setting this value too high may also decrease the performance of the function by removing valid edge candidates, making location require more iterations. Setting this value too high may also cause the function to fail to identify the Data Matrix barcode because too many candidates are eliminated.
demodulationMode | DataMatrixDemodulationMode | Specifies the mode the function should use to demodulate (determine which cells are on and which cells are off) the Data Matrix barcode.
cellSampleSize | DataMatrixCellSampleSize | Specifies the sample size, in pixels, the function should take to determine if each cell is on or off.
cellFilterMode | DataMatrixCellFilterMode | Specifies the mode the function uses to determine the pixel value for each cell. If cellSampleSize is IMAQ_1x1, the value of the single sampled pixel always determines the pixel value for the cell and the function ignores this element.
skewDegreesAllowed | unsigned int | Specifies the amount of skew in the Data Matrix barcode the function should allow for.
maxIterations | unsigned int | Specifies the maximum number of iterations before the function stops looking for the Data Matrix barcode.
initialSearchVectorWidth | unsigned int | Specifies the number of pixels the function should average together to determine the location of an edge. You may need to increase this value when the Data Matrix has cells with a low fill percentage.


DataMatrixSizeOptions

Contains the size options the function uses when searching for a Data Matrix barcode in the image.

Elements

Name | Type | Description
minSize | unsigned int | Specifies the minimum size (in pixels) of the Data Matrix barcode in the image. Setting this value to 0 indicates the function should never exclude a Data Matrix barcode candidate because it is too small.
maxSize | unsigned int | Specifies the maximum size (in pixels) of the Data Matrix barcode in the image. Setting this value to 0 indicates the function should never exclude a Data Matrix barcode candidate because it is too large.
quietZoneWidth | unsigned int | Specifies the expected minimum size of the quiet zone, in pixels. The function will ignore Data Matrix barcode candidates whose quiet zones are smaller than this value.


DataMatrixSubtype

Specifies the subtypes of Data Matrix barcodes that the function searches for.

Elements

Name | Value | Description
IMAQ_ALL_DATA_MATRIX_SUBTYPES | 0 | The function searches for Data Matrix barcodes of all subtypes.
IMAQ_DATA_MATRIX_SUBTYPES_ECC_000_ECC_140 | 1 | The function searches for Data Matrix barcodes of subtypes ECC 000, ECC 050, ECC 080, ECC 100 and ECC 140.
IMAQ_DATA_MATRIX_SUBTYPE_ECC_200 | 2 | The function searches for Data Matrix ECC 200 barcodes.
IMAQ_DATA_MATRIX_SUBTYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DetectExtremesOptions

Describes how a function calculates extremes.

Elements

Name | Type | Description
threshold | double | Defines which extremes are too small. The function rejects any peak with a fitted amplitude that is less than threshold. The function ignores valleys if the fitted trough is greater than threshold.
width | int | Specifies the number of consecutive data points the function uses in the quadratic least-squares fit. width must be greater than or equal to 3 but should be no larger than one-fourth of the approximate width of the peaks or valleys. Setting width to a large value can reduce the apparent amplitude of peaks and shift the apparent location. The less noise your data has, the smaller the value you can choose.


DetectionMode

Determines if the function detects peaks or detects valleys.

Elements

Name | Value | Description
IMAQ_DETECT_PEAKS | 0 | The function detects peaks.
IMAQ_DETECT_VALLEYS | 1 | The function detects valleys.
IMAQ_DETECTION_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


Direction3D

Defines the 3D orientation.

Elements

Name | Value | Description
IMAQ_3D_NW | 0 | The viewing angle for the 3D image is from the northwest.
IMAQ_3D_SW | 1 | The viewing angle for the 3D image is from the southwest.
IMAQ_3D_SE | 2 | The viewing angle for the 3D image is from the southeast.
IMAQ_3D_NE | 3 | The viewing angle for the 3D image is from the northeast.
IMAQ_DIRECTION_3D_SIZE_GUARD | 0xFFFFFFFF | Reserved


DrawMode

The method that the function uses to draw an object.

Elements

Name | Value | Description
IMAQ_DRAW_VALUE | 0 | Draws the boundary of the object with the specified pixel value.
IMAQ_DRAW_INVERT | 2 | Inverts the pixel values of the boundary of the object.
IMAQ_PAINT_VALUE | 1 | Fills the object with the given pixel value.
IMAQ_PAINT_INVERT | 3 | Inverts the pixel values of the object.
IMAQ_HIGHLIGHT_VALUE | 4 | The function fills the object by highlighting the enclosed pixels with the color of the object. The highlighting allows features of an image to persist inside a filled object.
IMAQ_DRAW_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


DrawTextOptions

Describes how the function draws text.

Elements

Name | Type | Description
fontName[32] | char | The font name to use. This parameter is limited to 32 characters.
fontSize | int | The size of the font.
bold | int | Set this parameter to TRUE to bold text.
italic | int | Set this parameter to TRUE to italicize text.
underline | int | Set this parameter to TRUE to underline text.
strikeout | int | Set this parameter to TRUE to strikeout text.
textAlignment | TextAlignment | Sets the alignment of text.
fontColor | FontColor | Sets the font color.


EdgeFilterSize

Specifies the width of the edge filter the function uses to identify curves in the image.

Elements

Name | Value | Description
IMAQ_FINE | 0 | Specifies that the function uses a fine (narrow) edge filter.
IMAQ_NORMAL | 1 | Specifies that the function uses a normal edge filter.
IMAQ_EDGE_FILTER_SIZE_SIZE_GUARD | 0xFFFFFFFF | Reserved


EdgeInfo

Provides information about an edge.

Elements

Name | Type | Description
position | PointFloat | The location of the edge in the image.
distance | double | The location of the edge from the first point along the boundary of the input ROI.
calibratedPosition | PointFloat | The position of the edge in the image in real-world coordinates.
calibratedDistance | double | The location of the edge from the first point along the boundary of the input ROI in real-world coordinates.
magnitude | double | The intensity contrast at the edge. This strength can be used as the noise level for the detected edge.
noisePeak | double | The strength of the noise associated with the current edge.
rising | int | Indicates the polarity of the edge. If TRUE, the edge is a rising.


EdgeLocationReport

Describes the location of the edges located by a search line.

Elements

Name | Type | Description
edges | PointFloat* | The coordinate location of all edges detected by the search line.
numEdges | int | The number of points in the edges array.


EdgeOptions

Describes how you want the function to find edges.

Elements

Name | Type | Description
threshold | unsigned | Specifies the threshold value for the contrast of the edge. The function identifies only edges with a contrast greater than this value in the detection process.
width | unsigned | The number of pixels that the function averages to find the contrast at either side of the edge.
steepness | unsigned | The span, in pixels, of the slope of the edge projected along the path specified by the input points.
subpixelType | InterpolationMethod | The method for interpolating. Valid options include IMAQ_QUADRATIC and IMAQ_CUBIC_SPLINE.
subpixelDivisions | unsigned | The number of samples the function obtains from a pixel. For example, set subpixelDivisions to 4 to split each pixel into four subpixels. The maximum number of subpixel divisions is 12.


EdgeOptions2

Describes how you want the function to find edges.

Elements

Name | Type | Description
polarity | EdgePolaritySearchMode | Specifies the polarity of the edges to be found.
kernelSize | int | Specifies the size of the edge detection kernel.
width | int | Specifies the number of pixels averaged perpendicular to the search direction to compute the edge profile strength at each point along the search ROI.
minThreshold | float | Specifies the minimum edge strength (gradient magnitude) required for a detected edge.
interpolationType | InterpolationMethod | Specifies the interpolation method used to locate the edge position.
columnProcessingMode | ColumnProcessingMode | Specifies the method used to find the straight edge.


EdgePolaritySearchMode

Determines the polarity of edges to search for.

Elements

Name | Value | Description
IMAQ_SEARCH_FOR_ALL_EDGES | 0 | Searches for all edges.
IMAQ_SEARCH_FOR_RISING_EDGES | 1 | Searches for rising edges only.
IMAQ_SEARCH_FOR_FALLING_EDGES | 2 | Searches for falling edges only.
IMAQ_EDGE_POLARITY_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


EdgeProcess

Defines the edges for which the function looks.

Elements

Name | Value | Description
IMAQ_FIRST | 0 | The function looks for the first edge.
IMAQ_FIRST_AND_LAST | 1 | The function looks for the first and last edge.
IMAQ_ALL | 2 | The function looks for all edges.
IMAQ_BEST | 3 | The function looks for the best edge.
IMAQ_EDGE_PROCESS_SIZE_GUARD | 0xFFFFFFFF | Reserved


EdgeReport

Information about an edge.

Elements

Name | Type | Description
location | float | The location of the edge from the first point in the points array. This is a subpixel interpolated distance.
contrast | float | The contrast at the edge.
polarity | PolarityType | The polarity of the edge.
reserved | float | This element is reserved.
coordinate | PointFloat | The coordinates of the edge.


EdgeReport2

Information about the edges detected.

Elements

Name | Type | Description
edges | EdgeInfo* | An array of edges detected. The number of edges detected is determined by the numEdges member.
numEdges | unsigned int | Indicates the number of edges detected
gradientInfo | double* | An array that contains the calculated edge strengths along the user-defined search area
numGradientInfo | unsigned int | Indicates the number of elements contained in gradientInfo.
calibrationValid | int | Indicates if the calibration data corresponding to the location of the edges is correct.


EllipseDescriptor

Describes the ellipses the function searches for.

Elements

Name | Type | Description
minMajorRadius | double | Specifies the minimum length of the semi-major axis of an ellipse the function will return.
maxMajorRadius | double | Specifies the maximum length of the semi-major axis of an ellipse the function will return.
minMinorRadius | double | Specifies the minimum length of the semi-minor axis of an ellipse the function will return.
maxMinorRadius | double | Specifies the maximum length of the semi-minor axis of an ellipse the function will return.


EllipseFeature

An ellipse feature.

Elements

Name | Type | Description
position | PointFloat | The location of the center of the ellipse.
rotation | double | The orientation of the semi-major axis of the ellipse with respect to the horizontal.
minorRadius | double | The length of the semi-minor axis of the ellipse.
majorRadius | double | The length of the semi-major axis of the ellipse.


EllipseMatch

Information describing a matched ellipse.

Elements

Name | Type | Description
position | PointFloat | The location of the center of the matched ellipse.
rotation | double | The orientation of the matched ellipse.
majorRadius | double | The length of the semi-major axis of the matched ellipse.
minorRadius | double | The length of the semi-minor axis of the matched ellipse.
score | double | The score of the matched ellipse.


ExtractionMode

Specifies the method the function uses to identify the locations of the curves in the image.

Elements

Name | Value | Description
IMAQ_NORMAL_IMAGE | 0 | Specifies that the function makes no assumptions about the uniformity of objects in the image or the image background.
IMAQ_UNIFORM_REGIONS | 1 | Specifies that the function assumes that either the objects in the image or the image background consists of uniform pixel values. This allows the function to more accurately calculate the external curves of the objects.
IMAQ_EXTRACTION_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ExtremeReport

Information describing an extreme, either a peak or a valley.

Elements

Name | Type | Description
location | double | The locations of the extreme. The location is an index based on the input pixel array, but may occur between actual index values.
amplitude | double | The amplitude of the extreme.
secondDerivative | double | The second derivative of the extreme.


FeatureData

A structure describing a generic geometric matching feature.

Elements

Name | Type | Description
type | FeatureType | An enumeration representing the type of the feature.
contourPoints | PointFloat* | A set of points describing the contour of the feature.
numContourPoints | int | The number of points in the contourPoints array.
feature | GeometricFeature | The feature data specific to this type of feature.


FeatureType

Indicates the type of feature to follow.

Elements

Name | Value | Description
IMAQ_NOT_FOUND_FEATURE | 0 | Specifies the feature is not found.
IMAQ_CIRCLE_FEATURE | 1 | Specifies the feature is a circle.
IMAQ_ELLIPSE_FEATURE | 2 | Specifies the feature is an ellipse.
IMAQ_CONST_CURVE_FEATURE | 3 | Specifies the features is a constant curve.
IMAQ_RECTANGLE_FEATURE | 4 | Specifies the feature is a rectangle.
IMAQ_LEG_FEATURE | 5 | Specifies the feature is a leg.
IMAQ_CORNER_FEATURE | 6 | Specifies the feature is a corner.
IMAQ_PARALLEL_LINE_PAIR_FEATURE | 7 | Specifies the feature is a parallel line pair.
IMAQ_PAIR_OF_PARALLEL_LINE_PAIRS_FEATURE | 8 | Specifies the feature is a pair of parallel line pairs.
IMAQ_LINE_FEATURE | 9 | Specifies the feature is a line.
IMAQ_CLOSED_CURVE_FEATURE | 10 | Specifies the feature is a closed curve.


FindEdgeOptions

Describes how you want the function to search for edges and the information the function overlays to the image.

Elements

Name | Type | Description
threshold | int | Specifies the threshold for the contrast of an edge. During the detection process, the function identifies only edges with a contrast greater than this value. Contrast is defined as the difference between the average pixel intensity before an edge and the average pixel intensity after an edge.
width | int | The number of pixels that the function averages to find the contrast at either side of the edge.
steepness | int | The span, in pixels, of the slope of the edge projected along the path specified by the input points.
subsamplingRatio | double | The number of pixels that separates two consecutive search lines.
showSearchArea | int | If TRUE, the function overlays the search area on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showSearchLines | int | If TRUE, the function overlays the search lines used to locate the edges on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showEdgesFound | int | If TRUE, the function overlays the locations of the edges found on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showResult | int | If TRUE, the function overlays the hit lines to the object and the edge used to generate the hit line on the result image. When applicable, the function also overlays the location of any measurements made by the function. If you do not want this information overlaid onto the image, set this element to FALSE.


FindPatternOptions

An array of angle ranges, in degrees, where each range specifies how much you expect the pattern to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the template image. Set this element to NULL to allow all angles.

Elements

Name | Type | Description
mode | MatchingMode | Specifies the method to use when looking for the pattern in the image.
numMatchesRequested | int | Number of valid matches expected.
minMatchScore | int | The minimum score a match can have in order for the function to consider the match valid.
subpixelAccuracy | int | Set this parameter to TRUE to return areas in the image that match the pattern area with subpixel accuracy.
angleRanges | RotationAngleRange* | An array of angle ranges, in degrees, where each range specifies how much you expect the pattern to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the template image. Set this element to NULL to allow all angles.
numRanges | int | Number of angle ranges in the angleRanges array.
showSearchArea | int | If TRUE, the function overlays the search area on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showResult | int | If TRUE, the function overlays the centers and bounding boxes of the patterns it locates on the result image. If you do not want this information overlaid onto the image, set this element to FALSE.


FindTransformMode

Specifies how a function updates a coordinate transform.

Elements

Name | Value | Description
IMAQ_FIND_REFERENCE | 0 | The location and orientation of the object set both the reference system and the measurement system of the coordinate transform. Use this mode when setting up a coordinate transform for the first time.
IMAQ_UPDATE_TRANSFORM | 1 | The location and orientation of the object set the new measurement system of the coordinate transform. The reference system of the coordinate transform remains unchanged. Use this mode with each new image to be inspected to update the location and the orientation of the object defining the measurement system.
IMAQ_FIND_TRANSFORM_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


FindTransformPatternOptions

An array of angle ranges, in degrees, where each range specifies how much you expect the pattern to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the template image. Set this element to NULL to allow all angles.

Elements

Name | Type | Description
matchMode | MatchingMode | Specifies the technique to use when looking for the template pattern in the image.
minMatchScore | int | The minimum score a match can have for the function to consider the match valid.
subpixelAccuracy | int | Set this element to TRUE to return areas in the image that match the pattern with subpixel accuracy.
angleRanges | RotationAngleRange* | An array of angle ranges, in degrees, where each range specifies how much you expect the pattern to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the template image. Set this element to NULL to allow all angles.
numRanges | int | Number of angle ranges in the angleRanges array.
showSearchArea | int | If TRUE, the function overlays the search area on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showFeatureFound | int | If TRUE, the function overlays the locations of the center of the pattern and the bounding box of the pattern on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showResult | int | If TRUE, the function overlays the position and orientation of the coordinate system on the result image. If you do not want this information overlaid onto the image, set this element to FALSE.


FindTransformRectOptions

Defines the parameters of the algorithm the function uses to locate the object and the information the function overlays to the image.

Elements

Name | Type | Description
threshold | int | Specifies the threshold for the contrast of the edge. The function identifies only edges with a contrast greater than this value in the detection process. Contrast is defined as the difference between the average pixel intensity before the edge and the average pixel intensity after the edge.
width | int | Specifies the number of pixels that are averaged to find the contrast at either side of the edge.
steepness | int | Specifies the slope of the edge. This value represents the number of pixels that correspond to the transition area of the edge.
subsamplingRatio | int | Specifies the number of pixels that separates two consecutive search lines of the rake.
mainAxisDirection | RakeDirection | Specifies the order and direction in which the function searches the edge along the main axis. This direction must be perpendicular to secondaryAxisDirection.
secondaryAxisDirection | RakeDirection | Specifies the order and direction in which the function searches the edge along the secondary axis. This direction must be perpendicular to mainAxisDirection.
showSearchArea | int | If TRUE, the function overlays the search area on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showSearchLines | int | If TRUE, the function overlays the search lines used to locate the edges on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showEdgesFound | int | If TRUE, the function overlays the locations of the edges found on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showResult | int | If TRUE, the function overlays the hit lines to the object on the result image. If you do not want this information overlaid onto the image, set this element to FALSE.


FindTransformRectsOptions

Defines the parameters of the algorithm the function uses to locate the object and the information the function overlays to the image.

Elements

Name | Type | Description
primaryThreshold | int | Specifies the threshold for the contrast of the edge in the primary rectangle. The function identifies only edges with a contrast greater than this value in the detection process. Contrast is defined as the difference between the average pixel intensity before the edge and the average pixel intensity after the edge.
primaryWidth | int | Specifies the number of pixels that are averaged to find the contrast at either side of the edge in the primary rectangle.
primarySteepness | int | Specifies the slope of the edge in the primary rectangle. This value represents the number of pixels that correspond to the transition area of the edge.
primarySubsamplingRatio | int | Specifies the number of pixels that separate two consecutive search lines of the rake in the primary rectangle.
secondaryThreshold | int | Specifies the threshold for the contrast of the edge in the secondary rectangle. The function identifies only edges with a contrast greater than this value in the detection process. Contrast is defined as the difference between the average pixel intensity before the edge and the average pixel intensity after the edge.
secondaryWidth | int | Specifies the number of pixels that are averaged to find the contrast at either side of the edge in the secondary rectangle.
secondarySteepness | int | Specifies the slope of the edge in the secondary rectangle. This value represents the number of pixels that correspond to the transition area of the edge.
secondarySubsamplingRatio | int | Specifies the number of pixels that separate two consecutive search lines of the rake in the secondary rectangle.
mainAxisDirection | RakeDirection | Specifies the order and direction in which the function searches the edge along the main axis. This direction must be perpendicular to secondaryAxisDirection.
secondaryAxisDirection | RakeDirection | Specifies the order and direction in which the function searches the edge along the secondary axis. This direction must be perpendicular to mainAxisDirection.
showSearchArea | int | If TRUE, the function overlays the search area on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showSearchLines | int | If TRUE, the function overlays the search lines used to locate the edges on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showEdgesFound | int | If TRUE, the function overlays the locations of the edges found on the image. If you do not want this information overlaid onto the image, set this element to FALSE.
showResult | int | If TRUE, the function overlays the hit lines to the object on the result image. If you do not want this information overlaid onto the image, set this element to FALSE.


FitCircleOptions

Describes how to calculate the best fit circle.

Elements

Name | Type | Description
rejectOutliers | int | Whether to use every given point or only a subset of the points to fit the circle. If this value is TRUE, the algorithm determines the best subset of points to use and ignores the outliers (the points outside the subset). If this value is FALSE, the algorithm uses every given point.
minScore | double | Specifies the required quality of the fitted circle. Acceptable values range from 0 to 1,000. A score of 1,000 indicates a perfect fit.
pixelRadius | double | The acceptable distance, in pixels, that a point determined to belong to the circle can be from the circumference of the circle.
maxIterations | int | Specifies the number of refinement iterations you allow the function to perform on the initial subset of points. You must allow at least one iteration.


FitEllipseOptions

Describes how to calculate the best fit ellipse.

Elements

Name | Type | Description
rejectOutliers | int | Whether to use every given point or only a subset of the points to fit the ellipse. If this value is TRUE, the algorithm determines the best subset of points to use and ignores the outliers (the points outside the subset). If this value is FALSE, the algorithm uses every given point.
minScore | double | Specifies the required quality of the fitted ellipse. Acceptable values range from 0 to 1,000. A score of 1,000 indicates a perfect fit.
pixelRadius | double | The acceptable distance, in pixels, that a point determined to belong to the ellipse can be from the circumference of the ellipse.
maxIterations | int | Specifies the number of refinement iterations you allow the function to perform on the initial subset of points. You must allow at least one iteration.


FitLineOptions

Describes how to calculate the best fit line.

Elements

Name | Type | Description
minScore | float | Specifies the required quality of the fitted line. Acceptable values range from 0 to 1,000. A score of 1,000 indicates a perfect fit.
pixelRadius | float | Specifies the neighborhood pixel relationship for the initial subset of points being used. During refinement iterations the function ignores points that are farther from the line than pixelRadius.
numRefinements | int | Specifies the number of refinement iterations you allow the function to perform on the initial subset of points. You must allow at least one iteration.


FlattenType

Indicates what parts of the image to flatten.

Elements

Name | Value | Description
IMAQ_FLATTEN_IMAGE | 0 | Flattens just the image data.
IMAQ_FLATTEN_IMAGE_AND_VISION_INFO | 1 | Flattens the image data and any Vision information associated with the image.
IMAQ_FLATTEN_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


FlipAxis

The axis over which to flip an image.

Elements

Name | Value | Description
IMAQ_HORIZONTAL_AXIS | 0 | Flips the image over the central horizontal axis.
IMAQ_VERTICAL_AXIS | 1 | Flips the image over the central vertical axis.
IMAQ_CENTER_AXIS | 2 | Flips the image over both the central vertical and horizontal axes.
IMAQ_DIAG_L_TO_R_AXIS | 3 | Flips the image over an axis from the upper left corner to lower right corner.
IMAQ_DIAG_R_TO_L_AXIS | 4 | Flips the image over an axis from the upper right corner to lower left corner.
IMAQ_FLIP_AXIS_SIZE_GUARD | 0xFFFFFFFF | Reserved


FontColor

Sets the color of the font.

Elements

Name | Value | Description
IMAQ_WHITE | 0 | Draws text in white.
IMAQ_BLACK | 1 | Draws text in black.
IMAQ_INVERT | 2 | Inverts the text pixels.
IMAQ_BLACK_ON_WHITE | 3 | Draws text in black with a white background.
IMAQ_WHITE_ON_BLACK | 4 | Draws text in white with a black background.
IMAQ_FONT_COLOR_SIZE_GUARD | 0xFFFFFFFF | Reserved


GeometricFeature

A union of pointers to geometric feature types.

Elements

Name | Type | Description
circle | CircleFeature* | A pointer to a CircleFeature.
ellipse | EllipseFeature* | A pointer to an EllipseFeature.
constCurve | ConstCurveFeature* | A pointer to a ConstCurveFeature.
rectangle | RectangleFeature* | A pointer to a RectangleFeature.
leg | LegFeature* | A pointer to a LegFeature.
corner | CornerFeature* | A pointer to a CornerFeature.
parallelLinePair | ParallelLinePairFeature* | A pointer to a ParallelLinePairFeature.
pairOfParallelLinePairs | PairOfParallelLinePairsFeature* | A pointer to a PairOfParallelLinePairsFeature.
line | LineFeature* | A pointer to a LineFeature.
closedCurve | ClosedCurveFeature* | A pointer to a ClosedCurveFeature.


GeometricMatchingMode

Specifies the method imaqMatchGeometricPattern2() uses when looking for the pattern in the image.

Elements

Name | Value | Description
IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANT | 0 | Searches for occurrences of the pattern in the image, assuming that the pattern is not rotated more than plus or minus 5 degrees.
IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT | 1 | Searches for occurrences of the pattern in the image with reduced restriction on the rotation of the pattern.
IMAQ_GEOMETRIC_MATCH_SCALE_INVARIANT | 2 | Searches for occurrences of the pattern in the image with reduced restriction on the size of the pattern.
IMAQ_GEOMETRIC_MATCH_OCCLUSION_INVARIANT | 4 | Searches for occurrences of the pattern in the image, allowing for a specified percentage of the pattern to be occluded.
IMAQ_GEOMETRIC_MATCHING_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


GeometricPatternMatch

Information describing a matched geometric pattern.

Elements

Name | Type | Description
position | PointFloat | The location of the origin of the template in the match.
rotation | float | The rotation of the match relative to the template image, in degrees.
scale | float | The size of the match relative to the size of the template image, expressed as a percentage.
score | float | The accuracy of the match. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match.
corner[4] | PointFloat | An array of four points describing the rectangle surrounding the template image.
inverse | int | This element is TRUE if the match is an inverse of the template image. For example, the match is a white object on a black background but the template image is a black object on a white background. This element is FALSE if the match and the template image have the same contrast with the image background.
occlusion | float | The percentage of the match that is occluded.
templateMatchCurveScore | float | The accuracy of the match obtained by comparing the template curves to the curves in the match region. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match.
matchTemplateCurveScore | float | The accuracy of the match obtained by comparing the curves in the match region to the template curves. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match. This element is calculated only if the matchTemplateCurveScore element of the advancedMatchOptions parameter to imaqMatchGeometricPattern() is TRUE.
correlationScore | float | The accuracy of the match obtained by comparing the template image to the match region using a correlation metric that compares the two regions as a function of their pixel values. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match. This element is calculated only if the correlationScore element of the advancedMatchOptions parameter to imaqMatchGeometricPattern() is TRUE.


GeometricPatternMatch2

Information describing a matched geometric pattern.

Elements

Name | Type | Description
position | PointFloat | The location of the origin of the template in the match.
rotation | float | The rotation of the match relative to the template image, in degrees.
scale | float | The size of the match relative to the size of the template image, expressed as a percentage.
score | float | The accuracy of the match. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match.
corner[4] | PointFloat | An array of four points describing the rectangle surrounding the template image.
inverse | int | This element is TRUE if the match is an inverse of the template image. For example, the match is a white object on a black background but the template image is a black object on a white background. This element is FALSE if the match and the template image have the same contrast with the image background.
occlusion | float | The percentage of the match that is occluded.
templateMatchCurveScore | float | The accuracy of the match obtained by comparing the template curves to the curves in the match region. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match.
matchTemplateCurveScore | float | The accuracy of the match obtained by comparing the curves in the match region to the template curves. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match. This element is calculated only if the matchTemplateCurveScore element of the advancedMatchOptions parameter to imaqMatchGeometricPattern2() is TRUE.
correlationScore | float | The accuracy of the match obtained by comparing the template image to the match region using a correlation metric that compares the two regions as a function of their pixel values. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match. This element is calculated only if the correlationScore element of the advancedMatchOptions parameter to imaqMatchGeometricPattern2() is TRUE.
label | String255 | The label corresponding to this match when the match is returned by imaqMatchMultipleGeometricPatterns(). label is an empty string when the match is returned by imaqMatchGeometricPattern2().
featureData | FeatureData* | The features used in this match.
numFeatureData | int | The size of the featureData array.
calibratedPosition | PointFloat | The location of the origin of the template in the match. If the image where the match is found is a calibrated image, then this value is in real-world units. Otherwise, this value is the same as position.
calibratedRotation | float | The rotation of the match relative to the template image, in degrees. If the image where the match is found is a calibrated image, then this value is in real-world units. Otherwise, this value is the same as rotation.
calibratedCorner[4] | PointFloat | An array of four points describing the rectangle surrounding the template image. If the image where the match is found is a calibrated image, then this value describes the calibrated rectangle. Otherwise, this value is the same as corner[4].


GridDescriptor

Contains scaling constants for an image.

Elements

Name | Type | Description
xStep | float | The distance in the x direction between two adjacent pixels in units specified by unit.
yStep | float | The distance in the y direction between two adjacent pixels in units specified by unit.
unit | CalibrationUnit | The unit of measure for the image.


HistogramReport

A report describing a pixel value classification.

Elements

Name | Type | Description
histogram | int* | An array describing the number of pixels that fell into each class.
histogramCount | int | The number of elements in the histogram array. The number of elements equals the value you provided in numClasses.
min | float | The smallest pixel value that the function classified.
max | float | The largest pixel value that the function classified.
start | float | The smallest pixel value that fell into the first class.
width | float | The size of each class.
mean | float | The mean value of the pixels that the function classified.
stdDev | float | The standard deviation of the pixels that the function classified.
numPixels | int | The number of pixels that the function classified. The mask and the given min and max influence this element.


HSIValue

The information needed to describe a color in the HSI (Hue, Saturation, and Intensity) color space.

Elements

Name | Type | Description
I | unsigned char | The color intensity.
S | unsigned char | The color saturation.
H | unsigned char | The color hue.
alpha | unsigned char | The alpha value of the color, which represents extra information about a color image, such as gamma correction.


HSLValue

The information needed to describe a color in the HSL (Hue, Saturation, and Luminance) color space.

Elements

Name | Type | Description
L | unsigned char | The color luminance.
S | unsigned char | The color saturation.
H | unsigned char | The color hue.
alpha | unsigned char | The alpha value of the color, which represents extra information about a color image, such as gamma correction.


HSVValue

The information needed to describe a color in the HSV (Hue, Saturation, and Value) color space.

Elements

Name | Type | Description
V | unsigned char | The color value.
S | unsigned char | The color saturation.
H | unsigned char | The color hue.
alpha | unsigned char | The alpha value of the color, which represents extra information about a color image, such as gamma correction.


ImageFeatureMode

Specifies which features from the color pattern the function uses.

Elements

Name | Value | Description
IMAQ_COLOR_AND_SHAPE_FEATURES | 0 | Instructs the function to use the color and the shape features of the color pattern.
IMAQ_COLOR_FEATURES | 1 | Instructs the function to use the color features of the color pattern.
IMAQ_SHAPE_FEATURES | 2 | Instructs the function to use the shape features of the color pattern.
IMAQ_FEATURE_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ImageInfo

Information about an image.

Elements

Name | Type | Description
imageUnit | CalibrationUnit | If you set calibration information with imaqSetSimpleCalibrationInfo(), imageUnit is the calibration unit.
stepX | float | If you set calibration information with imaqSetCalibrationInfo(), stepX is the distance in the calibration unit between two pixels in the x direction.
stepY | float | If you set calibration information with imaqSetCalibrationInfo(), stepY is the distance in the calibration unit between two pixels in the y direction.
imageType | ImageType | The type of the image.
xRes | int | The number of columns in the image.
yRes | int | The number of rows in the image.
xOffset | int | If you set mask offset information with imaqSetMaskOffset(), xOffset is the offset of the mask origin in the x direction.
yOffset | int | If you set mask offset information with imaqSetMaskOffset(), yOffset is the offset of the mask origin in the y direction.
border | int | The number of border pixels around the image.
pixelsPerLine | int | The number of pixels stored for each line of the image. This value may be larger than xRes.
reserved0 | void* | This element is reserved.
reserved1 | void* | This element is reserved.
imageStart | void* | A pointer to pixel (0,0).


ImageType

Defines the type of an image.

Elements

Name | Value | Description
IMAQ_IMAGE_U8 | 0 | The image type is 8-bit unsigned integer grayscale.
IMAQ_IMAGE_I16 | 1 | The image type is 16-bit signed integer grayscale.
IMAQ_IMAGE_SGL | 2 | The image type is 32-bit floating-point grayscale.
IMAQ_IMAGE_COMPLEX | 3 | The image type is complex.
IMAQ_IMAGE_RGB | 4 | The image type is RGB color.
IMAQ_IMAGE_HSL | 5 | The image type is HSL color.
IMAQ_IMAGE_RGB_U64 | 6 | The image type is 64-bit unsigned RGB color.
IMAQ_IMAGE_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


imaqAddRotatedRectContour

Usage

ContourID imaqAddRotatedRectContour(ROI* roi, RotatedRect rect);

Purpose

This function creates a new region of interest (ROI) contour that represents a rotated rectangle and adds it to the provided ROI.

Note This function is obsolete. You should use imaqAddRotatedRectContour2() instead, which corrects a numerical error that exists in this version of the function.

Parameters

Name | Type | Description
roi | ROI* | The ROI to contain the new contour.
rect | RotatedRect | The coordinate location information for the rotated rectangle.

Return Value

Type | Description
ContourID | On success, this function returns a ContourID for the contour. You can use the ContourID to reference the contour within the containing ROI. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqAutoThreshold

Usage

ThresholdData* imaqAutoThreshold(Image* dest, Image* source, int numClasses, ThresholdMethod method);

Purpose

Automatically thresholds an image into multiple classes.

Note This function is obsolete. You should use imaqAutoThreshold2() instead, which incorporates the functionality of imaqAutoThreshold() but has a mask parameter that enables you to control which pixels the function thresholds.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image to threshold.
numClasses | int | The number of classes into which to threshold the image. Valid values range from 2 to 256.
method | ThresholdMethod | The method for binary thresholding. If numClasses is 2 (a binary threshold), method specifies how to calculate the classes. If numClasses is not 2, the function ignores this parameter.

Return Value

Type | Description
ThresholdData* | On success, this function returns an array of structures providing information about the threshold ranges that the function applied. The array contains a number of ThresholdData structures equal to numClasses. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().


imaqChangeColorSpace

Usage

Color imaqChangeColorSpace(const Color* sourceColor, ColorMode sourceSpace, ColorMode destSpace);

Purpose

Maps the value of a color in one color space into the value of the same color in another color space.

Note This function does not support the CIE L*a*b* or CIE XYZ color modes.
Note This function is obsolete. Use imaqChangeColorSpace2() instead.

Parameters

Name | Type | Description
sourceColor | const Color* | The color in the source space. This parameter is required and cannot be NULL.
sourceSpace | ColorMode | The source color space.
destSpace | ColorMode | The destination color space.

Return Value

Type | Description
Color | On success, this function returns the value of the color in the destination color space. On failure, this function returns black. To get extended error information, call imaqGetLastError().


imaqCircles

Usage

CircleReport* imaqCircles(Image* dest, const Image* source, float minRadius, float maxRadius, int* numCircles);

Purpose

Separates overlapping circular objects and classifies them depending on their radii. This function also draws the detected circles into the destination image.

Note This function is obsolete. The replacement function is imaqFindCircles(), which returns only circles that meet the minimum and maximum radius requirements.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | On return, an image containing circles that the function located.
source | const Image* | The image in which the function finds circles.
minRadius | float | The smallest radius (in pixels) to be detected. Circles with radii smaller than this value do not appear in the destination image. These circles are in the returned report array, but the function reports their radii as negative.
maxRadius | float | The largest radius (in pixels) to be detected. Circles with radii larger than this value do not appear in the destination image. These circles are in the returned report array, but the function reports their radii as negative.
numCircles | int* | On return, the number of circles that the function detected in the image. If any circles fall outside the radius range, numCircles is greater than the number of circles that the function draws in the destination image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
CircleReport* | On success, this function returns an array of structures containing information about each of the found circles. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().


imaqColorHistogram

Usage

ColorHistogramReport* imaqColorHistogram(Image* image, int numClasses, ColorMode mode, const Image* mask);

Purpose

Calculates the histogram, or pixel distribution, of a color image.

Note This function does not support the CIE L*a*b* or CIE XYZ color modes.

Note This function is obsolete. Use imaqColorHistogram2() instead.

Image Types Supported

IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | Image* | The image whose histogram the function calculates.
numClasses | int | The number of classes into which the function separates the pixels.
mode | ColorMode | The color space in which to perform the histogram.
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function calculates the histogram using only those pixels in the image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to calculate the histogram of the entire image.

Return Value

Type | Description
ColorHistogramReport* | On success, this function returns a report describing the classification of each plane in a HistogramReport. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().When you are finished with the report, dispose of it by calling imaqDispose().


imaqConstructROI

Usage

int imaqConstructROI(const Image* image, ROI* roi, Tool initialTool, const ToolWindowOptions* tools, const ConstructROIOptions* options, int* okay);

Purpose

Displays the image in a modal window and allows the user to draw a region of interest (ROI) on it. After the user draws the ROI, the function closes the window.

Note This function is obsolete. The replacement function is imaqConstructROI2().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | Specifies the image that the user selects an ROI from.
roi | ROI* | Specifies the ROI that initially appears in the ROI constructor window. The user can then modify this ROI by adding, removing, resizing, and moving contours. The function applies the results of these modifications to the ROI.
initialTool | Tool | Specifies the initially selected tool in the ROI constructor window. This tool must be available in the ROI constructor window.
tools | const ToolWindowOptions* | Determines the availability of tools in the ROI constructor window. Set tools to NULL to display all the tools.
options | const ConstructROIOptions* | Describes how a function presents the ROI constructor window.
okay | int* | Upon return, this parameter is TRUE if the user pressed OK to end the selection of a line. Otherwise, this parameter is FALSE. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

windowNumber | IMAQ_MODAL_DIALOG
windowTitle | "ROI Constructor"
type | IMAQ_PALETTE_GRAY
palette | NULL
numColors | 0


imaqConvex

Usage

int imaqConvex(Image* dest, const Image* source);

Purpose

Computes the convex envelope for each labeled particle in the source image. If the source image contains more than one particle, you must label each particle with imaqLabel() before calling this function.

Note This function is obsolete. The replacement function is imaqConvexHull(), which allows you to specify the connectivity of your particles.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image containing the labeled particles whose convex envelopes the function calculates.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCoordinateReference

Usage

int imaqCoordinateReference(const Point* points, ReferenceMode mode, Point* origin, float* angle);

Purpose

Builds a reference for any arbitrary coordinate system with respect to the image plane. The reference of the coordinate system is specified as the position of the origin of the coordinate system and the orientation of its x-axis with respect to that of the image plane.

A CoordinateSystem accounts for the direction of the y-axis, which imaqCoordinateReference() does not account for. In addition, a CoordinateSystem uses a PointFloat to represent the origin, which allows for increased accuracy.

Note This function is obsolete. The replacement function is imaqBuildCoordinateSystem(), which uses a new structure called a CoordinateSystem.

Parameters

Name | Type | Description
points | const Point* | An array of points defining the coordinate reference. If mode is IMAQ_COORD_X_Y, the points array must have three points. If mode is IMAQ_COORD_ORIGIN_X, the points array must have two points.
mode | ReferenceMode | Specifies the method that the function uses to calculate the coordinate system.
origin | Point* | On return, the origin of the coordinate system. Set this parameter to NULL if you do not need this information.
angle | float* | On return, the angle, in degrees, of the x-axis of the coordinate system relative to the x-axis of an image. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqCreateOverlayFromMetafile

Usage

Overlay* imaqCreateOverlayFromMetafile(const void* metafile);

Purpose

Creates a window overlay from a Windows metafile or enhanced metafile. This function is obsolete. You should use imaqOverlayMetafile() instead. The new function overlays the metafile directly on to the image instead of returning an overlay.

Note This function is obsolete. The replacement function is imaqOverlayMetafile(), which overlays the metafile directly on to the image instead of returning an overlay.

Parameters

Name | Type | Description
metafile | const void* | The Windows handle to the metafile that you want to convert into an overlay. The handle may be either an HMETAFILE or HENHMETAFILE.

Return Value

Type | Description
Overlay* | On success, this function returns an overlay. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the overlay, dispose of it by calling imaqDispose().


imaqCreateOverlayFromROI

Usage

Overlay* imaqCreateOverlayFromROI(const ROI* roi);

Purpose

Creates a window overlay from a region of interest (ROI). This function is obsolete. You should use imaqOverlayROI() instead. The new function overlays the ROI directly on to the image instead of returning an overlay.

Note This function is obsolete. The replacement function is imaqOverlayROI(), which overlays the ROI directly on to the image instead of returning an overlay.

Parameters

Name | Type | Description
roi | const ROI* | The region of interest to convert into an overlay.

Return Value

Type | Description
Overlay* | On success, this function returns an overlay. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the overlay, dispose of it by calling imaqDispose().


imaqEdgeTool

Usage

EdgeReport* imaqEdgeTool(const Image* image, const Point* points, int numPoints, const EdgeOptions* options, int* numEdges);

Purpose

Finds edges along a path in an image.

Note This function is obsolete. The replacement function is imaqEdgeTool2().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which to find the edges.
points | const Point* | The path along which the function detects edges. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the points array.
options | const EdgeOptions* | Describes how you want the function to find edges. This parameter is required and cannot be NULL.
numEdges | int* | On return, the number of edges that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
EdgeReport* | On success, this function returns an array of information about each edge. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of this function by calling imaqDispose().


imaqEdgeTool2

Usage

EdgeReport* imaqEdgeTool2(const Image* image, const Point* points, int numPoints, EdgeProcess process, const EdgeOptions* options, int* numEdges);

Purpose

Finds edges along a path in an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which to find the edges.
points | const Point* | The path along which the function detects edges. This parameter is required and cannot be NULL.
numPoints | int | The number of points in the points array.
process | EdgeProcess | Defines the edges for which the function looks.
options | const EdgeOptions* | Describes how you want the function to find edges. This parameter is required and cannot be NULL.
numEdges | int* | On return, the number of edges that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
EdgeReport* | On success, this function returns an array of information about each edge. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of this function by calling imaqDispose().


imaqFitCircle

Usage

int imaqFitCircle(const PointFloat* points, int numPoints, BestCircle* circle);

Purpose

Finds the circle that best represents the set of points.

Note This function is obsolete. The replacement function is imaqFitCircle2().

Parameters

Name | Type | Description
points | const PointFloat* | The array of points to fit to the edge of the circle.
numPoints | int | The number of points in the supplied array. You must supply at least three points.
circle | BestCircle* | On return, a structure describing the circle that best fit the points. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqFitEllipse

Usage

int imaqFitEllipse(const PointFloat* points, int numPoints, BestEllipse* ellipse);

Purpose

Finds the ellipse that best represents the set of points.

Note This function is obsolete. The replacement function is imaqFitEllipse2().

Parameters

Name | Type | Description
points | const PointFloat* | The array of points to fit to the edge of the ellipse.
numPoints | int | The number of points in the supplied array. You must supply at least six points.
ellipse | BestEllipse* | On return, a structure describing the ellipse that best fit the points. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetCalibrationInfo

Usage

int imaqGetCalibrationInfo(const Image* image, CalibrationUnit* unit, float* xDistance, float* yDistance);

Purpose

Returns the calibration information of an image. This function is obsolete. The replacement function is imaqGetCalibrationInfo2(), which incorporates the functionality of imaqGetCalibrationInfo() with the grid element of the CalibrationInfo structure.

Note This function is obsolete. The replacement function is imaqGetCalibrationInfo2(), which incorporates the functionality of imaqGetCalibrationInfo() with the grid element of the CalibrationInfo structure.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The image whose calibration information the function queries.
unit | CalibrationUnit* | On return, the unit of measure that you specified in imaqSetCalibrationInfo(). Set this parameter to NULL if you do not need the unit information.
xDistance | float* | On return, the distance between two adjacent pixels in the x-direction. This value is in the units specified in unit. Set this parameter to NULL if you do not need the x-distance information.
yDistance | float* | On return, the distance between two adjacent pixels in the y-direction. This value is in the units specified in unit. Set this parameter to NULL if you do not need the y-distance information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqGetCharInfo

Usage

CharInfo* imaqGetCharInfo(const CharSet* set, int index);

Purpose

Returns information about a particular trained character. The structure that the function returns contains a copy of the data from the character set. Modifications to the information in the structure do not affect the character set.

Note This function is obsolete. The replacement function is imaqGetCharInfo2().

Parameters

Name | Type | Description
set | const CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
index | int | The index of a trained character in the character set from which the function gets information.

Return Value

Type | Description
CharInfo* | On success, this function returns a report that contains information about the character. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you finish with the character information, call imaqDispose() to dispose of it.


imaqGetContourInfo

Usage

ContourInfo* imaqGetContourInfo(const ROI* roi, ContourID id);

Purpose

Returns information about a particular contour. The structure that the function returns contains a copy of the data from the contour. Modifications to the information in the structure do not affect the contour.

Note This function is obsolete. The replacement function is imaqGetContourInfo2(), which returns a new structure called ContourInfo2. This new structure accounts for the two new contour types—the annulus and the rotated rectangle. Using imaqGetContourInfo to get information about one of the new contour types returns misleading information.

Parameters

Name | Type | Description
roi | const ROI* | The region of interest (ROI) containing the contour from which the function gets the information.
id | ContourID | The ContourID of the contour about which the function gets information.

Return Value

Type | Description
ContourInfo* | On success, this function returns a pointer to the structure containing information about the requested contour. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this structure, dispose of the pointer by calling imaqDispose().


imaqGetParticleInfo

Usage

ParticleReport* imaqGetParticleInfo(Image* image, int connectivity8, ParticleInfoMode mode, int* reportCount);

Purpose

Calculates various measurements of particles in a binary image.

Note This function is obsolete. Use imaqCountParticles() and imaqMeasureParticle() to get information about particles in your image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The binary image containing particles on which the function gets particle information. The calculation modifies the border of the image.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.
mode | ParticleInfoMode | Controls the extent of particle information that the function returns.
reportCount | int* | On return, filled with the number of reports in the array returned by the function. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
ParticleReport* | On success, this function returns a pointer to an array of reports about the particles in the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this data, dispose of the array by calling imaqDispose().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqGetWindowZoom

Usage

int imaqGetWindowZoom(int windowNumber, int* xZoom, int* yZoom);

Purpose

Retrieves the current zoom factors for a given image window. The zoom factor indicates an increase or decrease in the magnification of an image. A positive number indicates a magnification by the amount specified. For example, a zoom factor of 3 indicates that the image is displayed at three times its actual size (3:1). A negative number indicates that the image is decreased in magnification by the specified amount. For example, a zoom factor of —5 indicates that the image is displayed at one-fifth its actual size (1:5).

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
xZoom | int* | On return, the current zoom factor in the x direction for the window.
yZoom | int* | On return, the current zoom factor in the y direction for the window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqIsVisionInfoPresent

Usage

int imaqIsVisionInfoPresent(const Image* image, VisionInfoType type, int* present);

Purpose

Retrieves whether the given image contains the requested Vision information.

Note This function is obsolete. The replacement function is imaqGetVisionInfoTypes(), which retrieves all available types in one call. The new function also reveals more detailed information.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The image that the function checks for the presence of Vision information.
type | VisionInfoType | The Vision information for which the function checks.
present | int* | On return, this parameter is TRUE if the Vision information specified by type is present in the image and FALSE if the information is not contained in the image. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLabel

Usage

int imaqLabel(Image* dest, Image* source, int connectivity8, int* particleCount);

Purpose

Labels the particles in a binary image by applying a unique value to all pixels within a particle. This value is encoded in 8 or 16 bits, depending on the image type. The function can label 255 particles in an 8-bit image and 65,535 particles in a 16-bit image.

Note This function is obsolete. The replacement function is imaqLabel2().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The source image. The labeling process modifies the border of the source image. The border must be at least one pixel wide if you use connectivity-4 or two pixels wide if you use connectivity-8.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.
particleCount | int* | On return, the number of particles that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqLearnPattern

Usage

int imaqLearnPattern(Image* image, LearningMode learningMode);

Purpose

The mode in which the function learns the template image.

Note This function is obsolete. The replacement function is imaqLearnPattern2().

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | Image* | The image about which the function learns pattern matching information. The function appends the pattern matching information to the image.
learningMode | LearningMode | The mode in which the function learns the template image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLinearAverages

Usage

LinearAverages* imaqLinearAverages(const Image* image, Rect rect);

Purpose

Computes the mean line profile of an image. This function is obsolete. The replacement function is imaqLinearAverages2, which allows you to select which mean line profiles the function computes.

Note This function is obsolete. The replacement function is imaqLinearAverages2().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image on which the function calculates pixel value averages.
rect | Rect | Sets the rectangular area in which the function calculates the averages. Set this parameter to IMAQ_NO_RECT to calculate the averages on the whole image.

Return Value

Type | Description
LinearAverages* | On success, this function returns a structure containing the linear averages of the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().


imaqLineGaugeTool

Usage

int imaqLineGaugeTool(const Image* image, Point start, Point end, LineGaugeMethod method, const EdgeOptions* edgeOptions, const CoordinateTransform* reference, float* distance);

Purpose

Measures the distance between selected edges of a line with high-precision subpixel accuracy. This function has the ability to work on a rotated or translated particle. If you supply coordinate transform information, the function transforms the line information you pass from the coordinate system of the particle to the coordinate system of the image.

Note This function is obsolete. The replacement function is imaqLineGaugeTool2(), which uses the CoordinateTransform2 structure to account for the direction of the y-axis in a coordinate system.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name | Type | Description
image | const Image* | The image in which the function measures the distance between edges.
start | Point | The starting point of the line.
end | Point | The ending point of the line.
method | LineGaugeMethod | The measurement method.
edgeOptions | const EdgeOptions* | Describes how you want the function to find edges. If you set method to IMAQ_POINT_TO_POINT, the function ignores edgeOptions. If you set method to anything other than IMAQ_POINT_TO_POINT, this parameter is required and cannot be NULL.
reference | const CoordinateTransform* | The transform between the coordinate system of the particle and the image. Set this parameter to NULL if you do not want to apply a transform.
distance | float* | On return, the distance between edges and/or points. This parameter is required and cannot be NULL.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqLoadPattern

Usage

int imaqLoadPattern(Image* pattern, const char* fileName);

Purpose

Loads a template image previously saved with the imaqSavePattern() function.

Note This function is obsolete. The replacement function is imaqReadVisionFile(), which can load files that contain additional vision information such as an overlay. Files saved with imaqWriteVisionFile() cannot be loaded using imaqLoadPattern.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
pattern | Image* | The template image.
fileName | const char* | The name of the image file to load.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqMatchGeometricPattern

Usage

GeometricPatternMatch* imaqMatchGeometricPattern(const Image* image, const Image* pattern, const CurveOptions* curveOptions, const MatchGeometricPatternOptions* matchOptions, const MatchGeometricPatternAdvancedOptions* advancedMatchOptions, const ROI* roi, int* numMatches);

Purpose

Searches for areas in an image that match a given geometric template image.

Note This function is obsolete. The replacement function is imaqMatchGeometricPattern2()

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image in which the function finds matches to the template image.
pattern | const Image* | The pattern to find in the image.
curveOptions | const CurveOptions* | Describes how the function identifies the curves in the image the function will use to match the template image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter. Set this parameter to NULL to use the same curve options to match the template image as you used to learn the template image.
matchOptions | const MatchGeometricPatternOptions* | Describes how to search for the template image.
advancedMatchOptions | const MatchGeometricPatternAdvancedOptions* | Specifies advanced behaviors of the function, which can be used to optimize the performance of the function or to fine-tune the matches located by the function.
roi | const ROI* | Specifies where, in image, the function searches for the template image. The first contour of roi must be a rectangle or a rotated rectangle. Set this parameter to NULL to specify that the function searches in the entire image.
numMatches | int* | On return, the number of matches to the template image that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
GeometricPatternMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

matchOptions—Set matchOptions to NULL to use the default match options, as follows:

mode | IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT
subpixelAccuracy | FALSE
angleRanges | NULL (all angles allowed)
numRanges | 0
scaleRange | {75, 125}
occlusionRange | {0, 25}
numMatchesRequested | 1
minMatchScore | 800

advancedMatchOptions—Set advancedMatchOptions to NULL to use the default advanced match options, as follows:

minFeaturesUsed | 5
maxFeaturesUsed | 5
subpixelIterations | 20
subpixelTolerance | 0
initialMatchListLength | 200
matchTemplateCurveScore | FALSE
correlationScore | TRUE
minMatchSeparationDistance | 20
minMatchSeparationAngle | 10
minMatchSeparationScale | 10
maxMatchOverlap | 80
coarseResult | FALSE


imaqMatchPattern

Usage

PatternMatch* imaqMatchPattern(const Image* image, Image* pattern, const MatchPatternOptions* options, Rect searchRect, int* numMatches);

Purpose

Searches for areas in an image that match a given template image.

Note This function is obsolete. The replacement function is imaqMatchPattern2().

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image in which the function finds matches to the template image.
pattern | Image* | The pattern image to find in the image. NI Vision must learn this template image in imaqLearnPattern() before using it in this function.
options | const MatchPatternOptions* | Describes how to search for the template image.
searchRect | Rect | Specifies a rectangle in the image in which to search for the template image. Set this parameter to IMAQ_NO_RECT to search for the template image in the entire image.
numMatches | int* | On return, the number of matches to the template image that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
PatternMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

options—,Set the options parameter to NULL to use the default options, as follows:

mode | IMAQ_MATCH_SHIFT_INVARIANT
minContrast | 10
subpixelAccuracy | FALSE
angleRanges | NULL (all angles allowed)
numRanges | 0
numMatchesRequested | 1
matchFactor | 0
minMatchScore | 800


imaqParticleFilter

Usage

int imaqParticleFilter(Image* dest, Image* source, const ParticleFilterCriteria* criteria, int criteriaCount, int rejectMatches, int connectivity8);

Purpose

Filters particles based on their morphological measurements.

Note This function is obsolete. The replacement function is imaqParticleFilter2().

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | Image* | The image on which to perform the particle filter. The calculation modifies the border of the source image. The border must be at least one pixel wide if you use connectivity-4 or two pixels wide if you use connectivity-8.
criteria | const ParticleFilterCriteria* | The array of criteria for the filter. This parameter is required and cannot be NULL.
criteriaCount | int | Specifies the number of entries in the criteria array.
rejectMatches | int | Set this parameter to TRUE to transfer only those particles that do not meet all the criteria. Set this parameter to FALSE to transfer only those particles that meet all the criteria to the destination.
connectivity8 | int | 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, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.


imaqReadDataMatrixBarcode

Usage

Barcode2DInfo* imaqReadDataMatrixBarcode(const Image* image, const ROI* roi, const DataMatrixOptions* options, unsigned int* numBarcodes);

Purpose

Reads Data Matrix barcodes from an image.

Note This function is obsolete. The replacement function is imaqReadDataMatrixBarcode2(), which uses an increase in input parameters to offer better reliability and performance, as well as the ability to prepare images for data matrix grading.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image containing the barcodes to read.
roi | const ROI* | A region of interest specifying the location of the barcodes in the image. The first contour of roi must be a rectangle, rotated rectangle, oval, annulus or closed contour. Set this parameter to NULL to use the entire image.
options | const DataMatrixOptions* | Describes how to search for the Data Matrix barcode.
numBarcodes | unsigned int* | On return, the number of barcodes that the function found. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
Barcode2DInfo* | On success, this function returns an array of structures containing information about the barcodes. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this array, dispose of it by calling imaqDispose().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

searchMode | IMAQ_SEARCH_SINGLE_CONSERVATIVE
contrast | IMAQ_ALL_BARCODE_2D_CONTRASTS
cellShape | IMAQ_SQUARE_CELLS
barcodeShape | IMAQ_SQUARE_BARCODE_2D
subtype | IMAQ_ALL_DATA_MATRIX_SUBTYPES


imaqReadText

Usage

ReadTextReport* imaqReadText(const Image* image, const CharSet* set, const ROI* roi, const ReadTextOptions* readOptions, const OCRProcessingOptions* processingOptions, const OCRSpacingOptions* spacingOptions);

Purpose

Reads the text from the image. The function identifies all objects in the image based on the attributes that you set, and then compares each object with every trained character. For each object, the function selects the character that most closely matches the object. The function uses the substitution character for any object that does not match any of the trained characters.

Note This function is obsolete. The replacement function is imaqReadText2().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | const Image* | The source image for this operation.
set | const CharSet* | The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
roi | const ROI* | The ROI that the function performs this operation on. Pass NULL to use the entire image for this operation.
readOptions | const ReadTextOptions* | The options you use to configure how the function reads text.
processingOptions | const OCRProcessingOptions* | The options you use to configure how the function processes the contents of the image before attempting to read text.
spacingOptions | const OCRSpacingOptions* | The size and spacing constraints you can apply to characters in the image.

Return Value

Type | Description
ReadTextReport* | On success, this function returns a report that contains information about the text contained in the image. On failure, the function returns NULL. To get extended error information, call imaqGetLastError(). When you finish with the character information, call imaqDispose() to dispose of it.

Parameter Discussion

readOptions—Set readOptions to NULL to use the following default reading options:

validChars | NULL
numValidChars | 0
substitutionChar | ?
readStrategy | IMAQ_READ_AGGRESSIVE
acceptanceLevel | 700
aspectRatio | 400
readResolution | IMAQ_LOW_RESOLUTION

processingOptions—Set processingOptions to NULL to use the following default processing options:

mode | IMAQ_COMPUTED_UNIFORM
lowThreshold | 0
highThreshold | 255
blockCount | 4
fastThreshold | FALSE
biModalCalculation | FALSE
darkCharacters | TRUE
removeObjectsTouchingROI | FALSE
erosionCount | 0

spacingOptions—Set spacingOptions to NULL to use the following default spacing options:

minCharSpacing | 1
minCharSize | 20
maxCharSize | 65536
maxHorizontalElementSpacing | 1
maxVerticalElementSpacing | 0
minBoundingRectWidth | 1
maxBoundingRectWidth | 65536
minBoundingRectHeight | 1
maxBoundingRectHeight | 65536
autoSplit | FALSE


imaqRotate

Usage

int imaqRotate(Image* dest, const Image* source, float angle, PixelValue fill, InterpolationMethod method);

Purpose

Rotates an image counterclockwise.

Note This function is obsolete. The replacement function is imaqRotate2().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
dest | Image* | The destination image.
source | const Image* | The image to rotate.
angle | float | The angle, in degrees, to rotate the image.
fill | PixelValue | The value the function applies to the image pixels not covered by the rotated image.
method | InterpolationMethod | The method of interpolation. The valid interpolation methods for rotation are IMAQ_ZERO_ORDER and IMAQ_BILINEAR.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSavePattern

Usage

int imaqSavePattern(const Image* pattern, const char* fileName);

Purpose

Saves a pattern image to disk in PNG format. If you alter the contents of this file, NI Vision may not be able to use the file as a pattern image.

Note If you alter the contents of this file, NI Vision may not be able to use the file as a pattern image.
Note Images saved with this function lose any additional vision information other than grayscale pattern matching information.
Note This function is obsolete. The replacement function is imaqWriteVisionFile(), which can save images that contain additional vision information such as an overlay.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
pattern | const Image* | The pattern image to save.
fileName | const char* | The name in which the function saves the template image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSelectParticles

Usage

ParticleReport* imaqSelectParticles(const Image* image, const ParticleReport* reports, int reportCount, int rejectBorder, const SelectParticleCriteria* criteria, int criteriaCount, int* selectedCount);

Purpose

Filters an array of particle reports based on criteria ranges. Call imaqGetParticleInfo() before calling imaqSelectParticle().

Note This function is obsolete. Use imaqCountParticles(), imaqParticleFilter2(), and imaqMeasureParticle() to measure particles that fit a certain criteria.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name | Type | Description
image | const Image* | The image from which imaqGetParticleInfo() generated the particle reports.
reports | const ParticleReport* | The array of reports that imaqGetParticleInfo() returned. The function makes a copy of the reports that match the criteria.
reportCount | int | The number of reports in the input reports array.
rejectBorder | int | Set this parameter to TRUE to filter out particles touching the border of the image. Set this parameter to FALSE to process all particles.
criteria | const SelectParticleCriteria* | The array of criteria for the filter. This parameter is required and cannot be NULL.
criteriaCount | int | The number of criteria in the criteria array.
selectedCount | int* | On return, the number of reports that matched the criteria. Set this parameter to NULL if you do not need this information.

Return Value

Type | Description
ParticleReport* | On success, this function returns an array of the input reports that match the filtration criteria. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of it by calling imaqDispose().


imaqSetCalibrationInfo

Usage

int imaqSetCalibrationInfo(Image* image, CalibrationUnit unit, float xDistance, float yDistance);

Purpose

Sets the physical calibration attributes of an image. This function is obsolete. The replacement function is imaqSetSimpleCalibration(), which incorporates the functionality of imaqSetCalibrationInfo() with the grid parameter.

Note This function is obsolete. The replacement function is imaqSetSimpleCalibration(), which incorporates the functionality of imaqSetCalibrationInfo() with the grid parameter.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name | Type | Description
image | Image* | The image whose calibration information the function sets.
unit | CalibrationUnit | The unit of measure that the function uses to calibrate the image.
xDistance | float | The distance in the x direction between two adjacent pixels in units specified by unit.
yDistance | float | The distance in the y direction between to adjacent pixels in units specified by unit.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqSetWindowOverlay

Usage

int imaqSetWindowOverlay(int windowNumber, const Overlay* overlay);

Purpose

Sets or removes the overlay from a window. This function is obsolete. Overlays are now applied to images, not windows. See the Overlay functions for more information.

Note This function is obsolete. Overlays are now applied to images, rather than windows. Refer to the Overlay functions topic for more information.

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
overlay | const Overlay* | The overlay. Set this parameter to NULL to remove any existing overlay from the given window.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqTransformROI

Usage

int imaqTransformROI(ROI* roi, Point originStart, float angleStart, Point originFinal, float angleFinal);

Purpose

Rotates and translates a region of interest (ROI) from one coordinate system to another coordinate system within an image.

Note This function is obsolete. The replacement function is imaqTransformROI2(). The new function uses a new structure called a CoordinateSystem. A CoordinateSystem accounts for the direction of the y-axis, for which imaqTransformROI() does not take into account. In addition, a CoordinateSystem uses a PointFloat to represent the origin, which allows for increased accuracy.

Parameters

Name | Type | Description
roi | ROI* | The ROI to transform.
originStart | Point | The origin of the starting coordinate system.
angleStart | float | The angle, in degrees, of the x-axis of the starting coordinate system relative to the x-axis of the image.
originFinal | Point | The origin of the new coordinate system.
angleFinal | float | The angle, in degrees, of the x-axis of the new coordinate system relative to the x-axis of the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqWritePNGFile

Usage

int imaqWritePNGFile(const Image* image, const char* fileName, unsigned int compressionSpeed, const RGBValue* colorTable);

Purpose

Writes an image to a PNG file. This function stores any type of CalibrationUnit in a format that NI Vision can read. This function also converts calibration information into meters, which any PNG file reader can interpret.

Note This function is obsolete. The replacement function is imaqWritePNGFile2(). The new function uses a new parameter called useBitDepth, which provides control over the method NI Vision uses to convert signed 16-bit images and unsigned 64-bit RGB images to PNG files.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB

Parameters

Name | Type | Description
image | const Image* | The image to write to a file.
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL.
compressionSpeed | unsigned int | Represents the relative speed of the compression algorithm. As this value increases, the function spends less time compressing the image. Acceptable values range from 0 to 1,000, with 750 as the default. PNG format always stores images in a lossless fashion.
colorTable | const RGBValue* | An optional color table to associate with 8-bit images. If you provide a color table, the table must have 256 elements. Set this parameter to NULL to write a grayscale palette to the image.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


imaqZoomWindow

Usage

int imaqZoomWindow(int windowNumber, int xZoom, int yZoom, Point center);

Purpose

Sets the current zoom factors for a given image window. The zoom factor indicates an increase or decrease in the magnification of an image. A positive number indicates a magnification by the amount specified. For example, a zoom factor of 3 indicates that the image is displayed at three times its actual size (3:1). A negative number indicates that the image is decreased in magnification by the specified amount. For example, a zoom factor of –5 indicates that the image is displayed at one-fifth its actual size (1:5).

Parameters

Name | Type | Description
windowNumber | int | The window number of the image window.
xZoom | int | The zoom factor for the x direction. Set xZoom to zero to maintain the current zoom factor for the x direction.
yZoom | int | The zoom factor for the y direction. Set yZoom to zero to maintain the current zoom factor for the y direction.
center | Point | The center point around which to zoom. Set this parameter to IMAQ_NO_POINT to maintain the current center point.

Return Value

Type | Description
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().


InterpolationMethod

Defines the interpolation method used by a function.

Elements

Name | Value | Description
IMAQ_ZERO_ORDER | 0 | The function uses an interpolation method that interpolates new pixel values using the nearest valid neighboring pixel.
IMAQ_BILINEAR | 1 | The function uses an interpolation method that interpolates new pixel values using a bidirectional average of the neighboring pixels.
IMAQ_QUADRATIC | 2 | The function uses an interpolation method that interpolates new pixel values using a quadratic approximating polynomial.
IMAQ_CUBIC_SPLINE | 3 | The function uses an interpolation method that interpolates new pixel values by fitting them to a cubic spline curve, where the curve is based on known pixel values from the image.
IMAQ_BILINEAR_FIXED | 4 | The function uses an interpolation method that interpolates new pixel values using a bidirectional average of the neighboring pixels. The function makes the averaging calculations using fixed-point mathematics, which increases the performance of the interpolation but reduces the accuracy.
IMAQ_INTERPOLATION_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


JPEG2000FileAdvancedOptions

Specifies advanced behaviors when writing a JPEG2000 file.

Elements

Name | Type | Description
waveletMode | WaveletTransformMode | Determines which wavelet transform to use when writing the file.
useMultiComponentTransform | int | Set this parameter to TRUE to use an additional transform on RGB images. Set this parameter to FALSE to not use an additional transform. This parameter has no effect when encoding grayscale images.
maxWaveletTransformLevel | unsigned int | Specifies the maximum allowed level of wavelet transform. Increasing this value will result in a more accurate image, but will increase the time to write the image. Valid values for this element range from 0 to 255.
quantizationStepSize | float | Specifies the absolute base quantization step size for derived quantization mode. This element has no effect when waveletMode is IMAQ_WAVELET_TRANSFORM_INTEGER.


KernelFamily

The family of the kernel matrix. For more information about kernels, refer to Chapter 5, Image Processing, of the NI Vision Concepts Manual.

Elements

Name | Value | Description
IMAQ_GRADIENT_FAMILY | 0 | The kernel is in the gradient family. Gradient kernels highlight the variations of light intensity along a specific direction, which has the effect of outlining edges and revealing texture.
IMAQ_LAPLACIAN_FAMILY | 1 | The kernel is in the Laplacian family. Laplacian kernels highlight the variation of the light intensity surrounding a pixel.
IMAQ_SMOOTHING_FAMILY | 2 | The kernel is in the smoothing family. Smoothing kernels attenuate the variations of light intensity in the neighborhood of a pixel.
IMAQ_GAUSSIAN_FAMILY | 3 | The kernel is in the Gaussian family. Gaussian kernels attenuate the variations of light intensity in the neighborhood of a pixel. A Gaussian kernel is similar to a smoothing filter, but its blurring effect is more subdued.
IMAQ_KERNEL_FAMILY_SIZE_GUARD | 0xFFFFFFFF | Reserved


LearnCalibrationOptions

Describes how a function learns calibration information or the calibration options the user provided when learning the calibration.

Elements

Name | Type | Description
mode | CalibrationMode | Specifies the type of algorithm you want to use to reduce distortion in your image. When using LearnCalibrationOptions as an input, set mode to either IMAQ_PERSPECTIVE or IMAQ_NONLINEAR.
method | ScalingMethod | Defines the scaling method correction functions use to correct the image.
roi | CalibrationROI | Specifies the ROI correction functions use when correcting an image.
learnMap | int | Set this element to TRUE if you want the function to calculate and store an error map during the learning process. The image error map reflects error bounds on the calibration transformation. The error map is an estimate of the positional error that you can expect when you convert a pixel coordinate into a real-world coordinate.
learnTable | int | Set this element to TRUE if you want the function to calculate and store the correction table. The correction table accelerates the process of correcting an image. It is useful if you plan to correct several images using this calibration setup.


LearnColorPatternOptions

Describes the information the algorithm learns about a color pattern.

Elements

Name | Type | Description
learnMode | LearningMode | Specifies the invariance mode the function uses when learning the pattern.
featureMode | ImageFeatureMode | Specifies the features the function uses when learning the color pattern. If you set learnMode to either IMAQ_LEARN_ALL or IMAQ_LEARN_ROTATION_INFORMATION, featureMode must either be IMAQ_COLOR_AND_SHAPE_FEATURES or IMAQ_SHAPE_FEATURES.
threshold | int | Specifies the saturation threshold the function uses to distinguish between two colors that have the same hue values. Acceptable values range from 0 to 255.
ignoreMode | ColorIgnoreMode | Specifies whether the function excludes certain colors from the color features of the template image. Any color the function excludes during the learning process will also be excluded in the match phase.
colorsToIgnore | ColorInformation* | An array of ColorInformation structures providing a set of colors to exclude from the color features of the template image. The function ignores the dominant color from each ColorInformation structure. Any color excluded during the learning process is also ignored from the pattern in the match phase. Generate each ColorInformation structure using imaqLearnColor() with the sensitivity parameter set to IMAQ_SENSITIVITY_HIGH. Set this element to NULL if you do not need to ignore any colors.
numColorsToIgnore | int | The number of ColorInformation structures in the colorsToIgnore array.


LearnGeometricPatternAdvancedOptions

Advanced options for determining the information the algorithm learns about the geometric pattern.

Elements

Name | Type | Description
minRectLength | int | Specifies the minimum length for each side of a rectangular feature. The function ignores rectangular features with a side shorter than minRectLength.
minRectAspectRatio | double | Specifies the minimum aspect ratio of a rectangular feature. The function ignores rectangular features with aspect ratios less than minRectAspectRatio.
minRadius | int | Specifies the minimum radius for a circular feature. The function ignores circular features with radii less than minRadius.
minLineLength | int | Specifies the minimum length for a linear feature. The function ignores linear features with lengths shorter than minLineLength.
minFeatureStrength | double | Specifies the minimum strength for a feature. The function ignores features with a strength less than minFeatureStrength. Valid values for this element range from 0 to 1.
maxFeaturesUsed | int | Specifies the maximum number of features the function uses when learning. Set this element to 0 to specify that the function should use all features.
maxPixelDistanceFromLine | int | Specifies the maximum number of pixels between an edge pixel and a linear feature for the function to consider that edge pixel as part of the linear feature.


LearningMode

Specifies the invariance mode the function uses when learning the pattern.

Elements

Name | Value | Description
IMAQ_LEARN_ALL | 0 | The function extracts information for shift- and rotation-invariant matching.
IMAQ_LEARN_SHIFT_INFORMATION | 1 | The function extracts information for shift-invariant matching.
IMAQ_LEARN_ROTATION_INFORMATION | 2 | The function extracts information for rotation-invariant matching.
IMAQ_LEARNING_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


LearnPatternAdvancedOptions

Describes how the algorithm learns the pattern.

Elements

Name | Type | Description
shiftOptions | LearnPatternAdvancedShiftOptions* | Use this element to control the behavior of imaqLearnPattern2() during the shift-invariant learning phase.
rotationOptions | LearnPatternAdvancedRotationOptions* | Use this element to control the behavior of imaqLearnPattern2()during the rotation-invariant learning phase.


LearnPatternAdvancedRotationOptions

Describes how the algorithm learns during rotation-invariant matching.

Elements

Name | Type | Description
searchStrategySupport | SearchStrategy | Specifies the aggressiveness of the rotation search strategy available during the matching phase. IMAQ_VERY_AGGRESSIVE is not currently supported.
initialStepSize | int | The largest number of image pixels to shift the sample across the inspection image during the initial phase of matching. The default values are 5 for the IMAQ_BALANCED search strategy and 3 for the IMAQ_CONSERVATIVE search strategy. If the step size is not an odd integer, the algorithm coerces it to the next smaller odd integer. Note that the IMAQ_AGGRESSIVE search strategy does not support the initialStepSize field.
initialSampleSize | int | Specifies the number of template pixels that you want to include in a sample for the initial phase of rotation-invariant matching. The default is 0, which allows the algorithm to compute initialSampleSize. For optimal speed, the function coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
initialSampleSizeFactor | double | Specifies the size of the sample for the initial phase of rotation-invariant matching as a percent of the template size, in pixels. The default is 0, which causes the algorithm to use initialSampleSize. If you provide values for both initialSampleSizeFactor and initialSampleSize, the algorithm uses initialSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
initialAngularAccuracy | int | Sets the angle accuracy, in degrees, to use during the initial phase of rotation-invariant matching. The default is 6 degrees. The algorithm coerces the angle to the largest integer smaller than initialAngularAccuracy that evenly divides 360. This option is not used in conjunction with the IMAQ_AGGRESSIVE search strategy.
finalSampleSize | int | Specifies the number of template pixels you want to add to initialSampleSize for the final phase of rotation-invariant matching. These additional points include edge points. The default is 0, which allows the algorithm to compute finalSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
finalSampleSizeFactor | double | Specifies the size of the sample for the final phase of rotation-invariant matching as a percent of the edge points in the template, in pixels. The default is 0, which causes the algorithm to use finalSampleSize. If you provide values for both finalSampleSizeFactor and finalSampleSize, the algorithm uses finalSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
finalAngularAccuracy | int | Sets the angle accuracy, in degrees, to use during the final phase of the rotation-invariant matching. The default is 1 degree. Use subpixel accuracy to achieve angle accuracy less than the default. This value must be no greater than the value for initialAngularAccuracy. The algorithm coerces the angle to the largest integer smaller than it that evenly divides 360. This option is not used in conjunction with the IMAQ_AGGRESSIVE search strategy.
subpixelSampleSize | int | Specifies the number of template pixels that you want to include in a sample for the subpixel phase of rotation-invariant matching. The default is 0, which allows the algorithm to compute subpixelSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
subpixelSampleSizeFactor | double | Specifies the size of the sample for the subpixel phase of rotation-invariant matching as a percent of the template size, in pixels. The default is 0, which causes the algorithm to use subpixelSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.


LearnPatternAdvancedShiftOptions

Describes how the algorithm learns during shift-invariant matching.

Elements

Name | Type | Description
initialStepSize | int | The largest number of image pixels to shift the sample across the inspection image during the initial phase of shift-invariant matching. The default is 7. The algorithm may reduce the value of initialStepSize based on initialSampleSize and the template image. If the step size is not an odd integer, the VI coerces it to the next smaller integer.
initialSampleSize | int | Specifies the number of template pixels that you want to include in a sample for the initial phase of shift-invariant matching. The default is 0, which allows the algorithm to compute initialSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
initialSampleSizeFactor | double | Specifies the size of the sample for the initial phase of shift-invariant matching as a percent of the template size, in pixels. The default is 0, which causes the algorithm to use initialSampleSize. If you provide values for both initialSampleSizeFactor and initialSampleSize, the algorithm uses initialSampleSize. For optimal speed, the algorithm coerces sizes that are less that 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
finalSampleSize | int | Specifies the number of template pixels you want to add to initialSampleSize for the final phase of shift-invariant matching. These additional points include edge points. The default is 0, which allows the algorithm to compute finalSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
finalSampleSizeFactor | double | Specifies the size of the sample for the final phase of shift-invariant matching as a percent of the edge points in the template, in pixels. The default is 0, which causes the algorithm to use finalSampleSize. If you provide values for both finalSampleSizeFactor and finalSampleSize, the algorithm uses finalSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
subpixelSampleSize | int | Specifies the number of template pixels that you want to include in a sample for the subpixel phase of shift-invariant matching. The default is 0, which allows the algorithm to compute subpixelSampleSize. For optimal speed, the algorithm coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.
subpixelSampleSizeFactor | double | Specifies the size of the sample for the subpixel phase of shift-invariant matching as a percent of the template size, in pixels. The default is 0, which causes the algorithm to use subpixelSampleSize. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.


LegFeature

A leg feature.

Elements

Name | Type | Description
position | PointFloat | The location of the leg feature. The location is the center of the segment adjoining the two parallel sides.
corner[4] | PointFloat | The four corners of the leg feature.
rotation | double | The orientation of the leg with respect to the horizontal.
width | double | The width of the leg.
height | double | The height of the leg.


LevelType

Determines how the function evaluates the threshold and hysteresis values.

Elements

Name | Value | Description
IMAQ_ABSOLUTE | 0 | The function evaluates the threshold and hysteresis values as absolute values.
IMAQ_RELATIVE | 1 | The function evaluates the threshold and hysteresis values relative to the dynamic range of the given path.
IMAQ_LEVEL_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


Line

Defines the location of a line.

Elements

Name | Type | Description
start | Point | The coordinate location of the start of the line.
end | Point | The coordinate location of the end of the line.


LinearAverages

The linear averages of an image.

Elements

Name | Type | Description
columnAverages | float* | An array containing the mean pixel value of each column.
columnCount | int | The number of elements in the columnAverages array.
rowAverages | float* | An array containing the mean pixel value of each row.
rowCount | int | The number of elements in the rowAverages array.
risingDiagAverages | float* | An array containing the mean pixel value of each diagonal running from the lower left to the upper right of the inspected area of the image.
risingDiagCount | int | The number of elements in the risingDiagAverages array.
fallingDiagAverages | float* | An array containing the mean pixel value of each diagonal running from the upper left to the lower right of the inspected area of the image.
fallingDiagCount | int | The number of elements in the fallingDiagAverages array.


LinearAveragesMode

Specifies which mean line profiles the function calculates. Use bitwise-OR to combine two or more values in order to calculate multiple mean line profiles with one function call.

Elements

Name | Value | Description
IMAQ_COLUMN_AVERAGES | 1 | Specifies that the function calculates the mean pixel value of each column.
IMAQ_ROW_AVERAGES | 2 | Specifies that the function calculates the mean pixel value of each row.
IMAQ_RISING_DIAGONAL_AVERAGES | 4 | Specifies that the function calculates the mean pixel value of each diagonal running from the lower left to the upper right of the inspected area of the image.
IMAQ_FALLING_DIAGONAL_AVERAGES | 8 | Specifies that the function calculates the mean pixel value of each diagonal running from the upper left to the lower right of the inspected area of the image.
IMAQ_ALL_LINEAR_AVERAGES | 15 | Specifies that the function calculates all four linear mean pixel values.
IMAQ_LINEAR_AVERAGES_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


LineDescriptor

Describes the lines the function searches for.

Elements

Name | Type | Description
minLength | double | Specifies the minimum length of a line the function will return.
maxLength | double | Specifies the maximum length of a line the function will return.


LineEquation

Defines the three coefficients of the equation in the normal form (ax+by+c=0) of a line.

Elements

Name | Type | Description
a | double | The a coefficient of the line equation.
b | double | The b coefficient of the line equation.
c | double | The c coefficient of the line equation.


LineFeature

A line feature.

Elements

Name | Type | Description
startPoint | PointFloat | The starting point of the line.
endPoint | PointFloat | The ending point of the line.
length | double | The length of the line measured in pixels from the start point to the end point.
rotation | double | The orientation of the line with respect to the horizontal.


LineFloat

Defines the location of a line.

Elements

Name | Type | Description
start | PointFloat | The coordinate location of the start of the line.
end | PointFloat | The coordinate location of the end of the line.


LineGaugeMethod

The measurement method for the gauge tool.

Elements

Name | Value | Description
IMAQ_EDGE_TO_EDGE | 0 | Measures from the first edge on the line to the last edge on the line.
IMAQ_EDGE_TO_POINT | 1 | Measures from the first edge on the line to the end point of the line.
IMAQ_POINT_TO_EDGE | 2 | Measures from the start point of the line to the first edge on the line.
IMAQ_POINT_TO_POINT | 3 | Measures from the start point of the line to the end point of the line.
IMAQ_LINE_GAUGE_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


LineMatch

Information describing a matched line.

Elements

Name | Type | Description
startPoint | PointFloat | The starting point of the matched line.
endPoint | PointFloat | The ending point of the matched line.
length | double | The length of the line measured in pixels from the start point to the end point.
rotation | double | The orientation of the matched line.
score | double | The score of the matched line. Scores range from 0–1000, where a score of 1000 indicates a perfect match.


LineProfile

A report containing information about a line.

Elements

Name | Type | Description
profileData | float* | An array containing the value of each pixel in the line.
boundingBox | Rect | The bounding rectangle of the line.
min | float | The smallest pixel value in the line profile.
max | float | The largest pixel value in the line profile.
mean | float | The mean value of the pixels in the line profile.
stdDev | float | The standard deviation of the line profile.
dataCount | int | The size of the profileData array.


LocalThresholdMethod

The method the function uses to perform the local threshold.

Elements

Name | Value | Description
IMAQ_NIBLACK | 0 | The function computes thresholds for each pixel based on its local statistics using the Niblack local thresholding algorithm.
IMAQ_BACKGROUND_CORRECTION | 1 | The function performs background correction first to eliminate non-uniform lighting effects, then performs thresholding using the Otsu thresholding algorithm.
IMAQ_LOCAL_THRESHOLD_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


MappingMethod

Describes the method for converting 16-bit pixels (65,536 grayscale values) to 8-bit pixels (256 grayscale values).

Elements

Name | Value | Description
IMAQ_FULL_DYNAMIC | 0 | The function maps the full dynamic range of the 16-bit image to an 8-bit scale. It displays 16-bit images by scaling the data to 8 bits, calculated as a function of the dynamic range from the image source. The function calculates the minimum value (min) and the maximum value (max) automatically. Then the function applies the following formula to each pixel: Display(x, y) = (Src(x, y) - min) × 255/(max - min)
IMAQ_DOWNSHIFT | 1 | The function shifts the 16-bit image pixels to the right the number of times specified by the shiftCount element of the DisplayMapping structure.
IMAQ_RANGE | 2 | The function maps the pixel values in the range specified by the minimumValue and maximumValue elements of the DisplayMapping structure to an 8-bit scale.
IMAQ_90_PCT_DYNAMIC | 3 | The function maps the dynamic range containing the middle 90 percent of the cumulated histogram of the image to an 8-bit (256 grayscale values) scale.
IMAQ_PERCENT_RANGE | 4 | The function maps the pixel values in the relative percentage range (0 to 100) of the cumulated histogram specified by minimumValue and maximumValue to an 8-bit scale.
IMAQ_MAPPING_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


MatchColorPatternOptions

Describes how you want the function to search for the color template image.

Elements

Name | Type | Description
matchMode | MatchingMode | Specifies the method to use when looking for the color pattern in the image.
featureMode | ImageFeatureMode | Specifies the features to use when looking for the color pattern in the image.
minContrast | int | Specifies the minimum contrast expected in the image.
subpixelAccuracy | int | Set this parameter to TRUE to return areas in the image that match the pattern area with subpixel accuracy.
angleRanges | RotationAngleRange* | An array of angle ranges, in degrees, where each range specifies how much you expect the pattern to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the template image. Set this element to NULL to allow all angles.
numRanges | int | Number of valid matches expected.
colorWeight | double | Determines the percent contribution of the color score to the final color pattern matching score. Acceptable values range from 0 to 1,000. The algorithm uses the color weight for the final match ranking. For example, if you use a weight of 1,000, the algorithm finds each match by using both color and shape information and then ranks the matches based on their color scores. If the weight is 0, the matches are ranked based on their shape scores. The default is 500, indicating that the match score uses an equal combination of the color and shape scores.
sensitivity | ColorSensitivity | Specifies the sensitivity of the color information in the image.
strategy | SearchStrategy | Specifies how the color features of the image are used during the search phase.
numMatchesRequested | int | Number of valid matches expected.
minMatchScore | float | The minimum score a match can have for the function to consider the match valid. Acceptable values range from 0 to 1,000.


MatchGeometricPatternAdvancedOptions

Specifies advanced behaviors of imaqMatchGeometricPattern(), which can be used to optimize the performance of the function or to fine-tune the matches located by the function.

Elements

Name | Type | Description
minFeaturesUsed | int | Specifies the minimum number of features the function uses when matching.
maxFeaturesUsed | int | Specifies the maximum number of features the function uses when matching. Set this element to 0 to specify that the function should use all features.
subpixelIterations | int | Specifies the maximum number of incremental improvements used to refine matches with subpixel information.
subpixelTolerance | double | Specifies the maximum amount of change, in pixels, between consecutive incremental improvements in the match position before the function stops refining the match position. Set this element to 0 to specify that the function should always use a number of refinements equal to subpixelIterations. If you provide values for both subpixelIterations and subpixelTolerance, the function refines the match for, at most, subpixelIterations but may stop early if subpixelTolerance is satisfied. If you set subpixelTolerance, the function may invalidate matches during the subpixel refinement process. However, using subpixelIterations alone cannot invalidate a match.
initialMatchListLength | int | Specifies the maximum size of the match list. The match list contains the regions in the inspection image that have the highest probability of containing a match.
matchTemplateCurveScore | int | Set this element to TRUE to specify that the function should calculate the match curve to template curve score and return it for each match result. Set this element to FALSE to specify that the function should not calculate the match curve to template curve score.
correlationScore | int | Set this element to TRUE to specify that the function should calculate the correlation score and return it for each match result. Set this parameter to FALSE to specify that the function should not calculate the correlation score.
minMatchSeparationDistance | double | Specifies the minimum separation distance, in pixels, between the origins of two matches that have unique positions. The function does not return matches that have the same position, scale, and angle. Set this value to –1 if you do not want the function to use the position of a match to determine whether the match is unique.
minMatchSeparationAngle | double | Specifies the minimum angular difference, in degrees, between two matches that have unique angles. The function does not return matches that have the same position, scale, and angle. Set this value to –1 if you do not want the function to use the angle of a match to determine whether the match is unique.
minMatchSeparationScale | double | Specifies the minimum difference in scale, expressed as a percentage, between two matches that have unique scales. The function does not return matches that have the same position, scale, and angle. Set this value to –1 if you do not want the function to use the scale of a match to determine whether the match is unique.
maxMatchOverlap | double | Specifies the maximum amount of overlap, expressed as a percentage, allowed between the bounding rectangles of two unique matches. The function does not return matches that exceed this overlap percentage. Set this value to –1 if you want the function to ignore bounding rectangle overlap.
coarseResult | int | Specifies whether you want the function to spend less time accurately estimating the location of a match. Set this value to TRUE if you want to quickly determine whether a part is present in the inspection image without an accurate estimate of its position, angle, and scale. Set this value to FALSE to specify that the function returns matches with pixel or subpixel accuracy.


MatchGeometricPatternAdvancedOptions2

Specifies advanced behaviors of imaqMatchGeometricPattern2(), which can be used to optimize the performance of the function or to fine-tune the matches located by the function.

Elements

Name | Type | Description
minFeaturesUsed | int | Specifies the minimum number of features the function uses when matching.
maxFeaturesUsed | int | Specifies the maximum number of features the function uses when matching. Set this element to 0 to specify that the function should use all features.
subpixelIterations | int | Specifies the maximum number of incremental improvements used to refine matches with subpixel information.
subpixelTolerance | double | Specifies the maximum amount of change, in pixels, between consecutive incremental improvements in the match position before the function stops refining the match position. Set this element to 0 to specify that the function should always use a number of refinements equal to subpixelIterations. If you provide values for both subpixelIterations and subpixelTolerance, the function refines the match for, at most, subpixelIterations but may stop early if subpixelTolerance is satisfied. If you set subpixelTolerance, the function may invalidate matches during the subpixel refinement process. However, using subpixelIterations alone cannot invalidate a match.
initialMatchListLength | int | Specifies the maximum size of the match list. The match list contains the regions in the inspection image that have the highest probability of containing a match.
matchTemplateCurveScore | float | The accuracy of the match obtained by comparing the curves in the match region to the template curves. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match. This element is calculated only if the matchTemplateCurveScore element of the advancedMatchOptions parameter to imaqMatchGeometricPattern() is TRUE.
correlationScore | int | Set this element to TRUE to specify that the function should calculate the correlation score and return it for each match result. Set this parameter to FALSE to specify that the function should not calculate the correlation score.
minMatchSeparationDistance | double | Specifies the minimum separation distance, in pixels, between the origins of two matches that have unique positions. The function does not return matches that have the same position, scale, and angle. Set this value to –1 if you do not want the function to use the position of a match to determine whether the match is unique.
minMatchSeparationAngle | double | Specifies the minimum angular difference, in degrees, between two matches that have unique angles. The function does not return matches that have the same position, scale, and angle. Set this value to –1 if you do not want the function to use the angle of a match to determine whether the match is unique.
minMatchSeparationScale | double | Specifies the minimum difference in scale, expressed as a percentage, between two matches that have unique scales. The function does not return matches that have the same position, scale, and angle. Set this value to –1 if you do not want the function to use the scale of a match to determine whether the match is unique.
maxMatchOverlap | double | Specifies the maximum amount of overlap, expressed as a percentage, allowed between the bounding rectangles of two unique matches. The function does not return matches that exceed this overlap percentage. Set this value to –1 if you want the function to ignore bounding rectangle overlap.
coarseResult | int | Specifies whether you want the function to spend less time accurately estimating the location of a match. Set this value to TRUE if you want to quickly determine whether a part is present in the inspection image without an accurate estimate of its position, angle, and scale. Set this value to FALSE to specify that the function returns matches with pixel or subpixel accuracy.
smoothContours | int | Set this element to TRUE to specify smoothing be done on the contours of the inspection image before feature extraction.
enableCalibrationSupport | int | Set this element to TRUE to specify the algorithm treat the inspection image as a calibrated image. Use imaqSetSimpleCalibration() or imaqSetCalibrationInfo() to calibrate the inspection image.


MatchGeometricPatternOptions

Describes how to match a pattern geometrically.

Elements

Name | Type | Description
mode | unsigned int | Specifies the method imaqMatchGeometricPattern() uses when looking for the pattern in the image. Combine values from the GeometricMatchingMode enumeration to specify the value of this element.
subpixelAccuracy | int | Set this element to TRUE to specify that the function should calculate match locations with subpixel accuracy. Set this element to FALSE to specify that the function should calculate match locations with pixel accuracy.
angleRanges | RangeFloat* | An array of angle ranges, in degrees, where each range specifies how much you expect the template to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the template image. Set this element to NULL to allow all angles. This function ignores these ranges if mode does not include IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT.
numAngleRanges | int | Number of angle ranges in the angleRanges array.
scaleRange | RangeFloat | A range that specifies the sizes of the pattern you expect to be in the image, expressed as a ratio percentage representing the size of the pattern in the image divided by size of the original pattern multiplied by 100. This function ignores this range if mode does not include IMAQ_GEOMETRIC_MATCH_SCALE_INVARIANT.
occlusionRange | RangeFloat | A range that specifies the percentage of the pattern you expect to be occluded in the image. This function ignores this range if mode does not include IMAQ_GEOMETRIC_MATCH_OCCLUSION_INVARIANT.
numMatchesRequested | int | Number of valid matches expected.
minMatchScore | float | The minimum score a match can have for the function to consider the match valid. Acceptable values range from 0 to 1,000.


MatchingMode

Specifies the method to use when looking for the pattern in the image.

Elements

Name | Value | Description
IMAQ_MATCH_SHIFT_INVARIANT | 1 | Searches for occurrences of the template image anywhere in the searchRect, assuming that the pattern is not rotated more than plus or minus 4 degrees.
IMAQ_MATCH_ROTATION_INVARIANT | 2 | Searches for occurrences of the pattern in the image with no restriction on the rotation of the pattern.
IMAQ_MATCHING_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


MatchPatternAdvancedOptions

Describes how the algorithm matches the pattern.

Elements

Name | Type | Description
subpixelIterations | int | Defines the maximum number of incremental improvements used to refine matching using subpixel information. The default is 20.
subpixelTolerance | double | Defines the maximum amount of change, in pixels, between consecutive incremental improvements in the match position that you want to trigger the end of the refinement process. The default is 0, which specifies using the subpixelIterations value. If you provide values for both subpixelIterations and subpixelTolerance, the algorithm refines the match for at most subpixelIterations but may stop early if subpixelTolerance is satisfied. If you set subpixelTolerance, matches may be invalidated during the subpixel matching process. However, using subpixelIterations alone cannot invalidate a match. This behavior is particularly important when using imaqRefineMatches().
initialMatchListLength | int | Specifies the maximum size of the match list. The match list contains the regions in the inspection image that have the highest probability of containing a match.
matchListReductionFactor | int | Specifies the reduction of the match list as matches are refined. The default is 5.
initialStepSize | int | Specifies the number of pixels to shift the sample across the inspection image during the initial phase of shift-invariant matching. The default is 0, which uses the initialStepSize stored in the template. If the step size is not an odd integer, the algorithm uses the default value.
searchStrategy | SearchStrategy | Specifies the aggressiveness of the rotation search strategy. The default is IMAQ_BALANCED. This applies only to rotation-invariant matches. Note that IMAQ_VERY_AGGRESSIVE is not currently supported.
intermediateAngularAccuracy | int | Specifies the accuracy to use during the intermediate phase of rotation-invariant matching. The default is the value of finalAngularAccuracy stored in the template. The algorithm coerces this value to an integer that evenly divides 360 and lies in the range defined by initialAngularAccuracy and finalAngularAccuracy. This option only applies to rotation-invariant matching. For more information about initialAngularAccuracy and finalAngularAccuracy, refer to LearnPatternAdvancedRotationOptions.


MatchPatternOptions

Describes how you want the function to search for the template image.

Note imaqMatchPattern2() ignores the matchFactor element of MatchPatternOptions. Use the initialMatchListLength and matchListReductionFactor elements of MatchPatternAdvancedOptions to control the list of potential matches that imaqMatchPattern2 examines.

Elements

Name | Type | Description
mode | MatchingMode | Specifies the method to use when looking for the pattern in the image.
minContrast | int | Specifies the minimum contrast expected in the image.
subpixelAccuracy | int | Set this element to TRUE to return areas in the image that match the pattern area with subpixel accuracy.
angleRanges | RotationAngleRange* | An array of angle ranges, in degrees, where each range specifies how much you expect the pattern to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the template image. Set this element to NULL to allow all angles.
numRanges | int | Number of angle ranges in the angleRanges array.
numMatchesRequested | int | Number of valid matches expected.
matchFactor | int | Controls the number of potential matches that the function examines. Acceptable values range from 0 to 1,000. For most applications, set matchFactor to 0, which optimizes the speed of the algorithm. If you are not getting all of the numMatchesRequested, increasing this factor may increase the number of matches you receive but decreases the speed of the algorithm. Normally, increasing matchFactor is necessary only when looking for more than 200 matches per image.
minMatchScore | float | The minimum score a match can have for the function to consider the match valid.


MathTransformMethod

The transform function a function uses.

Elements

Name | Value | Description
IMAQ_TRANSFORM_LINEAR | 0 | The function uses linear remapping.
IMAQ_TRANSFORM_LOG | 1 | The function uses logarithmic remapping. Enhances contrast for small pixel values and reduces contrast for large pixel values.
IMAQ_TRANSFORM_EXP | 2 | The function uses exponential remapping. Enhances contrast for large pixel values and reduces contrast for small pixel values.
IMAQ_TRANSFORM_SQR | 3 | The function uses square remapping. Similar to exponential remapping but with a more gradual effect.
IMAQ_TRANSFORM_SQRT | 4 | The function uses square root remapping. Similar to logarithmic remapping but with a more gradual effect.
IMAQ_TRANSFORM_POWX | 5 | The function uses power X remapping. Causes variable effect depending on power.
IMAQ_TRANSFORM_POW1X | 6 | The function uses power 1/X remapping. Causes variable effect depending on power.
IMAQ_MATH_TRANSFORM_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


MeasurementType

Various measurements that can be taken on a particle. Refer to the NI Vision Concepts Manual for further discussion of these measurements.

Elements

Name | Value | Description
IMAQ_MT_CENTER_OF_MASS_X | 0 | X-coordinate of the point representing the average position of the total particle mass, assuming every point in the particle has a constant density.
IMAQ_MT_CENTER_OF_MASS_Y | 1 | Y-coordinate of the point representing the average position of the total particle mass, assuming every point in the particle has a constant density.
IMAQ_MT_FIRST_PIXEL_X | 2 | X-coordinate of the highest, leftmost particle pixel.
IMAQ_MT_FIRST_PIXEL_Y | 3 | Y-coordinate of the highest, leftmost particle pixel.
IMAQ_MT_BOUNDING_RECT_LEFT | 4 | X-coordinate of the leftmost particle point.
IMAQ_MT_BOUNDING_RECT_TOP | 5 | Y-coordinate of highest particle point.
IMAQ_MT_BOUNDING_RECT_RIGHT | 6 | X-coordinate of the rightmost particle point.
IMAQ_MT_BOUNDING_RECT_BOTTOM | 7 | Y-coordinate of the lowest particle point.
IMAQ_MT_MAX_FERET_DIAMETER_START_X | 8 | X-coordinate of the start of the line segment connecting the two perimeter points that are the furthest apart.
IMAQ_MT_MAX_FERET_DIAMETER_START_Y | 9 | Y-coordinate of the start of the line segment connecting the two perimeter points that are the furthest apart.
IMAQ_MT_MAX_FERET_DIAMETER_END_X | 10 | X-coordinate of the end of the line segment connecting the two perimeter points that are the furthest apart.
IMAQ_MT_MAX_FERET_DIAMETER_END_Y | 11 | Y-coordinate of the end of the line segment connecting the two perimeter points that are the furthest apart.
IMAQ_MT_MAX_HORIZ_SEGMENT_LENGTH_LEFT | 12 | X-coordinate of the leftmost pixel in the longest row of contiguous pixels in the particle.
IMAQ_MT_MAX_HORIZ_SEGMENT_LENGTH_RIGHT | 13 | X-coordinate of the rightmost pixel in the longest row of contiguous pixels in the particle.
IMAQ_MT_MAX_HORIZ_SEGMENT_LENGTH_ROW | 14 | Y-coordinate of all of the pixels in the longest row of contiguous pixels in the particle.
IMAQ_MT_BOUNDING_RECT_WIDTH | 16 | Distance between the x-coordinate of the leftmost particle point and the x-coordinate of the rightmost particle point.
IMAQ_MT_BOUNDING_RECT_HEIGHT | 17 | Distance between the y-coordinate of highest particle point and the y-coordinate of the lowest particle point.
IMAQ_MT_BOUNDING_RECT_DIAGONAL | 18 | Distance between opposite corners of the bounding rectangle.
IMAQ_MT_PERIMETER | 19 | Length of the outer boundary of the particle.
IMAQ_MT_CONVEX_HULL_PERIMETER | 20 | Perimeter of the smallest convex polygon containing all points in the particle.
IMAQ_MT_HOLES_PERIMETER | 21 | Sum of the perimeters of each hole in the particle.
IMAQ_MT_MAX_FERET_DIAMETER | 22 | Distance between the start and end of the line segment connecting the two perimeter points that are the furthest apart.
IMAQ_MT_EQUIVALENT_ELLIPSE_MAJOR_AXIS | 23 | Length of the major axis of the ellipse with the same perimeter and area as the particle.
IMAQ_MT_EQUIVALENT_ELLIPSE_MINOR_AXIS | 24 | Length of the minor axis of the ellipse with the same perimeter and area as the particle.
IMAQ_MT_EQUIVALENT_ELLIPSE_MINOR_AXIS_FERET | 25 | Length of the minor axis of the ellipse with the same area as the particle, and Major Axis equal in length to the Max Feret Diameter.
IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE | 26 | Longest side of the rectangle with the same perimeter and area as the particle.
IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE | 27 | Shortest side of the rectangle with the same perimeter and area as the particle.
IMAQ_MT_EQUIVALENT_RECT_DIAGONAL | 28 | Distance between opposite corners of the rectangle with the same perimeter and area as the particle.
IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE_FERET | 29 | Shortest side of the rectangle with the same area as the particle, and longest side equal in length to the Max Feret Diameter.
IMAQ_MT_AVERAGE_HORIZ_SEGMENT_LENGTH | 30 | Average length of a horizontal segment in the particle.
IMAQ_MT_AVERAGE_VERT_SEGMENT_LENGTH | 31 | Average length of a vertical segment in the particle.
IMAQ_MT_HYDRAULIC_RADIUS | 32 | The particle area divided by the particle perimeter.
IMAQ_MT_WADDEL_DISK_DIAMETER | 33 | Diameter of a disk with the same area as the particle.
IMAQ_MT_AREA | 35 | Area of the particle.
IMAQ_MT_HOLES_AREA | 36 | Sum of the areas of each hole in the particle.
IMAQ_MT_PARTICLE_AND_HOLES_AREA | 37 | Area of a particle that completely covers the image.
IMAQ_MT_CONVEX_HULL_AREA | 38 | Area of the smallest convex polygon containing all points in the particle.
IMAQ_MT_IMAGE_AREA | 39 | Area of the image.
IMAQ_MT_NUMBER_OF_HOLES | 41 | Number of holes in the particle.
IMAQ_MT_NUMBER_OF_HORIZ_SEGMENTS | 42 | Number of horizontal segments in the particle.
IMAQ_MT_NUMBER_OF_VERT_SEGMENTS | 43 | Number of vertical segments in the particle.
IMAQ_MT_ORIENTATION | 45 | The angle of the line that passes through the particle Center of Mass about which the particle has the lowest moment of inertia.
IMAQ_MT_MAX_FERET_DIAMETER_ORIENTATION | 46 | The angle of the line segment connecting the two perimeter points that are the furthest apart.
IMAQ_MT_AREA_BY_IMAGE_AREA | 48 | Percentage of the particle Area covering the Image Area.
IMAQ_MT_AREA_BY_PARTICLE_AND_HOLES_AREA | 49 | Percentage of the particle Area in relation to its Particle and Holes Area.
IMAQ_MT_RATIO_OF_EQUIVALENT_ELLIPSE_AXES | 50 | Equivalent Ellipse Major Axis divided by Equivalent Ellipse Minor Axis.
IMAQ_MT_RATIO_OF_EQUIVALENT_RECT_SIDES | 51 | Equivalent Rect Long Side divided by Equivalent Rect Short Side.
IMAQ_MT_ELONGATION_FACTOR | 53 | Max Feret Diameter divided by Equivalent Rect Short Side (Feret).
IMAQ_MT_COMPACTNESS_FACTOR | 54 | Area divided by the product of Bounding Rect Width and Bounding Rect Height.
IMAQ_MT_HEYWOOD_CIRCULARITY_FACTOR | 55 | Perimeter divided by the circumference of a circle with the same area.
IMAQ_MT_TYPE_FACTOR | 56 | Factor relating area to moment of inertia.
IMAQ_MT_SUM_X | 58 | The sum of all x-coordinates in the particle.
IMAQ_MT_SUM_Y | 59 | The sum of all y-coordinates in the particle.
IMAQ_MT_SUM_XX | 60 | The sum of all x-coordinates squared in the particle.
IMAQ_MT_SUM_XY | 61 | The sum of all x-coordinates times y-coordinates in the particle.
IMAQ_MT_SUM_YY | 62 | The sum of all y-coordinates squared in the particle.
IMAQ_MT_SUM_XXX | 63 | The sum of all x-coordinates cubed in the particle.
IMAQ_MT_SUM_XXY | 64 | The sum of all x-coordinates squared times y-coordinates in the particle.
IMAQ_MT_SUM_XYY | 65 | The sum of all x-coordinates times y-coordinates squared in the particle.
IMAQ_MT_SUM_YYY | 66 | The sum of all y-coordinates cubed in the particle.
IMAQ_MT_MOMENT_OF_INERTIA_XX | 68 | The moment of inertia in the x-direction twice.
IMAQ_MT_MOMENT_OF_INERTIA_XY | 69 | The moment of inertia in the x and y directions.
IMAQ_MT_MOMENT_OF_INERTIA_YY | 70 | The moment of inertia in the y-direction twice.
IMAQ_MT_MOMENT_OF_INERTIA_XXX | 71 | The moment of inertia in the x-direction three times.
IMAQ_MT_MOMENT_OF_INERTIA_XXY | 72 | The moment of inertia in the x-direction twice and the y-direction once.
IMAQ_MT_MOMENT_OF_INERTIA_XYY | 73 | The moment of inertia in the x-direction once and the y-direction twice.
IMAQ_MT_MOMENT_OF_INERTIA_YYY | 74 | The moment of inertia in the y-direction three times.
IMAQ_MT_NORM_MOMENT_OF_INERTIA_XX | 75 | The normalized moment of inertia in the x-direction twice.
IMAQ_MT_NORM_MOMENT_OF_INERTIA_XY | 76 | The normalized moment of inertia in the x- and y-directions.
IMAQ_MT_NORM_MOMENT_OF_INERTIA_YY | 77 | The normalized moment of inertia in the y-direction twice.
IMAQ_MT_NORM_MOMENT_OF_INERTIA_XXX | 78 | The normalized moment of inertia in the x-direction three times.
IMAQ_MT_NORM_MOMENT_OF_INERTIA_XXY | 79 | The normalized moment of inertia in the x-direction twice and the y-direction once.
IMAQ_MT_NORM_MOMENT_OF_INERTIA_XYY | 80 | The normalized moment of inertia in the x-direction once and the y-direction twice.
IMAQ_MT_NORM_MOMENT_OF_INERTIA_YYY | 81 | The normalized moment of inertia in the y-direction three times.
IMAQ_MT_HU_MOMENT_1 | 82 | The first Hu moment.
IMAQ_MT_HU_MOMENT_2 | 83 | The second Hu moment.
IMAQ_MT_HU_MOMENT_3 | 84 | The third Hu moment.
IMAQ_MT_HU_MOMENT_4 | 85 | The fourth Hu moment.
IMAQ_MT_HU_MOMENT_5 | 86 | The fifth Hu moment.
IMAQ_MT_HU_MOMENT_6 | 87 | The sixth Hu moment.
IMAQ_MT_HU_MOMENT_7 | 88 | The seventh Hu moment.
IMAQ_MEASUREMENT_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


MeasurementValue

The morphological measurement that a function uses for filtering.

Elements

Name | Value | Description
IMAQ_AREA | 0 | Surface area of the particle in pixels.
IMAQ_AREA_CALIBRATED | 1 | Surface area of the particle in calibrated units.
IMAQ_NUM_HOLES | 2 | Number of holes in the particle.
IMAQ_AREA_OF_HOLES | 3 | Surface area of the holes in calibrated units.
IMAQ_TOTAL_AREA | 4 | Total surface area (holes and particle) in calibrated units.
IMAQ_IMAGE_AREA | 5 | Surface area of the entire image in calibrated units.
IMAQ_PARTICLE_TO_IMAGE | 6 | Ratio, expressed as a percentage, of the surface area of a particle in relation to the total area of the particle.
IMAQ_PARTICLE_TO_TOTAL | 7 | Ratio, expressed as a percentage, of the surface area of a particle in relation to the total area of the particle.
IMAQ_CENTER_MASS_X | 8 | X-coordinate of the center of mass.
IMAQ_CENTER_MASS_Y | 9 | Y-coordinate of the center of mass.
IMAQ_LEFT_COLUMN | 10 | Left edge of the bounding rectangle.
IMAQ_TOP_ROW | 11 | Top edge of the bounding rectangle.
IMAQ_RIGHT_COLUMN | 12 | Right edge of the bounding rectangle.
IMAQ_BOTTOM_ROW | 13 | Bottom edge of bounding rectangle.
IMAQ_WIDTH | 14 | Width of bounding rectangle in calibrated units.
IMAQ_HEIGHT | 15 | Height of bounding rectangle in calibrated units.
IMAQ_MAX_SEGMENT_LENGTH | 16 | Length of longest horizontal line segment.
IMAQ_MAX_SEGMENT_LEFT_COLUMN | 17 | Leftmost x-coordinate of longest horizontal line segment.
IMAQ_MAX_SEGMENT_TOP_ROW | 18 | Y-coordinate of longest horizontal line segment.
IMAQ_PERIMETER | 19 | Outer perimeter of the particle.
IMAQ_PERIMETER_OF_HOLES | 20 | Perimeter of all holes within the particle.
IMAQ_SIGMA_X | 21 | Sum of the particle pixels on the x-axis.
IMAQ_SIGMA_Y | 22 | Sum of the particle pixels on the y-axis.
IMAQ_SIGMA_XX | 23 | Sum of the particle pixels on the x-axis squared.
IMAQ_SIGMA_YY | 24 | Sum of the particle pixels on the y-axis squared.
IMAQ_SIGMA_XY | 25 | Sum of the particle pixels on the x-axis and y-axis.
IMAQ_PROJ_X | 26 | Projection corrected in X.
IMAQ_PROJ_Y | 27 | Projection corrected in Y.
IMAQ_INERTIA_XX | 28 | Inertia matrix coefficient in XX.
IMAQ_INERTIA_YY | 29 | Inertia matrix coefficient in YY.
IMAQ_INERTIA_XY | 30 | Inertia matrix coefficient in XY.
IMAQ_MEAN_H | 31 | Mean length of horizontal segments.
IMAQ_MEAN_V | 32 | Mean length of vertical segments.
IMAQ_MAX_INTERCEPT | 33 | Length of longest segment of the convex hull.
IMAQ_MEAN_INTERCEPT | 34 | Mean length of the chords in an object perpendicular to its max intercept.
IMAQ_ORIENTATION | 35 | The orientation based on the inertia of the pixels in the particle. For more information, see Chapter 10, Particle Measurements, of the NI Vision Concepts Manual.
IMAQ_EQUIV_ELLIPSE_MINOR | 36 | Total length of the axis of the ellipse having the same area as the particle and a major axis equal to half the max intercept.
IMAQ_ELLIPSE_MAJOR | 37 | Total length of major axis having the same area and perimeter as the particle in calibrated units.
IMAQ_ELLIPSE_MINOR | 38 | Total length of minor axis having the same area and perimeter as the particle in calibrated units.
IMAQ_ELLIPSE_RATIO | 39 | Fraction of major axis to minor axis.
IMAQ_RECT_LONG_SIDE | 40 | Length of the long side of a rectangle having the same area and perimeter as the particle in calibrated units.
IMAQ_RECT_SHORT_SIDE | 41 | Length of the short side of a rectangle having the same area and perimeter as the particle in calibrated units.
IMAQ_RECT_RATIO | 42 | Ratio of rectangle long side to rectangle short side.
IMAQ_ELONGATION | 43 | Max intercept/mean perpendicular intercept.
IMAQ_COMPACTNESS | 44 | Particle area/(height × width).
IMAQ_HEYWOOD | 45 | Particle perimeter/perimeter of the circle having the same area as the particle.
IMAQ_TYPE_FACTOR | 46 | A complex factor relating the surface area to the moment of inertia.
IMAQ_HYDRAULIC | 47 | Particle area/particle perimeter.
IMAQ_WADDLE_DISK | 48 | Diameter of the disk having the same area as the particle in user units.
IMAQ_DIAGONAL | 49 | Diagonal of an equivalent rectangle in user units.
IMAQ_MEASUREMENT_VALUE_SIZE_GUARD | 0xFFFFFFFF | Reserved


MorphologyMethod

The morphological transformation the function applies. For more information about morphological transformations, refer to Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.

Elements

Name | Value | Description
IMAQ_AUTOM | 0 | The function uses a transformation that generates simpler particles that contain fewer details.
IMAQ_CLOSE | 1 | The function uses a transformation that fills tiny holes and smooths boundaries.
IMAQ_DILATE | 2 | The function uses a transformation that eliminates tiny holes isolated in particles and expands the contour of the particles according to the template defined by the structuring element.
IMAQ_ERODE | 3 | The function uses a transformation that eliminates pixels isolated in the background and erodes the contour of particles according to the template defined by the structuring element.
IMAQ_GRADIENT | 4 | The function uses a transformation that leaves only the pixels that would be added by the dilation process or eliminated by the erosion process.
IMAQ_GRADIENTOUT | 5 | The function uses a transformation that leaves only the pixels that would be added by the dilation process.
IMAQ_GRADIENTIN | 6 | The function uses a transformation that leaves only the pixels that would be eliminated by the erosion process.
IMAQ_HITMISS | 7 | The function uses a transformation that extracts each pixel located in a neighborhood exactly matching the template defined by the structuring element.
IMAQ_OPEN | 8 | The function uses a transformation that removes small particles and smooths boundaries.
IMAQ_PCLOSE | 9 | The function uses a transformation that fills tiny holes and smooths the inner contour of particles according to the template defined by the structuring element.
IMAQ_POPEN | 10 | The function uses a transformation that removes small particles and smooths the contour of particles according to the template defined by the structuring element.
IMAQ_THICK | 11 | The function uses a transformation that adds to an image those pixels located in a neighborhood that matches a template specified by the structuring element.
IMAQ_THIN | 12 | The function uses a transformation that eliminates pixels that are located in a neighborhood matching a template specified by the structuring element.
IMAQ_MORPHOLOGY_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


NearestNeighborClassResult

Results of training with the Nearest Neighbor engine.

Elements

Name | Type | Description
className | char* | The name of the class.
standardDeviation | float | The standard deviation of the members of this class.
count | int | The number of samples in this class.


NearestNeighborMethod

The methods to use with the nearest neighbor algorithm.

Elements

Name | Value | Description
IMAQ_MINIMUM_MEAN_DISTANCE | 0 | The minimum mean distance method.
IMAQ_K_NEAREST_NEIGHBOR | 1 | The k-nearest neighbor method.
IMAQ_NEAREST_PROTOTYPE | 2 | The nearest prototype method.
IMAQ_NEAREST_NEIGHBOR_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


NearestNeighborMetric

The metrics to use with the Nearest Neighbor algorithm.

Elements

Name | Value | Description
IMAQ_METRIC_MAXIMUM | 0 | The maximum metric.
IMAQ_METRIC_SUM | 1 | The sum metric.
IMAQ_METRIC_EUCLIDEAN | 2 | The Euclidean metric.
IMAQ_NEAREST_NEIGHBOR_METRIC_SIZE_GUARD | 0xFFFFFFFF | Reserved


NearestNeighborOptions

Options to the nearest neighbor algorithm.

Elements

Name | Type | Description
method | NearestNeighborMethod | The method to use.
metric | NearestNeighborMetric | The metric to use.
k | int | The value of k, if the IMAQ_K_NEAREST_NEIGHBOR method is used.


NearestNeighborTrainingReport

A report on the results of training a classifier session with the nearest neighbor algorithm.

Elements

Name | Type | Description
classDistancesTable | float** | The confidence in the training.
allScores | NearestNeighborClassResult* | All classes and their scores.
allScoresSize | int | The number of entries in allScores.


NormalizationMethod

Specifies the method that the function uses to normalize the template image relative to the inspection image.

Elements

Name | Value | Description
IMAQ_NORMALIZATION_NONE | 0 | No normalization.
IMAQ_NORMALIZATION_HISTOGRAM_MATCHING | 1 | Adjust image so its histogram is similar to the golden template's histogram.
IMAQ_NORMALIZATION_AVERAGE_MATCHING | 2 | Adjust image so its mean pixel value equals the golden template's mean pixel value.
IMAQ_NORMALIZATION_SIZE_GUARD | 0xFFFFFFFF | Reserved


ObjectReport

A report describing the location, size, and features of a binary object.

Elements

Name | Type | Description
center | PointFloat | Specifies the location of the center of mass of the binary object.
boundingRect | Rect | Specifies the location of the bounding rectangle of the binary object.
area | float | Specifies the area of the binary object.
orientation | float | Specifies the orientation of the longest segment in the binary object.
aspectRatio | float | Specifies the ratio between the width and the height of the binary object.
numHoles | int | Specifies the number of holes in the binary object.


ObjectType

Specifies the type of objects the function detects.

Elements

Name | Value | Description
IMAQ_BRIGHT_OBJECTS | 0 | The function detects bright objects.
IMAQ_DARK_OBJECTS | 1 | The function detects dark objects.
IMAQ_OBJECT_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


OpenContour

Defines the location and size of an open contour, which is a series of connected points where the last point does not connect to the first.

Elements

Name | Type | Description
points | Point* | The points that make up the open contour.
numPoints | int | The number of points in the array.


OutlineMethod

Method the function uses when outlining the edges. For more information about filtering, refer to Chapter 5, Image Processing, of the NI Vision Concepts Manual.

Elements

Name | Value | Description
IMAQ_EDGE_DIFFERENCE | 0 | The function uses a method that produces continuous contours by highlighting each pixel where an intensity variation occurs between itself and its three upper-left neighbors.
IMAQ_EDGE_GRADIENT | 1 | The function uses a method that outlines contours where an intensity variation occurs along the vertical axis.
IMAQ_EDGE_PREWITT | 2 | The function uses a method that extracts the outer contours of objects.
IMAQ_EDGE_ROBERTS | 3 | The function uses a method that outlines the contours that highlight pixels where an intensity variation occurs along the diagonal axes.
IMAQ_EDGE_SIGMA | 4 | The function uses a method that outlines contours and details by setting pixels to the mean value found in their neighborhood, if their deviation from this value is not significant.
IMAQ_EDGE_SOBEL | 5 | The function uses a method that extracts the outer contours of objects. As opposed to the Prewitt filter, the Sobel filter assigns a higher weight to the horizontal and vertical neighbors of the central pixel.
IMAQ_OUTLINE_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


PairOfParallelLinePairsFeature

A pair of parallel line pairs feature.

Elements

Name | Type | Description
firstParallelLinePair | ParallelLinePairFeature | The first parallel line pair.
secondParallelLinePair | ParallelLinePairFeature | The second parallel line pair.
rotation | double | The orientation of the feature with respect to the horizontal.
distance | double | The distance from the midline of the first parallel line pair to the midline of the second parallel line pair.


PaletteType

The palette type the function uses. For more information about palettes, refer to Chapter 2, Display, of the NI Vision Concepts Manual.

Elements

Name | Value | Description
IMAQ_PALETTE_GRAY | 0 | The function uses a palette that has a gradual gray-level variation from black to white.
IMAQ_PALETTE_BINARY | 1 | The function uses a palette of 16 cycles of 16 different colors that is useful with binary images.
IMAQ_PALETTE_GRADIENT | 2 | The function uses a palette that has a gradation from red to white with a prominent range of light blue in the upper value range.
IMAQ_PALETTE_RAINBOW | 3 | The function uses a palette that has a gradation from blue to red with a prominent range of greens in the middle value range.
IMAQ_PALETTE_TEMPERATURE | 4 | The function uses a palette that has a gradation from light brown to dark brown.
IMAQ_PALETTE_USER | 5 | The function uses a palette defined by the user.
IMAQ_PALETTE_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ParallelLinePairFeature

A parallel line pair feature.

Elements

Name | Type | Description
firstStartPoint | PointFloat | The starting point of the first line of the pair.
firstEndPoint | PointFloat | The ending point of the first line of the pair.
secondStartPoint | PointFloat | The starting point of the second line of the pair.
secondEndPoint | PointFloat | The ending point of the second line of the pair.
rotation | double | The orientation of the feature with respect to the horizontal.
distance | double | The distance from the first line to the second line.


ParticleClassifierOptions

Defines the dependence of the particle classifier on shape, scale, and mirror symmetry.

Elements

Name | Type | Description
scaleDependence | float | The relative importance of scale when classifying particles. This value ranges from 0 to 1000. If scaleDependence is 0, the samples are classified independent of scale. For example, a large object and small object of the same type would be classified as the same class.
mirrorDependence | float | The relative importance of mirror symmetry when classifying particles. This value ranges from 0 to 1000. An example of objects exhibiting mirror symmetry are the lowercase letters p and q. If mirrorDependence is 0, the samples are classified independent of mirror symmetry. For example, p and q would be classified as the same class.


ParticleClassifierPreprocessingOptions

Options used by a particle classifier to turn a grayscale image into a binary image.

Elements

Name | Type | Description
manualThreshold | int | Set this element to TRUE to specify the threshold range manually. Set this element to FALSE to have the threshold range automatically calculated.
manualThresholdRange | RangeFloat | If a manual threshold is being done, the range of pixels to keep. This field is ignored if manualThreshold is set to FALSE.
autoThresholdMethod | ThresholdMethod | If an automatic threshold is being done, the method used to calculate the threshold range. This field is ignored if manualThreshold is set to TRUE.
limits | RangeFloat | The limits on the automatic threshold range.
particleType | ParticleType | What kind of particles to look for.
rejectBorder | int | Set this element to TRUE to reject border particles. Set this element to FALSE to keep border particles.
numErosions | int | The number of erosions to perform.


ParticleClassifierType

Elements

Name | Value | Description
IMAQ_PARTICLE_LARGEST | 0 | Use only the largest particle in the image.
IMAQ_PARTICLE_ALL | 1 | Use all particles in the image.
IMAQ_PARTICLE_CLASSIFIER_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ParticleFilterCriteria

Describes the criteria used to filter particles in an image.

Elements

Name | Type | Description
parameter | MeasurementValue | The morphological measurement that the function uses for filtering.
lower | float | The lower bound of the criteria range.
upper | float | The upper bound of the criteria range.
exclude | int | Set this element to TRUE to indicate that a match occurs when the value is outside the criteria range. Set this element to FALSE to indicate that a match occurs when the value is inside the criteria range.


ParticleFilterCriteria2

Describes the criteria used to filter particles in the image.

Elements

Name | Type | Description
parameter | MeasurementType | The morphological measurement that the function uses for filtering.
lower | float | The lower bound of the criteria range.
upper | float | The upper bound of the criteria range.
calibrated | int | Set this element to TRUE to take calibrated measurements. Set this element to FALSE to take pixel measurements.
exclude | int | Set this element to TRUE to indicate that a match occurs when the measurement is outside the criteria range. Set this element to FALSE to indicate that a match occurs when the measurement is inside the criteria range.


ParticleFilterOptions

Options used by imaqParticleFilter to filter binary particles.

Elements

Name | Type | Description
rejectMatches | int | Set this parameter to TRUE to transfer only those particles that do not meet all the criteria. Set this parameter to FALSE to transfer only those particles that meet all the criteria to the destination.
rejectBorder | int | Set this element to TRUE to reject border particles. Set this element to FALSE to keep border particles.
connectivity8 | int | 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 Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.


ParticleInfoMode

Controls the extent of particle information that the function returns.

Elements

Name | Value | Description
IMAQ_BASIC_INFO | 0 | The function returns only the following elements of each report: area, calibratedArea, boundingRect. Showing only basic information allows the function to generate faster results.
IMAQ_ALL_INFO | 1 | The function returns all the information about each particle.
IMAQ_PARTICLE_INFO_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ParticleReport

Information about a particle in an image.

Elements

Name | Type | Description
area | int | The number of pixels in the particle.
calibratedArea | float | The size of the particle, calibrated to the calibration information of the image.
perimeter | float | The length of the perimeter, calibrated to the calibration information of the image.
numHoles | int | The number of holes in the particle.
areaOfHoles | int | The total surface area, in pixels, of all the holes in a particle.
perimeterOfHoles | float | The length of the perimeter of all the holes in the particle calibrated to the calibration information of the image.
boundingBox | Rect | The smallest rectangle that encloses the particle.
sigmaX | float | The sum of the particle pixels on the x-axis.
sigmaY | float | The sum of the particle pixels on the y-axis.
sigmaXX | float | The sum of the particle pixels on the x-axis, squared.
sigmaYY | float | The sum of the particle pixels on the y-axis, squared.
sigmaXY | float | The sum of the particle pixels on the x-axis and y-axis.
longestLength | int | The length of the longest horizontal line segment.
longestPoint | Point | The location of the leftmost pixel of the longest segment in the particle.
projectionX | int | The length of the particle when projected onto the x-axis.
projectionY | int | The length of the particle when projected onto the y-axis.
connect8 | int | This element is TRUE if the function used connectivity-8 to determine if particles are touching. This element is FALSE if the function used connectivity-4 to determine if particles are touching.


ParticleType

What kind of particles to look for.

Elements

Name | Value | Description
IMAQ_PARTICLE_BRIGHT | 0 | Bright particles
IMAQ_PARTICLE_DARK | 1 | Dark particles
IMAQ_PARTICLE_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


PatternMatch

Information describing a matched pattern.

Elements

Name | Type | Description
position | PointFloat | The location of the center of the match.
rotation | float | The rotation of the match relative to the template image, in degrees.
scale | float | The size of the match relative to the size of the template image, expressed as a percentage.
score | float | The accuracy of the match. A score of 1,000 indicates a perfect match, and a score of 0 indicates no match.
corner[4] | PointFloat | An array of four points describing the rectangle surrounding the template image.


PhotometricMode

Designates which photometric interpretation to use.

Elements

Name | Value | Description
IMAQ_WHITE_IS_ZERO | 0 | The function interprets zero-value pixels as white.
IMAQ_BLACK_IS_ZERO | 1 | The function interprets zero-value pixels as black.
IMAQ_PHOTOMETRIC_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


PixelValue

The information necessary to describe a particular type of pixel.

Elements

Name | Type | Description
grayscale | float | A grayscale pixel value. Use this member for images of type IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, or IMAQ_IMAGE_SGL.
rgb | RGBValue | A RGB pixel value. Use this member for images of type IMAQ_IMAGE_RGB.
hsl | HSLValue | A HSL pixel value. Use this member for images of type IMAQ_IMAGE_HSL.
complex | Complex | A complex pixel value. Use this member for images of type IMAQ_IMAGE_COMPLEX.
rgbu64 | RGBU64Value | An unsigned 64-bit RGB pixel value. Use this member for images of type IMAQ_IMAGE_RGB_U64.


Plane3D

Indicates the view a function uses to show complex images.

Elements

Name | Value | Description
IMAQ_3D_REAL | 0 | The function shows the real part of complex images.
IMAQ_3D_IMAGINARY | 1 | The function shows the imaginary part of complex images.
IMAQ_3D_MAGNITUDE | 2 | The function shows the magnitude part of complex images.
IMAQ_3D_PHASE | 3 | The function shows the phase part of complex images.
IMAQ_PLANE_3D_SIZE_GUARD | 0xFFFFFFFF | Reserved


Point

Defines the location of a point.

Elements

Name | Type | Description
x | int | The x-coordinate of the point.
y | int | The y-coordinate of the point.


PointFloat

Defines the location of a point.

Elements

Name | Type | Description
x | float | The x-coordinate of the point.
y | float | The y-coordinate of the point.


PointSymbol

The symbol to represent a point in an overlay.

Elements

Name | Value | Description
IMAQ_POINT_AS_PIXEL | 0 | A single pixel represents a point in the overlay.
IMAQ_POINT_AS_CROSS | 1 | A cross represents a point in the overlay.
IMAQ_POINT_USER_DEFINED | 2 | The pattern supplied by the user represents a point in the overlay.
IMAQ_POINT_SYMBOL_SIZE_GUARD | 0xFFFFFFFF | Reserved


PolarityType

The polarity of an edge.

Elements

Name | Value | Description
IMAQ_EDGE_RISING | 1 | The edge is a rising edge.
IMAQ_EDGE_FALLING | 0xFFFFFFFF | Reserved
IMAQ_POLARITY_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRCellFilterMode

Specifies the mode used to determine the pixel value for each cell.

Elements

Name | Value | Description
IMAQ_QR_CELL_FILTER_MODE_AUTO_DETECT | -2 | The function will try all filter modes and uses the one that decodes the QR code within the fewest iterations and utilizing the least amount of error correction.
IMAQ_QR_CELL_FILTER_MODE_AVERAGE | 0 | The function sets the pixel value for the cell to the average of the sampled pixels.
IMAQ_QR_CELL_FILTER_MODE_MEDIAN | 1 | The function sets the pixel value for the cell to the median of the sampled pixels.
IMAQ_QR_CELL_FILTER_MODE_CENTRAL_AVERAGE | 2 | The function sets the pixel value for the cell to the average of the pixels in the center of the cell sample.
IMAQ_QR_CELL_FILTER_MODE_HIGH_AVERAGE | 3 | The function sets the pixel value for the cell to the average value of the half of the sampled pixels with the highest pixel values.
IMAQ_QR_CELL_FILTER_MODE_LOW_AVERAGE | 4 | The function sets the pixel value for the cell to the average value of the half of the sampled pixels with the lowest pixel values.
IMAQ_QR_CELL_FILTER_MODE_VERY_HIGH_AVERAGE | 5 | The function sets the pixel value for the cell to the average value of the ninth of the sampled pixels with the highest pixel values.
IMAQ_QR_CELL_FILTER_MODE_VERY_LOW_AVERAGE | 6 | The function sets the pixel value for the cell to the average value of the ninth of the sampled pixels with the lowest pixel values.
IMAQ_QR_CELL_FILTER_MODE_ALL | 8 | The function tries each filter mode, starting with IMAQ_QR_CELL_FILTER_MODE_AVERAGE and ending with IMAQ_QR_CELL_FILTER_MODE_VERY_LOW_AVERAGE, stopping once a filter mode decodes correctly.
IMAQ_QR_CELL_FILTER_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRCellSampleSize

Specifies the sample size, in pixels, the function should take to determine if each cell is on or off.

Elements

Name | Value | Description
IMAQ_QR_CELL_SAMPLE_SIZE_AUTO_DETECT | -2 | The function will try each sample size and use the one which decodes the QR code within the fewest iterations and utilizing the least amount of error correction.
IMAQ_QR_CELL_SAMPLE_SIZE1X1 | 1 | The function will use a 1×1 sized sample from each cell.
IMAQ_QR_CELL_SAMPLE_SIZE2X2 | 2 | The function will use a 2×2 sized sample from each cell.
IMAQ_QR_CELL_SAMPLE_SIZE3X3 | 3 | The function will use a 3×3 sized sample from each cell.
IMAQ_QR_CELL_SAMPLE_SIZE4X4 | 4 | The function will use a 4×4 sized sample from each cell.
IMAQ_QR_CELL_SAMPLE_SIZE5X5 | 5 | The function will use a 5×5 sized sample from each cell.
IMAQ_QR_CELL_SAMPLE_SIZE6X6 | 6 | The function will use a 6×6 sized sample from each cell.
IMAQ_QR_CELL_SAMPLE_SIZE7X7 | 7 | The function will use a 7×7 sized sample from each cell.
IMAQ_QR_CELL_SAMPLE_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRCodeDataToken

Contains the data for a specific QR token.

Elements

Name | Type | Description
mode | QRStreamMode | Specifies the stream mode or the format of the data that is encoded in the QR code.
modeData | unsigned int | Indicates specifiers used by the user to postprocess the data if it requires it. Typically represents size, sometimes represents language for ECI Stream Mode and Application ID for EAN-128 codes.
data | unsigned char* | Shows the encoded data in the QR code.
dataLength | unsigned int | Specifies the length of the data found in the QR code.


QRCodeDescriptionOptions

Specifies the description options the function uses when searching for the QR code in the image.

Elements

Name | Type | Description
dimensions | QRDimensions | The number of rows and columns that are populated for the QR code, measured in cells.
polarity | QRPolarities | The polarity of the QR code.
mirror | QRMirrorMode | This element is TRUE if the QR code appears mirrored in the image and FALSE if the QR code appears normally in the image.
modelType | QRModelType | This option allows you to specify the type of QR code. Micro QR codes have only one target in the top left. Model 1 QR codes have alignment dashes along the bottom and right side of the code. Most QR codes are Model 2.


QRCodeReport

Describes the QR code that the function read.

Elements

Name | Type | Description
found | unsigned int | This element is TRUE if the function located and decoded a QR code and FALSE if the function failed to locate and decode a QR code.
data | unsigned char* | The data encoded in the QR code.
dataLength | unsigned int | The length of the data array.
boundingBox[4] | PointFloat | An array of four points describing the rectangle surrounding the QR code.
tokenizedData | QRCodeDataToken* | Contains the data tokenized in exactly the way it was encoded in the code. This is useful if the code is encoded using multiple languages.
sizeOfTokenizedData | unsigned int | Size of the tokenized data.
numErrorsCorrected | unsigned int | The number of errors the function corrected when decoding the QR code.
dimensions | unsigned int | The number of rows and columns that are populated for the QR code, measured in cells.
version | unsigned int | The version of the QR code. The version indicates how much information can be encoded and how much redundancy is included inside the code.
modelType | QRModelType | This option allows you to specify what type of QR code this is. Micro QR codes have only one target in the top left. Model 1 codes have alignment "dashes" along the bottom and right side of the symbol.
streamMode | QRStreamMode | The format of the data encoded in the stream.
matrixPolarity | QRPolarities | The polarity of the QR code.
mirrored | unsigned int | This element is TRUE if the QR code appears mirrored in the image and FALSE if the QR code appears normally in the image.
positionInAppendStream | unsigned int | Indicates what position the QR code is in with respect to the stream of data in all codes. It is possible for a QR code to be part of a larger array of codes.
sizeOfAppendStream | unsigned int | Specifies how many QR codes are part of a larger array of codes. Sometimes a QR code is part of a larger array of codes.
firstEAN128ApplicationID | int | The first EAN-128 Application ID encountered in the stream. This is only useful for EAN-128 codes and for mixed/appended EAN-128 codes, refer to the tokenized output.
firstECIDesignator | int | The first Regional Language Designator encountered in the stream. This is only useful for ECI codes. For multiple language ECI codes, refer to the tokenized output.
appendStreamIdentifier | unsigned int | Specifies what stream the QR code is in relation to when the code is part of a larger array of codes.
minimumEdgeStrength | unsigned int | The strength of the weakest edge the function used to find the coarse location of the QR code in the image. Use this value as a guide for setting the edgeThreshold element of the searchOptions parameter of imaqReadQRCode().
demodulationMode | QRDemodulationMode | The demodulation mode the function used to locate the QR code. If demodulationMode is set to IMAQ_AUTO_DETECT_DEMODULATION_MODE in the searchOptions parameter of imaqReadQRCode(), this element indicates the recommended demodulation mode for this image.
cellSampleSize | QRCellSampleSize | The cell sample size the function used to locate the QR code. If cellSampleSize is set to IMAQ_AUTO_DETECT_CELL_SAMPLE_SIZE in the searchOptions parameter of imaqReadQRCode(), this element indicates the recommended cell sample size for this image.
cellFilterMode | QRCellFilterMode | The cell filter mode the function used to locate the QR code. If cellFilterMode was set to IMAQ_AUTO_DETECT_CELL_FILTER_MODE in the searchOptions parameter of imaqReadQRCode(), this element indicates the recommended cell filter mode for this image.


QRCodeSearchOptions

Specifies the search options the function uses when searching for the QR code in the image.

Elements

Name | Type | Description
rotationMode | QRRotationMode | Specifies the amount of QR code rotation the function should allow for.
skipLocation | unsigned int | If set to TRUE, specifies that the function should assume that the QR code occupies the entire image (or the entire search region). The function then skips the location phase, moving immediately to extraction and decoding. If FALSE, the function does not make any assumptions about the percentage of the image occupied by the QR code.
edgeThreshold | unsigned int | The strength of the weakest edge the function uses to find the coarse location of the QR code in the image. Use the minimumEdgeStrength element of the QRCodeReport return value.
demodulationMode | QRDemodulationMode | The demodulation mode the function uses to locate the QR code.
cellSampleSize | QRCellSampleSize | The cell sample size the function uses to locate the QR code.
cellFilterMode | QRCellFilterMode | The cell filter mode the function uses to locate the QR code.
skewDegreesAllowed | unsigned int | Specifies the amount of skew in the QR code the function should allow for.


QRCodeSizeOptions

Contains the size options the function uses when searching for a QR code in the image.

Elements

Name | Type | Description
minSize | unsigned int | Specifies the minimum size (in pixels) of the QR code in the image. Setting this value to 0 indicates the function should never exclude a QR code candidate because it is too small.
maxSize | unsigned int | Specifies the maximum size (in pixels) of the QR code in the image. Setting this value to 0 indicates the function should never exclude a QR code candidate because it is too large.


QRDemodulationMode

Specifies the mode the function should use to demodulate the QR code.

Elements

Name | Value | Description
IMAQ_QR_DEMODULATION_MODE_AUTO_DETECT | -2 | The function will try each demodulation mode and use the one which decodes the QR code within the fewest iterations and utilizing the least amount of error correction.
IMAQ_QR_DEMODULATION_MODE_HISTOGRAM | 0 | The function uses a histogram of all of the QR cells to calculate a threshold. This threshold determines if a cell is on or off. This is the fastest mode, but requires images with consistent levels of contrast.
IMAQ_QR_DEMODULATION_MODE_LOCAL_CONTRAST | 1 | The function examines each of the cell's neighbors to determine if the cell is on or off. This mode is slower, but works with images that have inconsistent levels of contrast.
IMAQ_QR_DEMODULATION_MODE_COMBINED | 2 | The function uses the histogram of the QR code to calculate a threshold. For cells with pixel values that are sufficiently below or above this threshold, the method will use the threshold to determine if the cell is on or off. If the cell pixel values are close to the threshold, the method will use the IMAQ_QR_DEMODULATION_MODE_LOCAL_CONTRAST mode to determine if the cell is on or off. This mode is slower, but works with images that contain a QR code with extremely low cell fill percentages or gross print growth errors.
IMAQ_QR_DEMODULATION_MODE_ALL | 3 | The function tries IMAQ_QR_DEMODULATION_MODE_HISTOGRAM, then IMAQ_QR_DEMODULATION_MODE_LOCAL_CONTRAST and then IMAQ_QR_DEMODULATION_MODE_COMBINED, stopping once one mode is successful.
IMAQ_QR_DEMODULATION_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRDimensions

Specifies the dimensions of the QR code.

Elements

Name | Value | Description
IMAQ_QR_DIMENSIONS_AUTO_DETECT | 0 | The function will automatically determine the dimensions of the QR code.
IMAQ_QR_DIMENSIONS_11x11 | 11 | Specifies the dimensions of the QR code as 11 × 11.
IMAQ_QR_DIMENSIONS_13x13 | 13 | Specifies the dimensions of the QR code as 13 × 13.
IMAQ_QR_DIMENSIONS_15x15 | 15 | Specifies the dimensions of the QR code as 15 × 15.
IMAQ_QR_DIMENSIONS_17x17 | 17 | Specifies the dimensions of the QR code as 17 × 17.
IMAQ_QR_DIMENSIONS_21x21 | 21 | Specifies the dimensions of the QR code as 21 × 21.
IMAQ_QR_DIMENSIONS_25x25 | 25 | Specifies the dimensions of the QR code as 25 × 25.
IMAQ_QR_DIMENSIONS_29x29 | 29 | Specifies the dimensions of the QR code as 29 × 29.
IMAQ_QR_DIMENSIONS_33x33 | 33 | Specifies the dimensions of the QR code as 33 × 33.
IMAQ_QR_DIMENSIONS_37x37 | 37 | Specifies the dimensions of the QR code as 37 × 37.
IMAQ_QR_DIMENSIONS_41x41 | 41 | Specifies the dimensions of the QR code as 41 × 41.
IMAQ_QR_DIMENSIONS_45x45 | 45 | Specifies the dimensions of the QR code as 45 × 45.
IMAQ_QR_DIMENSIONS_49x49 | 49 | Specifies the dimensions of the QR code as 49 × 49.
IMAQ_QR_DIMENSIONS_53x53 | 53 | Specifies the dimensions of the QR code as 53 × 53.
IMAQ_QR_DIMENSIONS_57x57 | 57 | Specifies the dimensions of the QR code as 57 × 57.
IMAQ_QR_DIMENSIONS_61x61 | 61 | Specifies the dimensions of the QR code as 61 × 61.
IMAQ_QR_DIMENSIONS_65x65 | 65 | Specifies the dimensions of the QR code as 65 × 65.
IMAQ_QR_DIMENSIONS_69x69 | 69 | Specifies the dimensions of the QR code as 69 × 69.
IMAQ_QR_DIMENSIONS_73x73 | 73 | Specifies the dimensions of the QR code as 73 × 73.
IMAQ_QR_DIMENSIONS_77x77 | 77 | Specifies the dimensions of the QR code as 77 × 77.
IMAQ_QR_DIMENSIONS_81x81 | 81 | Specifies the dimensions of the QR code as 81 × 81.
IMAQ_QR_DIMENSIONS_85x85 | 85 | Specifies the dimensions of the QR code as 85 × 85.
IMAQ_QR_DIMENSIONS_89x89 | 89 | Specifies the dimensions of the QR code as 89 × 89.
IMAQ_QR_DIMENSIONS_93x93 | 93 | Specifies the dimensions of the QR code as 93 × 93.
IMAQ_QR_DIMENSIONS_97x97 | 97 | Specifies the dimensions of the QR code as 97 × 97.
IMAQ_QR_DIMENSIONS_101x101 | 101 | Specifies the dimensions of the QR code as 101 × 101.
IMAQ_QR_DIMENSIONS_105x105 | 105 | Specifies the dimensions of the QR code as 105 × 105.
IMAQ_QR_DIMENSIONS_109x109 | 109 | Specifies the dimensions of the QR code as 109 × 109.
IMAQ_QR_DIMENSIONS_113x113 | 113 | Specifies the dimensions of the QR code as 113 × 113.
IMAQ_QR_DIMENSIONS_117x117 | 117 | Specifies the dimensions of the QR code as 117 × 117.
IMAQ_QR_DIMENSIONS_121x121 | 121 | Specifies the dimensions of the QR code as 121 × 121.
IMAQ_QR_DIMENSIONS_125x125 | 125 | Specifies the dimensions of the QR code as 125 × 125.
IMAQ_QR_DIMENSIONS_128x128 | 128 | Specifies the dimensions of the QR code as 128 × 128.
IMAQ_QR_DIMENSIONS_133x133 | 133 | Specifies the dimensions of the QR code as 133 × 133.
IMAQ_QR_DIMENSIONS_137x137 | 137 | Specifies the dimensions of the QR code as 137 × 137.
IMAQ_QR_DIMENSIONS_141x141 | 141 | Specifies the dimensions of the QR code as 141 × 141.
IMAQ_QR_DIMENSIONS_145x145 | 145 | Specifies the dimensions of the QR code as 145 × 145.
IMAQ_QR_DIMENSIONS_149x149 | 149 | Specifies the dimensions of the QR code as 149 × 149.
IMAQ_QR_DIMENSIONS_153x153 | 153 | Specifies the dimensions of the QR code as 153 × 153.
IMAQ_QR_DIMENSIONS_157x157 | 157 | Specifies the dimensions of the QR code as 157 × 1537
IMAQ_QR_DIMENSIONS_161x161 | 161 | Specifies the dimensions of the QR code as 161 × 161.
IMAQ_QR_DIMENSIONS_165x165 | 165 | Specifies the dimensions of the QR code as 165 × 165.
IMAQ_QR_DIMENSIONS_169x169 | 169 | Specifies the dimensions of the QR code as 169 × 169.
IMAQ_QR_DIMENSIONS_173x173 | 173 | Specifies the dimensions of the QR code as 173 × 173.
IMAQ_QR_DIMENSIONS_177x177 | 177 | Specifies the dimensions of the QR code as 177 × 177.
IMAQ_QR_DIMENSIONS_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRGradingMode

Specifies if the function should make calculations needed to prepare to grade the QR code.

Elements

Name | Value | Description
IMAQ_QR_NO_GRADING | 0 | The function does not make any preparatory calculations. Attempts to grade this QR code will generate an error.
IMAQ_QR_GRADING_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRMirrorMode

Specifies if the QR code appears normally in the image of if the code appears mirrored in the image.

Elements

Name | Value | Description
IMAQ_QR_MIRROR_MODE_AUTO_DETECT | -2 | The function should determine if the QR code is mirrored.
IMAQ_QR_MIRROR_MODE_MIRRORED | 1 | The function should expect the QR code to appear mirrored.
IMAQ_QR_MIRROR_MODE_NORMAL | 0 | The function should expect the QR code to appear normal.
IMAQ_QR_MIRROR_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRModelType

Specifies what type of QR code the detector will search for.

Elements

Name | Value | Description
IMAQ_QR_MODELTYPE_AUTO_DETECT | 0 | Specifies that the function will auto-detect the type of QR code.
IMAQ_QR_MODELTYPE_MICRO | 1 | Specifies the QR code is of a micro type. Micro QR codes have a single target in the top left of the code.
IMAQ_QR_MODELTYPE_MODEL1 | 2 | Specifies the QR code is of a model1 type.
IMAQ_QR_MODELTYPE_MODEL2 | 3 | Specifies the QR code is of a model2 type. This is most common model.
IMAQ_QR_MODEL_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRPolarities

Specifies the polarity of the QR code to search for.

Elements

Name | Value | Description
IMAQ_QR_POLARITY_AUTO_DETECT | -2 | The function should determine the polarity of the QR code.
IMAQ_QR_POLARITY_BLACK_ON_WHITE | 0 | The function should search for a QR code with dark data on a bright background.
IMAQ_QR_POLARITY_WHITE_ON_BLACK | 1 | The function should search for a QR code with bright data on a dark background.
IMAQ_QR_POLARITY_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRRotationMode

Specifies the amount of QR code rotation the function should allow for.

Elements

Name | Value | Description
IMAQ_QR_ROTATION_MODE_UNLIMITED | 0 | The function allows for unlimited rotation.
IMAQ_QR_ROTATION_MODE_0_DEGREES | 1 | The function allows for ± 5 degrees of rotation.
IMAQ_QR_ROTATION_MODE_90_DEGREES | 2 | The function allows for between 85 and 95 degrees of rotation.
IMAQ_QR_ROTATION_MODE_180_DEGREES | 3 | The function allows for between 175 and 185 degrees of rotation.
IMAQ_QR_ROTATION_MODE_270_DEGREES | 4 | The function allows for between 265 and 275 degrees of rotation.
IMAQ_QR_ROTATION_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QRStreamMode

Specifies how the stream data was encoded.

Elements

Name | Value | Description
IMAQ_QR_MODE_NUMERIC | 0 | Specifies that the data was encoded using numeric mode.
IMAQ_QR_MODE_ALPHANUMERIC | 1 | Specifies that the data was encoded using alpha-numeric mode.
IMAQ_QR_MODE_RAW_BYTE | 2 | Specifies that the data was not encoded but is only raw binary bytes, or encoded in JIS-8.
IMAQ_QR_MODE_EAN128_TOKEN | 3 | Specifies that the data has a special meaning represented by the application ID. The application ID is located in tokenized data stream.
IMAQ_QR_MODE_EAN128_DATA | 4 | Specifies that the data has a special meaning represented by the application ID.
IMAQ_QR_MODE_ECI | 5 | Specifies that the data was meant to be read using the language represented in the language ID.
IMAQ_QR_MODE_KANJI | 6 | Specifies that the data was encoded in Shift-JIS16 Japanese.
IMAQ_QR_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


QuantifyData

Statistical data for a set of pixels.

Elements

Name | Type | Description
mean | float | The mean value of the pixel values.
stdDev | float | The standard deviation of the pixel values.
min | float | The smallest pixel value.
max | float | The largest pixel value.
calibratedArea | float | The area, calibrated to the calibration information of the image.
pixelArea | int | The area, in number of pixels.
relativeSize | float | The proportion, expressed as a percentage, of the associated region relative to the whole image.


QuantifyReport

Statistical data of an image.

Elements

Name | Type | Description
global | QuantifyData | Statistical data of the whole image.
regions | QuantifyData* | An array of QuantifyData structures containing statistical data of each region of the image. Refer to the mask parameter of imaqQuantify() for more information about the regions.
regionCount | int | The number of regions.


RakeDirection

The direction the function follows to search for edges along the search lines.

Elements

Name | Value | Description
IMAQ_LEFT_TO_RIGHT | 0 | The function searches from the left side of the search area to the right side of the search area.
IMAQ_RIGHT_TO_LEFT | 1 | The function searches from the right side of the search area to the left side of the search area.
IMAQ_TOP_TO_BOTTOM | 2 | The function searches from the top side of the search area to the bottom side of the search area.
IMAQ_BOTTOM_TO_TOP | 3 | The function searches from the bottom side of the search area to the top side of the search area.
IMAQ_RAKE_DIRECTION_SIZE_GUARD | 0xFFFFFFFF | Reserved


RakeOptions

Describes how to search for the edges.

Elements

Name | Type | Description
threshold | int | Specifies the threshold value for the contrast of the edge. The function identifies only edges with a contrast greater than this value in the detection process.
width | int | The number of pixels that the function averages to find the contrast at either side of the edge.
steepness | int | The span, in pixels, of the slope of the edge projected along the path specified by the input points.
subsamplingRatio | int | Specifies the number of pixels that separate two consecutive search lines.
subpixelType | InterpolationMethod | The method for interpolating. Valid options include IMAQ_QUADRATIC and IMAQ_CUBIC_SPLINE.
subpixelDivisions | int | The number of samples the function obtains from a pixel. For example, set subpixelDivisions to 4 to split each pixel into four subpixels. The maximum number of subpixel divisions is 12.


RakeReport

Information describing the rake used by the function and the edges the function calculated with the rake.

Elements

Name | Type | Description
rakeLines | LineFloat* | The coordinate location of each of the rake lines used by the function.
numRakeLines | int | The number of lines in the rakeLines array.
firstEdges | PointFloat* | The coordinate location of all edges detected as first edges.
numFirstEdges | int | The number of points in the firstEdges array.
lastEdges | PointFloat* | The coordinate location of all edges detected as last edges.
numLastEdges | int | The number of points in the lastEdges array.
allEdges | EdgeLocationReport* | An array of reports describing the location of the edges located by each rake line.
linesWithEdges | int* | An array of indices into the rakeLines array indicating the rake lines on which the function detected at least one edge.
numLinesWithEdges | int | The number of rake lines along which the function detected edges. This number represents the size of the linesWithEdges array and the number of EdgeLocationReports in the allEdges array.


Range

Describes a range of desired values.

Elements

Name | Type | Description
minValue | int | The minimum value of the range.
maxValue | int | The maximum value of the range.


RangeFloat

Describes a range of desired values.

Elements

Name | Type | Description
minValue | float | The minimum value of the range.
maxValue | float | The maximum value of the range.


ReadClassifierFileMode

The information to read from a classifier file.

Elements

Name | Value | Description
IMAQ_CLASSIFIER_READ_ALL | 0 | Read all information from the classifier file.
IMAQ_CLASSIFIER_READ_SAMPLES | 1 | Read only the samples from the classifier file.
IMAQ_CLASSIFIER_READ_PROPERTIES | 2 | Read only the properties from the classifier file.
IMAQ_READ_CLASSIFIER_FILE_MODES_SIZE_GUARD | 0xFFFFFFFF | Reserved


ReadResolution

Specifies the resolution imaqReadText() uses to read characters.

Refer to the NI OCR Training Interface Help for more information.

Elements

Name | Value | Description
IMAQ_LOW_RESOLUTION | 0 | Configures NI Vision to use low resolution during the read process.
IMAQ_MEDIUM_RESOLUTION | 1 | Configures NI Vision to use medium resolution during the read process.
IMAQ_HIGH_RESOLUTION | 2 | Configures NI Vision to use high resolution during the read process.


ReadStrategy

The level at which NI Vision analyzes images to determine if objects match trained characters.

Refer to the NI OCR Training Interface Help for more information.

Elements

Name | Value | Description
IMAQ_READ_AGGRESSIVE | 0 | Configures NI Vision to perform fewer checks when analyzing objects to determine if they match trained characters. This option boosts performance by up to 20 percent, but might result in inaccurate reads. You can successfully use the aggressive strategy for most cases. Use the aggressive strategy unless the character set or image quality requires more stringent analysis.
IMAQ_READ_CONSERVATIVE | 1 | Configures NI Vision to perform more checks to determine if an object matches a trained character. This strategy is slower than the aggressive strategy, but is more accurate and results in fewer mismatches.


ReadTextOptions

NI Vision configuration settings you want to use during the reading process.

Refer to the NI OCR Training Interface Help for more information.

Elements

Name

Type

Description

validChars[255] String255

An array of strings that specifies the valid characters. The string at each index in the array specifies the valid characters for the corresponding character position in the ROI. You can specify a string of valid characters for each element of the array, or you can use one of the predefined strings of characters from the following table.

Identifier | String of Valid Characters
IMAQ_OCR_UPPERCASE | ABCDEFGHIJKLMNOPQRSTUVWXYZ
IMAQ_OCR_LOWERCASE | abcdefghijklmnopqrstuvwxyz
IMAQ_OCR_ALPHABETIC | ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
IMAQ_OCR_DECIMAL_DIGITS | 0123456789
IMAQ_OCR_ALPHANUMERIC | ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
IMAQ_OCR_HEXADECIMAL_DIGITS | 0123456789ABCDEF
IMAQ_OCR_PATTERN | Matches any pattern at the corresponding character position.
IMAQ_OCR_FORCE_SPACE | Ignores the character at the corresponding character position and replaces it with a space in the read string.
numValidChars | int | The number of strings in the validChars array that you have initialized. Acceptable values range from 0 to 255. Set this element to 0 to specify that all characters are valid for all positions.
substitutionChar | char | The character to substitute for objects that the function cannot match with any of the trained characters.
readStrategy | ReadStrategy | The read strategy, which determines how closely the function analyzes images in the reading process to match objects with trained characters.
acceptanceLevel | int | The minimum acceptance level at which an object is considered a trained character. Acceptable values range from 0 to 1000.
aspectRatio | int | The maximum aspect ratio variance percentage for valid characters. The minimum value for this element is 100, which specifies that identified objects are valid only if they match the trained character exactly in size and height/width ratio. Set this element to IMAQ_ASPECT_RATIO_INDEPENDENT to specify that aspect ratio does not affect character validity.
readResolution | ReadResolution | The read resolution, which determines how much of the trained character data the function uses to match objects to trained characters.


ReadTextReport

Contains information about the text that you read.

Elements

Name | Type | Description
readString | const char* | The read string.
characterReport | const CharReport* | An array of reports describing the properties of each identified character.
numCharacterReports | int | The number of identified characters.


ReadTextReport2

Contains information about the text that you read.

Elements

Name | Type | Description
readString | const char* | The read string.
characterReport | CharReport2* | An array of reports describing the properties of each identified character.
numCharacterReports | int | The number of identified characters.


Rect

Defines the location and size of a rectangle.

Elements

Name | Type | Description
top | int | Location of the top edge of the rectangle.
left | int | Location of the left edge of the rectangle.
height | int | Height of the rectangle.
width | int | Width of the rectangle.


RectangleDescriptor

Describes the rectangles the function searches for.

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.

Elements

Name | Type | Description
minWidth | double | Specifies the minimum width of a rectangle the algorithm will return.
maxWidth | double | Specifies the maximum width of a rectangle the algorithm will return.
minHeight | double | Specifies the minimum height of a rectangle the algorithm will return.
maxHeight | double | Specifies the maximum height of a rectangle the algorithm will return.


RectangleFeature

A rectangle feature.

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.

Elements

Name | Type | Description
position | PointFloat | The center of the rectangle.
corner[4] | PointFloat | The four corners of the rectangle.
rotation | double | The orientation of the rectangle with respect to the horizontal.
width | double | The width of the rectangle.
height | double | The height of the rectangle.


RectangleMatch

Information describing a matched 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.

Elements

Name | Type | Description
corner[4] | PointFloat | The corners of the matched rectangle.
rotation | double | The orientation of the matched rectangle.
width | double | The width of the matched rectangle.
height | double | The height of the matched rectangle.
score | double | The score of the matched rectangle. Scores range from 0–1000, where a score of 1000 indicates a perfect match.


RectOrientation

Specifies the orientation of a resulting rectangular image relative to an annulus.

Elements

Name | Value | Description
IMAQ_BASE_INSIDE | 0 | Specifies that the base of the rectangular image lies along the inside edge of the annulus.
IMAQ_BASE_OUTSIDE | 1 | Specifies that the base of the rectangular image lies along the outside edge of the annulus.
IMAQ_TEXT_ORIENTATION_SIZE_GUARD | 0xFFFFFFFF | Reserved


ReferenceMode

Specifies the method that the function uses to calculate the coordinate system.

Elements

Name | Value | Description
IMAQ_COORD_X_Y | 0 | This method requires three elements in the points array. The first two points are on the x-axis of the coordinate system, and the third point is on the y-axis.
IMAQ_COORD_ORIGIN_X | 1 | This method requires two elements in the points array. The first point is the origin of the coordinate system, and the second point is on the x-axis.
IMAQ_REFERENCE_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


RegistrationMethod

Specifies the method that the function uses to register the template and the image.

Elements

Name | Value | Description
IMAQ_REGISTRATION_NONE | 0 | No registration.
IMAQ_REGISTRATION_PERSPECTIVE | 1 | Adjust image to correct for minor variations in alignment or perspective.
IMAQ_REGISTRATION_SIZE_GUARD | 0xFFFFFFFF | Reserved


RGBU64Value

The information needed to describe color in the RGB (Red, Green, Blue) color space where each channel has 16 bits.

Elements

Name | Type | Description
B | unsigned short | The blue value of the color.
G | unsigned short | The green value of the color.
R | unsigned short | The red value of the color.
alpha | unsigned short | The alpha value of the color, which represents extra information about a color image, such as gamma correction.


RGBValue

The information needed to describe a color in the RGB (Red, Green, and Blue) color space. There are several RGB constants already defined in NIVision.h, as follows:

Name | Value
IMAQ_RGB_TRANSPARENT | {0,0,0,1}
IMAQ_RGB_BLACK | {0,0,0,0}
IMAQ_RGB_WHITE | {255,255,255,0}
IMAQ_RGB_RED | {0,0,255,0}
IMAQ_RGB_BLUE | {255,0,0,0}
IMAQ_RGB_GREEN | {0,255,0,0}
IMAQ_RGB_YELLOW | {0,255,255,0}

There are additional constants you can use to initialize an RGBValue structure at declaration:

Name | Value
IMAQ_INIT_RGB_TRANSPARENT | {0,0,0,1}
IMAQ_INIT_RGB_BLACK | {0,0,0,0}
IMAQ_INIT_RGB_WHITE | {255,255,255,0}
IMAQ_INIT_RGB_RED | {0,0,255,0}
IMAQ_INIT_RGB_BLUE | {255,0,0,0}
IMAQ_INIT_RGB_GREEN | {0,255,0,0}
IMAQ_INIT_RGB_YELLOW | {0,255,255,0}

Elements

Name | Type | Description
B | unsigned char | The blue value of the color.
G | unsigned char | The green value of the color.
R | unsigned char | The red value of the color.
alpha | unsigned char | The alpha value of the color, which represents extra information about a color image, such as gamma correction.


ROIProfile

Information about the points along the edge of each contour in the region of interest (ROI).

Elements

Name | Type | Description
report | LineProfile | Quantifying information about the points along the edge of each contour in the ROI.
pixels | Point* | An array of the points along the edge of each contour in the ROI. This array has a number of Point structures equal to the dataCount in report.


RotatedRect

Defines the location, size, and rotation of a rotated rectangle.

Elements

Name | Type | Description
top | int | Location of the top edge of the rectangle before rotation.
left | int | Location of the left edge of the rectangle before rotation.
height | int | Height of the rectangle.
width | int | Width of the rectangle.
angle | double | The rotation, in degrees, of the rectangle.


RotationAngleRange

Specifies an allowed range of rotation for a pattern.

Elements

Name | Type | Description
lower | float | The lowest amount of rotation, in degrees, a valid pattern can have.
upper | float | The highest amount of rotation, in degrees, a valid pattern can have.


ScalingMethod

Defines the scaling method correction functions use to correct an image.

Elements

Name | Value | Description
IMAQ_SCALE_TO_PRESERVE_AREA | 0 | Correction functions scale the image such that the features in the corrected image have the same area as the features in the input image.
IMAQ_SCALE_TO_FIT | 1 | Correction functions scale the image such that the corrected image is the same size as the input image.
IMAQ_SCALING_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


ScalingMode

The scaling mode for the function. Set this parameter to IMAQ_SCALE_LARGER to duplicate pixels or IMAQ_SCALE_SMALLER to subsample pixels.

Elements

Name | Value | Description
IMAQ_SCALE_LARGER | 0 | The function duplicates pixels to make the image larger.
IMAQ_SCALE_SMALLER | 1 | The function subsamples pixels to make the image smaller.
IMAQ_SCALING_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


SearchDirection

Determines the search direction.

Elements

Name | Value | Description
IMAQ_SEARCH_DIRECTION_LEFT_TO_RIGHT | 0 | Searches from the left side of the search area to the right side of the search area.
IMAQ_SEARCH_DIRECTION_RIGHT_TO_LEFT | 1 | Searches from the right side of the search area to the left side of the search area.
IMAQ_SEARCH_DIRECTION_TOP_TO_BOTTOM | 2 | Searches from the top side of the search area to the bottom side of the search area.
IMAQ_SEARCH_DIRECTION_BOTTOM_TO_TOP | 3 | Searches from the bottom side of the search area to the top side of the search area.
IMAQ_SEARCH_DIRECTION_SIZE_GUARD | 0xFFFFFFFF | Reserved


SearchLineInfo

Describes a search line used for finding a straight edge.

Elements

Name | Type | Description
lineCoordinates | LineFloat | The endpoints of the search line.
edgeReport | EdgeReport2 | Indicates information about the edges found in this search line.


SearchStrategy

Specifies how the features of the image are used during the search phase. Use the search strategy parameter to optimize the speed of the pattern matching algorithm by allowing the algorithm to inspect less data from the image. Refer to the NI Vision for LabWindows/CVI User Manual for more information about these strategies.

Elements

Name | Value | Description
IMAQ_CONSERVATIVE | 1 | Instructs the pattern matching algorithm to use the largest possible amount of information from the image at the expense of slowing down the speed of the algorithm.
IMAQ_BALANCED | 2 | Instructs the pattern matching algorithm to balance the amount of information from the image it uses with the speed of the algorithm.
IMAQ_AGGRESSIVE | 3 | Instructs the pattern matching algorithm to use a lower amount of information from the image, which allows the algorithm to run quickly but at the expense of accuracy.
IMAQ_VERY_AGGRESSIVE | 4 | Instructs the pattern matching algorithm to use the smallest possible amount of information from the image, which allows the algorithm to run at the highest speed possible but at the expense of accuracy.
IMAQ_SEARCH_STRATEGY_SIZE_GUARD | 0xFFFFFFFF | Reserved


SegmentInfo

Information about a segment.

Elements

Name | Type | Description
numberOfPoints | int | The number of points in the segment.
isOpen | int | If TRUE, the contour is open. If FALSE, the contour is closed.
weight | double | The significance of the edge in terms of the gray values that constitute the edge.
points | ContourPoint* | The points of the segment.


SelectParticleCriteria

The criteria for a particle filter.

Elements

Name | Type | Description
parameter | MeasurementValue | The morphological measurement that the function uses for filtering. If you set the mode of imaqGetParticleInfo() to IMAQ_BASIC_INFO, parameter can only be the following values: IMAQ_AREA, IMAQ_AREA_CALIBRATED, IMAQ_LEFT_COLUMN, IMAQ_TOP_ROW, IMAQ_RIGHT_COLUMN, or IMAQ_BOTTOM_ROW. If you set the mode of imaqGetParticleInfo() to IMAQ_ALL_INFO, parameter can be any one of the values listed above or one the following values: IMAQ_NUM_HOLES, IMAQ_AREA_OF_HOLES, IMAQ_MAX_SEGMENT_LENGTH, IMAQ_MAX_SEGMENT_LEFT_COLUMN, IMAQ_MAX_SEGMENT_TOP_ROW, IMAQ_PERIMETER, IMAQ_PERIMETER_OF_HOLES, IMAQ_SIGMA_X, IMAQ_SIGMA_Y, IMAQ_SIGMA_XX, IMAQ_SIGMA_YY, IMAQ_SIGMA_XY, IMAQ_PROJ_X, or IMAQ_PROJ_Y.
lower | float | The lower boundary of the criteria range.
upper | float | The upper boundary of the criteria range.


ShapeDetectionOptions

Specifies the requirements for shapes that the function detects.

Elements

Name | Type | Description
mode | unsigned int | Specifies the method used when looking for the shape in the image. Combine values from the GeometricMatchingMode enumeration to specify the value of this element.
angleRanges | RangeFloat* | An array of angle ranges, in degrees, where each range specifies how much you expect the shape to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the shape in the image. Set this element to NULL to allow all angles. This function ignores this range if mode does not include IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT.
numAngleRanges | int | The size of the orientationRanges array.
scaleRange | RangeFloat | A range that specifies the sizes of the shapes you expect to be in the image, expressed as a ratio percentage representing the size of the pattern in the image divided by size of the original pattern multiplied by 100. This function ignores this range if mode does not include IMAQ_GEOMETRIC_MATCH_SCALE_INVARIANT
minMatchScore | double | The minimum score a match can have for the function to consider the match valid. Acceptable values range from 0 to 1,000.


ShapeMode

The shape the function draws.

Elements

Name | Value | Description
IMAQ_SHAPE_RECT | 1 | The function draws a rectangle.
IMAQ_SHAPE_OVAL | 2 | The function draws an oval.
IMAQ_SHAPE_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


ShapeReport

Describes a match to a given template shape.

Elements

Name | Type | Description
coordinates | Rect | The bounding rectangle of the object.
centroid | Point | The coordinate location of the centroid of the object.
size | int | The size, in pixels, of the object.
score | double | A value ranging between 1 and 1,000 that specifies how similar the object in the image is to the template. A score of 1,000 indicates a perfect match.


SimpleEdgeOptions

Describes how you want the function to find edges.

Elements

Name | Type | Description
type | LevelType | Determines how the function evaluates the threshold and hysteresis values.
threshold | int | The pixel value at which an edge occurs.
hysteresis | int | A value that helps determine edges in noisy images. If a pixel value crosses the given threshold value but does not exceed the value by the value of hysteresis, the function does not consider the pixel to be part of an edge.
process | EdgeProcess | Determines which edges the function looks for.
subpixel | int | Set this element to TRUE to find edges with subpixel accuracy by interpolating between points to find the crossing of the given threshold. Set this parameter to FALSE to report an edge as the point nearest the threshold crossing.


SizeType

Determines the size of the particles the function keeps after the erosion.

Elements

Name | Value | Description
IMAQ_KEEP_LARGE | 0 | The function keeps large particles remaining after the erosion.
IMAQ_KEEP_SMALL | 1 | The function keeps small particles eliminated by the erosion.
IMAQ_SIZE_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


SkeletonMethod

The method that the function uses to calculate the skeleton. For more information about skeleton functions, refer to Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.

Elements

Name | Value | Description
IMAQ_SKELETON_L | 0 | Uses an L-shaped structuring element in the skeleton function.
IMAQ_SKELETON_M | 1 | Uses an M-shaped structuring element in the skeleton function.
IMAQ_SKELETON_INVERSE | 2 | Uses an L-shaped structuring element on an inverse of the image in the skeleton function.
IMAQ_SKELETON_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


SpokeDirection

The direction the function follows to search for edges along the search lines.

Elements

Name | Value | Description
IMAQ_OUTSIDE_TO_INSIDE | 0 | The function searches from the outside of the search area to the inside of the search area.
IMAQ_INSIDE_TO_OUTSIDE | 1 | The function searches from the inside of the search area to the outside of the search area.
IMAQ_SPOKE_DIRECTION_SIZE_GUARD | 0xFFFFFFFF | Reserved


SpokeOptions

Describes how to search for the edges.

Elements

Name | Type | Description
threshold | int | Specifies the threshold value for the contrast of the edge. The function identifies only edges with a contrast greater than this value in the detection process.
width | int | The number of pixels that the function averages to find the contrast at either side of the edge.
steepness | int | The span, in pixels, of the slope of the edge projected along the path specified by the input points.
subsamplingRatio | double | The angle, in degrees, between each radial search line in the spoke.
subpixelType | InterpolationMethod | The method for interpolating. Valid options include IMAQ_QUADRATIC and IMAQ_CUBIC_SPLINE.
subpixelDivisions | int | The number of samples the function obtains from a pixel. For example, set subpixelDivisions to 4 to split each pixel into four subpixels. The maximum number of subpixel divisions is 12.


SpokeReport

Information describing the spoke used by the function and the edges the function calculated with the spoke.

Elements

Name | Type | Description
spokeLines | LineFloat* | The coordinate location of each of the spoke lines used by the function.
numSpokeLines | int | The number of lines in the spokeLines array.
firstEdges | PointFloat* | The coordinate location of all edges detected as first edges.
numFirstEdges | int | The number of points in the firstEdges array.
lastEdges | PointFloat* | The coordinate location of all edges detected as last edges.
numLastEdges | int | The number of points in the lastEdges array.
allEdges | EdgeLocationReport* | An array of reports describing the location of the edges located by each spoke line.
linesWithEdges | int* | An array of indices into the spokeLines array indicating the rake lines on which the function detected at least one edge.
numLinesWithEdges | int | The number of spoke lines along which the function detects edges. This number represents the size of the linesWithEdges array and the number of EdgeLocationReports in the allEdges array.


StraightEdge

Contains information about the detected straight edge.

Elements

Name | Type | Description
straightEdgeCoordinates | LineFloat | End points of the detected straight edge in pixel coordinates.
calibratedStraightEdgeCoordinates | LineFloat | End points of the detected straight edge in real-world coordinates.
angle | double | Angle of the found edge using the pixel coordinates.
calibratedAngle | double | Angle of the found edge using the real-world coordinates.
score | double | Describes the score of the detected edge.
straightness | double | Describes the straightness of the detected edge.
averageSignalToNoiseRatio | double | Describes the average signal to noise ratio (SNR) of the detected edge.
calibrationValid | int | Indicates if the calibration data for the straight edge is valid.
usedEdges | EdgeInfo* | An array of edges that were used to determine this straight line.
numUsedEdges | unsigned int | Indicates the number of edges in the usedEdges array.


StraightEdgeOptions

Specifies the options used to detect straight edges.

Elements

Name | Type | Description
numLines | unsigned int | Specifies the number of straight edges to find.
searchMode | StraightEdgeSearchMode | Specifies the method used to find the straight edge.
minScore | double | Specifies the minimum score of a detected straight edge.
maxScore | double | Specifies the maximum score of a detected edge.
orientation | double | Specifies the angle at which the straight edge is expected to be found.
angleRange | double | Specifies the +/- range around the orientation within which the straight edge is expected to be found.
angleTolerance | double | Specifies the expected angular accuracy of the straight edge.
stepSize | unsigned int | Specifies the gap in pixels between the search lines used with the rake-based methods.
minSignalToNoiseRatio | double | Specifies the minimum signal to noise ratio (SNR) of the edge points used to fit the straight edge.
minCoverage | double | Specifies the minimum number of points as a percentage of the number of search lines that need to be included in the detected straight edge.
houghIterations | unsigned int | Specifies the number of iterations used in the Hough-based method.


StraightEdgeReport

Information describing a calculated straight edge.

Elements

Name | Type | Description
start | PointFloat | The coordinates location of the start of the calculated edge. The point is located at the intersection of the edge with the first search line scanned by the function. If the function does not detect any edges or the edges do not fit to a valid line, it sets start to {0, 0}.
end | PointFloat | The coordinates location of the end of the calculated edge. The point is located at the intersection of the edge with the last search line scanned by the function. If the function does not detect any edges or the edges do not fit to a valid line, it sets end to {0, 0}.
straightness | double | The straightness of the calculated edge, which is equal to the least-square error of the fitted line to the entire set of coordinates. If the function does not detect any edges or the edges do not fit to a valid line, it sets straightness to 0.
coordinates | PointFloat* | An array of detected edge coordinates the function used to calculate the location of the straight edge.
numCoordinates | int | The number of detected edge coordinates.


StraightEdgeReport2

Contains information about the found straight edge(s).

Elements

Name | Type | Description
straightEdges | StraightEdge* | Contains an array of found straight edges.
numStraightEdges | unsigned int | Indicates the number of straight edges found.
searchLines | SearchLineInfo* | Contains an array of all search lines used in the detection.
numSearchLines | unsigned int | Indicates the number of search lines used in the detection.


StraightEdgeSearchMode

Specifies the options that are used to detect straight edges.

Elements

Name | Value | Description
IMAQ_USE_FIRST_RAKE_EDGES | 0 | Fits a straight edge on the first points detected using a rake.
IMAQ_USE_BEST_RAKE_EDGES | 1 | Fits a straight edge on the best points detected using a rake.
IMAQ_USE_BEST_HOUGH_LINE | 2 | Finds the strongest straight edge using all points detected on a rake.
IMAQ_USE_FIRST_PROJECTION_EDGE | 3 | Uses the location of the first projected edge as the straight edge.
IMAQ_USE_BEST_PROJECTION_EDGE | 4 | Finds the strongest projected edge location to determine the straight edge.
IMAQ_STRAIGHT_EDGE_SEARCH_SIZE_GUARD | 0xFFFFFFFF | Reserved


StructuringElement

The size and contents of a structuring element specify which pixels a morphological operation takes into account when determining the new value of the pixel being processed. For more information on structuring elements, refer to Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.

For example, to set up the 3 x 3 kernel
1 0 1
1 0 1
1 0 1
called myStructuringElement, use the following syntax:
myStructuringElement.matrixCols = 3
myStructuringElement.matrixRows = 3
myStructuringElement.hexa = FALSE
myStructuringElement.kernel = malloc(9 * sizeof(int))
myStructuringElement.kernel[0] = 1
myStructuringElement.kernel[1] = 0
myStructuringElement.kernel[2] = 1
myStructuringElement.kernel[3] = 1
myStructuringElement.kernel[4] = 0
myStructuringElement.kernel[5] = 1
myStructuringElement.kernel[6] = 1
myStructuringElement.kernel[7] = 0
myStructuringElement.kernel[8] = 1

Elements

Name | Type | Description
matrixCols | int | Number of columns in the matrix.
matrixRows | int | Number of rows in the matrix.
hexa | int | Set this element to TRUE if you specify a hexagonal structuring element in kernel. Set this element to FALSE if you specify a square structuring element in kernel.
kernel | int* | The values of the structuring element. Specify these values in order from the top-left of the kernel to the bottom-right of the kernel.


TextAlignment

Sets the alignment of the text.

Elements

Name | Value | Description
IMAQ_LEFT | 0 | Left aligns the text at the reference point.
IMAQ_CENTER | 1 | Centers the text around the reference point.
IMAQ_RIGHT | 2 | Right aligns the text at the reference point.
IMAQ_TEXT_ALIGNMENT_SIZE_GUARD | 0xFFFFFFFF | Reserved


ThresholdData

Information about a threshold range.

Elements

Name | Type | Description
rangeMin | float | The lower boundary of the range to keep.
rangeMax | float | The upper boundary of the range to keep
newValue | float | If useNewValue is TRUE, newValue is the replacement value for pixels within the range. If useNewValue is FALSE, the function ignores this field.
useNewValue | int | If TRUE, the function sets pixel values within [rangeMin, rangeMax] to the value specified in newValue. If FALSE, the function leaves the pixel values unchanged.


ThresholdMethod

Defines the method a function uses for binary thresholding. For information about automatic thresholding methods, refer to Chapter 8, Thresholding, of the NI Vision Concepts Manual.

Elements

Name | Value | Description
IMAQ_THRESH_CLUSTERING | 0 | The function uses a method that sorts the histogram of the image within a discrete number of classes corresponding to the number of phases perceived in an image.
IMAQ_THRESH_ENTROPY | 1 | The function uses a method that is best for detecting particles that are present in minuscule proportions on the image.
IMAQ_THRESH_METRIC | 2 | The function uses a method that is well-suited for images in which classes are not too disproportionate.
IMAQ_THRESH_MOMENTS | 3 | The function uses a method that is suited for images that have poor contrast.
IMAQ_THRESH_INTERCLASS | 4 | The function uses a method that is well-suited for images in which classes have well separated pixel value distributions.
IMAQ_THRESHOLD_METHOD_SIZE_GUARD | 0xFFFFFFFF | Reserved


ThresholdMode

The method by which to calculate the threshold that imaqTrainChars and imaqReadText use to analyze an image.

Refer to the NI OCR Training Interface Help for more information.

Elements

Name | Value | Description
IMAQ_FIXED_RANGE | 0 | Performs thresholding using the values you provide in the lowThreshold and highThreshold elements of OCRProcessingOptions. This mode provides the fastest thresholding.
IMAQ_COMPUTED_UNIFORM | 1 | Calculates a single threshold value for the entire ROI.
IMAQ_COMPUTED_LINEAR | 2 | Calculates a value on the left side of the ROI, calculates a value on the right side of the ROI, and linearly fills the middle values from left to right. Use the blockCount element of OCRProcessingOptions to control the step size. Use this mode when the light intensity varies uniformly across the ROI.
IMAQ_COMPUTED_NONLINEAR | 3 | Divides the ROI into the number of blocks specified by the blockCount element of OCRProcessingOptions and calculates a threshold value for each block.


TIFFCompressionType

Indicates the type of compression the function uses on a TIFF image.

Elements

Name | Value | Description
IMAQ_NO_COMPRESSION | 0 | The function does not compress the TIFF file.
IMAQ_JPEG | 1 | The function uses the JPEG compression algorithm to compress the TIFF file. JPEG compression is not valid for signed 16-bit or unsigned 64-bit RGB images.
IMAQ_RUN_LENGTH | 2 | The function uses a run length compression algorithm to compress the TIFF file.
IMAQ_ZIP | 3 | The function uses the ZIP compression algorithm to compress the TIFF file.
IMAQ_TIFF_COMPRESSION_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


TIFFFileOptions

Defines how the function writes the TIFF file.

Elements

Name | Type | Description
rowsPerStrip | int | Indicates the number of rows that the function writes per strip. Set this element to 0 if you want the function to write all of the data in one strip.
photoInterp | PhotometricMode | Designates which photometric interpretation to use. The function only uses photoInterp when writing unsigned 8-bit images.
compressionType | TIFFCompressionType | Indicates the type of compression to use on the TIFF file.


Tool

The available tools for creating a region of interest (ROI) in a window.

Elements

Name | Value | Description
IMAQ_NO_TOOL | 0xFFFFFFFF | Reserved
IMAQ_SELECTION_TOOL | 0 | The selection tool selects an existing ROI in an image.
IMAQ_POINT_TOOL | 1 | The point tool draws a point on the image.
IMAQ_LINE_TOOL | 2 | The line tool draws a line on the image.
IMAQ_RECTANGLE_TOOL | 3 | The rectangle tool draws a rectangle on the image.
IMAQ_OVAL_TOOL | 4 | The oval tool draws an oval on the image.
IMAQ_POLYGON_TOOL | 5 | The polygon tool draws a polygon on the image.
IMAQ_CLOSED_FREEHAND_TOOL | 6 | The closed freehand tool draws closed freehand shapes on the image.
IMAQ_ANNULUS_TOOL | 7 | The annulus tool draws annuluses on the image.
IMAQ_ZOOM_TOOL | 8 | The zoom tool controls the zoom of an image.
IMAQ_PAN_TOOL | 9 | The pan tool shifts the view of the image.
IMAQ_POLYLINE_TOOL | 10 | The polyline tool draws a series of connected straight lines on the image.
IMAQ_FREEHAND_TOOL | 11 | The freehand tool draws freehand lines on the image.
IMAQ_ROTATED_RECT_TOOL | 12 | The rotated rectangle tool draws rotated rectangles on the image.
IMAQ_TOOL_SIZE_GUARD | 0xFFFFFFFF | Reserved


ToolWindowOptions

Determines the availability of the window tools.

Elements

Name | Type | Description
showSelectionTool | int | If TRUE, the selection tool becomes visible. The selection tool selects an existing ROI in an image.
showZoomTool | int | If TRUE, the zoom tool becomes visible. The zoom tool controls the magnification of an image.
showPointTool | int | If TRUE, the point tool becomes visible. The point tool draws a point on the image.
showLineTool | int | If TRUE, the line tool becomes visible. The line tool draws a line on the image.
showRectangleTool | int | If TRUE, the rectangle tool becomes visible. The rectangle tool draws a rectangle on the image.
showOvalTool | int | If TRUE, the oval tool becomes visible. The oval tool draws an oval on the image.
showPolygonTool | int | If TRUE, the polygon tool becomes visible. The polygon tool draws a polygon on the image.
showClosedFreehandTool | int | If TRUE, the closed freehand tool becomes visible. The closed freehand tool draws closed freehand shapes on the image.
showPolyLineTool | int | If TRUE, the polyline tool becomes visible. The polyline tool draws a series of connected straight lines on the image.
showFreehandTool | int | If TRUE, the freehand tool becomes visible. The freehand tool draws freehand lines on the image.
showAnnulusTool | int | If TRUE, the annulus becomes visible. The annulus tool draws annuluses on the image.
showRotatedRectangleTool | int | If TRUE, the rotated rectangle tool becomes visible. The rotated rectangle tool draws rotated rectangles on the image.
showPanTool | int | If TRUE, the pan tool becomes visible. The pan tool shifts the view of the image.
reserved1 | int | This element is reserved and should be set to FALSE.
reserved2 | int | This element is reserved and should be set to FALSE.
reserved3 | int | This element is reserved and should be set to FALSE.
reserved4 | int | This element is reserved and should be set to FALSE.


TransformReport

Describes a set of transformed coordinates.

Elements

Name | Type | Description
points | PointFloat* | An array of transformed coordinates.
validPoints | int* | An array of values that describe the validity of each of the coordinates according to the region of interest you calibrated using either imaqLearnCalibrationGrid() or imaqLearnCalibrationPoints(). If a resulting point is inside the calibrated ROI, the function sets the corresponding int in the validPoints array to TRUE. Otherwise, the function sets the corresponding int in the validPoints array to FALSE. If you created the calibration information with imaqSetSimpleCalibration() or imaqSetCalibrationInfo(), each element in the validPoints array is always TRUE.
numPoints | int | The length of both the points array and the validPoints array.


TruncateMode

Specifies which frequencies the function truncates.

Elements

Name | Value | Description
IMAQ_TRUNCATE_LOW | 0 | The function truncates low frequencies.
IMAQ_TRUNCATE_HIGH | 1 | The function truncates high frequencies.
IMAQ_TRUNCATE_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


TwoEdgePolarityType

Specifies the edge polarity of the edge pairs.

Elements

Name | Value | Description
IMAQ_NONE | 0 | The function ignores the polarity of the edges.
IMAQ_RISING_FALLING | 1 | The polarity of the first edge is rising (dark to light) and the polarity of the second edge is falling (light to dark).
IMAQ_FALLING_RISING | 2 | The polarity of the first edge is falling (light to dark) and the polarity of the second edge is rising (dark to light).
IMAQ_RISING_RISING | 3 | The polarity of the first edge is rising (dark to light) and the polarity of the second edge is rising (dark to light).
IMAQ_FALLING_FALLING | 4 | The polarity of the first edge is falling (light to dark) and the polarity of the second edge is falling (light to dark).
IMAQ_TWO_EDGE_POLARITY_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


UserPointSymbol

Defines a symbol that functions can use to represent points in an overlay. For example, to set up the 3 x 3 symbol:

1 | 0 | 1
1 | 0 | 1
1 | 0 | 1

called mySymbol, use the following syntax:
mySymbol.cols = 3
mySymbol.rows = 3
mySymbol.pixels = malloc(9 * sizeof(int))
mySymbol.pixels[0] = 1
mySymbol.pixels[1] = 0
mySymbol.pixels[2] = 1
mySymbol.pixels[3] = 1
mySymbol.pixels[4] = 0
mySymbol.pixels[5] = 1
mySymbol.pixels[6] = 1
mySymbol.pixels[7] = 0
mySymbol.pixels[8] = 1

Elements

Name | Type | Description
cols | int | Number of columns in the symbol.
rows | int | Number of rows in the symbol.
pixels | int* | The pixels of the symbol. Specify these pixels in order from the top-left of the symbol to the bottom-right of the symbol. The function evaluates each pixel as either off (zero value) or on (non-zero value).


VerticalTextAlignment

Sets the vertical alignment for the text.

Elements

Name | Value | Description
IMAQ_BOTTOM | 0 | Aligns the bottom of the text at the reference point.
IMAQ_TOP | 1 | Aligns the top of the text at the reference point.
IMAQ_BASELINE | 2 | Aligns the baseline of the text at the reference point. The baseline of the text acts as the bottom for all uppercase characters. Certain lowercase characters, such as g and j, have a portion that dips below the baseline.
IMAQ_VERTICAL_TEXT_ALIGNMENT_SIZE_GUARD | 0xFFFFFFFF | Reserved


View3DOptions

Specifies how to convert an image to a three-dimensional representation.

Elements

Name | Type | Description
sizeReduction | int | A divisor the function uses when determining the final height and width of the 3D image. The function coerces the value if it is negative or greater then one-eighth the height or width of the original image.
maxHeight | int | Defines the maximum height of a pixel from the image source drawn in 3D. Valid values range from 2 to 256.
direction | Direction3D | Defines the 3D orientation.
alpha | float | Determines the angle between the horizontal and the baseline. Valid values range from 15 to 45.
beta | float | Determines the angle between the horizontal and the second baseline. Valid values range from 15 to 45.
border | int | Defines the border size.
background | int | Defines the background color.
plane | Plane3D | Indicates the view a function uses to show complex images.


VisionInfoType

The Vision information that can be attached to an image.

Elements

Name | Value | Description
IMAQ_ANY_VISION_INFO | 0 | The function checks if any extra vision information is associated with the image.
IMAQ_PATTERN_MATCHING_INFO | 1 | The function checks if any pattern matching template information is associated with the image.
IMAQ_CALIBRATION_INFO | 2 | The function checks if any calibration information is associated with the image.
IMAQ_OVERLAY_INFO | 3 | The function checks if any overlay information is associated with the image.
IMAQ_VISION_INFO_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


VisionInfoType2

Use this enumeration to indicate which Vision information types you want to check for in an image or remove from an image. Use bitwise-OR to combine two or more values in order to check for or remove multiple values with one function call. You can also use bitwise-AND between these values and the return value of imaqIsVisionInfoPresent2() to confirm the presence or absence of particular NI Vision information types.

Elements

Name | Value | Description
IMAQ_VISIONINFO_CALIBRATION | 0x01 | Used to indicate interaction with the Calibration information in an image.
IMAQ_VISIONINFO_OVERLAY | 0x02 | Used to indicate interaction with the Overlay information in an image.
IMAQ_VISIONINFO_GRAYTEMPLATE | 0x04 | Used to indicate interaction with the grayscale template information in an image.
IMAQ_VISIONINFO_COLORTEMPLATE | 0x08 | Used to indicate interaction with the color template information in an image.
IMAQ_VISIONINFO_GEOMETRICTEMPLATE | 0x10 | Used to indicate interaction with the geometric template information in an image.
IMAQ_VISIONINFO_CUSTOMDATA | 0x20 | Used to indicate interaction with the binary or text Custom Data in an image.
IMAQ_VISIONINFO_GOLDENTEMPLATE | 0x40 | Used to indicate interaction with the golden template information in an image.
IMAQ_VISIONINFO_ALL | 0xFFFFFFFF | Removes, checks for, or indicates the presence of all types of extra information in an image.


WaveletTransformMode

Sets the type of wavelet transform to be done when writing a JPEG2000 file.

Elements

Name | Value | Description
IMAQ_WAVELET_TRANSFORM_INTEGER | 0 | Uses a 5-3 reversible integer transform. This transform is generally faster than the floating-point transform, but produces less accurate results.
IMAQ_WAVELET_TRANSFORM_FLOATING_POINT | 1 | Performs a 9-7 irreversible floating-point transform. This transform is generally more accurate than the integer transform, but is slower.
IMAQ_WAVELET_TRANSFORM_MODE_SIZE_GUARD | 0xFFFFFFFF | Reserved


WindowBackgroundFillStyle

Describes the fill style for a display window.

Elements

Name | Value | Description
IMAQ_FILL_STYLE_SOLID | 0 | Fill the display window with a solid color.
IMAQ_FILL_STYLE_HATCH | 2 | Fill the display window with a pattern defined by WindowBackgroundHatchStyle.
IMAQ_FILL_STYLE_DEFAULT | 3 | Fill the display window with the NI Vision default pattern.
IMAQ_FILL_STYLE_SIZE_GUARD | 0xFFFFFFFF | Reserved


WindowBackgroundHatchStyle

Describes the hatch style for a display window.

Elements

Name | Value | Description
IMAQ_HATCH_STYLE_HORIZONTAL | 0 | The background of the display window will be horizontal bars.
IMAQ_HATCH_STYLE_VERTICAL | 1 | The background of the display window will be vertical bars.
IMAQ_HATCH_STYLE_FORWARD_DIAGONAL | 2 | The background of the display window will be diagonal bars. The bars start in the lower-left corner and end in the upper-right corner of the window.
IMAQ_HATCH_STYLE_BACKWARD_DIAGONAL | 3 | The background of the display window will be diagonal bars. The bars start in the upper-left corner and end in the lower-right corner of the window.
IMAQ_HATCH_STYLE_CROSS | 4 | The background of the display window will be intersecting horizontal and vertical bars.
IMAQ_HATCH_STYLE_CROSS_HATCH | 5 | The background of the display window will be intersecting forward and backward diagonal bars.
IMAQ_HATCH_STYLE_SIZE_GUARD | 0xFFFFFFFF | Reserved


WindowEventType

Describes the type of a window event.

Elements

Name | Value | Description
IMAQ_NO_EVENT | 0 | No event occurred since the last call to imaqGetLastEvent().
IMAQ_CLICK_EVENT | 1 | The user clicked on a window.
IMAQ_DRAW_EVENT | 2 | The user drew an ROI in a window.
IMAQ_MOVE_EVENT | 3 | The user moved a window.
IMAQ_SIZE_EVENT | 4 | The user sized a window.
IMAQ_SCROLL_EVENT | 5 | The user scrolled a window.
IMAQ_ACTIVATE_EVENT | 6 | The user activated a window.
IMAQ_CLOSE_EVENT | 7 | The user closed a window.
IMAQ_DOUBLE_CLICK_EVENT | 8 | The user double-clicked in a window.
IMAQ_WINDOW_EVENT_TYPE_SIZE_GUARD | 0xFFFFFFFF | Reserved


WindowOptions

Defines the behavior of a window.

Elements

Name | Value | Description
IMAQ_WIND_RESIZABLE | 1 | When present, the user may resize the window interactively. When absent, you can only resize the window programmatically.
IMAQ_WIND_TITLEBAR | 2 | When present, the title bar on the window is visible. When absent, the title bar on the window is not visible.
IMAQ_WIND_CLOSEABLE | 4 | When present, the close box is available. When absent, the close box is removed. The title bar must be present for this flag to have effect.
IMAQ_WIND_TOPMOST | 8 | When present, the window is always on top. When absent, the window is on top only when active.
IMAQ_WINDOW_OPTIONS_SIZE_GUARD | 0xFFFFFFFF | Reserved


WindowThreadPolicy

Determines the thread in which NI Vision creates windows.

Elements

Name | Value | Description
IMAQ_CALLING_THREAD | 0 | Using this policy, NI Vision creates windows in the thread that makes the first display function call for a given window number.
IMAQ_SEPARATE_THREAD | 1 | Using this policy, NI Vision creates windows in a separate thread and processes messages for the windows automatically.
IMAQ_WINDOW_THREAD_POLICY_SIZE_GUARD | 0xFFFFFFFF | Reserved


WriteClassifierFileMode

What information to write to a classifier file.

Elements

Name | Value | Description
IMAQ_CLASSIFIER_WRITE_ALL | 0 | Writes all information to the classifier file.
IMAQ_CLASSIFIER_WRITE_CLASSIFY_ONLY | 1 | Write only the information needed to classify to the classifier file.
IMAQ_WRITE_CLASSIFIER_FILE_MODES_SIZE_GUARD | 0xFFFFFFFF | Reserved