This function allows setting global image intensity threshold, which results in contrast
enhancement (by price of color quantization). It's a primitive way to discriminate image
elements based on their color- increasing some, and decreasing others, according to
their relation with the threshold.
The contribution also includes a small GUI (not documented) which wraps this function, and provides comfortable means to find the best parameters.