1. A non-transitory computer-readable storage medium whose contents enable a computing system to detect a roof in an image of a building having a roof, by performing a method comprising: receiving a target image; computing statistical measures for at least one selected section of a roof within the target image; training a statistical model system on the computed statistical measures to identify distinguishing characteristics of a roof; receiving from the statistical model system indications of portions outside of the selected section of the target image identified as part of the roof; determining, based on the received indications of portions of the target image, a likely outline of the roof in the target image; and storing the determined likely outline of the roof.