Imagine a scene with bright objects against a dark background. Thresholding is a very common monadic operation which transforms the image into one where the pixels have two possible values: true or false which correspond to foreground or background. It can be performed with a single vectorized MATLAB operation.