CN117218368A - Ship weld defect texture edge extraction method, system, equipment and storage medium - Google Patents

Ship weld defect texture edge extraction method, system, equipment and storage medium Download PDF

Info

Publication number
CN117218368A
CN117218368A CN202311057550.2A CN202311057550A CN117218368A CN 117218368 A CN117218368 A CN 117218368A CN 202311057550 A CN202311057550 A CN 202311057550A CN 117218368 A CN117218368 A CN 117218368A
Authority
CN
China
Prior art keywords
image
gradient
threshold value
edge
points
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
Application number
CN202311057550.2A
Other languages
Chinese (zh)
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.)
Guangzhou Maritime University
Original Assignee
Guangzhou Maritime University
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 Guangzhou Maritime University filed Critical Guangzhou Maritime University
Priority to CN202311057550.2A priority Critical patent/CN117218368A/en
Publication of CN117218368A publication Critical patent/CN117218368A/en
Pending legal-status Critical Current

Links

Classifications

    • 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

  • Image Analysis (AREA)

Abstract

The invention provides a method, a system, equipment and a storage medium for extracting texture edges of weld defects of ships, wherein the method comprises the following steps: preprocessing an X-ray image to obtain a gradient image; performing non-maximum suppression on image gradient data in a gradient image, and only reserving local maximum points to obtain pixel points of edge contours in the gradient image; giving a high threshold value and a low threshold value, wherein a pixel point with a gradient value larger than the high threshold value is marked as a strong edge point, a pixel point with a gradient value smaller than the low threshold value is marked as a weak edge point, and a pixel point with a gradient value between the high threshold value and the low threshold value is marked as a middle edge point; and removing the weak edge points, judging whether the middle edge points are reserved according to a preset judging rule, reserving the middle edge points if the judgment is yes, and removing the middle edge points if the judgment is no. The invention solves the problem that in the related art, the original X-ray image shot by the X-ray is used for judging whether the weld joint has defects or not, and the small edges are easy to ignore, so that the judgment error is caused.

Description

