[go: up one dir, main page]

CN119359715A - Welding gun mainboard defect detection method and system based on image processing - Google Patents

Welding gun mainboard defect detection method and system based on image processing Download PDF

Info

Publication number
CN119359715A
CN119359715A CN202411918282.3A CN202411918282A CN119359715A CN 119359715 A CN119359715 A CN 119359715A CN 202411918282 A CN202411918282 A CN 202411918282A CN 119359715 A CN119359715 A CN 119359715A
Authority
CN
China
Prior art keywords
image
gray
block
main board
welding gun
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.)
Granted
Application number
CN202411918282.3A
Other languages
Chinese (zh)
Other versions
CN119359715B (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.)
Wuxi Chaoqiang Weiye Technology Co ltd
Original Assignee
Wuxi Chaoqiang Weiye 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 Wuxi Chaoqiang Weiye Technology Co ltd filed Critical Wuxi Chaoqiang Weiye Technology Co ltd
Priority to CN202411918282.3A priority Critical patent/CN119359715B/en
Publication of CN119359715A publication Critical patent/CN119359715A/en
Application granted granted Critical
Publication of CN119359715B publication Critical patent/CN119359715B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • 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

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

本发明涉及图像数据处理技术领域,尤其涉及基于图像处理的焊枪主板缺陷检测方法和系统。方法包括:利用语义分割对焊枪主板表面图像的灰度图像进行提取,得到主板区域图像;按照预设大小将主板区域图像等分为若干个图像分块;将任意一个图像分块记为目标图像分块,计算目标图像分块的灰度差异程度;计算目标图像分块的潜在虚焊程度;根据所述潜在虚焊程度的大小,确定缺陷分块;利用最大熵法依次对每一个缺陷分块进行阈值分割处理,得到各缺陷分块的虚焊区域,完成基于图像处理的焊枪主板缺陷检测。本发明通过对图像分块进行灰度差异程度分析,结合边缘检测和链码识别方法,有效识别焊枪主板表面的细微缺陷,提高检测准确性。

The present invention relates to the field of image data processing technology, and in particular to a welding gun mainboard defect detection method and system based on image processing. The method comprises: extracting the grayscale image of the welding gun mainboard surface image by semantic segmentation to obtain a mainboard area image; dividing the mainboard area image into a plurality of image blocks according to a preset size; recording any image block as a target image block, calculating the grayscale difference degree of the target image block; calculating the potential degree of false solder joints of the target image block; determining the defective block according to the size of the potential degree of false solder joints; using the maximum entropy method to perform threshold segmentation processing on each defective block in turn, obtaining the false solder joint area of each defective block, and completing welding gun mainboard defect detection based on image processing. The present invention effectively identifies subtle defects on the surface of the welding gun mainboard by analyzing the grayscale difference degree of the image blocks, combining edge detection and chain code recognition methods, and improving detection accuracy.

Description

