A method and apparatus are disclosed for repairing an image using an image defect
matte that indicates portions of an image that have been repaired in previous iterations
or are proposed modifications for a current iteration. A user interface incorporates
graphical tools that allow the user to modify or manipulate the defect matte and
thereby initiate commands that control the selection, detection or repair of one
or more defects in an image. For example, the user interface may include commands
that allow a user to further repair or cancel a previous repair of a selected region
of an image. Each image defect matte may be stored, for example, as an array of
elements that assume integer values corresponding to different degrees or steps
of repair, such as "original", "repaired" or "new defect." Each matte integer value
can be encoded with a different color. Each element of the defect matte corresponds
to one or more image pixels. The defect matte can be projected onto the original
or repaired image to facilitate the repair process.