Ship weld defect texture edge extraction method, system, equipment and storage medium
Technical Field
The invention belongs to the technical field of ships, and particularly relates to a ship weld defect texture edge extraction method, a system, equipment and a storage medium.
Background
The defect detection of the ship weld joint mainly detects the welded part of the ship, and the analysis of whether the welded part meets the safety requirement is important in the quality inspection of the ship. Traditional ship weld defect monitoring and judging mainly uses an X-ray radiation source and a film to shoot, and then a professional technician judges the shot film, and because of the scarcity and the different professional degrees of the corresponding professional technicians, the defect area is easily misjudged, so that certain hidden danger is caused for the quality safety of the ship. Therefore, whether the welding line is defective or not is judged by the original X-ray image shot by the X-ray, and the small edges are easily ignored to cause judgment errors, and how to carry out image processing on the original X-ray image, the small edges in the X-ray image are enhanced, the inconspicuous texture information is amplified, so that the method has extremely high research significance for assisting professionals in judging the defects of the welding line of the ship.
Disclosure of Invention
Based on the above, in order to at least solve the problem that whether a weld joint is defective or not is judged by using an original X-ray image shot by X-rays in the related art, and a small edge is easy to ignore, so that judgment errors are caused, the invention aims to provide a ship weld joint defect texture edge extraction method, a ship weld joint defect texture edge extraction system, ship weld joint defect texture edge extraction equipment and a storage medium.
The invention is realized by the following technical scheme:
a method for extracting texture edges of weld defects of ships comprises the following steps:
preprocessing an X-ray image to obtain a gradient image;
performing non-maximum suppression on image gradient data in a gradient image, and only reserving local maximum points to obtain pixel points of edge contours in the gradient image;
giving a high threshold value and a low threshold value, wherein a pixel point with a gradient value larger than the high threshold value is marked as a strong edge point, a pixel point with a gradient value smaller than the low threshold value is marked as a weak edge point, and a pixel point with a gradient value between the high threshold value and the low threshold value is marked as a middle edge point;
and removing the weak edge points, judging whether the middle edge points are reserved according to a preset judging rule, reserving the middle edge points if the judgment is yes, and removing the middle edge points if the judgment is no.
Further, the step of judging whether the edge point remains in the middle according to a preset judging rule includes:
sequentially selecting one middle edge point from the middle edge points as a target middle edge point, and connecting the target middle edge point with the middle edge point contacted with the target middle edge point to obtain a plurality of contour lines;
judging whether each contour line is reserved or not, if so, reserving middle edge points forming the contour line, and if not, removing the middle edge points forming the contour line;
the judging process of whether the contour line remains is as follows:
(1) Judging whether any one of two ends of the contour line is in contact with the strong edge point, if so, entering the step (2), otherwise, judging that the contour line is not reserved;
(2) Judging whether any one of two ends of the contour line is in contact with the edge point or not, if so, entering the step (3), and if not, judging that the contour line is reserved;
(3) And calculating the distance between one end of the contour line, which is contacted with the strong edge point, and the strong edge point, which is contacted with the strong edge point, and marking the distance as a first distance, and calculating the distance between one end of the contour line, which is contacted with the weak edge point, and the weak edge point, which is contacted with the weak edge point, and marking the distance as a second distance, wherein if the first distance is smaller than the second distance, the contour line is judged to be reserved, and otherwise, the contour line is judged to be not reserved.
Further, the step of giving the high threshold and the low threshold comprises:
calculating the gray average value of the image for the image subjected to non-maximum value inhibition, and taking the calculated gray average value as a high threshold value;
and obtaining an optimal threshold value of the image by adopting a maximum inter-class variance method on the image subjected to non-maximum value inhibition, and taking the optimal threshold value as a low threshold value.
Further, the step of preprocessing the X-ray image to obtain a gradient image includes:
filtering the X-ray image to obtain a denoised X-ray image;
and calculating the image gradient of the denoised X-ray image to obtain a gradient image.
Further, the step of filtering the X-ray image to obtain a denoised X-ray image includes:
and carrying out bilateral filtering treatment on the X-ray image to obtain a denoised X-ray image.
The invention also provides a ship weld defect texture edge extraction system, which comprises:
the first processing module is used for preprocessing the X-ray image to obtain a gradient image;
the second processing module is used for carrying out non-maximum suppression on the image gradient data in the gradient image, only preserving local maximum points and obtaining pixel points of the edge contour in the gradient image;
the marking module is used for giving a high threshold value and a low threshold value, wherein a pixel point with a gradient value larger than the high threshold value is marked as a strong edge point, a pixel point with a gradient value smaller than the low threshold value is marked as a weak edge point, and a pixel point with a gradient value between the high threshold value and the low threshold value is marked as a middle edge point;
the judging module is used for removing the weak edge points, judging whether the middle edge points are reserved according to a preset judging rule, reserving the middle edge points if yes, and removing the middle edge points if no;
the invention also provides an electronic device, which comprises:
a processor;
a memory for storing an executable computer program;
and the processor realizes the steps of the ship weld defect texture edge extraction method when executing the computer program.
The invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the marine weld defect texture edge extraction method.
Compared with the prior art, the invention has the beneficial effects that: the gradient calculation and non-maximum suppression are carried out on the X-ray image, the texture and the direction in the image can be searched, the texture information with weak texture values of a part is filtered, the reliability judgment is carried out on the screened texture information, and finally the texture information with stronger reliability is obtained, so that the effect of enhancing the tiny edges in the X-ray image and amplifying the inconspicuous texture information is achieved, and the effect of assisting professionals in judging the defects of ship welding seams is achieved.
Drawings
FIG. 1 is a flow chart of the steps of the method for extracting texture edges of weld defects of a ship according to the present invention;
FIG. 2 is a schematic block diagram of a marine weld defect texture edge extraction system of the present invention;
fig. 3 is a hardware configuration diagram of the electronic device of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the description of the present invention, it should be noted that, directions or positional relationships indicated by terms such as "upper", "lower", "inner", "outer", etc., are directions or positional relationships based on those shown in the drawings, or those that are conventionally put in use, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the apparatus or elements to be referred to must have a specific direction, be constructed and operated in a specific direction, and thus should not be construed as limiting the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a method for extracting texture edges of weld defects of a ship according to the present invention. A method for extracting texture edges of weld defects of ships comprises the following steps:
s1, preprocessing an X-ray image to obtain a gradient image;
s2, performing non-maximum suppression on image gradient data in a gradient image, and only reserving local maximum points to obtain pixel points of edge contours in the gradient image;
s3, giving a high threshold value and a low threshold value, wherein a pixel point with a gradient value larger than the high threshold value is marked as a strong edge point, a pixel point with a gradient value smaller than the low threshold value is marked as a weak edge point, and a pixel point with a gradient value between the high threshold value and the low threshold value is marked as a middle edge point;
s4, removing the weak edge points, judging whether the middle edge points are reserved according to preset judging rules, reserving the middle edge points if yes, and removing the middle edge points if no.
In the step S1, a gradient image is obtained according to the pixel values of each pixel point in the X-ray image, so as to facilitate the subsequent processing.
In the step S1, further, in the step S1, the step of preprocessing the X-ray image to obtain a gradient image includes:
s11, performing filtering treatment on the X-ray image to obtain a denoised X-ray image;
s12, calculating the image gradient of the denoised X-ray image to obtain a gradient image.
In the step S11, the filtering process may be performed on the X-ray image by using bilateral filtering, and the nonlinear process may be performed according to the numerical distribution of local pixels in the image space by using the nonlinear characteristics of bilateral filtering, so that the low-frequency noise in the image is removed, and meanwhile, the pixel far from the edge pixel is not greatly affected, so that the original edge in the X-ray image may be retained. Therefore, the bilateral filtering processing is carried out on the X-ray image, low-frequency noise in the X-ray image can be removed, the denoised X-ray image is obtained, and the original edge in the original X-ray image can be reserved in the denoised X-ray image.
In the above step S12, since the X-ray image is a single-channel gray scale, the iron plates other than the weld appear black in the image, and the weld may appear dark gray to white depending on the amount of solder, the process, and the output power of the X-ray radiation source. The position of the welding edge can be found out by calculating the gradient of the denoised X-ray image, and the edge of the welding seam in the image and the defect edge information such as the edge with air holes, the edge with cracks and the edge with uneven materials in the welding can be roughly refined. The image gradient calculation can adopt a differential derivation method to locally derive adjacent pixel points in the denoised X-ray image, the derivative of the pixel points can be obtained, the magnitude of the derivative value is the local change rate of the pixel points, and the higher the change rate is, the greater the probability that the pixel points belong to the weld joint edge is proved.
In the step S2, the image gradient data in the gradient image reflects the change rate of the weld image, that is, the change condition in the weld imaged by the X-ray, which includes defects such as slag inclusion, air holes, lack of penetration, and the like, which show local changes in the image. The local changes are subjected to maximum value extraction by using non-maximum value inhibition, the pixel points with the local maximum value are extracted and reserved, the other pixel points with local parts smaller than the maximum value are removed, and the pixel points corresponding to the reserved local maximum value are the pixel points of the edge contour in the gradient image, so that the change rate data volume of the gradient image can be reduced, all local change rates are replaced by using the local maximum value change rate data, the defect edges are thinned, the data volume is reduced, and the subsequent calculation of other algorithms is facilitated.
In the step S3, the pixel points of the edge contour that remain are classified into 3 classes, namely, strong, medium and weak 3 classes, according to the local maximum value, so as to represent the credibility of the defect edge. And giving a high threshold value and a low threshold value according to the information of the image subjected to non-maximum value suppression so as to divide the reserved pixel points into a strong edge point, a middle edge point and a weak edge point, wherein the pixel points with gradient values larger than the high threshold value are marked as the strong edge points, the pixel points with gradient values smaller than the low threshold value are marked as the weak edge points, and the pixel points with gradient values smaller than or equal to the height value and larger than or equal to the low threshold value are marked as the middle edge points. After 3 kinds of classification of strong edge points, middle edge points and weak edge points are separated, the strong edge points belonging to the strong classification can be reserved, the weak edge points belonging to the weak classification need to be removed, and the middle edge points belonging to the middle classification need to be subjected to reliability discrimination again.
Further, in step S3, the step of giving the high threshold value and the low threshold value includes:
s31, calculating a gray average value of the image subjected to non-maximum value inhibition, and taking the calculated gray average value as a high threshold value;
s32, obtaining an optimal threshold value of the image by adopting a maximum inter-class variance method on the image subjected to non-maximum value inhibition, and taking the optimal threshold value as a low threshold value.
In step S31, the gray values of all the pixels in the image after non-maximum suppression are summed, and then divided by the total number of pixels in the image, the gray average value of the image after non-maximum suppression is obtained, and the obtained gray average value is used as a high threshold value to distinguish the strong edge point from the middle edge point.
In step S32, the image after non-maximum suppression is divided into foreground and background, the threshold is iterated from 0 to high threshold times, the inter-class variance value under each threshold is calculated and compared, the threshold corresponding to the largest variance value in all variance values is the optimal threshold, and the optimal threshold is the lowest threshold, so as to distinguish the weak edge point and the middle edge point.
In the above step S4, the weak edge points are removed, and the removal operation is to directly set the pixel data values of these weak edge points to 0, which corresponds to the removal of the weak edge points. For middle edge points belonging to middle classification, reliability judgment is carried out according to preset judgment rules, if the judgment is yes, the middle edge points are indicated to have high reliability, the middle edge points can be reserved, if the judgment is no, the middle edge points are indicated to have low reliability, the middle edge points need to be removed, and the removal operation of the middle edge points is that pixel data values of weak edge points are directly set to 0, so that the middle edge points are removed. If the reserved pixel point is judged to be the reserved middle edge point, the reserved pixel point is only a strong edge point, and if the reserved middle edge point is judged to be the reserved middle edge point, the reserved strong edge point and the reserved middle edge point are combined to obtain the final reserved pixel point. The finally-preserved pixel points are refined weld edge graphs, and the pixel points contain boundary information of welding positions of the welding flux and the steel plate and also contain boundaries of welding defects such as air holes, slag inclusion, cracks and the like generated during welding. The weld edge map finally obtained by the ship weld defect texture edge extraction method can extract the boundary information and the welding defect information, so that the extraction of the ship weld defect edge is realized, and a technician can be assisted in judging whether a welding position is defective or not according to the boundary information and the welding defect information.
Further, in step S4, the step of determining whether the edge point remains in the middle according to the preset determination rule includes:
s41, sequentially selecting a middle edge point from the middle edge points as a target middle edge point, and connecting the target middle edge point with the middle edge point contacted with the target middle edge point to obtain a plurality of contour lines;
s42, judging whether each contour line is reserved or not, if so, reserving middle edge points forming the contour line, and if not, removing the middle edge points forming the contour line;
the judging process of whether the contour line remains is as follows:
(1) Judging whether any one of two ends of the contour line is in contact with the strong edge point, if so, entering the step (2), otherwise, judging that the contour line is not reserved;
(2) Judging whether any one of two ends of the contour line is in contact with the edge point or not, if so, entering the step (3), and if not, judging that the contour line is reserved;
(3) And calculating the distance between one end of the contour line, which is contacted with the strong edge point, and the strong edge point, which is contacted with the strong edge point, and marking the distance as a first distance, and calculating the distance between one end of the contour line, which is contacted with the weak edge point, and the weak edge point, which is contacted with the weak edge point, and marking the distance as a second distance, wherein if the first distance is smaller than the second distance, the contour line is judged to be reserved, and otherwise, the contour line is judged to be not reserved.
In the steps S41 to S42, the middle edge points are pixel points on the image, and there are several middle edge points, one middle edge point is sequentially selected from the several middle edge points as a target middle edge point, the middle edge point contacting with the target middle edge point is the adjacent middle edge point in eight directions of the target middle edge point, then the middle edge points contacting with each other are connected to form a contour line, so as to obtain several contour lines, all the points on the contour lines are the middle edge points, then each contour line is respectively judged, if the contour lines are judged to be reserved, the middle edge points forming the contour lines are reserved, and if the contour lines are judged to be not reserved, the middle edge points forming the contour lines are removed.
In the steps (1) to (3), if one of the two ends of the contour line is in contact with the strong edge point and one of the two ends of the contour line is not in contact with the strong edge point, it is determined that the contour line is retained. If one of the two ends of the contour line is in contact with the strong edge point and one of the two ends of the contour line is in contact with the weak edge point, calculating the Euclidean distance between the one end of the contour line in contact with the strong edge point and the strong edge point in contact with the end, and recording the Euclidean distance as a first distance, wherein the calculation of the Euclidean distance is not repeated herein, and calculating the Euclidean distance between the one end of the contour line in contact with the weak edge point and the weak edge point in contact with the end, and recording the Euclidean distance as a second distance; if the first distance is smaller than the second distance, judging that the contour line is closer to the strong edge point, judging that the contour line is strong, and judging that the contour line is reserved; if the first distance is greater than or equal to the second distance, the contour line is judged to be closer to the weak edge point, the contour line is considered to be weak, and the contour line is judged not to be reserved. If one of the two ends of the contour line is not contacted with the strong edge point, the contour line is considered to be weak, and the contour line is judged not to be reserved.
Referring to fig. 2, fig. 2 is a schematic block diagram of a ship weld defect texture edge extraction system according to the present invention. Corresponding to the embodiment of the ship weld defect texture edge extraction method, the invention also provides a ship weld defect texture edge extraction system, which comprises:
the first processing module 1 is used for preprocessing the X-ray image to obtain a gradient image;
the second processing module 2 is used for carrying out non-maximum suppression on the image gradient data in the gradient image, only preserving local maximum points and obtaining pixel points of the edge contour in the gradient image;
a marking module 3, configured to give a high threshold and a low threshold, wherein a pixel point with a gradient value greater than the high threshold is denoted as a strong edge point, a pixel point with a gradient value less than the low threshold is denoted as a weak edge point, and a pixel point with a gradient value between the high threshold and the low threshold is denoted as a middle edge point;
the judging module 4 is used for removing the weak edge points, judging whether the middle edge points are reserved according to a preset judging rule, reserving the middle edge points if yes, and removing the middle edge points if no;
further, the judging module 4 includes:
the selecting unit is used for sequentially selecting one middle edge point from the middle edge points as a target middle edge point, and connecting the target middle edge point with the middle edge point contacted with the target middle edge point to obtain a plurality of contour lines;
the judging unit is used for judging whether the contour lines are reserved for each contour line, if so, reserving middle edge points forming the contour lines, and if not, removing the middle edge points forming the contour lines;
the judging process of whether the contour line remains is as follows:
(1) Judging whether any one of two ends of the contour line is in contact with the strong edge point, if so, entering the step (2), otherwise, judging that the contour line is not reserved;
(2) Judging whether any one of two ends of the contour line is in contact with the edge point or not, if so, entering the step (3), and if not, judging that the contour line is reserved;
(3) And calculating the distance between one end of the contour line, which is contacted with the strong edge point, and the strong edge point, which is contacted with the strong edge point, and marking the distance as a first distance, and calculating the distance between one end of the contour line, which is contacted with the weak edge point, and the weak edge point, which is contacted with the weak edge point, and marking the distance as a second distance, wherein if the first distance is smaller than the second distance, the contour line is judged to be reserved, and otherwise, the contour line is judged to be not reserved.
Further, the marking module 3 includes:
the high threshold unit is used for calculating the gray average value of the image for the image subjected to non-maximum value inhibition, and taking the calculated gray average value as a high threshold;
and the low threshold unit is used for obtaining an optimal threshold of the image by adopting a maximum inter-class variance method on the image subjected to non-maximum value inhibition, and taking the optimal threshold as the low threshold.
Further, the first processing module 1 includes:
the filtering unit is used for carrying out filtering treatment on the X-ray image to obtain a denoised X-ray image;
and the gradient unit is used for calculating the image gradient of the denoised X-ray image to obtain a gradient image.
The implementation process of the functions and roles of each module and unit in the above system is specifically shown in the implementation process of the corresponding steps in the above method, and will not be repeated here.
For system embodiments, reference is made to the description of method embodiments for the relevant points, since they essentially correspond to the method embodiments. The system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements.
Corresponding to the embodiment of the ship weld defect texture edge extraction method, the invention also provides electronic equipment, which can comprise:
a processor;
a memory for storing an executable computer program;
the processor executes the computer program to implement the method for extracting the texture edge of the weld defect of the ship in any method embodiment.
The embodiment of the invention can be applied to the electronic equipment. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions in a nonvolatile memory into a memory by a processor of an electronic device where the device is located for operation. In terms of hardware, as shown in fig. 3, the electronic device may further include other hardware, such as a camera module, in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 3; or may include other hardware, generally according to the actual function of the electronic device, which will not be described in detail.
Corresponding to the foregoing method embodiments, the present invention further provides a computer readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for extracting a texture edge of a weld defect of a ship in any of the foregoing method embodiments.
Embodiments of the invention may take the form of a computer program product embodied on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing program code. The computer readable storage medium may include: removable or non-removable media, either permanent or non-permanent. The information storage function of the computer readable storage medium may be implemented by any method or technique that may be implemented. The information may be computer readable instructions, data structures, models of a program, or other data.
In addition, the computer-readable storage medium includes, but is not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology memory, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or other non-transmission media that may be used to store information that may be accessed by a computing device.
Compared with the prior art, the invention has the beneficial effects that: the gradient calculation and non-maximum suppression are carried out on the X-ray image, the texture and the direction in the image can be searched, the texture information with weak texture values of a part is filtered, the reliability judgment is carried out on the screened texture information, and finally the texture information with stronger reliability is obtained, so that the effect of enhancing the tiny edges in the X-ray image and amplifying the inconspicuous texture information is achieved, and the effect of assisting professionals in judging the defects of ship welding seams is achieved.
The present invention is not limited to the preferred embodiments, and any simple modification, equivalent variation and modification made to the above embodiments according to the technical substance of the present invention will still fall within the scope of the technical solution of the present invention.

