Invariance in Content-Based Image Retrieval