Segmentation of page images having artifacts of photocopying and scanning