+

CN118655084B - Surface defect detection method, system, electronic device and storage medium - Google Patents

Surface defect detection method, system, electronic device and storage medium Download PDF

Info

Publication number
CN118655084B
CN118655084B CN202411148073.5A CN202411148073A CN118655084B CN 118655084 B CN118655084 B CN 118655084B CN 202411148073 A CN202411148073 A CN 202411148073A CN 118655084 B CN118655084 B CN 118655084B
Authority
CN
China
Prior art keywords
defect
target object
shape
image
graph
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411148073.5A
Other languages
Chinese (zh)
Other versions
CN118655084A (en
Inventor
郁梦辉
王磊
韩昭嵘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Lingxi Robot Intelligent Technology Co ltd
Original Assignee
Hangzhou Lingxi Robot Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Lingxi Robot Intelligent Technology Co ltd filed Critical Hangzhou Lingxi Robot Intelligent Technology Co ltd
Priority to CN202411148073.5A priority Critical patent/CN118655084B/en
Publication of CN118655084A publication Critical patent/CN118655084A/en
Application granted granted Critical
Publication of CN118655084B publication Critical patent/CN118655084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/01Arrangements or apparatus for facilitating the optical investigation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/952Inspecting the exterior surface of cylindrical bodies or wires
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

本申请涉及一种表面缺陷检测方法和系统,涉及缺陷检测领域,该方法包括:通过2.5D成像系统获取目标物体的2.5D图像集,2.5D图像集中的图像进行背景去除,得到目标物体的主体2.5D图像集,从主体2.5D图像集中获取形状图,基于高斯带通频域滤波方法,根据形状图对目标物体进行的表面缺陷检测,形状图由光源在不同相位下获取的图像合成,表征了目标物体的表面凹凸情况。通过本申请,解决了物体表面缺陷检测准确率低的问题,通过2.5D成像系统获取的2.5D图像集,细微缺陷成像效果好,形状图通过高对比度地展示电池表面的凹凸变化情况,使得缺陷区域与正常表面形成区分,提高了缺陷检测的准确率和效率。

The present application relates to a surface defect detection method and system, and relates to the field of defect detection. The method includes: obtaining a 2.5D image set of a target object through a 2.5D imaging system, removing the background of the image in the 2.5D image set to obtain a main 2.5D image set of the target object, obtaining a shape map from the main 2.5D image set, and performing surface defect detection on the target object according to the shape map based on a Gaussian bandpass frequency domain filtering method. The shape map is synthesized by images obtained by a light source at different phases, and characterizes the surface concave-convex conditions of the target object. Through this application, the problem of low accuracy in surface defect detection of objects is solved. The 2.5D image set obtained by the 2.5D imaging system has good imaging effect for subtle defects. The shape map displays the concave-convex changes of the battery surface with high contrast, so that the defect area is distinguished from the normal surface, thereby improving the accuracy and efficiency of defect detection.

Description

Surface defect detection method, system, electronic device and storage medium
Technical Field
The present application relates to the field of defect detection, and in particular, to a surface defect detection method, system, electronic device, and storage medium.
Background
Appearance inspection is a key quality control step in the manufacturing process of some products (e.g., cylindrical batteries) and is generally divided into three main methods, manual inspection, traditional 2D image inspection, and inspection based on deep learning.
The conventional 2D image detection technology captures images of the surface of the battery through a high-resolution camera, the defects are identified by utilizing an image processing technology, the 2D image detection is greatly influenced by shooting angles and illumination conditions, the imaging quality of the defects is possibly poor, so that some fine or low-contrast defects are difficult to accurately identify, the defects of the surface of the battery are automatically identified and classified through a training algorithm model by a deep learning detection method, a large amount of marking data is usually required for training by the deep learning model, and the detection capability of the specific defects with small sample size can be reduced.
At present, no effective solution is proposed for the problem of low accuracy of object surface defect detection in the related art.
Disclosure of Invention
The embodiment of the application provides a surface defect detection method, a surface defect detection system, electronic equipment and a storage medium, which are used for at least solving the problem of low accuracy of object surface defect detection in the related technology.
In a first aspect, an embodiment of the present application provides a surface defect detection method, where the method includes:
Acquiring a 2.5D image set of a target object by a 2.5D imaging system, the 2.5D imaging system comprising a high-speed line scan camera and a high-speed fringe line scan light source;
removing the background of the images in the 2.5D image set to obtain a main body 2.5D image set of the target object;
And acquiring a shape graph from the main body 2.5D image set, and detecting surface defects of the target object according to the shape graph based on a Gaussian band-pass frequency domain filtering method, wherein the shape graph is synthesized by images acquired by light sources under different phases, so that the surface concave-convex condition of the target object is represented.
In some embodiments, the method for detecting surface defects of the target object according to the shape graph based on the gaussian bandpass frequency domain filtering method includes:
carrying out Gaussian band-pass frequency domain filtering on the shape graph to obtain a filtering graph;
Obtaining a difference value diagram before and after filtering according to the filtering diagram and the shape diagram;
binarizing the difference value graph to obtain the surface defect graph;
and obtaining surface defect data of the target object according to the surface defect map.
In some embodiments, the binarizing the difference map to obtain the surface defect map includes:
Generating a defect external rectangular frame based on the difference value diagram, and determining a binarization threshold according to the gray value of the pixel point in the defect external rectangular frame;
And based on the binarization threshold value, binarizing the difference value graph to obtain the surface defect graph.
In some embodiments, the performing gaussian bandpass frequency domain filtering on the shape graph to obtain a filtered graph includes:
Determining the pixel row number and the pixel column number of the shape graph, and generating a Gaussian kernel based on the pixel row number and the pixel column number;
And based on Fourier transformation, performing spatial filtering according to the shape graph by the Gaussian kernel to obtain a filtering graph.
In some of these embodiments, the surface defect data includes coordinate data of a defect in the shape map, the method further comprising:
acquiring a 3D point cloud image of the target object;
aligning the 3D point cloud image with the shape image, and obtaining 3D coordinate data of the defect in the 3D point cloud image according to an alignment result and the coordinate data of the defect in the shape image;
And acquiring 3D data of the surface defect of the target object from the 3D point cloud image based on the 3D coordinate data.
In some of these embodiments, the coordinate data of the defect in the shape map includes a defect bounding rectangular box of the defect in the shape map, and 2.5D coordinate data of the defect bounding rectangular box;
Aligning the 3D point cloud image with the shape image, and obtaining 3D coordinate data of the defect in the 3D point cloud image according to an alignment result and coordinate data of the defect in the shape image includes:
Generating a first main body circumscribed rectangular frame of the target object according to the main body 2.5D image set;
Removing the background of the 3D point cloud image to obtain a second main body circumscribed rectangular frame of the target object;
And determining 3D coordinate data of the defect circumscribed rectangular frame in the 3D point cloud picture according to the 2.5D coordinate data, the first main body circumscribed rectangular frame and the second main body circumscribed rectangular frame.
In some of these embodiments, the method further comprises:
comparing the defect data with a preset defect threshold,
If the defect data is less than or equal to a preset defect threshold value, the target object is a qualified product,
And if the defect data is larger than a preset defect threshold value, the target object is a defective product.
In a second aspect, an embodiment of the present application provides a surface defect detection system, where the system includes an acquisition module, a processing module, and a detection module,
The acquisition module is used for acquiring a 2.5D image set of the target object through a 2.5D imaging system, and the 2.5D imaging system comprises a high-speed line scanning camera and a high-speed fringe line scanning light source;
the processing module is used for removing the background of the images in the 2.5D image set to obtain a main body 2.5D image set of the target object;
the detection module is used for acquiring a shape graph from the main body 2.5D image in a concentrated mode, detecting surface defects of the target object according to the shape graph based on a Gaussian band-pass frequency domain filtering method, and synthesizing the shape graph by images acquired by light sources under different phases to characterize the surface concave-convex condition of the target object.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the surface defect detection method according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a surface defect detection method as described in the first aspect above.
Compared with the related art, the surface defect detection method provided by the embodiment of the application has the advantages that the 2.5D image set of the target object is obtained through the 2.5D imaging system, the 2.5D imaging system comprises the high-speed line scanning camera and the high-speed line scanning light source, the background of the image in the 2.5D image set is removed to obtain the main body 2.5D image set of the target object, the shape graph is obtained from the main body 2.5D image set, the surface defect detection is carried out on the target object according to the shape graph based on the Gaussian band-pass frequency domain filtering method, the shape graph is synthesized by the images obtained by the light source under different phases, the surface concave-convex condition of the target object is represented, the 2.5D image set obtained through the 2.5D imaging system has good fine defect imaging effect, the shape graph shows the concave-convex change condition of the battery surface through high contrast, the defect area is distinguished from the normal surface, and the accuracy and the efficiency of defect detection are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a surface defect detection method according to an embodiment of the present application;
FIG. 2 is a flow chart of a Gaussian bandpass frequency domain filtering detection method according to an embodiment of the application;
FIG. 3 is a flow chart of a method of surface defect detection according to an embodiment of the present application;
FIG. 4 is a block diagram of a surface defect detection system according to an embodiment of the present application;
Fig. 5 is a schematic view of an internal structure of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the described embodiments of the application can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," and similar referents in the context of the application are not to be construed as limiting the quantity, but rather as singular or plural. The terms "comprises," "comprising," "includes," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in connection with the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes the association relationship of the association object, and indicates that three relationships may exist, for example, "a and/or B" may indicate that a exists alone, a and B exist simultaneously, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The embodiment provides a surface defect detection method. Fig. 1 is a flowchart of a surface defect detection method according to an embodiment of the present application, as shown in fig. 1, the flowchart including the steps of:
in step S101, a 2.5D image set of the target object is acquired by a 2.5D imaging system, the 2.5D imaging system comprising a high speed line scan camera and a high speed fringe line scan light source.
And the high-speed line scanning camera is used for acquiring an image of the object to be scanned. The light source used in the 2.5D imaging system is a special high-speed striped line scanning light source, and can emit striped light while changing the phase so as to realize high-speed change of stripes, thereby achieving synchronization with high-speed shooting of a camera. The 2.5D imaging system may further include a controller for controlling the line scan light source and the high speed line scan camera.
And acquiring a 2.5D image set of the surface of the target object through a 2.5D imaging system, wherein the 2.5D image set comprises an average image, a specular reflection image, a diffuse reflection image, a gloss ratio image, a depth image and a shape image, and the shape image is obtained by decoding and synthesizing images acquired by light sources under different phases, so that the surface concave-convex change condition of the target object is represented.
And S102, performing background removal on the images in the 2.5D image set to obtain a main body 2.5D image set of the target object.
Preprocessing the 2.5D image set, namely removing the background, extracting the main body area of the target object, ensuring that the image only contains the information of the target object, and calculating the position and the size of the circumscribed rectangle of the main body area of the target object.
In the conventional single 2D image processing, complicated steps are required for removing the background to distinguish the outline of the main body of the target object, but in the embodiment, the image with less background interference can be selected from the 2.5D image set to directly and quickly extract the main body area of the target object through simple binarization, and the extracted main body area of the target object is suitable for all the images in the group, so that the processing consistency is maintained and the processing efficiency is improved.
Step S103, acquiring a shape chart from the main body 2.5D image set, and carrying out surface defect detection on the target object according to the shape chart based on a Gaussian band-pass frequency domain filtering method, wherein the shape chart is synthesized by images acquired by light sources under different phases, so that the surface concave-convex condition of the target object is represented.
The shape map is a shape map obtained by removing the background and extracting the main body region of the target object.
In this embodiment, defect detection is performed by selecting a shape map in which the concave-convex change imaging is relatively obvious. For defects with concave-convex variation, such as when the target object is a cylindrical battery, the shape chart is beneficial to detecting surface scratches, pits and welding slag of the cylindrical battery. The shape chart shows the concave-convex change condition of the battery surface with high contrast, so that the defect area is distinguished from the normal surface, and the identification accuracy and efficiency of the height difference defect which is difficult to detect by the conventional plane image are improved.
In some embodiments, the surface defect detection of the target object according to the shape chart based on the gaussian bandpass frequency domain filtering method in step S103 includes:
Step S1031, gaussian band-pass frequency domain filtering is carried out on the shape graph, and a filtering graph is obtained.
In some embodiments, step S1031 specifically includes:
step S201, determining the pixel row number and the pixel column number of the shape map, and generating a gaussian kernel based on the pixel row number and the pixel column number.
Assuming that the number of pixel rows of the shape graph is M and the number of pixel columns is N, generating an n×1-dimensional gaussian kernel G 11 and an m×1-dimensional gaussian kernel G 12 with σ 1, respectively, and calculating an m×n-dimensional gaussian kernel G 1:
Wherein alpha 11 and alpha 12 represent T represents the transpose.
Again, by the same method, m×n-dimensional gaussian kernel G 2 is calculated with σ 22 > σ1).
Step S202, spatial filtering is performed according to the Gaussian kernel shape graph based on Fourier transformation, and a filtering graph is obtained.
The gaussian kernel difference G 3 is calculated:
G3=G2- G1
Rearranging G 3 to obtain G '3, and performing discrete Fourier transform on G' 3 to obtain G (u, v).
Fourier transforming the shape map:
Where F (u, v) is the frequency domain result of the discrete fourier transform of the shape map F (M, N), M and N represent the number of rows and columns of the image, u and v represent the frequency domain pixel coordinates, M and N represent the spatial domain pixel coordinates, and j represents the imaginary unit, respectively.
Multiplying F (u, v) by G (u, v) to obtain H (u, v):
H(u,v)=F(u,v)*G(u,v)
Then, performing inverse discrete fourier transform on the H (u, v) to obtain a spatial domain filtering result:
f' (m, n) is a filter map obtained by spatially filtering the shape map.
Step S1032, obtaining a difference value diagram before and after filtering according to the filtering diagram and the shape diagram.
The filtered graph f' (m, n) is differenced from f (m, n) to obtain a pre-filtered and post-filtered difference graph f sub:
fsub=|f’(m,n)-f(m,n)|
where || represents an absolute value.
Step S1033, binarizing the difference value diagram to obtain a surface defect diagram.
In some embodiments, step S1033 specifically includes:
Step S301, a defect external rectangular frame is generated based on the difference value diagram, and a binarization threshold value is determined according to the gray value of the pixel point in the defect external rectangular frame.
Step S302, binarizing the difference value diagram based on a binarization threshold value to obtain a surface defect diagram.
Setting the size of a defect external rectangular frame as w b*hb, calculating the average value mu and the variance delta of the gray values of pixel points in the defect external rectangular frame, and setting a threshold value t:
t=μ+k*δ
Wherein k is a preset coefficient. The difference map f sub is subjected to local binarization to obtain a defect map f bin:
Step S1034, obtaining surface defect data of the target object according to the surface defect map.
Surface defect data includes, but is not limited to, defect location and size. Fig. 2 is a flowchart of a gaussian bandpass frequency domain filtering detection method according to an embodiment of the application. In this embodiment, a gaussian bandpass frequency domain filtering method is used to detect defects, and position and size information of the defects are calculated. The gaussian band-pass filter allows signals in a specific frequency range to pass through, so that specific details in an image can be effectively enhanced, and meanwhile, too high or too low frequency components are suppressed, so that the detection accuracy of defects in the specific frequency range in the frequency domain is improved.
In some of these embodiments, the surface defect data includes coordinate data of the defect in the shape map, the method further comprising:
Step S1035, obtaining a 3D point cloud image of the target object;
And step S1036, aligning the 3D point cloud image with the shape image, and obtaining the 3D coordinate data of the defect in the 3D point cloud image according to the alignment result and the coordinate data of the defect in the shape image.
For measuring non-3D defect information, such as scratch length and solder joint area, only simple statistical processing is needed for the defect map f bin, and for measuring 3D defect information, such as actual depth of scratch, pit and solder joint, depth measurement is needed by obtaining 3D information.
The point cloud image is affected by noise and fluctuation precision, so that slight and fine defects are difficult to position, and the high-precision 3D camera is high in cost, so that the 2.5D image is used for defect positioning in the embodiment, and then the defect is aligned with the 3D point cloud image for defect measurement. Fig. 3 is a flowchart of a surface defect detection method according to an embodiment of the present application.
The 2.5D image is different from the 3D point cloud image in resolution and the target object is also different in position in the image, and the defect coordinates of the 2.5D image need to be mapped into the 3D point cloud image.
In some embodiments, the coordinate data of the defect in the shape graph comprises a defect circumscribing rectangular frame of the defect in the shape graph and 2.5D coordinate data of the defect circumscribing rectangular frame, and the step S1036 comprises:
step S401, generating a first main body circumscribed rectangular frame of the target object according to the main body 2.5D image set.
And step S402, performing background removal on the 3D point cloud image to obtain a second main body circumscribed rectangular frame of the target object.
Step S403, determining 3D coordinate data of the defect circumscribed rectangular frame in the 3D point cloud picture according to the 2.5D coordinate data, the first main body circumscribed rectangular frame and the second main body circumscribed rectangular frame.
Optionally, denoising the obtained 3D point cloud image, extracting a main body area of the target object, and calculating an circumscribed rectangular frame of the main body area of the target object, wherein the width and the length are w 3d,h3d respectively. Meanwhile, the width and the length of the circumscribed rectangular frame of the main body area of the target object in the calculated shape graph are w 2.5d,h2.5d respectively, the width and the length of the circumscribed rectangular frame of the defect are w d,hd respectively, and the upper left corner coordinate is (m d,nd). The defect coordinates in the 2.5D shape map are mapped into the 3D point cloud map:
(m 'd,n'd) is the mapping coordinate of the left upper corner coordinate of the defect circumscribed rectangular frame in the 3D point cloud picture, and w' d,h'd is the width and the length of the defect circumscribed rectangular frame respectively.
Step S1037, based on the 3D coordinate data, acquires 3D data of the target object surface defect from the 3D point cloud image.
It should be noted that, for mapping the 2.5D image defect coordinates into the 3D point cloud image, the image alignment may also be performed by a feature point matching method, and then the coordinate transformation may be performed. After the defects in the 3D point cloud image are positioned, the needed depth information of the defects can be calculated by using the point cloud distance values.
In some of these embodiments, the method further comprises:
Comparing the defect data with a preset defect threshold, if the defect data is smaller than or equal to the preset defect threshold, the target object is a qualified product, and if the defect data is larger than the preset defect threshold, the target object is a unqualified product.
When the target object is a product requiring to be detected to be qualified, calculating the length, width and depth information of each extracted defect, comparing the length, width and depth information with the detected standard threshold value, and judging that the object is qualified when the object is lower than the detected standard threshold value and judging that the object is unqualified when the object is higher than the detected standard threshold value.
Through the steps S101 to S103, a 2.5D image set of the target object is obtained by using the 2.5D imaging system, the 2.5D imaging system comprises a high-speed line scanning camera and a high-speed stripe line scanning light source, the background of the image in the 2.5D image set is removed to obtain a main body 2.5D image set of the target object, a shape diagram is obtained from the main body 2.5D image set, the surface defect detection of the target object is carried out according to the shape diagram based on a gaussian band-pass frequency domain filtering method, the shape diagram is synthesized by the images obtained by the light sources under different phases, the surface concave-convex condition of the target object is represented, the problem of low accuracy of object surface defect detection is solved, the 2.5D image set obtained by the 2.5D imaging system has good fine defect imaging effect, the concave-convex change condition of the battery surface is displayed by the shape diagram with high contrast, the defect area is distinguished from the normal surface, and the accuracy and the efficiency of defect detection are improved.
The images with less background interference are selected from the 2.5D image set, the main body area of the target object is quickly extracted directly through simple binarization, the main body area of the target object is suitable for all the images of the group, and the processing efficiency is improved while the processing consistency is maintained.
And the defect detection is carried out by using a shape chart, and the shape chart shows the concave-convex change condition of the battery surface in a high contrast way, so that a defect area is distinguished from a normal surface, and the identification accuracy and efficiency of the height difference defect which is difficult to detect by a conventional plane image are improved.
And mapping the defects detected by the 2.5D image into a 3D point cloud image, obtaining 3D information of the defects, and further carrying out qualitative and quantitative analysis on the defects.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
The present embodiment also provides a surface defect detection system, which is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the terms "module," "unit," "sub-unit," and the like may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 4 is a block diagram of a surface defect detection system according to an embodiment of the present application, which includes an acquisition module 51, a processing module 52, and a detection module 53, as shown in fig. 4.
An acquisition module 51 for acquiring a 2.5D image set of the target object by a 2.5D imaging system, the 2.5D imaging system comprising a high speed line scan camera and a high speed fringe line scan light source.
The processing module 52 is configured to perform background removal on the images in the 2.5D image set, so as to obtain a main 2.5D image set of the target object.
The detection module 53 acquires a shape chart from the main body 2.5D image set, and performs surface defect detection on the target object according to the shape chart based on a Gaussian band-pass frequency domain filtering method, wherein the shape chart is synthesized by images acquired by light sources under different phases, and represents the surface concave-convex condition of the target object.
In some of these embodiments, the detection module 53 includes a filtering module, a difference making module, a defect map generating module, and a defect data obtaining module.
The filtering module is used for carrying out Gaussian band-pass frequency domain filtering on the shape graph to obtain a filtering graph;
and the difference making module is used for obtaining a difference value diagram before and after filtering according to the filtering diagram and the shape diagram.
And the defect map generating module is used for binarizing the difference map to obtain a surface defect map.
And the defect data acquisition module is used for acquiring the surface defect data of the target object according to the surface defect map.
In some of these embodiments, the defect map generation module includes a threshold determination module and a binarization module.
The threshold determining module is used for generating a defect circumscribed rectangular frame based on the difference value graph and determining a binarization threshold according to the gray value of the pixel point in the defect circumscribed rectangular frame.
And the binarization module is used for binarizing the difference value graph based on the binarization threshold value to obtain a surface defect graph.
In some of these embodiments, the filtering module includes a Gaussian kernel generation module and a filter map generation module.
The Gaussian kernel generation module is used for determining the pixel row number and the pixel column number of the shape graph and generating Gaussian kernels based on the pixel row number and the pixel column number;
And the filtering diagram generation module is used for carrying out spatial filtering according to the Gaussian check shape diagram based on Fourier transformation to obtain a filtering diagram.
In some of these embodiments, the surface defect data includes coordinate data of the defect in the shape map, and the system further includes a point cloud generation module, a mapping module, and a 3D data acquisition module.
And the point cloud generation module is used for acquiring the 3D point cloud image of the target object.
And the mapping module is used for aligning the 3D point cloud image with the shape image, and obtaining 3D coordinate data of the defect in the 3D point cloud image according to an alignment result and the coordinate data of the defect in the shape image.
And the 3D data acquisition module is used for acquiring 3D data of the surface defect of the target object from the 3D point cloud image based on the 3D coordinate data.
In some embodiments, the coordinate data of the defect in the shape graph comprises a defect circumscribing rectangular box of the defect in the shape graph and 2.5D coordinate data of the defect circumscribing rectangular box, and the mapping module comprises a first block diagram module, a second block diagram module and a coordinate determination module.
And the first block diagram module is used for generating a first main body circumscribed rectangular frame of the target object according to the main body 2.5D image set.
The second block diagram module is used for removing the background of the 3D point cloud image to obtain a second main body external rectangular frame of the target object;
And the coordinate determining module is used for determining 3D coordinate data of the defect circumscribed rectangular frame in the 3D point cloud picture according to the 2.5D coordinate data, the first main body circumscribed rectangular frame and the second main body circumscribed rectangular frame.
In some of these embodiments, the system further includes a determination module.
The judging module is used for comparing the defect data with a preset defect threshold, if the defect data is smaller than or equal to the preset defect threshold, the target object is a qualified product, and if the defect data is larger than the preset defect threshold, the target object is a unqualified product.
Through the system, the acquisition module 51 acquires the 2.5D image set of the target object through the 2.5D imaging system, the 2.5D imaging system comprises a high-speed line scanning camera and a high-speed stripe line scanning light source, the processing module 52 carries out background removal on the images in the 2.5D image set to obtain the main body 2.5D image set of the target object, the detection module 53 acquires a shape chart from the main body 2.5D image set, the surface defect detection is carried out on the target object according to the shape chart based on a Gaussian band-pass frequency domain filtering method, the shape chart is synthesized by the images acquired by the light sources under different phases, the surface concave-convex condition of the target object is represented, the problem of low accuracy of object surface defect detection is solved, the 2.5D image set acquired through the 2.5D imaging system has good fine defect imaging effect, the concave-convex condition of the battery surface is displayed through high contrast, the defect area is distinguished from the normal surface, and the accuracy and the efficiency of defect detection are improved.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the modules may be located in the same processor, or may be located in different processors in any combination.
The present embodiment also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic device may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, acquiring a 2.5D image set of a target object through a 2.5D imaging system, wherein the 2.5D imaging system comprises a high-speed line scanning camera and a high-speed fringe line scanning light source.
S2, removing the background of the image in the 2.5D image set to obtain a main body 2.5D image set of the target object.
S3, acquiring a shape graph from the main body 2.5D image set, and detecting surface defects of the target object according to the shape graph based on a Gaussian band-pass frequency domain filtering method, wherein the shape graph is synthesized by images acquired by light sources under different phases, so that the surface concave-convex condition of the target object is represented.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and this embodiment is not repeated herein.
In one embodiment, fig. 5 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application, and as shown in fig. 5, an electronic device, which may be a server, is provided, and an internal structure diagram thereof may be as shown in fig. 5. The electronic device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the electronic device is for storing data. The network interface of the electronic device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a surface defect detection method.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the electronic device to which the present inventive arrangements are applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be understood by those skilled in the art that the technical features of the above-described embodiments may be combined in any manner, and for brevity, all of the possible combinations of the technical features of the above-described embodiments are not described, however, they should be considered as being within the scope of the description provided herein, as long as there is no contradiction between the combinations of the technical features.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (9)