Claims (8)

1. The method for extracting the texture edge of the weld joint defect of the ship is characterized by comprising the following steps of:
preprocessing an X-ray image to obtain a gradient image;
performing non-maximum suppression on the image gradient data in the gradient image, and only reserving local maximum points to obtain pixel points of edge contours in the gradient image;
giving a high threshold value and a low threshold value, wherein a pixel point with a gradient value larger than the high threshold value is marked as a strong edge point, a pixel point with a gradient value smaller than the low threshold value is marked as a weak edge point, and a pixel point with a gradient value between the high threshold value and the low threshold value is marked as a middle edge point;
and removing the weak edge points, judging whether the middle edge points are reserved according to a preset judging rule, reserving the middle edge points if the judgment is yes, and removing the middle edge points if the judgment is no.
2. The method for extracting the texture edge of the weld defect of the ship according to claim 1, wherein the step of judging whether the edge point remains according to a preset judgment rule comprises the steps of:
sequentially selecting one middle edge point from the middle edge points as a target middle edge point, and connecting the target middle edge point with the middle edge point contacted with the target middle edge point to obtain a plurality of contour lines;
judging whether each contour line is reserved or not, if so, reserving middle edge points forming the contour line, and if not, removing the middle edge points forming the contour line;
the judging process of whether the contour line remains is as follows:
(1) Judging whether any one of two ends of the contour line is in contact with the strong edge point, if so, entering the step (2), otherwise, judging that the contour line is not reserved;
(2) Judging whether any one of two ends of the contour line is in contact with the edge point or not, if so, entering the step (3), and if not, judging that the contour line is reserved;
(3) And calculating the distance between one end of the contour line, which is contacted with the strong edge point, and the strong edge point, which is contacted with the strong edge point, and marking the distance as a first distance, and calculating the distance between one end of the contour line, which is contacted with the weak edge point, and the weak edge point, which is contacted with the weak edge point, and marking the distance as a second distance, wherein if the first distance is smaller than the second distance, the contour line is judged to be reserved, and otherwise, the contour line is judged to be not reserved.
3. The method of claim 1, wherein the step of assigning high and low thresholds comprises:
calculating the gray average value of the image for the image subjected to non-maximum value inhibition, and taking the calculated gray average value as a high threshold value;
and obtaining an optimal threshold value of the image by adopting a maximum inter-class variance method on the image subjected to non-maximum value inhibition, and taking the optimal threshold value as a low threshold value.
4. The method for extracting texture edges of weld defects of ships according to claim 1, wherein the step of preprocessing the X-ray image to obtain a gradient image comprises:
filtering the X-ray image to obtain a denoised X-ray image;
and calculating the image gradient of the denoised X-ray image to obtain a gradient image.
5. The method for extracting the texture edge of the weld defect of the ship according to claim 4, wherein the step of filtering the X-ray image to obtain the denoised X-ray image comprises:
and carrying out bilateral filtering treatment on the X-ray image to obtain a denoised X-ray image.
6. A marine weld defect texture edge extraction system, comprising:
the first processing module is used for preprocessing the X-ray image to obtain a gradient image;
the second processing module is used for carrying out non-maximum suppression on the image gradient data in the gradient image, only preserving local maximum points and obtaining pixel points of the edge contour in the gradient image;
the marking module is used for giving a high threshold value and a low threshold value, wherein a pixel point with a gradient value larger than the high threshold value is marked as a strong edge point, a pixel point with a gradient value smaller than the low threshold value is marked as a weak edge point, and a pixel point with a gradient value between the high threshold value and the low threshold value is marked as a middle edge point;
and the judging module is used for removing the weak edge points, judging whether the middle edge points are reserved according to a preset judging rule, reserving the middle edge points if the judgment is yes, and removing the middle edge points if the judgment is no.
7. An electronic device, comprising:
a processor;
a memory for storing an executable computer program;
wherein the processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 5.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 5.
CN202311057550.2A 2023-08-21 2023-08-21 Ship weld defect texture edge extraction method, system, equipment and storage medium Pending CN117218368A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311057550.2A CN117218368A (en) 2023-08-21 2023-08-21 Ship weld defect texture edge extraction method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311057550.2A CN117218368A (en) 2023-08-21 2023-08-21 Ship weld defect texture edge extraction method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117218368A true CN117218368A (en) 2023-12-12

