Screenshots     Download     Documentation     Tutorials     Partners     Resources     Contact     Forum     Search  

 

Adaptive Threshold

The Adaptive Threshold module is used in uneven lighting conditions when you need to segment a lighter foreground object from its background. In many lighting situations shadows or dimming of light cause thresholding problems as traditional thresholding considers the entire image brightness. Adaptive Thresholding will perform binary thresholding (i.e. it creates a black and white image) by analyzing each pixel with respect to its local neighborhood. This localization allows each pixel to be considered in a more adaptive environment.

The algorithm will consider each pixel one at a time, calculate the mean of the local neighborhood 'window size' (x-windowSize/2, y-windowSize/2, x+windowSize/2, y+windowSize/2) and thresholds the current pixel to white if the difference between the calculated mean and the current pixel value is lower than the 'mean offset'.

The example below shows an image from our line following tutorial. In this image the sides of the line image are dimmed due to uneven lighting. Adaptive Thresholding can solve this problem as long as the neighborhood considered (the pixel window) is large enough.

Interface

Instructions

1. Specify a window size large enough to reduce unwanted lighting
2. Specify the mean offset

Example

SourceAdaptive Threshold

See Also


Threshold
Auto_Threshold

For more information


HIPR2 - Adaptive Thresholding

© 2008 RoboRealm. All Rights Reserved. | Contact | Glossary | Privacy | Disclaimer | Link to Us | Resources | Site Map