A compact Image Segmentation for RTS invariant image retrieval