Patent attributes
A defect detection method includes acquiring a reference image; selecting a target region of the reference image; identifying, based on a matching metric, one or more comparative regions of the reference image corresponding to the target region; acquiring a test image; masking the test image with the target region of the reference image and the one or more comparative regions of the reference image; defining a defect threshold for the target region in the test image based on the one or more comparative regions in the test image; and determining whether the target region of the test image contains a defect based on the defect threshold.