Most object recognition schemes fail in case of illumination changes between the color image acquisitions. One of the most widely used solutions to cope with this problem is to compare the images by means of the intersection between invariant color histograms. The main originality of our approach is to cope with the problem of illumination changes by analyzing each pair of query and target images constructed during the retrieval, instead of considering each image of the database independently from each other. In this paper, we propose a new approach which determines color histograms adapted to each pair of images. These adapted color histograms are obtained so that their intersection is higher when the two images are similar than when they are different. The adapted color histograms processing is based on an original model of illumination changes based on rank measures of the pixels within the color component images.