Search

CN-122023425-A - Image-based appearance defect detection method, device, medium, and program

CN122023425ACN 122023425 ACN122023425 ACN 122023425ACN-122023425-A

Abstract

The embodiment of the invention discloses an image-based appearance defect detection method, equipment, a medium and a program, wherein the method comprises the steps of acquiring images with different exposure degrees of a target detection object under the same visual angle, synthesizing the acquired images with different exposure degrees of the target detection object under the same visual angle into a pseudo-color image of the target detection object, generating reasoning image data according to the pseudo-color image of the target detection object, and carrying out defect identification and classification according to the reasoning image data to obtain an appearance defect detection result of the target detection object. The technical scheme of the embodiment of the invention can improve the universality and the detection precision of the image-based appearance defect method.

Inventors

  • TANG JIAJUN
  • LU TIANHUA
  • ZHANG FEI
  • HAN XUECHAO
  • NI JUN

Assignees

  • 安脉时代智能制造(杭州)有限公司

Dates

Publication Date
20260512
Application Date
20260414

Claims (10)

  1. 1. An image-based appearance defect detection method, comprising: acquiring different exposure degree acquisition images of a target detection object under the same visual angle; Synthesizing the acquired images of the target detection object with different exposure degrees under the same viewing angle into a pseudo-color image of the target detection object; Generating reasoning image data according to the pseudo-color image of the target detection object; and carrying out defect identification and classification according to the reasoning image data to obtain an appearance defect detection result of the target detection object.
  2. 2. The image-based visual defect detecting method according to claim 1, wherein the synthesizing the collected images of the target detection object at different exposure degrees under the same viewing angle into the pseudo color image of the target detection object comprises: denoising the acquired images with different exposure degrees of the target detection object under the same view angle to obtain denoised image data; And generating three-channel image data according to the exposure difference information of the denoising image data, and synthesizing the three-channel image data to obtain a pseudo-color image of the target detection object.
  3. 3. The image-based appearance defect detection method according to claim 2, wherein the generating three-channel image data from exposure difference information of the denoised image data and synthesizing the three-channel image data to obtain the pseudo color image of the target detection object includes: Taking a single-channel image with a first exposure dimension in the denoising image data as first channel image data; taking a second exposure dimension single-channel image in the denoising image data as second channel image data; generating third channel image data from the first channel image data and the second channel image data; and synthesizing the first channel image data, the second channel image data and the third channel image data to obtain a pseudo-color image of the target detection object.
  4. 4. The image-based appearance defect detection method of claim 3, wherein the generating third channel image data from the first channel image data and the second channel image data comprises: calculating a first product value between the first channel image data and the scaling factor; Calculating a reference coefficient of the scaling coefficient and calculating a second product value between the second channel image data and the reference coefficient; and calculating the sum of the first product value and the second product value to obtain the third channel image data.
  5. 5. The image-based appearance defect detection method of claim 1, wherein generating inferred image data from the pseudo-color image of the target detection object comprises: Clipping the pseudo-color image of the target detection object to obtain a clipping region image to be detected; And dividing the image of the cutting area to be detected by using a redundant cutting pattern mode to obtain the reasoning image data.
  6. 6. The method for detecting an appearance defect based on an image according to claim 5, wherein the cropping the target object from the pseudo-color image to obtain the image of the cropping area to be detected comprises: performing reduction processing on the pseudo-color image of the target detection object according to a set proportion multiple to obtain a scaled pseudo-color image; Inputting the scaled pseudo-color image into a detection area positioning model to obtain initial coordinates of a detection image area; and amplifying the initial coordinates of the detection image area according to the set proportion multiple to obtain the image of the cutting area to be detected.
  7. 7. The image-based visual defect detecting method according to claim 1, wherein the performing defect recognition and classification based on the inferred image data to obtain the visual defect detection result of the target detection object comprises: identifying and cutting the abnormal region on the inferred image data through a defect identification model to obtain an image cutting region; scaling the image clipping region to a target size to obtain a unified image clipping region; And carrying out defect classification on the unified image cutting area through a defect classification model to obtain an appearance defect detection result of the target detection object.
  8. 8. An electronic device, the electronic device comprising: at least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program for execution by the at least one processor to enable the at least one processor to perform the image-based appearance defect detection method of any one of claims 1-7.
  9. 9. A computer readable storage medium storing computer instructions for causing a processor to implement the image-based appearance defect detection method of any one of claims 1-7 when executed.
  10. 10. A computer program product comprising computer programs/instructions which when executed by a processor implement the image-based appearance defect detection method of any of claims 1-7.

