16. A non-transitory computer-readable storage medium storing executable computer program instructions for identifying documents sharing at least one a common underlying structure, the computer program instructions comprising instructions for: detecting occurrences of a plurality of predetermined image features in a plurality of document images, wherein at least one of the plurality of predetermined image features is common among instances of a form; indexing the plurality of document images in an image index based on the detected image features; building a graph of connected nodes for the plurality of document images by searching the image index, wherein nodes representing instances of a predefined document type are connected by edges in the graph; identifying the documents sharing the common underlying structure using the graph; reproducing the common underlying structure shared by the identified documents; and generating improved images of the identified documents by overlaying the reproduced common underlying structure on document images of the identified documents.
17. The storage medium of claim 16 , wherein the graph comprises a weighted graph and edges in the weighted graph are assigned weights measuring similarities between document images represented by nodes connected by the edges.