Edge potential functions and genetic algorithms for shape-based image retrieval