Welding gun main board defect detection method and system based on image processing
Technical Field
The invention relates to the technical field of image data processing, in particular to a welding gun main board defect detection method and system based on image processing.
Background
With the development of industries such as electronic products and communication equipment, the soldering technology plays an important role in various industries. The welding gun main board is used as a core component of welding equipment, the production quality of the welding gun main board directly influences the welding effect and the quality of products, in the traditional welding gun main board production, the problems of high cost, low efficiency, difficulty in finding tiny defects and the like exist in manual detection, defective products enter the market, the quality of the products and brand image are influenced, and along with the continuous progress of an image processing technology, the popularization of an automatic detection system can improve the production efficiency, reduce the production cost and improve the production consistency and the stability. In the welding process, a cold joint defect is generated due to improper temperature control or too short welding time, and the cold joint defect refers to that the surface of a welding spot seems to be welded, but the actual internal connection is poor, which can lead to unstable electric contact between a pin of an electronic element and a welding disc and even complete disconnection, thereby influencing the welding quality and the product performance. The existing method for detecting the potential false welding defects on the surface of the welding gun main board is a maximum entropy method, can automatically calculate an optimal threshold value, is suitable for complex images, and has strong self-adaptability.
The patent application document with the publication number of CN115760830A provides a fabric flaw detection method, which comprises the steps of denoising a fabric image by adopting a self-adaptive median filter, carrying out image enhancement on the image by adopting a fuzzy domain image enhancement method, calculating edge gradient amplitudes of the image in the horizontal, vertical, 45-degree and 135-degree directions by using a Sobel edge difference operator, carrying out non-maximum suppression by adopting a linear interpolation method according to the edge gradient amplitude, segmenting and fusing the image by adopting an iteration method and a maximum entropy method, calculating a high-low threshold value of the compressed image, and extracting the flaw image edge after suppressing isolated pixel points according to the high-low threshold value.
However, flux residues may exist around the welding spot on the surface of the welding gun main board, and although the flux residues do not affect the reliability of electrical connection, the flux residues may bring similar appearance to the welding spot surface, so that the accuracy of detection of potential false welding defects is affected, meanwhile, the basic idea of the maximum entropy method in image segmentation is to determine a proper threshold value by maximizing the entropy value of an image gray level histogram, in general, the maximum entropy method uses a global threshold value, namely, the gray level histogram of the whole image is analyzed, and a global threshold value is selected for image segmentation, but when a fixed global threshold value is used for segmentation of each segmented area on the image, the segmentation result is inaccurate, and important information is lost.
Disclosure of Invention
In order to solve the problem that important information is lost due to inaccurate segmentation results of each segmented image of an image by using a fixed global threshold when a maximum entropy method is used and the accuracy of cold joint detection is reduced due to residual soldering flux, the invention provides a method and a system for detecting defects of a welding gun main board based on image processing.
In a first aspect, the present invention provides a method for detecting defects of a welding gun motherboard based on image processing, which adopts the following technical scheme:
A welding gun main board defect detection method based on image processing comprises the steps of extracting gray images of a welding gun main board surface image by means of semantic segmentation to obtain a main board area image, equally dividing the main board area image into a plurality of image blocks according to preset sizes, recording any one of the image blocks as a target image block, calculating the gray level value of each gray pixel point in the target image block, the gray average value of the target image block and the variance of the number of the gray pixels corresponding to each gray level in a gray level histogram corresponding to the target image block, obtaining all edges and edge pixel points of each image block by means of edge detection, identifying the directions of the edge pixel points by means of chain codes to obtain the direction number value of the edge pixel points, calculating the potential false welding degree of the target image block based on the gray level value of each gray pixel point in the target image block and the difference of the direction number value of all adjacent two edge pixel points on each edge of the target image block, and determining the potential false welding defect degree of each false welding point in sequence by means of the chain code to obtain the maximum false welding defect detection threshold value of each welding gun defect region.
The method has the advantages that fine defects on the surface of the welding gun main board, such as false welding, can be effectively identified through gray level difference degree analysis on the image blocks and combining an edge detection method and a chain code identification method, so that accuracy of the false welding detection is improved, influences of residual soldering flux on detection results can be effectively reduced through gray level value, mean value and histogram variance analysis, misjudgment and missed judgment caused by residual substances are avoided, each defect block is subjected to self-adaptive threshold segmentation through a maximum entropy method, segmentation threshold can be dynamically adjusted according to characteristics of different image areas, information loss caused by a fixed global threshold is avoided, accurate defect area identification is guaranteed, quality of the welding gun main board can be estimated from multiple dimensions through comprehensive analysis of gray level difference, edge direction and potential false welding degree, and accordingly defect detection comprehensiveness and accuracy are improved.
Further, the semantic segmentation uses DeepLab models.
The deep neural network model for semantic segmentation has the advantages that the deep neural network model for semantic segmentation can accurately segment the surface of the welding gun main board and accurately identify the defect area, has stronger adaptability to complex backgrounds, and ensures stable performance under complex conditions.
Further, the gray scale difference degree satisfies the following relation:
In the formula (I), in the formula (II), Is the firstThe degree of gray scale difference of individual image patches,Is the firstThe number of gray-scale pixels within a single image tile,Is the firstIntra-block first of individual imagesThe gray value of each gray pixel point,Is the firstThe gray-scale average of each image patch,Is the firstThe image blocks correspond to the variance of the number of gray pixel points corresponding to each gray level in the gray histogram,Is an absolute value sign.
The method has the advantages that local gray level change can be accurately captured through calculating the difference between the gray level value and the gray level average value of each pixel point in the image block, the image analysis accuracy is improved, the gray level histogram variance is combined to weight the change of gray level distribution, the area with larger gray level change is more prominent, the sensitivity to the fine difference is increased, noise and real change are effectively distinguished through absolute value difference calculation, false detection is reduced, and the robustness is improved.
Further, the edge detection adopts a Canny operator.
Further, the chain code adopts an 8-neighborhood chain code.
Further, the potential cold joint degree satisfies the following relation:
In the formula (I), in the formula (II), Is the firstThe degree of potential cold joint of the individual image tiles,Is the firstThe degree of gray scale difference of individual image patches,Is the firstThe number of categories of direction number values of edge pixels of the individual image patches,Is the firstThe number of edges of the individual image tiles,Is the firstThe first image blockThe number of edge pixels on the strip edge,AndRespectively the firstThe first image blockFirst on the strip edgeAnd (b)The direction number value of each edge pixel point,As a function of the normalization,Is an absolute value sign.
The method has the advantages that potential false soldering areas can be effectively identified by combining gray level differences, edge quantity and edge direction changes, so that the accuracy of false soldering detection is improved, the gray level differences and edge characteristics are comprehensively considered, the detection process is more comprehensive, fine changes in images can be accurately captured, and the scale differences of different image blocks are reduced by normalization processing, so that the detection results are more stable and consistent.
Further, determining the defect block according to the potential cold joint degree comprises determining the image block as the defect block in response to the potential cold joint degree being greater than a preset defect threshold.
The method has the advantages that the defect threshold is set, when the potential cold joint degree exceeds the value, the potential cold joint degree is determined to be the defect block, erroneous judgment and missed judgment are effectively avoided, the image block can be automatically divided into the defect area and the non-defect area, the detection efficiency is improved, and manual intervention is reduced.
In a second aspect, the present invention provides a welding gun motherboard defect detection system based on image processing, which adopts the following technical scheme:
The welding gun main board defect detection system based on image processing comprises a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are executed by the processor to realize the welding gun main board defect detection method based on the image processing.
By adopting the technical scheme, the welding gun main board defect detection method based on image processing generates a computer program, and the computer program is stored in the memory to be loaded and executed by the processor, so that terminal equipment is manufactured according to the memory and the processor, and the welding gun main board defect detection method based on image processing is convenient to use.
The invention has the following technical effects:
The main board area image of the welding gun is subjected to block processing, gray features are independently analyzed in each block image, so that the potential rosin joint degree is estimated, and the image segmentation is carried out by independently applying a maximum entropy method to each block with the large potential rosin joint degree, so that the subtle changes of the areas can be captured more accurately, the appearance rosin joint caused by the factors of the rosin flux residue and the like and the problem of inaccurate segmentation caused by using the global threshold are avoided, the segmentation effect and the sensitivity of defect detection are improved, and the risk of important information loss is reduced.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not by way of limitation, and like or corresponding reference numerals refer to like or corresponding parts.
Fig. 1 is a flowchart of a method for detecting defects of a welding gun main board based on image processing according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that when the terms "first," "second," and the like are used in the claims, the specification and the drawings of the present invention, they are used merely for distinguishing between different objects and not for describing a particular sequential order. The terms "comprises" and "comprising" when used in the specification and claims of the present invention are taken to specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The invention aims to perform threshold segmentation treatment on potential virtual welding defects on the surface of a welding gun mainboard by using a maximum entropy method, perform blocking treatment on the welding gun mainboard image before segmentation, and screen out each image block needing to be processed by using the maximum entropy method independently according to the analysis of gray features in each image block.
The embodiment of the invention discloses a welding gun main board defect detection method based on image processing, which comprises the following steps of S1-S6 with reference to FIG. 1:
and S1, extracting a gray level image of a surface image of a mainboard of the welding gun by utilizing semantic segmentation to obtain a mainboard area image.
Specifically, the semantic segmentation uses DeepLab models.
The method comprises the steps of carrying out vertical shooting on the surface of a welding gun mainboard through a high-definition camera to obtain a welding gun mainboard surface image, carrying out gray-scale treatment on the welding gun mainboard surface image to obtain a gray-scale image of the welding gun mainboard surface image, and extracting a welding gun mainboard region in the welding gun mainboard surface image by using a deep convolutional neural network version 3 (Deep Convolutional Neural Network for SEMANTIC IMAGE Segmentation version, deep LabV 3) model for semantic image segmentation in order to facilitate analysis of gray-scale characteristics of the welding gun mainboard surface in the subsequent steps.
S2, equally dividing the image of the main board area into a plurality of image blocks according to a preset size.
The image blocking processing is performed on the welding gun main board area image so as to facilitate the analysis of the subsequent steps, and the blocking rule of the welding gun main board area image is that the welding gun main board area image is equally divided into a plurality of image blocks, and gray pixel points which are positioned in the edge area of the welding gun main board and are insufficient for constructing one image block are integrated into the image block closest to the Euclidean distance of the gray pixel points for analysis.
The practitioner can set the size of the image tiles, e.g., 7 x 7, depending on the particular implementation.
And S3, marking any image block as a target image block, and calculating the gray level difference degree of the target image block.
When the index is analyzed, the more the gray value of the gray pixel point in each image block deviates from the gray average value in the block and the larger the number difference of the corresponding gray pixel point in each gray level in the gray histogram, the more the gray value distribution in the image block is scattered, the larger the gray difference degree is, and the possibility of potential false welding defects in the image block is increased.
And calculating the gray level difference degree of the target image block based on the gray level value of each gray level pixel point in the target image block, the gray level average value of the target image block and the variance of the number of gray level pixel points corresponding to each gray level in the gray level histogram corresponding to the target image block.
Specifically, the gray scale difference degree satisfies the following relation:
;
In the formula, Is the firstThe degree of gray scale difference of individual image patches,Is the firstThe number of gray-scale pixels within a single image tile,Is the firstIntra-block first of individual imagesThe gray value of each gray pixel point,Is the firstThe gray-scale average of each image patch,Is the firstThe image blocks correspond to the variance of the number of gray pixel points corresponding to each gray level in the gray histogram,Is an absolute value sign.
Wherein, Represent the firstThe larger the gray value of all gray pixel points in each image block is compared with the gray average value of the image block, the larger the value is, which means that the larger the offset is, which can be described as the firstThe more discrete the gray value distribution in each image block, the greater the gray difference degree, and the greater the possibility of potential cold joint defects in the image block; The larger can be explained by The larger the difference of the number of the corresponding pixel points on each gray level in the gray level histogram of each image block, the more the difference can be verifiedThe larger the deviation of the gray value of all gray pixel points in each image block compared with the gray average value of the image block, the higher the reliability, namely the description of the firstThe more discrete the gray value distribution within each image block, the greater the gray difference degree, and the further description of the firstThe greater the likelihood of potential cold joint defects in the individual image segments.
And S4, calculating the potential cold joint degree of the target image block.
It should be noted that, in order to distinguish the potential cold joint defect from the residual soldering flux region in the surface image of the welding gun main board, the gray scale variation characteristic in each image block is further analyzed, and then the gray scale difference degree in each image block is analyzed and calculated to obtain the potential cold joint degree in each image block, before the index analysis, the welding point with the potential cold joint usually has irregular or incomplete edges, possibly has a missing part, which causes the non-smooth, incomplete or obvious fracture of the edge of the welding point, while the residual soldering flux usually does not change the edge shape of the welding point, and has no obvious fracture or abrupt change, so that when the potential cold joint degree in each image block is analyzed, the difference value of the direction numbers between the adjacent pixel points in all edges in one image block is larger, the greater the difference value of the direction numbers between the adjacent pixel points in one image block is, the greater the potential cold joint defect can be indicated, and the greater the potential cold joint defect can be corresponding to the greater the potential cold joint degree.
And calculating the potential false welding degree of the target image block based on the gray level difference degree, the edge direction number of the target image block and the difference between the direction number values of all adjacent two edge pixel points on each edge of the target image block, wherein the edge direction number is the kind number of all the direction number values in the target image block.
Specifically, the edge detection adopts a Canny operator.
Specifically, the chain code adopts an 8-neighborhood chain code.
Specifically, the potential cold joint degree satisfies the following relation:
;
In the formula, Is the firstThe degree of potential cold joint of the individual image tiles,Is the firstThe degree of gray scale difference of individual image patches,Is the firstThe number of categories of direction number values of edge pixels of the individual image patches,Is the firstThe number of edges of the individual image tiles,Is the firstThe first image blockThe number of edge pixels on the strip edge,AndRespectively the firstThe first image blockFirst on the strip edgeAnd (b)The direction number value of each edge pixel point,As a function of the normalization,Is an absolute value sign.
Wherein, The larger the firstThe larger the gray level difference degree of each image block is, the greater the possibility that potential cold joint defects exist in the image block is, and the greater the corresponding potential cold joint degree is; the larger the gray level variation within the one image patch, the more the possibility of the potential cold joint defect within the one image patch, the greater the corresponding potential cold joint degree, the more the image patch without the potential cold joint defect, The potential false soldering degree is 0, and the image block does not need to be processed by a maximum entropy method independently in the follow-up process; The larger the difference value of the direction numbers between the adjacent two pixel points on all edges in one image block can be described, the more disordered the gray level change in the one image block can be verified, and the greater the potential cold joint degree of the one image block can be further described.
And S5, determining defect blocking according to the potential cold joint degree.
Specifically, the determining the defect block according to the magnitude of the potential cold joint degree includes:
and in response to the potential cold joint degree being greater than a preset defect threshold, identifying the image block as a defect block.
The practitioner may set a defect threshold, for example, 0.5, depending on the particular implementation.
And S6, sequentially carrying out threshold segmentation processing on each defect block by using a maximum entropy method to obtain a virtual welding area of each defect block, and finishing the defect detection of the welding gun main board based on image processing.
For image segmentation without independent maximum entropy processing, as the potential cold joint degree of the areas is lower, the potential cold joint defects are not likely to exist, meanwhile, obvious gray level change does not exist in the areas, the distribution of gray level histograms is generally smooth, the areas do not need to be processed by the maximum entropy processing, and for all the defect segmentation with independent maximum entropy processing, threshold segmentation processing is performed by the maximum entropy processing, the corresponding segmentation threshold values are obtained, and the cold joint areas are obtained, wherein the obtained cold joint areas are the potential cold joint defects on the surface of a welding gun main board. The threshold segmentation process of the specific maximum entropy method is a known technology, and will not be described in detail herein.
The embodiment of the invention also discloses a welding gun main board defect detection system based on image processing, which comprises a processor and a memory, wherein the memory stores computer program instructions, and the welding gun main board defect detection method based on the image processing is realized when the computer program instructions are executed by the processor.
The above system further comprises other components well known to those skilled in the art, such as a communication bus and a communication interface, the arrangement and function of which are known in the art and therefore are not described in detail herein.
In the context of this patent, the foregoing memory may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic or magneto-optical storage medium, or any other medium that can be used to store the desired information and that can be accessed by an application, a module, or both. Any such computer storage media may be part of, or accessible by, or connectable to, the device.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.
The above embodiments are not intended to limit the scope of the invention, so that the equivalent changes of the structure, shape and principle of the invention are covered by the scope of the invention.

