CN115713487A - Defect identification method, device and storage medium for X-ray welding seam image - Google Patents
Defect identification method, device and storage medium for X-ray welding seam image Download PDFInfo
- Publication number
- CN115713487A CN115713487A CN202211320723.0A CN202211320723A CN115713487A CN 115713487 A CN115713487 A CN 115713487A CN 202211320723 A CN202211320723 A CN 202211320723A CN 115713487 A CN115713487 A CN 115713487A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- contrast
- weld
- defect
- 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.)
- Pending
Links
- 230000007547 defect Effects 0.000 title claims abstract description 97
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000003466 welding Methods 0.000 title claims abstract description 37
- 238000010801 machine learning Methods 0.000 claims abstract description 20
- 238000012545 processing Methods 0.000 claims abstract description 19
- 238000012549 training Methods 0.000 claims abstract description 15
- 230000000877 morphologic effect Effects 0.000 claims abstract description 8
- 238000004590 computer program Methods 0.000 claims description 15
- 238000001914 filtration Methods 0.000 claims description 12
- 230000006870 function Effects 0.000 claims description 6
- 238000007499 fusion processing Methods 0.000 claims description 6
- 238000013139 quantization Methods 0.000 claims description 6
- 238000004891 communication Methods 0.000 claims description 4
- 238000004422 calculation algorithm Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000013527 convolutional neural network Methods 0.000 claims description 3
- 239000011159 matrix material Substances 0.000 claims description 3
- 230000004044 response Effects 0.000 claims description 3
- 238000001514 detection method Methods 0.000 abstract description 21
- 230000008569 process Effects 0.000 abstract description 5
- 238000007781 pre-processing Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 206010052143 Ocular discomfort Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/082—Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
- Analysing Materials By The Use Of Radiation (AREA)
Abstract
The invention discloses a defect identification method, equipment and a storage medium for an X-ray weld image, wherein the method comprises the steps of constructing a machine learning training network, preprocessing the image to obtain a primarily denoised image, carrying out secondary denoising on the primarily denoised image, carrying out binarization processing on the secondarily denoised image, carrying out morphological processing on a binarization weld defect characteristic image, traversing each pixel in the binarization weld defect characteristic image after the morphological processing and the like. The method comprises the steps of carrying out first detection on weld defect characteristics in an image through a machine learning model to obtain a weld defect characteristic image; and then, carrying out binarization processing on the welding seam defect characteristic image to obtain a binarization welding seam defect characteristic image, carrying out secondary detection to determine whether the target object has the welding seam defect, and carrying out secondary detection by combining a machine learning model and a connected domain in the detection process to reduce error detection and improve the detection accuracy.
Description
Technical Field
The invention relates to the field of machine learning, in particular to a defect identification method, computer equipment and storage medium for an X-ray weld image.
Background
The image has the problems of high noise, low contrast, relatively similar gray value distribution of a welding line region and a background region, large illumination difference of different regions of the image and the like, and the image firstly brings visual discomfort to people, so that a skilled worker needs to spend a large amount of time to manually carry out image enhancement work, and the image quality is closest to the judgment degree of human eyes. A large amount of image enhancement work easily causes fatigue of skilled workers, and the situations of erroneous judgment, missing judgment and the like of the quality of a welding seam are easily caused. Despite the great improvements obtained with X-ray image capturing devices for welds, various interference factors still exist, which result in poor X-ray image quality. Therefore, visual effects and quality improvement for the original X-ray image are essential parts of image pre-processing.
However, the conventional welding seam detection scheme is to capture an image of a target object, perform various processing based on a visual technology on the image, and when the environment of the target object is complex, the accuracy of detecting whether the target object has a welding seam defect is low.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, provides a defect identification method for an X-ray weld image, computer equipment and a storage medium, and can solve the technical problem that the accuracy for detecting whether a target object has weld defects is low at present.
In one embodiment, a defect identification method for an X-ray weld image is provided, comprising the steps of:
constructing a machine learning training network, wherein the machine learning training network comprises a convolution layer, and the convolution layer is used for improving the reconstruction precision of the image;
acquiring an X-ray welding seam original image, inputting the X-ray welding seam original image into a machine learning training network to obtain a defect characteristic image, and simultaneously carrying out primary filtering and denoising on the defect characteristic image to obtain a denoised image;
carrying out secondary denoising on the image subjected to primary denoising to obtain a secondary denoised image;
traversing all pixel points on the image subjected to secondary denoising, calculating a local threshold of the current pixel, counting the number of edge points in a current neighborhood range, assigning 0 or 1 to all the pixel points according to the local threshold of the current pixel and the range of the number of the edge points in the current neighborhood range to finish binarization processing of the image subjected to secondary denoising, and obtaining a binarization weld defect feature map;
performing morphological processing on the binaryzation weld defect characteristic map;
traversing each pixel in the morphologically processed binary weld defect feature map, when the traversed pixel meets a preset weld defect condition, taking the pixel meeting the preset weld defect condition as a seed pixel, and stacking the coordinates of the seed pixel; taking the pixels meeting the preset weld defect condition in the neighborhood of the seed pixel as fillable pixels, and stacking the coordinates of the fillable pixels; popping up coordinates at the top of the stack; taking the pixel corresponding to the popped coordinate as a seed pixel to continuously search the fillable pixel until the stack is empty; after the primary seed filling is finished, determining pixel areas corresponding to the popped coordinates as welding seam defect connected areas; and determining whether the target object has the weld defects or not through the weld defect communication domain.
As a further scheme of the invention: the machine learning training network comprises a full connection layer and nine convolution layers, wherein the nine convolution layers are sequentially located behind the full connection layer.
As a further scheme of the invention: the initial input of the convolutional neural network is to compress an image into an M dimensional vector and record the M dimensional vector as phi X, wherein phi is an M multiplied by N dimensional observation matrix, M is measurement data, and X is a vectorized input image block; recording the average value of quantization errors of the intermediate reconstructed image after block quantization as a loss function, and selecting MSE as the loss function, wherein the MSE is the square sum average of the difference value of the real value and the predicted value; given a set of high resolution images { X } i And its corresponding low resolution image y i The MSE is calculated according to the formulaWhere m is the total number of image blocks in the training set, x i Is the ith patch, y i Is the network output of the ith patch.
As a further scheme of the invention: the step of performing secondary denoising on the primarily denoised image to obtain a secondarily denoised image comprises:
acquiring a high-contrast area in an image and acquiring a low-contrast area in the image, wherein the high-contrast area and the low-contrast area comprise the edge of the image;
and carrying out fusion processing on the high-contrast area and the low-contrast area to obtain a secondary denoised image.
As a further scheme of the invention: the method comprises the following steps of when acquiring a high-contrast area in an image:
performing median filtering on the image subjected to primary denoising, traversing all pixel points of the image subjected to primary denoising, calculating the contrast of each pixel to obtain a contrast image, and then performing binarization processing on the contrast image by using a maximum inter-class variance method (Otsu) to obtain a high-contrast image, wherein the image describes regions with higher contrast on the image, and the regions comprise the edges of the image.
As a further scheme of the invention: wherein the contrast of each pixel is calculated using equation 1;
wherein, D (x, y) represents the contrast value of the pixel point, and (x, y) represents the coordinate of one pixel point, x is the abscissa, y is the ordinate, max is the maximum value of D (x + l, y + n), wherein, the variables l and n are variables, and the variable range is 1-3.
As a further scheme of the invention: the method comprises the following steps of when acquiring a low-contrast area in an image: and iteratively executing gray morphological closing operation and opening operation on the image subjected to primary denoising to obtain a background, and subtracting the background image from the image subjected to primary denoising to obtain a low-contrast image.
As a further scheme of the invention: wherein, when the fusion processing is performed on the high contrast area and the low contrast area, the method includes: and directly taking intersection of the high-contrast image and the low-contrast image, filtering background noise of the obtained edge image, and simultaneously filtering a low-contrast part to obtain a secondarily denoised image.
As a further scheme of the invention: assigning 0 or 1 to all pixel points according to the local threshold of the current pixel and the number range of the edge points in the current neighborhood range to complete binarization processing of the image subjected to secondary denoising, completing binarization of the image by using a formula 2, and obtaining a binarization weld defect feature map;
wherein g (x, y) represents the gray value of the current pixel point, T is the local threshold of the current pixel point, ne represents the number of edge points in the neighborhood range of the current pixel point, bw (x, y) represents the binary numerical value at the image coordinate (x, y), r represents the neighborhood radius, and otherwise represents others.
As a further scheme of the invention: wherein, the local threshold T of the current pixel is calculated based on formula 3;
wherein, T represents the local threshold of the current pixel, m and s represent the gray mean and standard deviation of the pixel in the current neighborhood range respectively, k is an adjustment coefficient used for controlling the response of the algorithm to the image contrast, and R is an adjustment to the gray standard deviation.
As a further scheme of the invention: and when the coordinates of the seed pixels are stacked, adding a label to the coordinates.
As a further scheme of the invention: when the seeds are filled according to the seed pixels, the same label is added to all the stacked coordinates, and the pixel area corresponding to the coordinates with the same label is determined as a welding seam defect communication area.
As a further scheme of the invention: when a pixel is traversed, if the label already exists in the traversed pixel, the pixel is not processed any more.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for defect identification of an X-ray weld image when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for defect identification of an X-ray weld image.
The invention has the beneficial effects that: according to the method, the contrast information of the edge area is used for carrying out self-adaptive calculation on the local threshold, the foreground information with low contrast can be reserved while noise is suppressed, and the weld defect characteristic image is obtained by carrying out first detection on the weld defect characteristic in the image through a machine learning model; performing binarization processing on the welding seam defect characteristic image to obtain a binarization welding seam defect characteristic image, and extracting a welding seam defect communicating region from the binarization welding seam defect characteristic image; and performing secondary detection through the welding seam defect communicating region to determine whether the target object has the welding seam defect, and performing secondary detection by combining the machine learning model and the communicating region in the detection process to reduce error detection and improve the detection accuracy.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
FIG. 1 is a schematic flow chart of a defect identification method for an X-ray weld image according to an embodiment of the present invention.
Fig. 2 is an internal structural diagram of a computer device in one embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, in an embodiment of the present invention, a method for identifying defects in an X-ray weld image includes steps S1 to S6:
s1, constructing a machine learning training netComplexing: the machine learning training network constructed comprises a full-connection layer and nine convolutional layers, wherein the nine convolutional layers are sequentially positioned behind the full-connection layer, namely a first layer to a ninth layer of the convolutional layers are sequentially positioned behind the full-connection layer, and the convolutional layers are used for improving the reconstruction precision of the image and obtaining high-resolution output; the initial input of the convolutional neural network is to compress an image into an M dimensional vector and record the M dimensional vector as phi X, wherein phi is an M multiplied by N dimensional observation matrix, M is measurement data, and X is a vectorized input image block; recording the average value of quantization errors of the intermediate reconstructed image after block quantization as a loss function, and selecting MSE as the loss function, wherein the MSE is the sum average of squares of the difference values of a true value and a predicted value; given a set of high resolution images { X } i And its corresponding low resolution image y i The MSE is calculated according to the formulaWhere m is the total number of image blocks in the training set, x i Is the ith patch, y i Is the network output of the ith patch.
S2, preprocessing an image: the method comprises the steps of obtaining an X-ray welding seam original image, inputting the X-ray welding seam original image into a machine learning training network to obtain a defect characteristic image, carrying out primary detection on welding seam defect characteristics in the image through a machine learning model to obtain a welding seam defect characteristic image, and simultaneously carrying out primary filtering denoising on the defect characteristic image to obtain a primary denoised image.
S3, carrying out secondary denoising on the image subjected to primary denoising: and the secondary denoising step comprises the steps of obtaining a high-contrast area in the image and obtaining a low-contrast area in the image, wherein the high-contrast area and the low-contrast area comprise the edge of the image, and the high-contrast area and the low-contrast area are fused to obtain the image subjected to secondary denoising.
Understandably, the step of secondary denoising is the fusion processing of high-low contrast areas of the image.
Firstly, acquisition of a high-contrast area is included: performing median filtering on the image subjected to primary denoising, traversing all pixel points of the image, calculating the contrast of each pixel by using formula 1 to obtain a contrast image, and performing binarization processing on the contrast image by using a maximum inter-class variance method (Otsu) to obtain a high-contrast image, wherein the image describes regions with higher contrast on the image, and the regions comprise the edges of the image;
wherein, D (x, y) represents the contrast value of the pixel point, and (x, y) represents the coordinate of one pixel point, x is the abscissa, y is the ordinate, max is the maximum value of D (x + l, y + n), wherein, the variables l and n are variables, and the variable range is 1-3.
And then, acquiring a low-contrast area, iteratively executing gray morphological closing operation and opening operation on the primarily denoised image to obtain a background, and then subtracting the background image from the primarily denoised image to obtain a low-contrast image, wherein the edges comprise high-contrast edges and low-contrast edges of the image.
And finally, performing fusion processing on the high-contrast area and the low-contrast area, directly taking intersection of the high-contrast image and the low-contrast image, filtering background noise of the obtained edge image, and filtering a low-contrast part to obtain a secondarily denoised image.
S4, binaryzation of a secondary denoising image: traversing all pixel points on the image subjected to secondary denoising, calculating a local threshold of the current pixel, counting the number of edge points in a current neighborhood range, assigning 0 or 1 to all the pixel points according to the local threshold of the current pixel and the range of the number of the edge points in the current neighborhood range, completing binarization processing of the image subjected to secondary denoising, and obtaining a binarization weld defect characteristic map.
Assigning 0 or 1 to all pixel points according to the local threshold of the current pixel and the number range of the edge points in the current neighborhood range to complete the binarization processing of the image after secondary denoising, completing the binarization of the image by using a formula 2, and obtaining a binarization weld defect feature map;
wherein g (x, y) represents the gray value of the current pixel point, T is the local threshold of the current pixel point, ne represents the number of edge points in the neighborhood range of the current pixel point, bw (x, y) represents the binarization value at the image coordinate (x, y), r represents the neighborhood radius, and otherwise represents others.
The local threshold T of the current pixel is calculated based on the formula (formula 3);
wherein T represents the local threshold of the current pixel, m and s represent the mean and standard deviation of the gray scale of the pixel in the current neighborhood range, respectively, k is an adjustment coefficient for controlling the response of the algorithm to the image contrast, R is an adjustment to the standard deviation of the gray scale, related to the gray scale order of the image, and for an 8-invention-bit gray scale image, the R value is 128.
And S5, performing morphological processing on the binarization weld defect characteristic diagram. Extracting a weld defect connected domain from the binaryzation weld defect characteristic image; and performing secondary detection through the weld defect communicating region to determine whether the target object has weld defects.
S6, traversing each pixel in the morphologically processed binary welding seam defect characteristic map, and when the traversed pixel meets a preset welding seam defect condition, taking the pixel meeting the preset welding seam defect condition as a seed pixel, and stacking the coordinates of the seed pixel; taking the pixels meeting the preset weld defect condition in the neighborhood of the seed pixel as fillable pixels, and stacking the coordinates of the fillable pixels; popping up coordinates at the top of the stack; taking the pixel corresponding to the popped coordinate as a seed pixel, and continuously searching the fillable pixel until the stack is empty; after one-time seed filling is finished, determining pixel areas corresponding to the popped coordinates as welding seam defect connected areas; when the coordinates of the seed pixels are stacked, adding labels to the coordinates; when the seeds are filled according to the seed pixels, adding the same label to all the stacked coordinates, and determining a pixel area corresponding to the coordinates with the same label as a welding seam defect connected domain; when a pixel is traversed, if the traversed pixel has a label, the pixel is not processed; and determining whether the target object has the weld defects or not through the weld defect communication domain.
According to the method, the contrast information of the edge area is used for carrying out self-adaptive calculation on the local threshold, the foreground information with low contrast can be reserved while noise is suppressed, and the weld defect characteristic image is obtained by carrying out first detection on the weld defect characteristic in the image through a machine learning model; then, carrying out binarization processing on the welding seam defect characteristic image to obtain a binarization welding seam defect characteristic image, and extracting a welding seam defect connected domain from the binarization welding seam defect characteristic image; and performing secondary detection through the welding seam defect communicating region to determine whether the target object has the welding seam defect, and performing secondary detection by combining the machine learning model and the communicating region in the detection process to reduce error detection and improve the detection accuracy.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 2. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The database of the computer device is used to store defect identification data for the X-ray weld image. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for defect identification of an X-ray weld image.
Those skilled in the art will appreciate that the architecture shown in fig. 2 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the computer program implementing the steps of the method for defect identification of an X-ray weld image.
The specific definition of the steps implemented when the processor executes the computer program may refer to the definition of the method for identifying defects in an X-ray weld image, which is not described herein again.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for defect identification of an X-ray weld image.
Specific definitions of implementation steps when the computer program is executed by the processor may be found in the above definitions of the method for defect identification of an X-ray weld image, which are not described in detail herein.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The defect identification method, the computer device and the storage medium for the X-ray weld image provided by the embodiment of the application are introduced in detail, and a specific example is applied in the description to explain the principle and the implementation of the application, and the description of the embodiment is only used for helping to understand the technical scheme and the core idea of the application; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications or substitutions do not depart from the spirit and scope of the present disclosure as defined by the appended claims.
Claims (15)
1. A defect identification method for an X-ray weld image is characterized by comprising the following steps:
constructing a machine learning training network, wherein the machine learning training network comprises a convolution layer, and the convolution layer is used for improving the reconstruction precision of an image;
acquiring an X-ray welding seam original image, inputting the X-ray welding seam original image into a machine learning training network to obtain a defect characteristic image, and simultaneously carrying out primary filtering denoising on the defect characteristic image to obtain a primary denoised image;
carrying out secondary denoising on the image subjected to primary denoising to obtain a secondary denoised image;
traversing all pixel points on the image subjected to secondary denoising, calculating a local threshold value of a current pixel, counting the number of edge points in a current neighborhood range, assigning 0 or 1 to all the pixel points according to the local threshold value of the current pixel and the range of the number of the edge points in the current neighborhood range to complete binarization processing of the image subjected to secondary denoising, and obtaining a binarization weld defect feature map;
performing morphological processing on the binaryzation weld defect characteristic map;
traversing each pixel in the morphologically processed binary weld defect feature map, when the traversed pixel meets a preset weld defect condition, taking the pixel meeting the preset weld defect condition as a seed pixel, and stacking the coordinates of the seed pixel; taking the pixels meeting the preset weld defect condition in the neighborhood of the seed pixel as fillable pixels, and stacking the coordinates of the fillable pixels; popping up coordinates at the top of the stack; taking the pixel corresponding to the popped coordinate as a seed pixel, and continuously searching the fillable pixel until the stack is empty; after one-time seed filling is finished, determining pixel areas corresponding to the popped coordinates as welding seam defect connected areas; and determining whether the target object has the weld defects or not through the weld defect communication domain.
2. The method of claim 1, wherein the machine learning training network comprises one fully-connected layer and nine convolutional layers, the nine convolutional layers being located sequentially after the fully-connected layer.
3. The method of claim 1, wherein the initial input to the convolutional neural network is a compressed image into a M dimensional vector, and is denoted as Φ X, where Φ is an M X N dimensional observation matrix, M is the measured data, and X is the vectorized input image block; the average value of quantization errors of the intermediate reconstructed image after block quantization is recorded as a loss function, and MSE is selected as lossA loss function, MSE is the sum of the squares average of the differences between the true and predicted values; given a set of high resolution images { X } i And its corresponding low resolution image y i Is the calculation of MSEWhere m is the total number of image blocks in the training set, x i Is the ith patch, y i Is the network output of the ith patch.
4. The method of claim 1, wherein the step of performing a secondary denoising on the primary denoised image to obtain a secondary denoised image comprises:
acquiring a high-contrast area in an image and acquiring a low-contrast area in the image, wherein the high-contrast area and the low-contrast area comprise the edge of the image;
and carrying out fusion processing on the high-contrast area and the low-contrast area to obtain a secondary denoised image.
5. The method for identifying defects of an X-ray weld image according to claim 4, wherein the method for identifying defects of the X-ray weld image comprises the following steps when a high-contrast area in the image is acquired:
performing median filtering on the image subjected to primary denoising, traversing all pixel points of the image subjected to primary denoising, calculating the contrast of each pixel to obtain a contrast image, and then performing binarization processing on the contrast image by using a maximum inter-class variance method to obtain a high-contrast image, wherein the image describes regions with higher contrast on the image, and the regions contain the edges of the image.
6. The defect identification method for an X-ray weld image according to claim 5, characterized in that the contrast of each pixel is calculated using equation 1;
wherein, D (x, y) represents the contrast value of the pixel point, x, y represents the coordinate of a pixel point, x is the abscissa, y is the ordinate, max is the maximum value of D (x + l, y + n), wherein, the variables l and n are all variables, and the variable range is 1-3.
7. The method for identifying defects of an X-ray weld image according to claim 4, wherein when acquiring the low-contrast area in the image, the method comprises the following steps:
and iteratively executing a gray morphological closing operation and an opening operation on the primarily denoised image to obtain a background, and then subtracting the background image from the primarily denoised image to obtain a low-contrast image.
8. The defect identification method for an X-ray weld image according to claim 4, characterized by comprising, in the fusion process of the high-contrast region and the low-contrast region:
and directly taking intersection of the high-contrast image and the low-contrast image, filtering background noise of the obtained edge image, and filtering a low-contrast part to obtain a secondarily denoised image.
9. The method for identifying the defects of the X-ray weld image according to claim 8, characterized in that all pixel points are assigned with 0 or 1 according to the local threshold of the current pixel and the number range of the edge points in the current neighborhood range to complete the binarization processing of the image after the secondary denoising, the binarization of the image is completed by using a formula 2, and a binarization weld defect feature map is obtained;
wherein g (x, y) represents the gray value of the current pixel point, T is the local threshold of the current pixel point, ne represents the number of edge points in the neighborhood range of the current pixel point, bw (x, y) represents the binarization value at the image coordinate (x, y), r represents the neighborhood radius, and otherwise represents others.
10. The defect identification method for the X-ray weld image according to claim 9, characterized in that the local threshold T of the current pixel is calculated based on equation 3;
wherein T represents the local threshold of the current pixel, m and s represent the mean and standard deviation of the gray scale of the pixel in the current neighborhood range, respectively, k is an adjustment coefficient for controlling the response of the algorithm to the image contrast, and R is an adjustment to the standard deviation of the gray scale.
11. The method of claim 1, wherein the coordinates of the seed pixels are labeled when they are stacked.
12. The method for identifying the defects of the X-ray weld image according to claim 11, wherein the same label is added to all stacked coordinates when the seed filling is performed according to the seed pixel, and a pixel region corresponding to the coordinates with the same label is determined as a weld defect connected domain.
13. The method of claim 11, wherein when traversing a pixel, if a label already exists for the traversed pixel, the pixel is not processed.
14. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 13 are implemented when the computer program is executed by the processor.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 13.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211320723.0A CN115713487A (en) | 2022-10-26 | 2022-10-26 | Defect identification method, device and storage medium for X-ray welding seam image |
PCT/CN2023/115485 WO2024087870A1 (en) | 2022-10-26 | 2023-08-29 | Defect identification method for x-ray weld seam image, device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211320723.0A CN115713487A (en) | 2022-10-26 | 2022-10-26 | Defect identification method, device and storage medium for X-ray welding seam image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115713487A true CN115713487A (en) | 2023-02-24 |
Family
ID=85231417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211320723.0A Pending CN115713487A (en) | 2022-10-26 | 2022-10-26 | Defect identification method, device and storage medium for X-ray welding seam image |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115713487A (en) |
WO (1) | WO2024087870A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116342610A (en) * | 2023-05-31 | 2023-06-27 | 山东恒海钢结构有限公司 | Steel structure assembly type building welding abnormality detection method |
CN117444960A (en) * | 2023-10-23 | 2024-01-26 | 广州普诺环境检测技术服务有限公司 | Intelligent control robot for solid and liquid sample dioxin detection pretreatment |
WO2024087870A1 (en) * | 2022-10-26 | 2024-05-02 | 上海船舶工艺研究所(中国船舶集团有限公司第十一研究所) | Defect identification method for x-ray weld seam image, device, and storage medium |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104977313A (en) * | 2014-04-09 | 2015-10-14 | 四川省特种设备检验研究院 | Method and device for detecting and identifying X-ray image defects of welding seam |
CN104122271A (en) * | 2014-07-09 | 2014-10-29 | 宁波摩视光电科技有限公司 | Automated optical inspection (AOI)-based bullet apparent defect detection method |
CN106780438B (en) * | 2016-11-11 | 2020-09-25 | 广东电网有限责任公司清远供电局 | Insulator defect detection method and system based on image processing |
CN109190632A (en) * | 2018-08-23 | 2019-01-11 | 甘肃政法学院 | A kind of binarization method of ancient books file and picture |
US11468553B2 (en) * | 2018-11-02 | 2022-10-11 | Kla Corporation | System and method for determining type and size of defects on blank reticles |
CN110163842B (en) * | 2019-04-15 | 2021-06-25 | 深圳高速工程检测有限公司 | Building crack detection method and device, computer equipment and storage medium |
CN111144419B (en) * | 2019-12-05 | 2023-06-09 | 大连民族大学 | Historical document image binarization method based on block self-adaptive homomorphic filtering |
CN115187562A (en) * | 2022-07-22 | 2022-10-14 | 重庆中科摇橹船信息科技有限公司 | Gluing defect detection method and device |
CN115184380B (en) * | 2022-08-01 | 2024-04-26 | 国网上海市电力公司 | Method for detecting abnormity of welding spots of printed circuit board based on machine vision |
CN115713487A (en) * | 2022-10-26 | 2023-02-24 | 上海船舶工艺研究所(中国船舶集团有限公司第十一研究所) | Defect identification method, device and storage medium for X-ray welding seam image |
-
2022
- 2022-10-26 CN CN202211320723.0A patent/CN115713487A/en active Pending
-
2023
- 2023-08-29 WO PCT/CN2023/115485 patent/WO2024087870A1/en unknown
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024087870A1 (en) * | 2022-10-26 | 2024-05-02 | 上海船舶工艺研究所(中国船舶集团有限公司第十一研究所) | Defect identification method for x-ray weld seam image, device, and storage medium |
CN116342610A (en) * | 2023-05-31 | 2023-06-27 | 山东恒海钢结构有限公司 | Steel structure assembly type building welding abnormality detection method |
CN116342610B (en) * | 2023-05-31 | 2023-08-15 | 山东恒海钢结构有限公司 | Steel structure assembly type building welding abnormality detection method |
CN117444960A (en) * | 2023-10-23 | 2024-01-26 | 广州普诺环境检测技术服务有限公司 | Intelligent control robot for solid and liquid sample dioxin detection pretreatment |
CN117444960B (en) * | 2023-10-23 | 2024-04-16 | 广州普诺环境检测技术服务有限公司 | Intelligent control robot for solid and liquid sample dioxin detection pretreatment |
Also Published As
Publication number | Publication date |
---|---|
WO2024087870A1 (en) | 2024-05-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111723860B (en) | Target detection method and device | |
CN115713487A (en) | Defect identification method, device and storage medium for X-ray welding seam image | |
Liu et al. | Robust color guided depth map restoration | |
CN109063742B (en) | Butterfly identification network construction method and device, computer equipment and storage medium | |
CN110516541B (en) | Text positioning method and device, computer readable storage medium and computer equipment | |
CN110415280B (en) | Remote sensing image and building vector registration method and system under multitask CNN model | |
CN111260055A (en) | Model training method based on three-dimensional image recognition, storage medium and equipment | |
CN110570382B (en) | Image restoration method and device, electronic equipment and storage medium | |
CN111476758B (en) | Defect detection method and device for AMOLED display screen, computer equipment and storage medium | |
CN114529837A (en) | Building outline extraction method, system, computer equipment and storage medium | |
CN110207592A (en) | Building cracks measurement method, device, computer equipment and storage medium | |
CN109711419A (en) | Image processing method, device, computer equipment and storage medium | |
CN107004266A (en) | The method for detecting defect on surface of tyre | |
CN112668462B (en) | Vehicle damage detection model training, vehicle damage detection method, device, equipment and medium | |
CN106991697A (en) | The ambition ratio measuring method of chest digitized video | |
CN115880288B (en) | Detection method, system and computer equipment for electronic element welding | |
CN111626379A (en) | X-ray image detection method for pneumonia | |
CN117291790B (en) | SAR image registration method, SAR image registration device, SAR image registration equipment and SAR image registration medium | |
CN117557565B (en) | Detection method and device for lithium battery pole piece | |
Wu et al. | Multi-focus image fusion: Transformer and shallow feature attention matters | |
CN113744142A (en) | Image restoration method, electronic device and storage medium | |
CN117173145A (en) | Method, device, equipment and storage medium for detecting surface defects of power equipment | |
CN116310832A (en) | Remote sensing image processing method, device, equipment, medium and product | |
CN116051473A (en) | Weld defect identification model establishment method and device, and identification method and device | |
CN111899263B (en) | Image segmentation method, device, 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 |