A reference image is generated from a subject image of at least a portion
of a photolithography mask to enable a photolithography mask inspection
and analysis system that otherwise cannot generate a reference image from
a reference die or digitized design data, for example, to perform a mask
analysis using the reference image. A mask inspection and analysis system
may then be enhanced to perform one or more additional mask analyses to
analyze the mask. The reference image is generated by identifying a
defect or contaminant of the mask in the subject image and modifying the
subject image to remove the defect or contaminant from the mask to
generate the reference image. For one embodiment, a system using a
STARlight inspection tool that captures transmitted and reflected images
of a portion of a mask may then be enhanced to perform one or more mask
analyses that use a reference image.