__header__

Description

The adaptive threshold tool will look for defects within images

The defects will be found with the formula (Pixel - Mean) - change = answer.
See the style paramater for all options.

Notes

Once setup the tool can be run without showing the output to the viewer.
To do this
Currently only works on monochrome images

Inputs

CIFViewer

display viewer source image if no image sepecified

CIF

option image to operator on

ROI

ROI: Region of Interest, this describes the box that will be define the area in question.

Parameters

Image

the adaptive thresholded image - displayed within the viewer if defined.

M

M: This area has three options that allow the user to find the Mean, the MaxMin, or the Medium points within the region of interest.

C

C: a lower number here gives for a lower change graded

neighbourhoodX & neighborhoodY: give the pixel amount of the grid..... This means that the axis of X & Y will multiply against one another to form a grid pattern for the region of interest. This grid is what will be used to find the Mean, MinMax, and Medium point areas, and these averages will be used to find parts that do not fit in and are defects.

Style

Style: this indicates the style within which the image and the defects will be detected.
Style options: Grey, GreyAbs, Binary, BinaryAbs: these will alter the
  binary:         pixel = (pixel<(mean-C))?0:255;
  BinaryAbs:  pixel = abs(pixel-mean)
  Grey:          pixel = value-mean+C (0..255)
  GreyAbs:    pixel = abs(value-mean+C) (0..255)

ImageMode

Set how the ouput image is to be handled