Patent ID: 8285031

Claim:
A method for inspecting a pattern to-be-inspected by using an image of the pattern to-be-inspected and data for fabricating the pattern to-be-inspected, comprising the steps of: controlling an image generation device to generate the image of the pattern to-be-inspected; storing at least part of the image in a memory of an inspection apparatus; storing, into the memory, at least one reference pattern representing one or both of one or more line segments and one or more curves, the at least one reference pattern derived from data for fabricating the pattern to-be inspected and comprising data associated with at least a first and a second mask; detecting edges within the image; determining a first shift quantity by comparing at least one detected edge associated with the first mask and an associated line or curve of the reference pattern; determining a second shift quantity by comparing at least one detected edge associated with the second mask and an associated line or curve of the reference pattern; and determining an overlay error by differencing the first shift quantity and the second shift quantity; wherein the reference pattern comprises a pattern generated by at least one of (i) geometry operation between the data for fabricating the pattern to-be-inspected representing the first mask and the data for fabricating the pattern to-be-inspected representing the second mask, and (ii) geometry operation between the reference pattern associated with the first mask and the reference pattern associated with the second mask.