CN116758084A - Intelligent detection method for welding defects of sheet metal parts based on image data - Google Patents

Intelligent detection method for welding defects of sheet metal parts based on image data Download PDF

Info

Publication number
CN116758084A
CN116758084A CN202311048242.3A CN202311048242A CN116758084A CN 116758084 A CN116758084 A CN 116758084A CN 202311048242 A CN202311048242 A CN 202311048242A CN 116758084 A CN116758084 A CN 116758084A
Authority
CN
China
Prior art keywords
image block
image
welding
defect
gray
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
CN202311048242.3A
Other languages
Chinese (zh)
Other versions
CN116758084B (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.)
Jinhengshan Electric Wuxi Co ltd
Original Assignee
Jinhengshan Electric Wuxi 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 Jinhengshan Electric Wuxi Co ltd filed Critical Jinhengshan Electric Wuxi Co ltd
Priority to CN202311048242.3A priority Critical patent/CN116758084B/en
Publication of CN116758084A publication Critical patent/CN116758084A/en
Application granted granted Critical
Publication of CN116758084B publication Critical patent/CN116758084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • 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/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • 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/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30152Solder
    • 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)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The application relates to the field of image processing, in particular to an intelligent detection method for welding defects of sheet metal parts based on image data, which comprises the following steps: acquiring a welding area image; obtaining a plurality of first image blocks and a plurality of second image blocks according to the welding area image, and calculating an angle difference index of each first image block so as to obtain the importance degree of each first image block; obtaining the abnormal degree of each second image block according to the importance degree of each first image block, further obtaining the welding line regularity of each second image block, calculating the neighborhood relevance of each second image block, and obtaining the defect possibility of each second image block according to the abnormal degree, the welding line regularity and the neighborhood relevance; and carrying out defect detection on the welding area image according to the defect possibility to obtain a defect area, so that the interference of welding lines is eliminated, and an accurate defect area is obtained.

Description

