US 12,118,714 B2
Method of detecting and classifying defects and electronic device using the same
Tung-Tso Tsai, New Taipei (TW); Tzu-Chen Lin, New Taipei (TW); Chin-Pin Kuo, New Taipei (TW); and Shih-Chao Chien, New Taipei (TW)
Assigned to HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed by HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed on Dec. 30, 2021, as Appl. No. 17/566,159.
Claims priority of application No. 202011633792.8 (CN), filed on Dec. 31, 2020.
Prior Publication US 2022/0207687 A1, Jun. 30, 2022
Int. Cl. G06T 7/00 (2017.01)
CPC G06T 7/001 (2013.01) [G06T 2207/20081 (2013.01); G06T 2207/30108 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method for detecting and classifying defects comprising:
inputting an image to be detected to a trained autoencoder, and obtaining a reconstructed image corresponding to the image to be detected;
determining whether the image to be detected has defects based on a defect criteria for filtering out small noise reconstruction errors;
in response that the image to be detected has defects, calculating a plurality of structural similarity values between the image to be detected and a plurality of template images marking defect categories respectively;
determining a target defect category corresponding to the template image with the highest structural similarity value, and classifying the image to be detected into the target defect category, wherein a mathematical expression of the defect criteria is

OG Complex Work Unit Math
wherein ΔXi,j is a reconstruction error image between the image to be detected and the reconstructed image, δXi,j is a binary image of the reconstruction error image, i and j represent pixel positions, τ is a preset reconstruction error measurement threshold.