Multi-oriented and multi-scaled text character analysis and recognition in graphical documents and their applications to document image retrieval