Family

ID=89047117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311057550.2A Pending CN117218368A (en) 2023-08-21 2023-08-21 Ship weld defect texture edge extraction method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117218368A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117689552A (en) * 2024-02-02 2024-03-12 科普云医疗软件(深圳)有限公司 Coronary angiography enhancement method for intracardiac interventional therapy

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117689552A (en) * 2024-02-02 2024-03-12 科普云医疗软件(深圳)有限公司 Coronary angiography enhancement method for intracardiac interventional therapy
CN117689552B (en) * 2024-02-02 2024-04-05 科普云医疗软件(深圳)有限公司 Coronary angiography enhancement method for intracardiac interventional therapy

Similar Documents

Publication Publication Date Title
KR100727190B1 (en) Method and computer readable medium for inspecting defect of mask
CN111292305A (en) Improved YOLO-V3 metal processing surface defect detection method
CN117218368A (en) Ship weld defect texture edge extraction method, system, equipment and storage medium
CN112116557B (en) Radiographic image weld area defect detection method, storage medium and equipment
CN110660072B (en) Method and device for identifying straight line edge, storage medium and electronic equipment
CN113012157B (en) Visual detection method and system for equipment defects
CN114495098B (en) Diaxing algae cell statistical method and system based on microscope image
CN115880248A (en) Surface scratch defect identification method and visual detection equipment
CN112288727A (en) Magnetic ring surface defect detection method and device, electronic equipment and storage medium
CN110276759B (en) Mobile phone screen bad line defect diagnosis method based on machine vision
CN112907521A (en) SSD and GLCM based welding air hole target detection method
CN111932531A (en) Model training method, welding spot defect detection method and device and electronic equipment
CN117011281A (en) Deep learning-based battery overlap value anomaly detection method
CN116385411A (en) Image detection method and system
CN112215266B (en) X-ray image contraband detection method based on small sample learning
CN114612710A (en) Image detection method, image detection device, computer equipment and storage medium
CN113920547A (en) Glove detection method and system based on neural network
CN114387222A (en) Image quality evaluation method, system, electronic equipment and storage medium
CN114219932A (en) Method, processor and storage medium for locating a girth weld centerline
CN106875369B (en) Real-time dynamic target tracking method and device
Yang et al. Generalized weld bead region of interest localization and improved faster R-CNN for weld defect recognition
JP2000258137A (en) Appearance inspection method and appearance inspection device for electronic component and record medium recording program for making computer realize appearance inspection processing
CN117218097B (en) Method and device for detecting surface defects of shaft sleeve type silk screen gasket part
CN112926695B (en) Image recognition method and system based on template matching
US20160267646A1 (en) Apparatus for assessment of voids in solder and method for assessment of voids in solder

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