CPC G06T 7/0004 (2013.01) [G06T 3/00 (2013.01); G06T 5/40 (2013.01); G06T 5/50 (2013.01); G06T 5/70 (2024.01); G06T 11/00 (2013.01); G06T 2207/20081 (2013.01); G06T 2207/20192 (2013.01); G06T 2207/20221 (2013.01)] | 13 Claims |
1. A method of generating a defect image for training, by a system having a central processing unit and a memory, the method comprising:
extracting a defect area from a sample image, wherein the defect area comprises a first defect and a first surrounding area, wherein the first surrounding area forms a quadrangle encompassing the first defect, with border lines of the first surrounding area intersecting outermost top, bottom, left, and right points of the first defect;
determining a target area in a base image, the target area being an area with which the defect area is to be synthesized and comprising a second defect and a second surrounding area encompassing the second defect;
correcting the defect area by referring to image data of the target area, wherein the correcting of the defect area comprises a reduction of a histogram difference between the first surrounding area and the second surrounding area and between the first defect and the second defect, wherein the reduction of the histogram difference between the first defect and the second defect is restricted to a predefined degree while the reduction of the histogram difference between the first surrounding area and the second surrounding area is unrestricted; and
generating the defect image for training by synthesizing the corrected defect area with the target area in the base image.
|