Description

Image-based appearance defect detection method, device, medium, and program Technical Field The embodiment of the invention relates to the technical field of computer vision, in particular to an image-based appearance defect detection method, an image-based appearance defect detection device, electronic equipment, a storage medium and a program. Background The visual defect detection method based on the image is one of main application scenes of computer vision. The computer vision technology can realize the automatic detection of the surface defects of the product by collecting the image of the product and analyzing the image by utilizing an algorithm. The method is applied to various fields of covering automobile parts, electronic elements, new energy products and the like, and detection contents comprise but are not limited to scratches, chromatic aberration, foreign matters and other surface defects. At present, the main implementation mode of the image-based appearance defect detection method comprises the core steps of ‌ image preprocessing, feature extraction, template matching ‌ and the like, and defect detection is realized by combining the traditional machine vision and deep learning technology. In the process of realizing the invention, the prior art is found to have the defects that the existing image-based appearance defect detection method only aims at the object to be detected to collect a single image as a data source, carries out ‌ image preprocessing, feature extraction, template matching ‌ and other core steps on the single image, and outputs an appearance defect detection result. Or the traditional image processing method depends on the setting of parameter setting, is sensitive to the image background and the gray level, contrast and shape characteristics of a defect target, and has variable defect morphology and color, so that the traditional image processing method has the defects that a group of detection parameters with good universality are difficult to set, namely, a group of parameter setting adapting to various morphological defects is difficult to be determined, complex or abstract defect modes are difficult to capture, frequent debugging parameters are required in the product switching process to adapt to the change of an ambient light source, threshold segmentation failure can be caused under the non-uniform illumination condition, false detection is generated, and the defects of weak complex scene processing capability, difficult scene migration and the like exist. Disclosure of Invention The embodiment of the invention provides an appearance defect detection method, an appearance defect detection device, an electronic device, a storage medium and a program based on an image, which can improve the universality and the detection precision of the appearance defect detection method based on the image. According to an aspect of the present invention, there is provided an image-based appearance defect detection method including: acquiring different exposure degree acquisition images of a target detection object under the same visual angle; Synthesizing the acquired images of the target detection object with different exposure degrees under the same viewing angle into a pseudo-color image of the target detection object; Generating reasoning image data according to the pseudo-color image of the target detection object; and carrying out defect identification and classification according to the reasoning image data to obtain an appearance defect detection result of the target detection object. According to another aspect of the present invention, there is provided an image-based appearance defect detecting apparatus including: The exposure degree acquisition image acquisition module is used for acquiring acquisition images of different exposure degrees of the target detection object under the same visual angle; The pseudo-color image synthesis module is used for synthesizing the acquired images of different exposure degrees of the target detection object under the same visual angle into a pseudo-color image of the target detection object; the reasoning image data generation module is used for generating reasoning image data according to the pseudo-color image of the target detection object; and the appearance defect detection result acquisition module is used for carrying out defect identification and classification according to the reasoning image data to obtain an appearance defect detection result of the target detection object. According to another aspect of the present invention, there is provided an electronic apparatus including: and a memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the image-based appearance defect detection method of any one of the embodiments of the present invention. According to another aspect of the present