A multi-plane approach for text segmentation of complex document images