1. A method of detecting surface defects, the method comprising:
Acquiring a 2.5D image set of a target object by a 2.5D imaging system, the 2.5D imaging system comprising a high-speed line scan camera and a high-speed fringe line scan light source;
removing the background of the images in the 2.5D image set to obtain a main body 2.5D image set of the target object;
Acquiring a shape graph from the main body 2.5D image set, and detecting surface defects of the target object according to the shape graph based on a Gaussian band-pass frequency domain filtering method to obtain surface defect data of the target object, wherein the surface defect data comprise coordinate data of defects in the shape graph, and the shape graph is synthesized by images acquired by light sources under different phases and represents the surface concave-convex condition of the target object;
acquiring a 3D point cloud image of the target object;
aligning the 3D point cloud image with the shape image, and obtaining 3D coordinate data of the defect in the 3D point cloud image according to an alignment result and the coordinate data of the defect in the shape image;
And acquiring 3D data of the surface defect of the target object from the 3D point cloud image based on the 3D coordinate data.
2. The method according to claim 1, wherein the surface defect detection of the target object according to the shape map based on the gaussian bandpass frequency domain filtering method comprises:
carrying out Gaussian band-pass frequency domain filtering on the shape graph to obtain a filtering graph;
Obtaining a difference value diagram before and after filtering according to the filtering diagram and the shape diagram;
binarizing the difference value graph to obtain a surface defect graph;
and obtaining surface defect data of the target object according to the surface defect map.
3. The method of claim 2, wherein binarizing the difference map to obtain the surface defect map comprises:
Generating a defect external rectangular frame based on the difference value diagram, and determining a binarization threshold according to the gray value of the pixel point in the defect external rectangular frame;
And based on the binarization threshold value, binarizing the difference value graph to obtain the surface defect graph.
4. The method of claim 2, wherein said gaussian bandpass frequency domain filtering said shape map to obtain a filtered map comprises:
Determining the pixel row number and the pixel column number of the shape graph, and generating a Gaussian kernel based on the pixel row number and the pixel column number;
And based on Fourier transformation, performing spatial filtering according to the shape graph by the Gaussian kernel to obtain a filtering graph.
5. The method of claim 1, wherein the coordinate data of the defect in the shape map comprises a defect bounding rectangular box of the defect in the shape map, and 2.5D coordinate data of the defect bounding rectangular box;
Aligning the 3D point cloud image with the shape image, and obtaining 3D coordinate data of the defect in the 3D point cloud image according to an alignment result and coordinate data of the defect in the shape image includes:
Generating a first main body circumscribed rectangular frame of the target object according to the main body 2.5D image set;
Removing the background of the 3D point cloud image to obtain a second main body circumscribed rectangular frame of the target object;
And determining 3D coordinate data of the defect circumscribed rectangular frame in the 3D point cloud picture according to the 2.5D coordinate data, the first main body circumscribed rectangular frame and the second main body circumscribed rectangular frame.
6. The method according to claim 2, wherein the method further comprises:
comparing the defect data with a preset defect threshold,
If the defect data is less than or equal to a preset defect threshold value, the target object is a qualified product,
And if the defect data is larger than a preset defect threshold value, the target object is a defective product.
7. A surface defect detection system is characterized by comprising an acquisition module, a processing module and a detection module, wherein,
The acquisition module is used for acquiring a 2.5D image set of the target object through a 2.5D imaging system, and the 2.5D imaging system comprises a high-speed line scanning camera and a high-speed fringe line scanning light source;
the processing module is used for removing the background of the images in the 2.5D image set to obtain a main body 2.5D image set of the target object;
The detection module is used for acquiring a shape graph from the main body 2.5D image set, carrying out surface defect detection on the target object according to the shape graph based on a Gaussian band-pass frequency domain filtering method, and obtaining surface defect data of the target object, wherein the surface defect data comprise coordinate data of defects in the shape graph, and the shape graph is synthesized by images acquired by light sources under different phases, so that the surface concave-convex condition of the target object is represented;
acquiring a 3D point cloud image of the target object;
aligning the 3D point cloud image with the shape image, and obtaining 3D coordinate data of the defect in the 3D point cloud image according to an alignment result and the coordinate data of the defect in the shape image;
And acquiring 3D data of the surface defect of the target object from the 3D point cloud image based on the 3D coordinate data.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the surface defect detection method according to any of claims 1 to 6 when executing the computer program.
9. A storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the surface defect detection method according to any one of claims 1 to 6.
CN202411148073.5A 2024-08-21 2024-08-21 Surface defect detection method, system, electronic device and storage medium Active CN118655084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411148073.5A CN118655084B (en) 2024-08-21 2024-08-21 Surface defect detection method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411148073.5A CN118655084B (en) 2024-08-21 2024-08-21 Surface defect detection method, system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN118655084A CN118655084A (en) 2024-09-17
CN118655084B true CN118655084B (en) 2024-12-24