Claims (8)

1. The method for detecting the defects of the welding gun main board based on the image processing is characterized by comprising the following steps of:
extracting a gray level image of a welding gun main board surface image by utilizing semantic segmentation to obtain a main board area image;
Equally dividing the main board area image into a plurality of image blocks according to a preset size, marking any one image block as a target image block, and calculating the gray difference degree of the target image block based on the gray value of each gray pixel point in the target image block, the gray average value of the target image block and the variance of the number of the gray pixels corresponding to each gray level in the gray histogram corresponding to the target image block;
acquiring all edges and edge pixel points of each image block by utilizing edge detection, and identifying the directions of the edge pixel points by utilizing chain codes to obtain direction number values of the edge pixel points; calculating the potential false welding degree of the target image block based on the gray level difference degree, the edge direction number of the target image block and the difference of the direction number values of all adjacent two edge pixel points on each edge of the target image block, wherein the edge direction number is the kind number of all direction number values in the target image block;
Determining defect blocking according to the potential cold joint degree;
And sequentially carrying out threshold segmentation processing on each defect block by using a maximum entropy method to obtain a virtual welding area of each defect block, and finishing the detection of the defects of the welding gun main board based on image processing.
2. The image processing-based gun motion main board defect detection method according to claim 1, wherein the semantic segmentation adopts DeepLab models.
3. The image processing-based gun main board defect detection method according to claim 1, wherein the gray scale difference degree satisfies the following relation:
;
In the formula, Is the firstThe degree of gray scale difference of individual image patches,Is the firstThe number of gray-scale pixels within a single image tile,Is the firstIntra-block first of individual imagesThe gray value of each gray pixel point,Is the firstThe gray-scale average of each image patch,Is the firstThe image blocks correspond to the variance of the number of gray pixel points corresponding to each gray level in the gray histogram,Is an absolute value sign.
4. The image processing-based gun main board defect detection method according to claim 1, wherein the edge detection adopts a Canny operator.
5. The method for detecting defects of a welding gun main board based on image processing according to claim 1, wherein the chain code is an 8-neighborhood chain code.
6. The image processing-based gun main board defect detection method according to claim 1, wherein the potential cold joint degree satisfies the following relation:
;
In the formula, Is the firstThe degree of potential cold joint of the individual image tiles,Is the firstThe degree of gray scale difference of individual image patches,Is the firstThe number of categories of direction number values of edge pixels of the individual image patches,Is the firstThe number of edges of the individual image tiles,Is the firstThe first image blockThe number of edge pixels on the strip edge,AndRespectively the firstThe first image blockFirst on the strip edgeAnd (b)The direction number value of each edge pixel point,As a function of the normalization,Is an absolute value sign.
7. The method for detecting defects of a welding gun main board based on image processing according to claim 1, wherein determining defect blocks according to the magnitude of the potential cold joint degree comprises:
and in response to the potential cold joint degree being greater than a preset defect threshold, identifying the image block as a defect block.
8. The welding gun main board defect detection system based on image processing is characterized by comprising a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions realize the welding gun main board defect detection method based on the image processing according to any one of claims 1-7 when the computer program instructions are executed by the processor.
CN202411918282.3A 2024-12-25 2024-12-25 Welding gun main board defect detection method and system based on image processing Active CN119359715B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411918282.3A CN119359715B (en) 2024-12-25 2024-12-25 Welding gun main board defect detection method and system based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411918282.3A CN119359715B (en) 2024-12-25 2024-12-25 Welding gun main board defect detection method and system based on image processing

