Hierarchical Perceptual Grouping for Object Recognition