1. A method of binarizing a grayscale image into a black and white binary image, said method comprising: selecting a given pixel (P) in the grayscale image; determining the color value (V P ) of P; providing a sub-image (SubI P ) comprising P as well as a number of neighboring pixels; providing a threshold (T P ) of P based on the color values of all the pixels in SubI P ; converting P to black if V P ≦T P or to white if V p >T P ; repeating the above steps for each pixel of the grayscale image; and obtaining a resulting black and white binarized image.