Altami Software - software for image analysis
Altami Software
Software for image analysis

8.4.3 Threshold

The filter picks out objects from the surrounding background when brightnesses objects and background pixels are concentrated near two prevailing values. Usually the filter is used for receiving two-grade (binary, black and white) image of half-tone image or deleting the noise.

Marking of objects is done by means of defining the values of threshold dividing the areas of brightnesses distribution. If the brightness value of a defined pixel is more than the threshold pixel, than this point belongs to the object, if less — than to the background.

Filter parameters:

  • New value (newValue);
  • Block size (blockSize);
  • TreshValue (treshValue);
  • Operations (treshOperation).

The filter writes to the pixel New value (newValue) in the case if its brightness is higher than the average brightness in radius of the circle defined by the Block size (blockSize) parameter. New value should not equal zero.

Block size is a size of the analyzed area around the pixel. The more is this value, the less the sensitivity of the filter, the more noise is eliminated, yet, some details can be lost. The more is the TreshValue (treshValue) parameter, the brighter objects shall be defined at the image.

Selection of Block size and Threshold value values cannot be universal, it changes from task to task, and these tasks should be picked by hand for receiving the best result.

In threshold transformation you can select one of the Operations (treshOperation):

1) binary transformation (treshBinary). Pixel whose value is higher than that of a threshold becomes white, lower — black.

http://download.altamisoft.ru/download/resources/AS_3_1_0_manual_en/threshold_trbin_en.png

2) inverse binary transformation (treshBinaryInv). Pixel whose value is higher than the threshold becomes black, lower — white.

http://download.altamisoft.ru/download/resources/AS_3_1_0_manual_en/threshold_trbininv_en.png

3) reduced (treshTrunc).

http://download.altamisoft.ru/download/resources/AS_3_1_0_manual_en/threshold_trtunc_en.png

4) set to zero (treshToZero): Pixel value less than the threshold equals 0, higher than the threshold stays the same.

http://download.altamisoft.ru/download/resources/AS_3_1_0_manual_en/threshold_trto0_en.png

5) inverse, set to zero (treshToZeroInv). Pixel value higher than the threshold equals to 0, less than the threshold stays the same.

http://download.altamisoft.ru/download/resources/AS_3_1_0_manual_en/threshold_trto0inv_en.png

Please find more information on settings and the use of filter in the step by step instruction Tutorial on the use of Threshold filter.

Win/Linux/Mac

Altami software products work under the most popular modern operating system such as Windows, Linux и Macintosh.

Need to develop?

If our products do not solve your problems, we are ready to develop "from scratch" or modify existing applications.

USB 3.0

Tired of the slow camera work? Keep up with progress! The camera on USB 3.0! operates at a speed of up to 180 fps.