Publications (2)

Publication Number Publication Date
CN119359715A true CN119359715A (en) 2025-01-24
CN119359715B CN119359715B (en) 2025-05-16

Family

ID=94310288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411918282.3A Active CN119359715B (en) 2024-12-25 2024-12-25 Welding gun main board defect detection method and system based on image processing

Country Status (1)

Country Link
CN (1) CN119359715B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119693358A (en) * 2025-02-24 2025-03-25 苏州祥龙嘉业电子科技股份有限公司 Connector surface defect detection method and system based on image processing
CN119963558A (en) * 2025-04-11 2025-05-09 江阴标榜汽车部件股份有限公司 Laser welding defect recognition method for injection molded pipes based on image processing
CN120318227A (en) * 2025-06-12 2025-07-15 东莞市台工电子机械科技有限公司 A wafer surface smoothness detection method and system for visual inspection machine

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109272503A (en) * 2018-09-29 2019-01-25 西安工程大学 A hairiness detection algorithm based on maximum entropy and DBSCAN fusion
WO2020147398A1 (en) * 2019-01-17 2020-07-23 平安科技(深圳)有限公司 Reproduced image detection method and device, computer device and storage medium
CN115908429A (en) * 2023-03-08 2023-04-04 山东歆悦药业有限公司 A method and system for detecting the grinding accuracy of foot bath medicine powder
CN116862855A (en) * 2023-06-30 2023-10-10 中国船舶集团有限公司第七一九研究所 Method and system for monitoring leakage of water-lubricated tail shaft based on image processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109272503A (en) * 2018-09-29 2019-01-25 西安工程大学 A hairiness detection algorithm based on maximum entropy and DBSCAN fusion
WO2020147398A1 (en) * 2019-01-17 2020-07-23 平安科技(深圳)有限公司 Reproduced image detection method and device, computer device and storage medium
CN115908429A (en) * 2023-03-08 2023-04-04 山东歆悦药业有限公司 A method and system for detecting the grinding accuracy of foot bath medicine powder
CN116862855A (en) * 2023-06-30 2023-10-10 中国船舶集团有限公司第七一九研究所 Method and system for monitoring leakage of water-lubricated tail shaft based on image processing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHEN ZHENG: "Adaptive Edge Detection Algorithm Based on Grey Entropy Theory and Textural Features", IEEE ACCESS, 9 July 2019 (2019-07-09), pages 1 - 12 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119693358A (en) * 2025-02-24 2025-03-25 苏州祥龙嘉业电子科技股份有限公司 Connector surface defect detection method and system based on image processing
CN119963558A (en) * 2025-04-11 2025-05-09 江阴标榜汽车部件股份有限公司 Laser welding defect recognition method for injection molded pipes based on image processing
CN120318227A (en) * 2025-06-12 2025-07-15 东莞市台工电子机械科技有限公司 A wafer surface smoothness detection method and system for visual inspection machine