Intelligent detection method for welding defects of sheet metal parts based on image data
Technical Field
The application relates to the field of image processing, in particular to an intelligent detection method for welding defects of sheet metal parts based on image data.
Background
With the development of industrialization and modernization, the quality requirements on sheet metal parts are higher and higher. Welding defects may lead to product quality failure, safety hazards and production accidents, so that timely and effective defect detection is required. The development of sheet metal part welding defect detection technology is to meet the quality requirements, improve the automation level and the detection precision and speed, so that the quality and the reliability of the welding process are ensured.
Because sheet metal parts are generally used in a high-strength environment and frequently used, the quality requirements on the sheet metal parts are high. The metal plate welding area is usually subjected to scale welding, and the scale welding is a common welding technology and is characterized by attractive welding seams, high strength and good corrosion resistance, so that the metal plate is generally subjected to scale welding in order to meet the practical requirements of the metal plate. Flash is a common defect in fish scale welding, and the quality of sheet metal parts is greatly affected by the existence of the flash, so that flash detection is needed after welding is finished. Many scale-like textures exist in the weld joint formed by the scale welding, and the textures can greatly interfere with the detection of the flash, so that the accuracy of the detection of the flash is reduced.
Disclosure of Invention
In order to solve the technical problems, the application provides an intelligent detection method for welding defects of sheet metal parts based on image data, which comprises the following steps:
acquiring a welding area image;
obtaining a plurality of first image blocks and a plurality of second image blocks according to the welding area image, calculating an angle difference index of each first image block, and obtaining the importance degree of each first image block according to the angle difference index;
obtaining the abnormal degree of each second image block according to the importance degree of each first image block, obtaining the welding line regularity of each second image block according to the abnormal degree, calculating the neighborhood relevance of each second image block, and obtaining the defect possibility of each second image block according to the abnormal degree, the welding line regularity and the neighborhood relevance;
performing defect detection on the welding area image according to the defect possibility to obtain a defect area;
the calculating the angle difference index of each first image block comprises the following specific steps:
the welding direction is the horizontal direction;
for a first image block, acquiring an included angle between the gradient direction of each pixel and the welding direction, and taking the variance of the included angle between the gradient direction of all pixels and the welding line direction as an angle difference index of the first image block;
the method for obtaining the importance degree of each first image block according to the angle difference index comprises the following specific steps:
acquiring gray values of pixels in a first image block, and taking the average value of the gray values of all the pixels in the first image block as a gradient index of the first image block;
calculating a gray scale difference index of each first image;
taking the product of the gradient index, the gray level difference index and the angle difference index of each first image block as the importance degree of each first image block;
the step of obtaining the abnormality degree of each second image block according to the importance degree of each first image block comprises the following specific steps:
for a second image block, acquiring a first image block to which the second image block belongs, and taking the importance degree of the first image block to which the second image block belongs as the importance degree of the second image block;
calculating the average value of the gradient values of all pixels in the second image blocks, and taking the ratio of the importance degree of each second image block to the average value of the gradient values as the abnormal degree;
the welding line regularity of each second image block is obtained according to the degree of abnormality, and the method comprises the following specific steps:
for a second image block: acquiring a first image block to which a second image block belongs, and acquiring the second image block with the largest degree of abnormality from the first image block to which the second image block belongs as a representative image block of the second image block; acquiring two first image blocks adjacent to the first image block in the welding direction as adjacent areas of the second image block, and respectively acquiring a second image block with the greatest degree of abnormality in each adjacent area as a reference image block of the second image block;
for a second image block, calculating the gray value average value of all pixels in the representative image block, calculating the gray value average value of all pixels in the reference image block, respectively differencing the gray value average value of the representative image block with the gray value average value of each reference image block to obtain two gray difference values, averaging the two gray difference values to obtain the gray difference value average value, and taking the reciprocal of the gray difference value average value as the welding line regularity of the second image block;
the calculating the neighborhood relevance of each second image block comprises the following specific steps:
for a second image block, 8 second image blocks adjacent to the second image block are obtained as adjacent image blocks of the second image block, the gradient average value of all pixels in each adjacent image block is taken as the gradient value of each adjacent image block, and the gradient value average value of the 8 adjacent image blocks is calculated; taking the average value of the gradient values of all pixels in the second image block as the gradient value of the second image block;
the neighborhood relevance calculating method of each second image block comprises the following steps:
wherein ,gradient value representing the j-th second image block,>gradient value mean value of adjacent image block representing jth second image block, +.>Representing the neighborhood relevance of the j-th second image block;
the defect possibility of each second image block is obtained according to the abnormality degree, the welding line regularity and the neighborhood relevance, and the method comprises the following specific steps:
taking the product of the inverse of the welding line regularity, the abnormality degree and the neighborhood relevance of each second image block as the defect possibility of each second image block.
Preferably, the obtaining a plurality of first image blocks and a plurality of second image blocks according to the welding area image includes the specific steps of:
uniformly dividing a welding area image into a plurality of first image blocks from top to bottom and from left to right;
uniformly dividing the welding area image into a plurality of second image blocks from top to bottom and from left to right; the first image block is of a different size than the second image block.
Preferably, the calculating the gray scale difference index of each first image includes the specific steps of:
all second image blocks inside the first image block are called sub-blocks of the first image block;
and for a first image block, acquiring the gray values of pixels in each sub-block, calculating the gray value average value of all pixels in each sub-block, and taking the variance of the gray value average value of all sub-blocks as a gray difference index.
Preferably, the defect detection is performed on the welding area image according to the defect possibility to obtain a defect area, which comprises the following specific steps:
for a second image block, taking the defect probability of pixels in the second image block as the defect probability of the second image block;
the image is enhanced by utilizing the defect possibility of each pixel to obtain an enhanced welding area image;
and carrying out defect detection on the enhanced image to obtain a defect area.
The embodiment of the application has at least the following beneficial effects: when detecting the weld flash defect, the scale marks in the weld joint can influence the detection precision. Meanwhile, the information is grasped differently under different view angles, so that an image is divided into a first image block and a second image block with different sizes, the information in the first image block with larger size is analyzed to obtain the abnormal degree of each second image block, the abnormal condition of each second image block under the large view angle is reflected through the abnormal degree, then the second image block with small size is analyzed, the neighborhood relevance is obtained by combining more detail information under the small view angle, the arrangement rule of the fish scale patterns is combined to obtain the weld pattern regularity, and finally the defect possibility is obtained by combining the abnormal degree, the neighborhood relevance and the weld pattern regularity, so that the defect distinction is realized by utilizing the defect characteristics and the interference information characteristics, and the accurate defect area is obtained.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an intelligent detection method for welding defects of sheet metal parts based on image data.
Detailed Description
In order to further describe the technical means and effects adopted by the application to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the intelligent detection method for the welding defect of the sheet metal part based on image data according to the application with reference to the attached drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
The following specifically describes a specific scheme of the intelligent detection method for the welding defects of the sheet metal parts based on image data.
Referring to fig. 1, a flowchart of steps of an intelligent detection method for welding defects of sheet metal parts based on image data according to an embodiment of the application is shown, the method includes the following steps:
and S001, acquiring a welding area image of the sheet metal part.
In order to detect the weld flash defect of the weld joint area on the sheet metal part, the image of the weld joint area needs to be acquired first.
The industrial camera is utilized to collect images of welding areas of the metal plate part for fish scale welding, and the fact that the welding direction in the images is required to be ensured to be horizontal when the images are collected is needed to be described.
And carrying out graying treatment on the welding area image of the metal plate fish scale welding to obtain a gray level image of the welding area image, and recording the gray level image of the welding area image as the welding area image in the follow-up process for convenience of description.
Step S002, obtaining a first image block and a second image block according to the welding area image, and calculating the importance degree of each first image block.
Because many scale-like textures exist in the welding seam formed by the scale welding, the textures can greatly interfere with the detection of the weld flash, so that the accuracy of the detection of the weld flash is reduced, and the analysis is required to be carried out by combining the characteristics of the textures of the weld flash and the scale welding seam, thereby realizing the accurate detection of the weld flash defect.
1. Obtaining a first image block and a second image block according to the welding area image:
when eliminating the interference of weld texture, the large structural information is considered and the detail texture is combined when accurately detecting the weld flash area, so that the image is divided into image blocks with different sizes, wherein the large image block is used for macroscopically analyzing the large structural information, and the small image block is used for grasping the detail texture.
A preset K1 is set, and the welding area image is uniformly divided into a plurality of first image blocks k1×k1 from top to bottom and from left to right, where k1=9 is taken as an example in this embodiment, the embodiment is not specifically limited, and K1 is determined according to the specific implementation situation. It should be noted that, when the last divided first image block does not meet the size requirement, the size of the first image block is amplified by means of end zero padding.
A K2 is preset, and the welding area image is uniformly divided into a plurality of second image blocks k2×k2 from top to bottom and from left to right, where k2=3 is taken as an example in this embodiment, the embodiment is not specifically limited, and K2 is determined according to the specific implementation situation. It should be noted that, when the second image block that is finally divided does not meet the size requirement, the second image block is subjected to size expansion by means of end zero padding.
2. Calculating the importance degree of each first image block:
because there is a gray level difference between the inner regions in the weld flash defect region, it is important to the information of those regions where the inner gray level difference is large; meanwhile, as some texture structures exist in the weld flash defect, the gradient of the weld flash defect area is relatively large, so that the information in the area with the large gradient is important; furthermore, the fish scale patterns of the welding seams are arranged regularly, and the arrangement of the textures of the weld flash defect areas is disordered, so that the disordered arrangement information is important. Based on this, the importance level of each first image block is calculated as follows:
(1) Acquiring gradient indexes of each first image block:
since some texture is present in the flash defect, the gradient of the flash defect area is relatively large, and thus the gradient information is the information that needs to be focused when defect detection is performed, and thus the gradient index of each first image block is acquired first.
Obtaining gray values of pixels in the first image block, averaging the gray values of all pixels in the first image block to serve as a gradient index of each first image block, and marking the shaving index of the ith first image block as follows
(2) Acquiring gray scale difference indexes of each first image:
since there is a gradation difference between the inside regions in the flash defect region, the gradation difference between the regions is also a concern when detecting defects.
All second tiles inside the first tile are referred to as sub-tiles of the first tile.
For a first image block, acquiring the gray values of pixels in sub-blocks, calculating the average value of the gray values of all pixels in each sub-block, and taking the variance of the average value of the gray values of all sub-blocks as the gray difference index of the first image blockMarking the gray scale difference index of the ith first image block as
(3) Acquiring an angle difference index of each first image block:
because the scale patterns of the welding seams can be arranged regularly, and the weld flash is generally formed by piling up welding slag, the piling up is random, so that the texture arrangement of the weld flash defect areas is disordered, and the important attention is paid to the areas with disordered arrangement.
In step S001, image acquisition is controlled, and the welding direction in the acquired welding region image is the horizontal direction.
Because the scale textures in the welding seam have a certain arrangement rule, gradient directions at the scale textures are consistent, and the difference of included angle values between the gradient directions and the welding direction is small, so that the angle difference index of the first image block is calculated based on the gradient directions.
For a first image block, acquiring the included angle between the gradient direction of each pixel and the welding line direction, taking the variance of the included angle between the gradient direction of all pixels and the welding line direction as an angle difference index, and marking the angle difference index of the ith first image block as follows
(4) Calculating the importance degree of each first image block:
wherein ,a gray scale difference index representing the i-th first image block, the larger the value is, the more likely it is that there is a defect, and thus the information of the region is to be focused on,/->Gradient index representing the i-th first image block, the gradient indexA larger value indicates a greater probability of defects, and thus information about the area is more important,/-A)>An index of angular difference representing the i-th first image block, the larger the value is, the greater the likelihood of defect existence is, and thus the more important the information of the area is, +.>Indicating the importance level of the i-th first image block.
Step S003, calculating the degree of abnormality of the second image block, obtaining the welding line regularity of the second image block according to the degree of abnormality of the second image block, calculating the neighborhood relevance of the second image block, and obtaining the defect possibility of the second image block according to the degree of abnormality, the welding line regularity and the neighborhood relevance.
In step S002, the importance level of each first image block is obtained, and thus the information of which areas are important can be obtained, but the accurate defect areas cannot be obtained yet, so that further analysis is needed by combining the detailed information.
1. Calculating the degree of abnormality of each second image block:
the importance degree of each first image block is obtained through the calculation, the area of the first image block is large, and the weld flash is generally only in a partial area of the first image block, so that the weld flash area needs to be accurately obtained and further analyzed by combining with the second image block.
Since the gradient of the flash defect with respect to the texture of the weld is small, the region of the first image block where the gradient value is small is more likely to be a defective region, and thus the degree of abnormality of each second image block is calculated based on this.
For a second image block, acquiring gradient values of all pixels, and calculating gradient value average values of all pixels; acquiring a first image block to which the second image block belongs, and taking the importance degree of the first image block as the importance degree of the second image block; taking the ratio of the importance level to the gradient value mean value as the abnormality level of the image block, and taking the j second image blockThe degree of abnormality is recorded as
2. Calculating the welding line regularity of each second image block:
since the above-mentioned process cannot completely distinguish between the weld nuggets and the weld nuggets, that is, the weld nuggets are included in the region having a large degree of abnormality, and the weld nuggets are included at the same time, and the differences between the known weld nuggets are small, and the known weld nuggets are generally regularly arranged along the welding direction, and the weld nuggets are piled up with the weld slag, and the weld slag piles have a large difference in morphology and have no distribution rule along the welding direction, the weld nugget regularity of each second image block is calculated based on the following.
For one second image block, a first image block to which the second image block belongs is acquired, a second image block with the largest degree of abnormality is acquired in the first image block to which the second image block belongs as a representative image block of the second image block, two first image blocks adjacent to the first image block to which the second image block belongs in the welding direction are acquired as adjacent areas of the second image block, and one second image block with the largest degree of abnormality is acquired in each adjacent area as a reference image block of the second image block.
The degree of abnormality of the representative image block is large, so that the possibility of containing welding lines and welding flash in the representative image block is large, and the possibility of abnormality of the reference image block is large, so that the possibility of containing welding lines and welding flash in the representative image block is large; meanwhile, as the gray level difference of the two welding lines in the welding direction is smaller, when the representing image block and the reference image block are welding lines, the gray level difference of the two image blocks is smaller, and the gray level difference of the weld flash in the welding direction is larger, and when the representing image block and the reference image block are welding flash, the gray level difference of the two image blocks is larger, so that the welding line regularity of each second image block is calculated based on the gray level difference.
For a second image block, calculating the gray value average value of all pixels in the representative image block, calculating the gray value average value of all pixels in the reference image block, and respectively differencing the gray value average value of the representative image block with the gray value average value of each reference image block to obtain two gray valuesThe difference value of the degree, the average value of the gray difference values is obtained by averaging the two gray difference values, the reciprocal of the average value of the gray difference values is used as the welding line regularity of the second image block, and the welding line regularity of the j second image block is recorded as
3. Calculating the neighborhood relevance of each second image block:
since the flash is sphere-like, the highest point gray value of the flash is decreased to the surrounding, and the gray attenuation is similar, so that the gray value of each pixel in the flash area has high similarity with the gradient in the neighborhood, and the neighborhood relevance is calculated based on the gray value of each pixel in the flash area.
For a second image block, 8 second image blocks adjacent to the second image block are obtained as adjacent image blocks of the second image block, the gradient average value of all pixels in each adjacent image block is taken as the gradient value of each adjacent image block, and the gradient value average value of the 8 adjacent image blocks is calculated; and taking the average value of the gradient values of all pixels in the second image block as the gradient value of the second image block.
The gradient value of the j-th second image block is recorded asThe average value of the gradient values of the adjacent image blocks of the jth second image block is marked as +.>The calculation formula of the neighborhood relevance of the j-th second image block is as follows:
wherein ,gradient value representing the j-th second image block,>gradient values representing adjacent image blocks of the j-th second image blockMean value of->Representing the similarity of the gradient values of the j-th second image block and the neighboring image blocks, the closer the value is to 1, the more similar the two are, indicating +.>Representing the neighborhood relevance of the j-th second image block.
4. Calculating the defect probability of each second image block:
wherein ,representing the degree of abnormality of the j-th second image block, a larger value indicating a greater likelihood of the image block being defective>Representing the neighborhood relevance of the jth second image block, a larger value indicating that the information within the image block is more consistent with the flash defect characteristics, and thus the greater the likelihood that the image block is defective>Representing the welding line regularity of the jth image block, wherein the larger the value is, the more information in the image block accords with the welding line regularity, so that the image block has higher possibility of welding lines, and has lower possibility of welding flash, and the more the image block is in the welding line regularity>Indicating the defect probability of the j-th image block.
So far, the defect possibility of each second image block is obtained, the neighborhood relevance is obtained by combining the characteristics of the weld flash when the defect possibility of each image block is analyzed, and the weld pattern regularity is obtained by combining the arrangement rule characteristics of the weld pattern, so that the defect possibility is accurately obtained.
And S004, carrying out enhancement processing on the welding area image according to the defect possibility of the second image block to obtain an enhanced welding area image, and carrying out defect detection on the enhanced welding area image to obtain a defect area.
The defect probability of the pixel in the second image block is taken, the product of the defect probability of each pixel and 255 is calculated, and the product value is normalized toThe new gray value of each pixel is obtained in the section, and the image formed by the new gray value of each pixel is called a welding area image after reinforcement.
And dividing the reinforced welding area image by using an Ojin threshold method to obtain a defect area.
In summary, the embodiment of the application provides an intelligent detection method for welding defects of sheet metal parts based on image data, and when detecting weld flash defects, scale marks in welding seams can influence the detection accuracy. Meanwhile, the information is grasped differently under different view angles, so that an image is divided into a first image block and a second image block with different sizes, the information in the first image block with larger size is analyzed to obtain the abnormal degree of each second image block, the abnormal condition of each second image block under the large view angle is reflected through the abnormal degree, then the second image block with small size is analyzed, the neighborhood relevance is obtained by combining more detail information under the small view angle, the arrangement rule of the fish scale patterns is combined to obtain the weld pattern regularity, and finally the defect possibility is obtained by combining the abnormal degree, the neighborhood relevance and the weld pattern regularity, so that the defect distinction is realized by utilizing the defect characteristics and the interference information characteristics, and the accurate defect area is obtained.
It should be noted that: the sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the present application is not intended to be limiting, but rather, any modifications, equivalents, improvements, etc. that fall within the principles of the present application are intended to be included within the scope of the present application.

