Method based on a probability function image retrieval