Applying Semantic Reasoning in Image Retrieval