A method and a system for dynamically thresholding an image signal. The
system comprises a computing block. The computing block receives the
image signal and a minimum and a maximum within each of a set of windows
centered on the current pixel in the image signal, and computes, for each
of the windows, based on the current pixel and the respective minimum and
maximum, a respective indicator representing the distance and direction
of the current pixel relative to a respective threshold plane, and
outputs a control signal based on the indicators.