The invention discloses a product edge defect detection method. The method comprises the following steps: step 1, carrying out image input; step 2, carrying out image preprocessing; step 3, carrying out template rough matching; step 4, segmenting edge information to be measured; step 5, creating a template
data structure; step 6, down-sampling the edge information to be measured; step 7, carryingout matching in the template; step 8, calculating affine transformation parameters; step 9, carrying out template fine matching; and step 10, carrying out edge defect detection. According to the method, the edge information of the image is binarized, so that the method has the advantages of being insensitive to illumination change and edge gray scale and being stable and reliable; the edge information downsampling is utilized to iterate
template matching parameters from coarse to fine, so that the method has the
advantage of high calculation speed; the RANSAC principle and the fine matching mode of parameter iterative optimization are utilized, so that the method has the
advantage of high detection precision; and a segmented matching
template matching mode is adopted, so that the advantageof stretching resistance is achieved.