Interactive contour modeling applied to image querying