__header__

Description

The correlation tool will allow the user to train Automation Manager to find a specific piece of an image by comparing it to a predefined image (what we will call the model). 

To begin drag this tool onto a program and select it.  When the tool is selected in the program two ROI boxes will display in the viewer window, one green and one blue.  The blue box is used to train the tool.


Position the blue ROI over the part of the image you would like the correlation tool to locate.

Right-click the Correlation tool in the progam and choose train.  When the tool is trained its icon will reflect the trained area, that is your model.

 

Now that the tool is trained, whenever the correlation too is run in that program it will look for what it has been trained to find and place a crosshair in the center of that area.  By default the green box is the ROI that scans images to find what the tool has been trained to locate.

 

The correlation tool works by doing a low resolution pass search for the model (i.e. what you have trained).  After this low pass search is done over the entire image there may be several canidates that could possibly be the right match.  Next, a high resolution scan is done on each of the possible canidates.  The caniditate with the highest percentage of similarity will be selected from the image.

Correlation Properties

Correlation


Minimum Accept Score

The Minimum Accpet Score is a percentage based on similarity (of shape, not brightness or contrast) to the trained model.  If the score is below the Minimum Accept Score, nothing will be selected from that image and it is deemed to have failed.

Sub Sample X

Sub Sample Y

The correlation does a low resolution pass search of the entire image for the model. This low pass search is done to select possible regions that may correlate to the model you have trained.  Based on the possible regions found in the low resolution pass a high resolution pass is done to select the sector that is most similar to the trained model.  The low pass search speeds up the execution time to find the model.

The subsample factors define how to render the image for the low pass search. For example, if the subsample is 3 then only every thrid pixel is used in the low resolution pass. Note: the higher these factors the faster the search, but if the sub sample factors are too high, then the model may not be found. To check that the factors are not too high, view the "Model-Low" resolution model and hit "Re-Train". This low resolution model should be recognizable.



Retrain

The "Re-Train" button will retrain the Low Pass model only.  It will resample the model with a lower resollution for the first pass (see above - Sub Sample).  When the "Sub Sample" X and/or Y have been adjusted the "Re-Train" button must be hit in order for the change to be made.  You can see how the change has affected the model be selecting "Model-Low Resolution" from the dropdown menu.  "Re-Train" will only resample the model that has already been trained, it will not genetrate a completely new model.

Image Display - Model, Model Low Resolution., Result Image

Displays the trained model.
- The Model is the actual image of the model you have trained.
- The Model-Low Resolution shows how the model looks in low resolution mode.
- Result Image shows an image result of the correlation. Points of correlation are shown as light spots.

Search Accuracy:-  Low Accuracy, Pixel Accuracy, Sub Pixel Accuracy

Defines the thoroughness of the high resolution pass.  Low Accuracy will be the fastest but least accurate, Sub Pixel will be the slowest but most accurate.
Low Accuracy stops at the low resolution pass.
Pixel accuracy stops at the pixel resolution pass.
Sub pixel accuracy looks at the surrounding locations of the found model to determine more precicely the correct model.

Find Center Offset X, Find Center Offset Y

When the correlation too is run it will place a crosshair on the part of the image that fits the model.  The crosshair is placed on the center of that image.  Using the Center Offsets you can adjust the tool so it will place the crosshair either above or below the center (using the Offset Y) or to the right or left of the image (using the Offset X). 

General Parameters


Train:
This button is equavalent to right-clicking the Correlation tool in the program and choosing "Train"  This button will train as the new model whatever is currently inside the blue ROI.

Run:
The model is searched for. Its position, and score are calculated.

Cycle /Time:
Reports the execution time in msec of the trained model.

Reset
Resets the positions of the ROI.

Results


Number Points
The number of points/features found.  Currently the correlation tool will only find one point everytime it is run.

Score
The correlation score. !00% is perfect match.

Contrast Score
The measure of contrast. !00% contrast is the same as the trained image.  The Correlation tool does not take into consideration contrast, although it does measure it.

X,Y
The found location of the model.

__footer__