1. A method for generating a text lines array from an input image array, the method comprising the steps of: computing a sufficient stability threshold; and for each white pixel in the input image array, setting a corresponding pixel in the text lines array to black if a horizontal distance value from the white pixel to a nearest black pixel in a same image pixel row is less than the sufficient stability threshold.