CPC G06T 7/001 (2013.01) [G06F 18/24 (2023.01); G06T 7/136 (2017.01); G06T 7/187 (2017.01); G06T 7/70 (2017.01); G06V 10/82 (2022.01); G06F 18/214 (2023.01); G06T 2207/20081 (2013.01); G06T 2207/20084 (2013.01); G06T 2207/30141 (2013.01); G06V 10/44 (2022.01)] | 19 Claims |
1. A method for labeling images comprising:
obtaining an image to be tested;
comparing the image to be tested to a reference image to generate an image mask, the image mask includes several connected domains;
detecting defects of the image to be tested;
when at least one defect is detected in the image to be tested, obtaining a coordinate of the at least one defect;
based on a central coordinate of the connected domains and the coordinate of the at least one defect, determining the connected domains to be defect connected domains or normal connected domains;
generating a first image mask and a second image mask corresponding to the defect connected domains and the normal connected domains; and
processing the first image mask and the second image mask with the image to be tested, respectively, to obtain a defect element image corresponding to the defect connected domains and a normal element image corresponding to the normal connected domains.
|