1. A segmented layered image system, comprising: a pixel energy component adapted to calculate pixel energy for a region of a document image, the pixel energy component further adapted to calculate a partition of the region based at least in part upon minimization of pixel energy of at least one of a foreground and a background; a region merge component that merges pairs of regions of the document image based, at least in part, upon minimization of pixel energy; and, a mask storage component adapted to store information associated with the partition in a mask.