On the use of phase of the discrete cosine transform for text detection in document images and video frames under variations in illumination