Family

ID=92704512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411148073.5A Active CN118655084B (en) 2024-08-21 2024-08-21 Surface defect detection method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN118655084B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119850606B (en) * 2025-03-19 2025-06-27 苏州苏映视图像软件科技有限公司 Image defect detection method, device, micro-distance imaging equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114119469A (en) * 2021-10-13 2022-03-01 东方晶源微电子科技(北京)有限公司 Image processing method, apparatus and system for semiconductor electron beam defect monitoring
CN115494080A (en) * 2022-09-22 2022-12-20 章鱼博士智能技术(上海)有限公司 A method and system for detecting appearance defects of battery pack blue film
CN117372338A (en) * 2023-09-15 2024-01-09 瑞声科技(新加坡)有限公司 Mirror defect detection method, device, equipment and readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3295423A1 (en) * 2015-05-11 2018-03-21 Siemens Aktiengesellschaft Method and system for registration of 2d/2.5d laparoscopic and endoscopic image data to 3d volumetric image data
CN114764804B (en) * 2022-06-16 2022-09-20 深圳新视智科技术有限公司 Lithium battery pole piece defect detection method, device, equipment and storage medium
CN116071353B (en) * 2023-03-06 2023-09-05 成都盛锴科技有限公司 Bolt assembly detection method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114119469A (en) * 2021-10-13 2022-03-01 东方晶源微电子科技(北京)有限公司 Image processing method, apparatus and system for semiconductor electron beam defect monitoring
CN115494080A (en) * 2022-09-22 2022-12-20 章鱼博士智能技术(上海)有限公司 A method and system for detecting appearance defects of battery pack blue film
CN117372338A (en) * 2023-09-15 2024-01-09 瑞声科技(新加坡)有限公司 Mirror defect detection method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN118655084A (en) 2024-09-17