Also Published As

Publication number Publication date
CN119359715B (en) 2025-05-16

Similar Documents

Publication Publication Date Title
CN119359715B (en) Welding gun main board defect detection method and system based on image processing
CN113706490B (en) A kind of wafer defect detection method
CN114332026A (en) Visual detection method and device for scratch defects on surface of nameplate
CN116542975B (en) Defect classification method, device, equipment and medium for glass panel
CN115239727B (en) PCB surface defect detection method
CN112669295A (en) Lithium battery pole piece defect detection method based on secondary threshold segmentation theory
CN113298769B (en) FPC flexible flat cable appearance defect detection method, system and medium
CN118501161B (en) A quality detection method and system for copper column crimping
CN112967224A (en) Electronic circuit board detection system, method and medium based on artificial intelligence
CN110660072A (en) Method and device for identifying straight line edge, storage medium and electronic equipment
CN108876842A (en) A kind of measurement method, system, equipment and the storage medium of sub-pixel edge angle
CN118657740A (en) A hardware processing quality inspection method, electronic equipment and system
CN119151886A (en) PCBA (printed circuit board assembly) plate surface defect detection method based on computer vision
CN118710586A (en) Circuit board defect detection method and device, storage medium, and electronic equipment
CN117152165B (en) Photosensitive chip defect detection method and device, storage medium and electronic equipment
CN118397248A (en) Constant volume method and system based on machine vision
CN108492306A (en) A kind of X-type Angular Point Extracting Method based on image outline
JP2002140713A (en) Image processing method and apparatus
CN117173185B (en) Method and device for detecting area of rolled plate, storage medium and computer equipment
JP2008185395A (en) Mounting substrate visual inspection method
CN119290919A (en) PCB board detection system and detection method
CN118351059A (en) Circuit board detection method, device, computer equipment and storage medium
CN115393594B (en) Product surface detection method
CN111935480B (en) A detection method and related device for an image acquisition device
CN114842037A (en) Image edge detection method and device for welding seam, computer equipment and storage medium

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