Extracting Textual Information from Images and Videos for Automatic Content-Based Annotation and Retrieval