Claims (4)

1. The intelligent detection method for the welding defects of the sheet metal parts based on the image data is characterized by comprising the following steps:
acquiring a welding area image;
obtaining a plurality of first image blocks and a plurality of second image blocks according to the welding area image, calculating an angle difference index of each first image block, and obtaining the importance degree of each first image block according to the angle difference index;
obtaining the abnormal degree of each second image block according to the importance degree of each first image block, obtaining the welding line regularity of each second image block according to the abnormal degree, calculating the neighborhood relevance of each second image block, and obtaining the defect possibility of each second image block according to the abnormal degree, the welding line regularity and the neighborhood relevance;
performing defect detection on the welding area image according to the defect possibility to obtain a defect area;
the calculating the angle difference index of each first image block comprises the following specific steps:
the welding direction is the horizontal direction;
for a first image block, acquiring an included angle between the gradient direction of each pixel and the welding direction, and taking the variance of the included angle between the gradient direction of all pixels and the welding line direction as an angle difference index of the first image block;
the method for obtaining the importance degree of each first image block according to the angle difference index comprises the following specific steps:
acquiring gray values of pixels in a first image block, and taking the average value of the gray values of all the pixels in the first image block as a gradient index of the first image block;
calculating a gray scale difference index of each first image;
taking the product of the gradient index, the gray level difference index and the angle difference index of each first image block as the importance degree of each first image block;
the step of obtaining the abnormality degree of each second image block according to the importance degree of each first image block comprises the following specific steps:
for a second image block, acquiring a first image block to which the second image block belongs, and taking the importance degree of the first image block to which the second image block belongs as the importance degree of the second image block;
calculating the average value of the gradient values of all pixels in the second image blocks, and taking the ratio of the importance degree of each second image block to the average value of the gradient values as the abnormal degree;
the welding line regularity of each second image block is obtained according to the degree of abnormality, and the method comprises the following specific steps:
for a second image block: acquiring a first image block to which a second image block belongs, and acquiring the second image block with the largest degree of abnormality from the first image block to which the second image block belongs as a representative image block of the second image block; acquiring two first image blocks adjacent to the first image block in the welding direction as adjacent areas of the second image block, and respectively acquiring a second image block with the greatest degree of abnormality in each adjacent area as a reference image block of the second image block;
for a second image block, calculating the gray value average value of all pixels in the representative image block, calculating the gray value average value of all pixels in the reference image block, respectively differencing the gray value average value of the representative image block with the gray value average value of each reference image block to obtain two gray difference values, averaging the two gray difference values to obtain the gray difference value average value, and taking the reciprocal of the gray difference value average value as the welding line regularity of the second image block;
the calculating the neighborhood relevance of each second image block comprises the following specific steps:
for a second image block, 8 second image blocks adjacent to the second image block are obtained as adjacent image blocks of the second image block, the gradient average value of all pixels in each adjacent image block is taken as the gradient value of each adjacent image block, and the gradient value average value of the 8 adjacent image blocks is calculated; taking the average value of the gradient values of all pixels in the second image block as the gradient value of the second image block;
the neighborhood relevance calculating method of each second image block comprises the following steps:
wherein ,gradient value representing the j-th second image block,>gradient value mean value of adjacent image block representing jth second image block, +.>Representing the neighborhood relevance of the j-th second image block;
the defect possibility of each second image block is obtained according to the abnormality degree, the welding line regularity and the neighborhood relevance, and the method comprises the following specific steps:
taking the product of the inverse of the welding line regularity, the abnormality degree and the neighborhood relevance of each second image block as the defect possibility of each second image block.
2. The intelligent detection method for welding defects of sheet metal parts based on image data according to claim 1, wherein the steps of obtaining a plurality of first image blocks and a plurality of second image blocks according to the welding area image comprise the following specific steps:
uniformly dividing a welding area image into a plurality of first image blocks from top to bottom and from left to right;
uniformly dividing the welding area image into a plurality of second image blocks from top to bottom and from left to right; the first image block is of a different size than the second image block.
3. The intelligent detection method for welding defects of sheet metal parts based on image data as set forth in claim 1, wherein the calculating of the gray scale difference index of each first image comprises the following specific steps:
all second image blocks inside the first image block are called sub-blocks of the first image block;
and for a first image block, acquiring the gray values of pixels in each sub-block, calculating the gray value average value of all pixels in each sub-block, and taking the variance of the gray value average value of all sub-blocks as a gray difference index.
4. The intelligent detection method for welding defects of sheet metal parts based on image data according to claim 1, wherein the defect detection of the welding area image according to the defect possibility to obtain a defect area comprises the following specific steps:
for a second image block, taking the defect probability of pixels in the second image block as the defect probability of the second image block;
the image is enhanced by utilizing the defect possibility of each pixel to obtain an enhanced welding area image;
and carrying out defect detection on the enhanced image to obtain a defect area.
CN202311048242.3A 2023-08-21 2023-08-21 Intelligent detection method for welding defects of sheet metal parts based on image data Active CN116758084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311048242.3A CN116758084B (en) 2023-08-21 2023-08-21 Intelligent detection method for welding defects of sheet metal parts based on image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311048242.3A CN116758084B (en) 2023-08-21 2023-08-21 Intelligent detection method for welding defects of sheet metal parts based on image data

