Text this: A Novel Optimization-Based Approach for Content-Based Image Retrieval