PreProcess

This module is intended for image pre-processing.

It is commonly used to scale down images to reduce processing times/memory usage, cropping pictures to avoid defect detection outside ROIs (Regions of Interest) and other examples mentioned below.

ย 

The following modifications are available in this module:

Cut

Cut lets you crop the image manually from all four sides.

ย 

Scale

Scale lets you adjust the resolution of the image.

ย 

Rotation

You can rotate all images by a specified angle.

ย 

Background normalization

Background normalization serves for unifying colors.

Blur

This function blurs the picture and reduces noise. Details in theย OpenCV documentation.

ย 

Canny Edge Detector

Canny edge detector focuses only on the outlines of the objects. You can set Threshold value to highlight the outlines. Details in theย OpenCV documentation.

ย 

Remove background

Remove background function can help you with focusing only on the main object. Offers two types of background removal (histogram and canny), each can be useful for different kinds of images. The โ€˜Canny background removalโ€™ usesย canny edge detector,ย dilationย andย erosion.

ย 

Unifier

Unifies the position and angle of objects or just puts the angle of the object into Context (if this option is ticked). Remove background needs to be used before Unifier.

ย 

Contrast equalisation

Equalises the contrast using the CLAHE algorithm, which works with a histogram of a pixel and its surroundings (depending on theย kernel size). Clip limit determines the value at which the histogram is clipped. Details in the OpenCV documentation forย CLAHEย andย histogram equalisation.

ย 

Dilation

Can be used to expand shapes found in the input image. Details in the OpenCV documentation forย dilateย andย morphological transformations.

ย 

Erosion

Can be used to reduce shapes found in the input image. Details in the OpenCV documentation forย erodeย andย morphological transformations.

ย 

Polar transform

Finds the biggest circle in the image (found circle can be seen in the left image showing the โ€˜Stage 1โ€™ layer of polar transform), then transforms it using polar coordinates. โ€˜Minimal distance between circlesโ€™ can be used to adjust how many circles will be found by defining a minimal distance which needs to be between their centers. The โ€˜inverse ratio of the accumulator/image resolutionโ€™ is used to adjust accumulator resolution (the lower the ratio, the higher the accumulator resolution). Details in the OpenCV documentation forย Hough circlesย andย polar warp.

ย 

Color space transform

Converts the image into a different color space (HLS, HSV, YUV, LAB or GRAY). Details in theย OpenCV documentation.

Adjust gamma

This function lets you adjust the gamma value.

Kernel size

Some transformations use a parameter called โ€˜Kernel sizeโ€™, which determines the size of the matrix of surrounding pixels, which are taken into consideration when computing the transformation.

Active

Using the โ€˜Activeโ€™ checkbox, the whole module can be enabled or disabled. You can also enable/disable each function individually. When new module or individual function is created, it is automatically set as active.

Order of functions, changing layers

Individual functions are applied one after another from the top. You can change the order of the functions so that they suit your needs best, just drag and drop them to the right place. If you want to see how the image looks after applying individual active modifications (and its stages in some cases), you can change layers using the button at the top, which is set to โ€˜Show all layersโ€™ by default.