1. A method, comprising: using a computer to implement operations including ranking a plurality of regions of a raster image based on color similarities between the plurality of regions; and automatically merging certain ones of the plurality of regions connected through at least one of an edge and a vertex based on the ranking.