Interactive image segmentation by maximal similarity based region merging