A method and device for acquiring internal and external wall crack defects
Through multispectral and three-dimensional detection methods, using multi-band lighting and image processing technology, the problem of low accuracy in identifying surface defects of petrochemical equipment has been solved, and accurate identification and depth measurement of defects such as scratches, abrasions, and wear have been achieved.
Patent Information
- Application Number
- CN202311165385.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2043-09-11
AI Technical Summary
Existing technologies are unable to effectively distinguish and identify dents and scratches on the surface of petrochemical equipment and components, and are difficult to adapt to the detection of scratches of different depths, resulting in low recognition accuracy and the inability to accurately measure the depth and area size of defects.
A multispectral combined with three-dimensional target detection method is adopted. Two industrial cameras and a multi-band lighting unit are used. Images are collected through the imaging module. Combined with the multispectral module to provide an environmentally adapted lighting spectrum, image preprocessing, edge detection, enhancement and recognition are performed to calculate the defect depth and size.
It achieves accurate identification and quantitative evaluation of scratches, abrasions, wear, and slender depressions on the surface of petrochemical equipment and components, overcomes the overexposure problem caused by ambient light and measurement angle, and improves recognition accuracy and detection efficiency.
Smart Images

Figure CN119595635B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of petrochemical small-diameter inner wall crack detection, and is applied to non-contact detection methods and related equipment. Specifically, it relates to a detection method and device for obtaining inner and outer wall crack defects. Background Art
[0002] Due to material corrosion, friction, and uncontrollable factors during the manufacturing process, object surfaces are prone to deformation and shedding, necessitating regular surface inspection. In particular, some components require defect inspection on both the inner and outer surfaces of cylinders to ensure compliance with equipment requirements. Defect inspection refers to the detection of surface defects such as bumps, pits, and scratches. Surface defect detection is crucial for ensuring production safety and preventing economic losses.
[0003] Scratch defects are generally inspected through machine vision. However, traditional image enhancement methods in machine vision have poor enhancement effects on scratch images and are not targeted, which hinders the subsequent use of image analysis to identify and analyze defects in the image. In addition, existing machine vision inspection methods only rely on abnormal characterization to detect whether there are defects on the surface for identification. They cannot effectively distinguish between dents and abrasions because the characteristics of dents and abrasions are relatively similar, resulting in low recognition accuracy. Indents seriously affect the appearance and quality of use of metal equipment, while ordinary abrasions only have a partial impact on the appearance of metal equipment and have no significant impact on the quality of use. Therefore, it is necessary to effectively identify the types of defects and provide feedback to enterprises.
[0004] At the same time, during the actual image capture process, under the influence of actual light reflection, the overall representation of the pit and scratch areas are both special highlight features, which cannot effectively distinguish the two defects.
[0005] In the detection project, we also face the problem of different scratch depths. Traditional methods are difficult to adapt to the detection of scratches of different depths, resulting in overexposure inside some areas. At this time, it is impossible to determine whether there are scratches in the overexposed area, resulting in poor actual segmentation effect.
[0006] In short, current technical methods can only directly or indirectly qualitatively identify scratches, wear, and elongated pit defects, and the recognition accuracy needs to be further improved; in addition, there is currently no relevant technology to directly detect and quantitatively evaluate the degree of defect depression.
[0007] In response to the problems of the prior art, the present invention provides a method and device for detecting inner and outer wall crack defects. Summary of the Invention
[0008] In response to the problems of the current prior art, the present invention provides a detection device for obtaining inner and outer wall crack defects, the device comprising:
[0009] An imaging module, which is used to acquire an image of the target object to be measured;
[0010] Multi-spectral module, which has multi-band lighting capabilities and is used to provide corresponding lighting spectra to target objects in different environments;
[0011] A measurement control module is connected to the imaging module and is used to control the acquisition process of the imaging module.
[0012] According to one embodiment of the present invention, the imaging module includes two industrial cameras, wherein the angle between the two industrial cameras is:
[0013]
[0014] Where: α is the angle between the two industrial cameras; D is the distance between the industrial camera lens and the target object; L is the straight-line distance between the two industrial cameras.
[0015] According to one embodiment of the present invention, the multispectral module includes: an annular light source bracket and a multi-band lighting unit, wherein the annular light source bracket is coaxially arranged with the lens of the industrial camera, and the multi-band lighting unit is arranged on the annular light source bracket.
[0016] According to one embodiment of the present invention, the multi-band lighting unit is composed of red light band lamp beads, blue light band lamp beads and green light band lamp beads, wherein the lamp beads in the same band are spaced 45° apart, and the lamp beads in different bands are spaced 15° apart.
[0017] According to one embodiment of the present invention, the device further includes: a multi-spectrum control module, which includes three buttons, respectively used to control the turning on and off of the red light band lamp beads, the blue light band lamp beads and the green light band lamp beads.
[0018] According to one embodiment of the present invention, the measurement control module is used to control the opening and closing of the imaging module and the multispectral module, wherein the measurement control module and the multispectral control module independently control the opening and closing of the multispectral module.
[0019] According to one embodiment of the present invention, the device further includes: a data processing end, which is used to perform data processing on the image to be measured, identify crack defects of the target object, and calculate the depth of the crack defects.
[0020] According to one embodiment of the present invention, the device further comprises: a signal transmission module, which is used to transmit the on and off status information of the multi-spectral module to the data processing end.
[0021] According to one embodiment of the present invention, the device further includes: a power supply module, which is used to supply power to the imaging module, the multispectral module, the measurement control module, and the signal transmission module.
[0022] According to another aspect of the present invention, there is also provided a method for detecting inner and outer wall crack defects, which is performed by the device as described in any one of the above items, and the method comprises:
[0023] Acquire an image of the target object to be measured by the imaging module;
[0024] Providing corresponding lighting spectra to target objects in different environments through the multi-spectral module with multi-band lighting capabilities;
[0025] The acquisition process of the imaging module is controlled by a measurement control module connected to the imaging module.
[0026] According to one embodiment of the present invention, the method comprises:
[0027] According to the characteristics of the ambient light in which the target object is located, the multi-spectral module provides the target object with an illumination spectrum suitable for the current environment;
[0028] Using the imaging module to photograph the target object to obtain the image to be measured;
[0029] Performing image preprocessing, crack edge detection processing, crack enhancement processing, and crack identification processing on the image to be tested to obtain a crack defect image;
[0030] Based on the crack defect image, two-dimensional crack size measurement is performed to calculate the crack opening length value;
[0031] Based on the crack defect image, depth calculation is performed on all pixel points in the crack defect image, and a crack depth map is generated according to the depth calculation result.
[0032] According to one embodiment of the present invention, image preprocessing is performed by the following steps:
[0033] The brightness values of all pixels in the image to be tested are accumulated and the average brightness value L is calculated after accumulation. avg ;
[0034] For brightness values greater than or equal to the brightness average value L avg The pixel point is assigned a first weight value;
[0035] For brightness values less than the brightness average value L avg The pixel point is assigned a second weight value;
[0036] The weighted average brightness of all pixels in the image to be tested is calculated using the following expression:
[0037]
[0038] Among them, L wavg is the weighted average value of brightness; A represents the first weight value, A>1, and the second weight value is 1 / A; L h is the brightness value of the pixel that is greater than or equal to the average brightness; L l is the brightness value of the pixel that is less than the average brightness; N h is the number of pixels with brightness greater than or equal to the average value; N l is the number of pixels with brightness less than the average value.
[0039] According to one embodiment of the present invention, crack edge detection processing is performed through the following steps:
[0040] For the pre-processed image, pixels with brightness values less than a first threshold are removed, where the first threshold is B×L wavg (0 <B<1);
[0041] For the image after culling, calculate the brightness gradient and direction of each pixel;
[0042] Traverse the entire image and find pixel points whose brightness gradient is greater than the second threshold according to the brightness gradient direction. Connect these adjacent pixel points to form a continuous edge line, which is recorded as the crack edge, where the second threshold is C (C>1).
[0043] According to one embodiment of the present invention, crack enhancement processing is performed through the following steps: using a brightness value enhancement coefficient, the pixel points on the crack edge and the pixel points within the crack edge whose brightness values are greater than or equal to the brightness weighted average are enhanced, wherein the second threshold is used as the brightness value enhancement coefficient.
[0044] According to one embodiment of the present invention, crack recognition processing is performed by the following steps: for the crack enhanced image, an area composed of pixels whose brightness value is greater than or equal to a third threshold is identified and recorded as the crack defect image, wherein the third threshold is C×L wavg .
[0045] According to one embodiment of the present invention, the two-dimensional size of the crack is measured by the following steps: based on the crack defect image, the minimum circumscribed rectangle of the crack to be measured is selected; and the length of the long side of the minimum circumscribed rectangle is recorded as the crack opening length value.
[0046] According to one embodiment of the present invention, the crack defect depth is calculated by the following expression:
[0047]
[0048] Wherein, Δd is the crack defect depth; l is the crack opening length value of the crack defect in the image captured by the first industrial camera, f is the focal length of the industrial camera, e is the distance between the pixel position of the crack defect in the image captured by the second industrial camera and the camera optical axis, and r represents the distance between the pixel position of the defect in the image to be tested and the camera optical axis.
[0049] According to another aspect of the present invention, a storage medium is provided, which contains a series of instructions for executing the method steps described in any one of the above.
[0050] The present invention provides a method and device for detecting inner and outer wall crack defects, which have the following advantages over the existing technology:
[0051] The present invention is beneficial for identifying the types of scratches and crack defects on the surface of petrochemical equipment and parts. The present invention is beneficial for overcoming the problem of differences in the depth of scratches and crack defects, and is suitable for detecting defects of different depths. The present invention is beneficial for overcoming the difficulty in identifying scratches and crack defects in the exposed area, and realizes the function of defect identification and measurement in the overexposed area. The present invention is beneficial for accurately measuring the depth of scratches and crack defects and the size of the occurrence area. The present invention can identify some cracks that are thin and long in appearance and have a certain depth; in the identification process, it can eliminate the interference of shallow defects such as wear and scratches, distinguish cracks from other shallow defects based on the depth, and can also calculate the crack depth.
[0052] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0054] Figure 1 Shown is a structural block diagram of a detection device for obtaining inner and outer wall crack defects according to one embodiment of the present invention;
[0055] Figure 2 A schematic diagram showing the arrangement positions of an imaging module and a target object according to an embodiment of the present invention is shown;
[0056] Figure 3 shows a schematic diagram of a multispectral module according to one embodiment of the present invention;
[0057] Figure 4 A flowchart showing the steps of a detection method for obtaining inner and outer wall crack defects according to one embodiment of the present invention is shown;
[0058] Figure 5 A flowchart showing the steps of crack defect identification and detection according to one embodiment of the present invention is shown.
[0059] In the accompanying drawings, the same reference numerals are used for the same parts. In addition, the accompanying drawings are not drawn according to the actual scale.
[0060] The meanings of the reference numerals in the accompanying drawings are as follows: 1- red light band lamp beads; 2- blue light band lamp beads; 3- green light band lamp beads; 4- industrial camera lens; 5- ring light source bracket. DETAILED DESCRIPTION
[0061] To make the objectives, technical solutions and advantages of the present invention more clear, embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
[0062] Prior art (CN115266735B) provides a metal sheet surface defect detection system and method, including: the detection system includes an acquisition terminal, including an image acquisition system and a composite light source system; the composite light source system includes several light source chambers; the light source chambers are equipped with white diffuse reflection light sources and semi-transparent and semi-reflective mirrors with predetermined inclinations; a portion of the light from the white diffuse reflection light source is emitted parallel to the surface of the inspected sheet through the semi-transparent and semi-reflective mirrors, and the semi-transparent and semi-reflective mirrors transmit light parallel to the principal optical axis of the camera corresponding to the light source chamber into the camera; another portion of the light from the white diffuse reflection light source is emitted obliquely toward the sheet surface and passes through the semi-transparent and semi-reflective mirrors into the camera corresponding to the light source chamber. However, this prior art cannot accurately and quantitatively analyze the depth of defects by using changes in contrast.
[0063] Prior art (CN115330769B) relates to the field of data processing technology, specifically a method for detecting scratches and dents on the surface of aluminum tubes. This method employs electronic equipment for identification, utilizing a production-based artificial intelligence system to detect scratches and dents on the surface of aluminum tubes. The method first uses an electronic camera to identify the surface image of the aluminum tube and then performs correction processing to obtain a corrected image. The corrected image is then subjected to data processing to determine whether local defects exist on the surface image of the aluminum tube. Furthermore, the method determines whether dents or scratches are present. However, this prior art utilizes a fixed method and cannot be used in complex industrial production environments.
[0064] The prior art (CN114998337B) provides a scratch detection method, device, equipment and storage medium, including: obtaining multiple keycap images, each keycap image corresponds to a keycap with at least one scratch, and the annotation data of the keycap image includes: the first border of the scratch, the confidence and the probability of the type; an adaptive anchor frame for the scratch is determined to determine the size of the second border of the scratch; multiple detection frames are determined according to the sizes of the second borders of all scratches; data enhancement is performed on all keycap images to obtain a standard keycap image; feature extraction and fusion are performed on the standard keycap image to obtain a feature fusion map corresponding to the detection frame; based on the detection frame, scratch prediction is performed on the feature fusion map by a detection model to obtain a prediction result; the detection model is optimized according to the annotation data of all keycap images and the prediction results corresponding to all detection frames to obtain an optimized target detection model; scratch detection is performed on the keycap image to be identified by the target detection model to obtain a detection result. However, this existing technology requires that the surface to be tested containing scratches be marked in advance, and the scratched surface must be compared with the perfect surface to be tested, which is labor-intensive and not suitable for scenarios where scratches on the surfaces of a large number of equipment are to be detected in industrial sites.
[0065] Existing technology (CN112298273B) applies to the field of wheel scratch measurement technology and provides a wheel scratch length measurement method, device, and terminal device. The method includes: obtaining the axle box vibration acceleration signal and noise signal corresponding to the wheel; processing the axle box vibration acceleration signal based on the noise signal to obtain the scratch vibration signal; performing a continuous wavelet transform on the scratch vibration signal to obtain a continuous wavelet transform coefficient modulus maximum sequence of the scratch vibration signal; obtaining the mutation time difference of the axle box vibration acceleration signal corresponding to the wheel scratch based on the continuous wavelet transform coefficient modulus maximum sequence; and calculating the wheel scratch length based on the mutation time difference. However, this existing technology cannot directly determine the extent of the scratch.
[0066] Prior art (CN110779474B) provides a multi-point controlled positioning closed-type beam detection device for workpiece wear detection. Prior art (CN110095287B) provides a method for testing the inner surface friction and wear of a stator of a straight-vane variable displacement pump. Prior art (CN111366089B) provides an inner diameter measuring instrument and a wear detection method using the inner diameter measuring instrument. Prior art (CN101079303B) provides a circumferential scratch defect detection method and a disk inspection device. Prior art (CN115082481B) relates to the field of image data processing technology, specifically to an image enhancement method for gears. Existing technology (Zhong Weilin, Sun Zhilin, Ning Huanbo, et al. Application of 3D laser scanning technology in the detection of inner wall wear of port silos [J]. Waterway Ports, 2020, 41(02): 185-190.) Based on the large silo group of Huanghua Port, 3D laser scanning technology is used to propose point cloud reverse reconstruction of silo 3D model for the detection of inner wall wear of silos. Existing technology (Ren Yongtai, Wu Fangchen. Image detection method of wear area on the surface of machined parts [J]. Manufacturing Automation, 2022, 44(05): 196-200.) provides a method for detecting surface wear of machined parts by image using fuzzy neural network as technical support and combining artificial intelligence technology.
[0067] However, the above-mentioned existing technologies cannot solve the problems of difficulty in identifying scratches, abrasions, wear and tear, and elongated depression defects on the surface of petrochemical equipment and parts, differences in depth, depth and size of the occurrence area, nor can they solve the problem of overexposure of the defective area due to the measurement angle of ambient light, and cannot realize the identification of scratches, wear and tear, and elongated depression defects in the overexposed area.
[0068] To address the aforementioned shortcomings of existing technologies, the present invention combines multispectral and three-dimensional target detection to accurately identify scratches, abrasions, wear, and elongated depressions on the surfaces of petrochemical equipment and components, even in the presence of overexposure caused by ambient light and measurement angles. This invention proposes a quantitative identification and assessment method for scratches, abrasions, wear, and elongated depressions based on defect depth and defect orientation, and provides user feedback with images and numerical information.
[0069] Figure 1 A structural block diagram of a detection device for obtaining inner and outer wall crack defects according to an embodiment of the present invention is shown.
[0070] In one embodiment, Figure 1As shown, a detection device for detecting internal and external wall crack defects can accurately identify small crack defects among complex scratch defects and measure the extent of crack occurrence. The detection device includes an imaging module, a multispectral module, and a measurement and control module. The imaging module is used to capture images of the target object to be tested. The multispectral module has multi-band illumination capabilities, providing corresponding illumination spectra to the target object under different environments. The measurement and control module is connected to the imaging module to control the imaging module's acquisition process.
[0071] Figure 2 A schematic diagram showing the arrangement positions of an imaging module and a target object according to an embodiment of the present invention is shown.
[0072] like Figure 2 As shown, the imaging module includes two industrial cameras, wherein the angle between the two industrial cameras is:
[0073]
[0074] Where: α is the angle between the two industrial cameras; D is the distance between the industrial camera lens 4 and the target object; and L is the linear distance between the two industrial cameras. In the present invention, the imaging module includes two industrial cameras. By setting the angle between the two industrial cameras, the vertical and horizontal detection accuracy of the images produced by the two cameras are consistent, preventing missed detections.
[0075] Figure 3 FIG. 4 shows a schematic diagram of a multispectral module according to an embodiment of the present invention.
[0076] like Figure 3 As shown, the multispectral module includes a ring-shaped light source bracket 5 and a multi-band lighting unit. The ring-shaped light source bracket 5 is coaxially arranged with the industrial camera lens 4, and the multi-band lighting unit is mounted on the ring-shaped light source bracket 5. Specifically, the multi-band lighting unit is composed of red light-band lamp beads 1, blue light-band lamp beads 2, and green light-band lamp beads 3. The lamp beads in the same band are spaced 45° apart, while the lamp beads in different bands are spaced 15° apart. Furthermore, the red light-band lamp beads 1, blue light-band lamp beads 2, and green light-band lamp beads 3 are all ring-shaped light sources and are located in the same ring-shaped light source bracket 5.
[0077] In one embodiment, the multi-band lighting unit can use an LED white light source, the light source shape is still a ring light source, and a white light LED lamp bead is set every 45°. Specifically, a filter group is placed in front of the multi-band lighting unit, and the filter group has a bandpass characteristic, allowing the red light, green light and blue light bands after white light irradiation to pass through. Furthermore, the filter group has a rotational adjustable function, and it itself has 6 filter positions, each filter position is spaced 60° apart, and the filter and the filter group are detachably connected; after the filter is placed in the position, it is fixed by the external bayonet of the filter group.
[0078] In one embodiment, Figure 1 As shown, the detection device also includes: a multi-spectrum control module, which includes three buttons (P1, P2, P3), which are used to control the opening and closing of the red light band lamp bead 1, the blue light band lamp bead 2 and the green light band lamp bead 3 respectively.
[0079] In one embodiment, Figure 1 As shown, the measurement and control module is used to control the on / off of the imaging module and the multispectral module. The measurement and control module and the multispectral control module independently control the on / off of the multispectral module. Specifically, the measurement and control module are independent of each other. That is, if the ambient light is suitable (for example, daylight without glare), there is no need to activate the multispectral module for illumination. If the ambient light is dim or too bright, the multispectral module needs to be adjusted accordingly.
[0080] In one embodiment, the measurement control module's functions include: (a) controlling the opening and shooting of two industrial cameras; (b) controlling the opening and closing of the multispectral module; and (c) controlling the transmission of images captured by the two industrial cameras to an industrial computer at the data processing end. (a) and (b) are controlled separately and independently of each other.
[0081] Specifically, the measurement control module includes a control chip, an image processing chip, an FPGA chip, buttons, and input / output ports. The control chip is used to control the on / off of the industrial camera and multispectral module, similar to a simple single-chip microcomputer. The image processing chip is used in conjunction with the industrial camera. After the camera completes its capture, it transmits image information to the chip, which displays the image of the measured target. This serves as an image sensor, receiving only the raw image information. The FPGA chip, located in the industrial computer at the data processing end, processes the raw image received by the image processing chip. This processing includes image preprocessing, crack edge detection, crack enhancement, and crack identification. The buttons are used to turn on the industrial camera and multispectral module. There can be multiple buttons, such as key 1 controlling the camera and keys 2 through 4 controlling the on / off of the three wavelength band LEDs. Alternatively, there can be two buttons, such as key 1 controlling the camera and key 2 controlling spectrum 1 with one press, spectrum 2 with two presses, spectrum 3 with three presses, and spectrum 4 with four presses. The input port transmits the original image taken by the camera to the industrial computer at the data processing end, and the output port transmits the processed image to the user for storage.
[0082] In one embodiment, Figure 1 As shown, the detection device also includes a data processing terminal, which is used to process the image to be tested, identify crack defects in the target object, and calculate the crack defect depth. Specifically, the data processing terminal performs image preprocessing on the image to remove defect noise such as scratches and wear marks and enhance image contrast; uses image brightness binarization to enhance the crack edge and distinguish it from the background image; and uses least squares filtering to extract the brightness values of pixels around the defect, obtaining the maximum brightness value and the coordinates of the crack edge. The difference between the two is the crack defect depth.
[0083] In one embodiment, Figure 1 As shown, the detection device further includes: a signal transmission module, which is used to transmit the on and off status information of the multi-spectral module to the data processing end.
[0084] In one embodiment, Figure 1 As shown, the detection device also includes a power module for powering the imaging module, multispectral module, measurement and control module, and signal transmission module. Specifically, the power module is powered by an industrial computer at the data processing end. Furthermore, the power module is powered by a portable mobile battery module.
[0085] The present invention is based on a multi-light source spectral lighting method, which can illuminate the surface to be measured from a 360-degree angle to obtain clear images of scratches, wear, and slender depressions of inconsistent depths on the image acquisition device. It can also measure the depth value of the scratches, wear, and slender depression defects in the measured area and the area size of the defect.
[0086] According to another aspect of the present invention, a detection method for obtaining inner and outer wall crack defects is also provided, which is performed by a detection device for obtaining inner and outer wall crack defects.
[0087] Figure 4 A flowchart of the steps of a detection method for obtaining inner and outer wall crack defects according to an embodiment of the present invention is shown.
[0088] like Figure 4 As shown, in step S401, an image to be measured of a target object is acquired by an imaging module.
[0089] like Figure 4 As shown, in step S402, a multi-spectral module with multi-band lighting capability is used to provide corresponding lighting spectra to the target object under different environments.
[0090] like Figure 4 As shown, in step S403, the acquisition process of the imaging module is controlled by the measurement control module connected to the imaging module.
[0091] Figure 5 A flowchart showing the steps of crack defect identification and detection according to one embodiment of the present invention is shown.
[0092] like Figure 5 As shown, in step S501, according to the characteristics of the ambient light in which the target object is located, the multi-spectral module provides the target object with an illumination spectrum suitable for the current environment.
[0093] Specifically, step S501 is a spectrum adjustment method, which includes: when the measured surface of the target object is in a daylight environment, selecting the green light spectrum for illumination; when the measured surface of the target object is in a dark environment, selecting the red light spectrum for illumination; for the scene of crack depth detection, selecting the blue light spectrum for illumination.
[0094] like Figure 5 As shown, in step S502, the target object is photographed and imaged by using an imaging module to obtain an image to be measured.
[0095] Specifically, two cameras are used to capture and image the area to be tested of the target object to obtain an image to be tested.
[0096] like Figure 5 As shown, in step S503, image preprocessing, crack edge detection, crack enhancement, and crack recognition are performed on the image to be measured, and a crack defect image is obtained.
[0097] In one embodiment, in step S503, image preprocessing is performed through the following steps: accumulate the brightness values of all pixel points in the image to be measured, and calculate the average brightness value L after accumulation. avg ; assign a first weight value to the pixel points whose brightness values are greater than or equal to the average brightness value L avg ; assign a second weight value to the pixel points whose brightness values are less than the average brightness value L avg ; calculate the brightness weighted average value of all pixel points in the image to be measured through the following expression:
[0098]
[0099] where L wavg is the brightness weighted average value; A represents the first weight value, A > 1, and the second weight value is 1 / A; L h is the brightness value of the pixel points greater than or equal to the average brightness value; L l is the brightness value of the pixel points less than the average brightness value; N h is the number of pixel points greater than or equal to the average brightness value; N l is the number of pixel points less than the average brightness value.
[0100] In one embodiment, in step S503, crack edge detection is performed through the following steps: for the preprocessed image,剔除 the pixel points whose brightness values are less than the first threshold, where the first threshold is B×L wavg (0 < B < 1); for the image after剔除, calculate the brightness value gradient and its direction of each pixel point; traverse the entire image, find the pixel points whose brightness value gradients are greater than the second threshold according to the brightness value gradient direction, and connect these adjacent pixel points to form a continuous edge line, which is recorded as the crack edge, where the second threshold is C (C > 1).
[0101] In one embodiment, in step S503, crack enhancement is performed through the following steps: use the brightness value enhancement coefficient to enhance the pixel points on the crack edge and the pixel points within the crack edge whose brightness values are greater than or equal to the brightness weighted average value, where the second threshold C is used as the brightness value enhancement coefficient.
[0102] In one embodiment, in step S503, crack recognition is performed through the following steps: for the image after crack enhancement, identify the area composed of pixel points whose brightness values are greater than or equal to the third threshold, and record it as the crack defect image, where the third threshold is C×L wavg .
[0103] like Figure 5 As shown, in step S504, based on the crack defect image, the two-dimensional size of the crack is measured and the crack opening length value is calculated.
[0104] In one embodiment, in step S504, the two-dimensional size of the crack is measured by the following steps: based on the crack defect image, the minimum circumscribed rectangle of the crack to be measured is selected; and the length of the long side of the minimum circumscribed rectangle is recorded as the crack opening length value.
[0105] like Figure 5 As shown, in step S505, three-dimensional crack depth measurement is performed based on the crack defect image, depth calculation is performed on all pixels in the crack defect image, and a crack depth map is generated according to the depth calculation result.
[0106] In one embodiment, in step S505, the crack defect depth is calculated using the following expression:
[0107]
[0108] Wherein, Δd is the crack defect depth; l is the crack opening length value of the crack defect in the image captured by the first industrial camera, f is the focal length of the industrial camera, e is the distance between the pixel position of the crack defect in the image captured by the second industrial camera and the camera optical axis, and r represents the distance between the pixel position of the defect in the image to be tested and the camera optical axis.
[0109] In one embodiment, in steps S504-S505, the crack depth is measured by the following steps:
[0110] S1. Acquisition of test image data: using two cameras to acquire the test image;
[0111] S2. Processing of the image to be tested: performing preprocessing, crack edge detection processing, crack enhancement processing, and crack identification processing on the image to be tested to obtain a crack defect image;
[0112] S3. Two-dimensional crack size measurement: Based on the crack edge, select the minimum circumscribed rectangle of the crack to be measured; the length of the long side of the minimum circumscribed rectangle is defined as the crack opening length value;
[0113] S4. Three-dimensional crack depth measurement: Using an imaging module, obtain two images to be measured using two cameras, and transmit the shooting parameters, light source positions, and shooting angles of the two cameras to the data processing end through an information transmission module. The images to be measured taken by the two cameras should both contain the edge of the crack to be measured.
[0114] S5. Perform depth calculation on all pixel points in the crack area to be measured, obtain the depth calculation results, and generate a crack depth map based on the depth values.
[0115] In existing technologies, traditional manual inspection methods are commonly used to detect equipment crack defects. These methods have low detection accuracy, poor real-time performance, and are prone to fatigue among inspectors, as well as being highly subjective. Furthermore, existing detection methods using machine vision rely solely on abnormal characterization to detect surface defects and identify them. These methods are unable to effectively distinguish between scratches and cracks, as their characterizations are similar, resulting in low recognition accuracy. Cracks seriously affect the appearance and operational quality of equipment, while ordinary abrasions only partially affect the appearance of the equipment and have no significant impact on its operation. Therefore, effective identification of crack defects is necessary to provide feedback to the enterprise regarding these defects.
[0116] The present invention can solve the problem of difficulty in identifying scratches, abrasions, wear, and elongated depressions on the surface of petrochemical equipment and components. The present invention addresses the problem of traditional methods being unable to detect defects of varying depths, addressing the varying depths of scratches, abrasions, wear, and elongated depressions.
[0117] The present invention can identify some cracks that are thin and long in appearance and have a certain depth. During the identification process, the interference of shallow defects such as wear and scratches can be eliminated, and cracks and other shallow defects can be distinguished based on the depth, and the crack depth can also be calculated.
[0118] The present invention solves the problem of overexposure caused by the measurement angle of the defective area due to ambient light, and can identify scratches, abrasions, and elongated depressions within the overexposed area. The present invention solves the problem that existing technologies cannot accurately measure the depth and size of scratches, abrasions, abrasions, and elongated depressions.
[0119] The present invention can be widely used in defect identification and detection of equipment in the petroleum and chemical fields. It can overcome the interference of complex ambient light in petrochemical industry scenarios and effectively improve the accuracy of defect identification and detection efficiency.
[0120] The detection method and apparatus for detecting internal and external wall crack defects provided by the present invention may also be used in conjunction with a computer-readable storage medium having a computer program stored thereon. The computer program is executed to implement the detection method for detecting internal and external wall crack defects. The computer program is capable of executing computer instructions, which include computer program code. The computer program code may be in source code form, object code form, executable file, or some intermediate form.
[0121] Computer-readable storage media may include: any entity or device that can carry computer program code, recording media, USB flash drives, mobile hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0122] It should be noted that the content contained in computer-readable storage media can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media do not include electrical carrier signals and telecommunications signals.
[0123] In one embodiment, the outer surface of the target object is placed under outdoor ambient light, and a green light spectrum is selected as the illumination; under the green light ring illumination, the camera captures the surface area of the target object; the image to be measured is preprocessed, and the brightness values of all pixels in the image to be measured are accumulated, and the average brightness value L is calculated after the accumulation. avg ; For brightness values greater than or equal to the average value L avg The pixel points with brightness greater than or equal to the average value L are given a weight of 3; avg The pixel points are assigned a weight of 1 / 3; the weighted average value L of the brightness of all pixels in the image to be tested is calculated. wavg ; Detect crack edges, for pre-processed images, the brightness value is less than Pixels are eliminated; for the image after elimination, the brightness gradient and its direction of each pixel are calculated; the entire image to be tested is traversed, and according to the brightness gradient direction, pixels with a brightness gradient greater than a threshold value C (C>1) are found, and these adjacent pixels are connected to form a continuous edge line to obtain the crack edge; for edge pixels and pixels with brightness values greater than or equal to L wavg The pixel points are enhanced, and the enhancement coefficient of the brightness value is C; the brightness value after processing in the area to be tested is greater than or equal to C×L wavg The area composed of pixels is the crack; based on the crack edge, the minimum circumscribed rectangle of the crack to be measured is selected; the length of the long side of the minimum circumscribed rectangle is defined as the crack opening length value, that is, the two-dimensional size measurement of the crack is realized; the imaging module is used to obtain the images taken by the two cameras respectively, and the shooting parameters, light source position and shooting angle of the two cameras are transmitted to the data processing module through the information transmission module. The images taken by the two cameras should contain the edge of the crack to be measured; the crack depth is The depth of all pixels in the crack area to be tested is calculated, and the depth calculation results are obtained, and a crack depth map is generated based on the depth values.
[0124] In one embodiment, the outer surface of the target object is placed in a dark environment, and the red light spectrum is selected as the illumination; under the red light ring illumination, the camera captures the surface area of the target object; the image to be measured is preprocessed, and the brightness values of all pixels in the image to be measured are accumulated, and the average value L of the brightness value is calculated after the accumulation. avg ; For brightness values greater than or equal to the average value L avg The pixel points with brightness greater than or equal to the average value L are given a weight of 10; avg The pixel points are assigned a weight of 1 / 10; the weighted average value L of the brightness values of all pixels in the image to be tested is calculated. wavg ; Detect crack edges, for pre-processed images, the brightness value is less than Pixels are eliminated; for the image after elimination, the brightness gradient and its direction of each pixel are calculated; the entire image to be tested is traversed, and according to the brightness gradient direction, pixels with a brightness gradient greater than a threshold value C (C>1) are found, and these adjacent pixels are connected to form a continuous edge line to obtain the crack edge; for edge pixels and pixels with brightness values greater than or equal to L wavg The pixel points are enhanced, and the enhancement coefficient of the brightness value is C; the brightness value after processing in the area to be tested is greater than or equal to C×L wavg The area composed of pixels is the crack; based on the crack edge, the minimum circumscribed rectangle of the crack to be measured is selected; the length of the long side of the minimum circumscribed rectangle is defined as the crack opening length value, that is, the two-dimensional size measurement of the crack is realized; the imaging module is used to obtain the images taken by the two cameras respectively, and the shooting parameters, light source position and shooting angle of the two cameras are transmitted to the data processing module through the information transmission module. The images taken by the two cameras should contain the edge of the crack to be measured; the crack depth is The depth of all pixels in the crack area to be tested is calculated, and the depth calculation results are obtained, and a crack depth map is generated based on the depth values.
[0125] In summary, the present invention provides a method and device for detecting inner and outer wall crack defects, which has the following advantages over the prior art:
[0126] The present invention is beneficial for identifying the types of scratches and crack defects on the surface of petrochemical equipment and parts. The present invention is beneficial for overcoming the problem of differences in the depth of scratches and crack defects, and is suitable for detecting defects of different depths. The present invention is beneficial for overcoming the difficulty in identifying scratches and crack defects in the exposed area, and realizes the function of defect identification and measurement in the overexposed area. The present invention is beneficial for accurately measuring the depth of scratches and crack defects and the size of the occurrence area. The present invention can identify some cracks that are thin and long in appearance and have a certain depth; in the identification process, it can eliminate the interference of shallow defects such as wear and scratches, distinguish cracks from other shallow defects based on the depth, and can also calculate the crack depth.
[0127] It should be understood that the embodiments disclosed herein are not limited to the specific structures, processing steps, or materials disclosed herein, but should extend to equivalent substitutions of these features understood by those skilled in the relevant art. It should also be understood that the terminology used herein is for the purpose of describing specific embodiments only and is not intended to be limiting.
[0128] In the description of the present invention, unless otherwise specified, "plurality" means two or more; terms such as "upper," "lower," "left," "right," "inner," "outer," "front end," "rear end," "head," and "tail" indicate positions or relationships based on those shown in the accompanying drawings. These terms are intended solely to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, terms such as "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0129] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "connected" and "connection" should be understood in a broad sense. For example, they can refer to fixed connection, detachable connection, or integral connection; mechanical connection, electrical connection; direct connection, or indirect connection through an intermediary. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0130] Certain terms are used throughout this application document to indicate specific system components. As will be appreciated by those skilled in the art, different names may be used to indicate the same component, and thus this application document is not intended to distinguish between components that are only different in name but not in function. In this application document, the terms "comprise," "include," and "have" are used in an open format and should therefore be interpreted as meaning "including, but not limited to...". In addition, the terms "substantially," "substantially," or "approximately" that may be used herein refer to industry-accepted tolerances for the corresponding terms. The term "coupling," as used herein, includes direct coupling and indirect coupling via another component, element, circuit, or module, wherein for indirect coupling, the intervening component, element, circuit, or module does not change the information of the signal but can adjust its current level, voltage level, and / or power level. Inferred coupling (e.g., one element is coupled to another element by inference) includes direct and indirect coupling between two elements in the same manner as "coupling."
[0131] References in this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Therefore, appearances of the phrases "one embodiment" or "an embodiment" in various places throughout this specification do not necessarily refer to the same embodiment.
[0132] The embodiments of the present invention are presented for purposes of illustration and description and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those skilled in the art. The embodiments are chosen and described in order to better illustrate the principles of the invention and its practical application and to enable those skilled in the art to understand the invention and design various embodiments with various modifications as suited for specific applications.
[0133] Although the embodiments disclosed herein are as described above, the contents described herein are merely embodiments for facilitating understanding of the present invention and are not intended to limit the present invention. Any person skilled in the art of the present invention may make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed herein. However, the scope of patent protection of the present invention shall still be subject to the scope defined by the appended claims.
Claims
1. A method for detecting inner and outer wall crack defects, characterized in that: The method is performed by a detection device for obtaining inner and outer wall crack defects, the device comprising an imaging module, a multispectral module, and a measurement control module, and the method comprises: According to the characteristics of the ambient light in which the target object is located, the multi-spectral module with multi-band lighting capabilities provides the target object with a lighting spectrum suitable for the current environment; Using the imaging module to photograph the target object to obtain an image to be measured; Controlling the acquisition process of the imaging module through the measurement control module connected to the imaging module; Performing image preprocessing, crack edge detection processing, crack enhancement processing, and crack identification processing on the image to be tested to obtain a crack defect image; Based on the crack defect image, two-dimensional crack size measurement is performed to calculate the crack opening length value; Based on the crack defect image, performing depth calculation on all pixel points in the crack defect image, and generating a crack depth map according to the depth calculation result; The image is preprocessed by the following steps: accumulating the brightness values of all pixels in the image to be measured and calculating the brightness average after the accumulation; assigning a first weight value to pixels whose brightness values are greater than or equal to the brightness average; Assigning a second weight value to pixel points whose brightness values are less than the brightness average; The weighted average brightness of all pixels in the image to be tested is calculated using the following expression: The crack defect depth is calculated using the following expression: Among them, L wavg is the weighted average value of brightness; A represents the first weight value, A>1, and the second weight value is 1 / A; L h is the brightness value of the pixel that is greater than or equal to the average brightness; L l is the brightness value of the pixel that is less than the average brightness; N h is the number of pixels with brightness greater than or equal to the average value; N l is the number of pixels with brightness less than the average value; Δd is the depth of the crack defect; l is the crack opening length of the crack defect in the image captured by the first industrial camera, f is the focal length of the industrial camera, e is the distance between the pixel position of the crack defect in the image captured by the second industrial camera and the camera optical axis, and r represents the distance between the pixel position of the defect in the image to be tested and the camera optical axis.
2. A detection method for obtaining inner and outer wall crack defects according to claim 1, characterized in that: The imaging module includes two industrial cameras, wherein the angle between the two industrial cameras is: Where: α is the angle between the two industrial cameras; D is the distance between the industrial camera lens and the target object; L is the straight-line distance between the two industrial cameras.
3. A detection method for obtaining inner and outer wall crack defects according to claim 2, characterized in that: The multi-spectral module includes: an annular light source bracket and a multi-band lighting unit, wherein the annular light source bracket is coaxially arranged with the lens of the industrial camera, and the multi-band lighting unit is arranged on the annular light source bracket.
4. A detection method for obtaining inner and outer wall crack defects according to claim 3, characterized in that: The multi-band lighting unit is composed of red light band lamp beads, blue light band lamp beads and green light band lamp beads, wherein the lamp beads in the same band are spaced 45 degrees apart, and the lamp beads in different bands are spaced 15 degrees apart.
5. A detection method for obtaining inner and outer wall crack defects according to claim 4, characterized in that: The device also includes: a multi-spectrum control module, which includes three buttons, which are used to control the opening and closing of the red light band lamp beads, the blue light band lamp beads and the green light band lamp beads respectively.
6. A detection method for obtaining inner and outer wall crack defects according to claim 5, characterized in that: The measurement control module is used to control the opening and closing of the imaging module and the multispectral module, wherein the measurement control module and the multispectral control module independently control the opening and closing of the multispectral module.
7. A method for detecting inner and outer wall crack defects according to any one of claims 1 to 6, characterized in that: The device further comprises: a data processing end, which is used to perform data processing on the image to be measured, identify crack defects of the target object, and calculate the depth of the crack defects.
8. A detection method for obtaining inner and outer wall crack defects according to claim 7, characterized in that: The device further comprises: a signal transmission module, which is used to transmit the on and off status information of the multi-spectral module to the data processing end.
9. A detection method for obtaining inner and outer wall crack defects according to claim 8, characterized in that: The device further comprises: a power supply module, which is used to supply power to the imaging module, the multi-spectral module, the measurement control module, and the signal transmission module.
10. The method for detecting inner and outer wall crack defects according to claim 1, wherein: The crack edge detection process is performed through the following steps: For the pre-processed image, pixels with brightness values less than a first threshold are removed, where the first threshold is B×L wavg (0 <B<1); For the image after culling, calculate the brightness gradient and direction of each pixel; Traverse the entire image and find pixels whose brightness gradient is greater than the second threshold according to the brightness gradient direction. Connect these adjacent pixels to form a continuous edge line, which is recorded as the crack edge. The second threshold is C (C>1).
11. A detection method for obtaining inner and outer wall crack defects according to claim 10, characterized in that: Crack enhancement processing is performed through the following steps: using the brightness value enhancement coefficient, the pixel points on the crack edge and the pixel points within the crack edge whose brightness values are greater than or equal to the brightness weighted average are enhanced, wherein the second threshold is used as the brightness value enhancement coefficient.
12. A detection method for obtaining inner and outer wall crack defects according to claim 11, characterized in that: The crack recognition process is performed by the following steps: for the crack enhanced image, the area composed of pixels with brightness values greater than or equal to the third threshold is identified and recorded as the crack defect image, wherein the third threshold is C×L wavg .
13. A method for detecting inner and outer wall crack defects according to any one of claims 10 to 12, characterized in that: The two-dimensional size of the crack is measured by the following steps: based on the crack defect image, the minimum circumscribed rectangle of the crack to be measured is selected; and the length of the long side of the minimum circumscribed rectangle is recorded as the crack opening length value.
14. A storage medium, characterized in that It contains a series of instructions for executing the method steps according to any one of claims 1-13.
Citation Information
Patent Citations
Method of detecting scratch defect in circumferential direction and magnetic disk detecting device
CN101079303B
Test method for friction and wear of the inner surface of the stator of a straight vane variable pump
CN110095287B
A multi-point control and positioning enclosed beam inspection device for workpiece wear detection
CN110779474B
Internal diameter measuring instrument and method for detecting wear on the internal diameter of a hole.
CN111366089B
Methods, devices and terminal equipment for measuring wheel scratch length
CN112298273B