Publications (2)

Publication Number Publication Date
CN116758084A true CN116758084A (en) 2023-09-15
CN116758084B CN116758084B (en) 2023-10-13

Family

ID=87950066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311048242.3A Active CN116758084B (en) 2023-08-21 2023-08-21 Intelligent detection method for welding defects of sheet metal parts based on image data

Country Status (1)

Country Link
CN (1) CN116758084B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117274261A (en) * 2023-11-22 2023-12-22 深圳市诺凌电子有限公司 Photovoltaic energy storage electric box connector defect detection method based on machine vision
CN117455909A (en) * 2023-12-22 2024-01-26 广东马氏水产有限公司 Automatic fish body disease detection method for fish in and out
CN117473350A (en) * 2023-12-28 2024-01-30 江苏高特高金属科技有限公司 Welded pipe welding production process monitoring method based on data processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190228515A1 (en) * 2018-01-22 2019-07-25 Boe Technology Group Co., Ltd. Method and apparatus for detecting defects, and computer readable storage medium
CN114445387A (en) * 2022-01-29 2022-05-06 泗阳富艺木业股份有限公司 Fiberboard quality classification method based on machine vision
CN115375676A (en) * 2022-10-24 2022-11-22 微山三利特不锈钢有限公司 Stainless steel product quality detection method based on image recognition
CN116188462A (en) * 2023-04-24 2023-05-30 深圳市翠绿贵金属材料科技有限公司 Noble metal quality detection method and system based on visual identification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190228515A1 (en) * 2018-01-22 2019-07-25 Boe Technology Group Co., Ltd. Method and apparatus for detecting defects, and computer readable storage medium
CN114445387A (en) * 2022-01-29 2022-05-06 泗阳富艺木业股份有限公司 Fiberboard quality classification method based on machine vision
CN115375676A (en) * 2022-10-24 2022-11-22 微山三利特不锈钢有限公司 Stainless steel product quality detection method based on image recognition
CN116188462A (en) * 2023-04-24 2023-05-30 深圳市翠绿贵金属材料科技有限公司 Noble metal quality detection method and system based on visual identification

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117274261A (en) * 2023-11-22 2023-12-22 深圳市诺凌电子有限公司 Photovoltaic energy storage electric box connector defect detection method based on machine vision
CN117274261B (en) * 2023-11-22 2024-02-27 深圳市诺凌电子有限公司 Photovoltaic energy storage electric box connector defect detection method based on machine vision
CN117455909A (en) * 2023-12-22 2024-01-26 广东马氏水产有限公司 Automatic fish body disease detection method for fish in and out
CN117455909B (en) * 2023-12-22 2024-03-29 广东马氏水产有限公司 Automatic fish body disease detection method for fish in and out
CN117473350A (en) * 2023-12-28 2024-01-30 江苏高特高金属科技有限公司 Welded pipe welding production process monitoring method based on data processing
CN117473350B (en) * 2023-12-28 2024-02-27 江苏高特高金属科技有限公司 Welded pipe welding production process monitoring method based on data processing

