1. A computer-implemented method, comprising, dividing an image into a set of image subregions; for each image subregion of the set of image subregions, identifying a set of subregion dictionary entries from a subregion dictionary, wherein each of the set of subregion dictionary entries comprises a subregion entry appearance matching an appearance of the respective image subregion, and a subregion entry geometry comprising a shape construction parameter; and constructing a shape from the image, wherein the constructing the shape comprises identifying a set of optimal subregion dictionary entries, the identifying the set of optimal subregion dictionary entries comprises minimizing an energy function of the sets of subregion dictionary entries for all image subregions of the set of image subregions, and each optimal subregion dictionary entry is, for a respective one of the image subregions, a subregion entry associated with a minimum of the energy function, and the shape comprises a shape construction parameter from a subregion geometry entry of each optimal subregion geometry entry of the set of optimal subregion geometry entries.