1. A method of generating bi-level pixel values from a set of input pixel values corresponding to an image, the method comprising: determining a first variance, said first variance being a variance of input pixel values in a first window of said image, said first window being of a first size and including an input pixel value being processed; determining a second variance, said second variance being a variance of input pixel values in a second window of said image, said second window at least partially overlapping said first window and including said input pixel value being processed inaddition to at least some pixel values not included in said first window; selecting, based on said first variance and said second variance, a binarization threshold generation function from a plurality of binarization threshold generation functions, said plurality of binarization threshold generation functions including at least a first binarization threshold generation function and a second binarization threshold function; and generating a bi-level pixel value from said input pixel value based on a comparison of said input pixel value to a binarization threshold generated by the selected binarization threshold generation function.