Segment images with quadtrees