Condensing image databases when retrieval is based on non-metric distances | Synapse