Image Assertion

Table of contents

Description

An image assertion tests the image of some control, VI, or window against a comparison value by first quantifying the difference between the two images and then comparing that quantity to the specified threshold.

Parameters

Step Subtype

The specific operation to be performed. It can be one of the following values.

Value Meaning
Control Image Checks a control's image against the specified value.
VI Image Checks a VI's image against the specified value.
Window Image Checks a window's image against the specified value.
Cursor Icon Checks a mouse cursor icon's image against the specified value.

Comparison Type

The type of comparison (comparator) to use when performing the comparison of the quantified difference value against the threshold.

Object Name

For all subtypes except Cursor Icon, the name of the object referenced in the assertion. It can be a control name, VI name, or window name.

Threshold

The value to compare the quantified difference value against. The units of this parameter may change based on the value of Compare Method.

Compare Method

The method used to compare the actual image against the expected image. It can be one of the following values.

Value Meaning
Mean Squared Error Measures the average squared difference between the pixels of the expected image and the actual image. Since each RGB channel of each pixel is considered, it is effectively a unitless value. Lower values indicate higher similarity. A value of zero indicates an exact match.
Peak Signal-to-Noise Ratio Measures the quality difference between the expected image and the actual image. It is expressed in decibels (dB). Higher values indicate higher similarity. A value of inf indicates an exact match.

Left/Top/Right/Bottom

Allows a subset of the full image to be used in the comparison. See Remarks for details.

Image Units

The units of Left, Top, Right, and Bottom. It can be one of the following values.

Value Meaning
Pixels Measures subset based on pixel values.
Percent Measures subset based on percent of the total image size.

Comparison Value

The value to compare the actual value against.

Remarks

When the Enter Step window is in an Image-Assertion context, the window is constantly listening for a macro hotkey press. When the hotkey press is detected, the Comparison Value will automatically populate with the current image.

If the Left, Top, Right, and Bottom are all set to 0, the entire image will be used. If Left and Right are set to 0 and one or both of Top and Bottom are nonzero, the entire width will be used and a subset of the height will be used based on the nonzero values. If Top and Bottom are set to 0 and one or both of Left and Right are nonzero, the entire height will be used and a subset of the eidth will be used based on the nonzero values.

For the Control Image subtype, the image includes any labels or other visible parts of the control.

For the Window Image subtype, the image includes a title bar if one exists. For the VI Image subtype, since the image is of the front panel itself, the image does not include the title bar.


This site uses Just the Docs, a documentation theme for Jekyll.