Also Published As

Publication number Publication date
CN116758084B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN116758084B (en) Intelligent detection method for welding defects of sheet metal parts based on image data
CN116703907B (en) Machine vision-based method for detecting surface defects of automobile castings
CN107341802B (en) Corner sub-pixel positioning method based on curvature and gray scale compounding
CN103499585A (en) Non-continuity lithium battery thin film defect detection method and device based on machine vision
CN108332681A (en) A kind of determination method of the big plastic bending sectional profile curve lin of thin-wall pipes
CN109658391B (en) Circle radius measuring method based on contour merging and convex hull fitting
CN106600593B (en) A kind of middle aluminium porcelain ball surface defect inspection method
CN104923593A (en) Vision-based positioning method for top layer bending plate
CN109682839A (en) A kind of metal arc Surface Flaw online test method
CN114581782B (en) Fine defect detection method based on coarse-to-fine detection strategy
CN110503638B (en) Spiral adhesive quality online detection method
CN115294099B (en) Method and system for detecting hairline defect in steel plate rolling process
CN115082462A (en) Method and system for detecting appearance quality of fluid conveying pipe
CN112037203A (en) Side surface defect detection method and system based on complex workpiece outer contour registration
CN113012098B (en) Iron tower angle steel punching defect detection method based on BP neural network
CN111724358A (en) Concrete quality detection method and system based on image and convolutional neural network
CN113237889A (en) Multi-scale ceramic detection method and system
CN112884746A (en) Character defect intelligent detection algorithm based on edge shape matching
CN111123263B (en) Tunnel reinforcing steel bar identification and detection system and method based on geological radar detection data
US7893947B2 (en) Method for extracting edge in photogrammetry with subpixel accuracy
CN115239728A (en) Fire-fighting equipment identification method
CN116862910A (en) Visual detection method based on automatic cutting production
CN111539951B (en) Visual detection method for outline size of ceramic grinding wheel head
CN112109374A (en) Method for positioning and controlling assembling and disassembling of bending die based on computer vision system
CN115619799B (en) Grain image segmentation method and system based on transfer learning

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