Similar Documents

Publication Publication Date Title
CN109615611B (en) Inspection image-based insulator self-explosion defect detection method
CN112348787B (en) Training method of object defect detection model, object defect detection method and device
CN109580630B (en) Visual inspection method for defects of mechanical parts
CN114140679A (en) Defect fusion method, device, recognition system and storage medium
CN109410192B (en) A fabric defect detection method and device for multi-texture grading fusion
CN113570605A (en) Defect detection method and system based on liquid crystal display panel
CN107230203A (en) Casting defect recognition methods based on human eye vision attention mechanism
CN112233067A (en) Hot rolled steel coil end face quality detection method and system
CN118655084B (en) Surface defect detection method, system, electronic device and storage medium
CN112308854B (en) Automatic detection method and system for chip surface flaws and electronic equipment
CN114240845B (en) Light cutting method surface roughness measurement method applied to cutting workpiece
CN111598869B (en) Method, equipment and storage medium for detecting Mura of display screen
CN118279301B (en) Light guide plate quality monitoring method and system based on image processing
CN119693358B (en) Connector surface defect detection method and system based on image processing
CN118671004B (en) Product surface defect detection method and system
CN115511718A (en) PCB image correction method and device, terminal equipment and storage medium
CN119417817B (en) Paint defect detection method and system based on machine vision
CN110426395B (en) A kind of solar EL battery silicon wafer surface detection method and device
CN119027422B (en) Battery accessory quality detection method and system based on machine vision
CN116125489A (en) Indoor object three-dimensional detection method, computer equipment and storage medium
JP2021156629A (en) Correction program, correction method, and information processor
CN110874837A (en) Automatic defect detection method based on local feature distribution
JPH1038542A (en) Method and device for object recognition and recording medium
Urmanov et al. Computer methods of image processing of volcanoes
CN119068505B (en) A PCB classification method, system and storage medium based on visual recognition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载