Detection method and device for acquiring crack defects of inner and outer walls
Through the multi-spectrum combined with three-dimensional object detection method, the problem of surface defect identification and quantitative evaluation of petrochemical equipment and parts is solved, and the precise identification and measurement of scratches, abrasions, wear, and slender depression defects are achieved, and the overexposure problems caused by ambient light and measurement angles are overcome.
Patent Information
- Application Number
- CN202311165385.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2043-09-11
AI Technical Summary
The prior art is difficult to effectively identify and quantitatively evaluate the scratches, abrasions, wear, and slender depression defects on the surface of petrochemical equipment and parts. Especially in the case of overexposure caused by ambient light and measurement angles, defects in the overexposure area cannot be accurately identified.
Using a multi-spectrum combined with three-dimensional object detection method, images are collected through multi-band illumination and imaging modules, image pre-processing, crack edge detection, enhancement processing and identification processing are carried out to generate crack defect images, and two-dimensional dimension measurement and three-dimensional depth measurement are performed.
It realizes accurate identification and quantitative evaluation of scratches, abrasions, wears, and slender depression defects on the surface of petrochemical equipment and parts, overcomes the problems of depth differences and overexposure, and improves the accuracy and detection efficiency of defect identification.
Smart Images

Figure CN119595635A_ABST
Abstract
Description
Technical Field
[0001] The 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, and specifically to a detection method and device for obtaining inner and outer wall crack defects. Background Art
[0002] Due to material corrosion, friction and uncontrollable reasons in the manufacturing process, the surface of objects is prone to deformation and falling off, so it is necessary to regularly inspect the surface of objects. In particular, for some parts, it is necessary to make defect inspections on the inner and outer surfaces of the cylinder to meet the needs of the equipment. Defect inspection refers to the inspection of defects on the surface of objects, such as bulges, pits, scratches, etc. Defect inspection on the surface of objects is of great significance to the safety of the production process and to avoid economic losses.
[0003] For scratch defects, defect inspection is generally carried out through machine vision. However, the traditional image enhancement method in machine vision has poor enhancement effect on scratch images and is not targeted, which is not conducive to the subsequent use of image analysis to identify and analyze defects in the image. In addition, the existing machine vision detection methods only rely on abnormal representations to detect whether there are defects on the surface for identification. It is impossible to effectively distinguish between dent defects and abrasion defects, because the representations of dents and abrasions are relatively similar, resulting in low recognition accuracy. Indents seriously affect the appearance and use quality of metal equipment, while ordinary abrasions only have a partial impact on the appearance of metal equipment and have no significant impact on the use quality. 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 dent and scratch areas are special highlight features, which cannot effectively distinguish the two defects.
[0005] In the detection project, there is also the problem of differences in 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, the 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 view of the problems in the prior art, the present invention provides a detection method and device for obtaining inner and outer wall crack defects. Summary of the invention
[0008] In view of 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 tested;
[0010] Multi-spectral module, which has multi-band lighting capability 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 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.
[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, which are 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 an embodiment of the present invention, the measurement control module is used to control the opening and closing of the imaging module and the multi-spectral module, wherein the measurement control module and the multi-spectral control module independently control the opening and closing of the multi-spectral module.
[0019] According to an embodiment of the present invention, the device further comprises: a data processing end, which is used to perform data processing on the image to be tested, 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 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.
[0022] According to another aspect of the present invention, there is also provided a detection method for obtaining inner and outer wall crack defects, which is performed by a device as described in any one of the above items, and the method comprises:
[0023] Acquire an image of the target object to be tested by the imaging module;
[0024] Providing corresponding lighting spectra to target objects in different environments through the multi-spectral module having 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 tested;
[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 by 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 N is the number of pixels with brightness greater than or equal to the average value; 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 preprocessed image, pixels whose brightness value is less than a first threshold are removed, where the first threshold is B×L wavg (0 <B<1);
[0041] For the image after elimination, calculate the brightness value gradient and its direction of each pixel;
[0042] Traverse the entire image, find the pixel points whose brightness gradient is greater than the second threshold according to the brightness 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).
[0043] According to one embodiment of the present invention, crack enhancement processing is performed through the following steps: using a brightness value enhancement coefficient, pixels at the crack edge and pixels 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 an 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] Among them, Δd is the depth of the crack defect; l is the crack opening length value of the crack defect in the image taken 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 taken 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 as described in any one of the above.
[0050] The present invention provides a detection method and device for obtaining inner and outer wall crack defects, which has the following advantages compared with the prior art:
[0051] The present invention is useful for identifying the types of scratches and crack defects on the surface of petrochemical equipment and parts. The present invention is useful for overcoming the problem of differences in the depth of scratches and crack defects, and is suitable for defect detection of different depths. The present invention is useful for overcoming the difficulty of identifying scratches and crack defects in the exposure area, and realizing the function of defect identification and measurement in the overexposed area. The present invention is useful for accurately measuring the depth of scratches and crack defects and the size of the area where they occur. The present invention can identify some cracks that are thin and long in appearance and have a certain depth; in 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.
[0052] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose 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 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;
[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 multi-spectral module according to an 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 an embodiment of the present invention is shown;
[0058] Figure 5 A flowchart of the steps of crack defect identification and detection according to an embodiment of the present invention is shown.
[0059] In the accompanying drawings, the same reference numerals are used for the same components. 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, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
[0062] The prior art (CN115266735B) provides a metal sheet surface defect detection system and a detection method thereof, including: the detection system includes an acquisition end, including an image acquisition system and a composite light source system; the composite light source system includes a plurality of light source chambers; a white diffuse reflection light source and a semi-transparent semi-reflective mirror with a predetermined inclination are arranged in the light source chamber; a part of the light from the white diffuse reflection light source is parallelly emitted to the surface of the plate to be detected through the semi-transparent semi-reflective mirror, and the semi-transparent semi-reflective mirror emits the light parallel to the main optical axis of the camera corresponding to the light source chamber into the camera; another part of the light from the white diffuse reflection light source is obliquely emitted to the plate surface and passes through the semi-transparent semi-reflective mirror into the camera corresponding to the light source chamber. However, the prior art cannot accurately use the change in contrast to quantitatively analyze the depth of the defect.
[0063] The prior art (CN115330769B) relates to the field of data processing technology, and specifically to a defect detection method for scratches and dents on the surface of aluminum tubes. The method is a method for using electronic equipment for identification, and uses an artificial intelligence system in the production field to complete the defect detection of scratches and dents on the surface of aluminum tubes. The method first identifies the surface image of the aluminum tube through an electronic camera, performs correction processing to obtain a corrected image; performs data processing on the corrected image to determine whether there are local defects in the surface image of the aluminum tube; and further, determines the dent defects and scratch defects. However, the prior art adopts a fixed method and cannot be used in industrial production sites with complex environments.
[0064] The prior art (CN114998337B) provides a scratch detection method, device, equipment and storage medium, including: obtaining multiple keycap images, the 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; for the scratch adaptive anchor frame, determine the size of the second border of the scratch; determine multiple detection frames according to the size of the second borders of all scratches; perform data enhancement on all keycap images to obtain a standard keycap image; perform feature extraction and fusion on the standard keycap image to obtain a feature fusion map corresponding to the detection frame; based on the detection frame, perform scratch prediction on the feature fusion map through a detection model to obtain a prediction result; optimize the detection model 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; perform scratch detection on the keycap image to be identified through the target detection model to obtain a detection result. However, this existing technology requires that the surface to be tested that contains scratches be marked in advance, and the scratched surface needs to 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 detected in industrial sites.
[0065] The prior art (CN112298273B) is applicable to the field of wheel scratch measurement technology, and provides a wheel scratch length measurement method, device and terminal equipment, the method comprising: obtaining the axle box vibration acceleration signal and noise signal corresponding to the wheel; processing the axle box vibration acceleration signal according to the noise signal to obtain the scratch vibration signal; performing continuous wavelet transform on the scratch vibration signal to obtain the 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 according to the continuous wavelet transform coefficient modulus maximum sequence; and calculating the wheel scratch length according to the mutation time difference. However, the prior art cannot directly obtain the degree of scratch.
[0066] Prior art (CN110779474B) provides a multi-point control positioning closed 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, and specifically to an image enhancement method for gears. Existing technology (Zhong Weilin, Sun Zhilin, Ning Huanbo, etc. 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 silo inner wall wear detection. Existing technology (Ren Yongtai, Wu Fangchen. Image detection method of surface wear area of machined parts [J]. Manufacturing Automation, 2022, 44(05): 196-200.) provides a method for surface wear image detection of machined parts with fuzzy neural network as technical support and combined with artificial intelligence technology.
[0067] However, the above-mentioned existing technologies cannot solve the problems of difficult identification of 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, and cannot 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] In view of the above-mentioned defects of the prior art, the present invention adopts a method of combining multi-spectral with three-dimensional target detection to achieve accurate identification of scratches, abrasions, wear and thin and long depression defects on the surface of petrochemical equipment and parts under the condition of overexposure caused by ambient light and measurement angle. The present invention proposes a quantitative identification and evaluation method for scratches, abrasions, wear and thin and long depression defects based on the defect depth and the degree of stray defect direction, and provides image and numerical information feedback to the user.
[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 obtaining inner and outer wall crack defects can accurately identify tiny crack defects among messy scratch defects and can detect the degree of crack occurrence. The detection device includes: an imaging module, a multi-spectral module, and a measurement control module. Among them, the imaging module is used to acquire the image to be tested of the target object. The multi-spectral module has multi-band lighting capabilities and is used to provide corresponding lighting spectra to the target object under different environments. The measurement control module is connected to the imaging module and is used to control the acquisition process of the imaging module.
[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] Wherein: α is the angle between the two industrial cameras; D is the distance between the industrial camera lens 4 and the target object; L is the straight-line distance between the two industrial cameras. In the present invention, the imaging module includes two industrial cameras, and the angle between the two industrial cameras is set so that the longitudinal and lateral detection accuracy of the images formed by the two cameras are consistent, and no missed detection occurs.
[0075] Figure 3 A schematic diagram of a multi-spectral module according to an embodiment of the present invention is shown.
[0076] like Figure 3 As shown, the multi-spectral module includes: an annular light source bracket 5 and a multi-band lighting unit, wherein the annular light source bracket 5 is coaxially arranged with the lens 4 of the industrial camera, and the multi-band lighting unit is arranged on the annular 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, wherein the interval between lamp beads in the same band is 45°, and the interval between lamp beads in different bands is 15°. Furthermore, the red light band lamp beads 1, the blue light band lamp beads 2, and the green light band lamp beads 3 are all annular light sources, and are located in the same annular light source bracket 5.
[0077] In one embodiment, the multi-band lighting unit can use an LED white light source, the shape of the light source 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 to pass through after white light irradiation. Furthermore, the filter group has a rotationally 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 control module is used to control the opening and closing of the imaging module and the multi-spectral module, wherein the measurement control module and the multi-spectral control module independently control the opening and closing of the multi-spectral module. Specifically, the measurement control module and the multi-spectral control module are independent of each other, that is, if the ambient light is suitable (such as daylight and the sunlight is not glaring), there is no need to turn on the multi-spectral module for lighting; if the ambient light is dim or too bright, the multi-spectral module needs to be adjusted according to the ambient light.
[0080] In one embodiment, the measurement control module 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 the images taken by the two industrial cameras to the 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 chip, an FPGA chip, a button, and an input / output port. Among them, the control chip is used to control the opening and closing of the industrial camera and the multi-spectral module, which is similar to a simple single-chip microcomputer. The image chip is used in conjunction with the industrial camera. After the industrial camera shoots, the image information is transmitted to the chip to present the image information of the measured target, which is equivalent to the role of the image sensor, and the original image information is received. The FPGA chip is set in the industrial computer at the data processing end to process the original image received by the image chip. The processing specifically includes: image preprocessing, crack edge detection processing, crack enhancement processing, and crack identification. The purpose of the button is to turn on the industrial camera and the multi-spectral module. The number of buttons can be multiple, such as key 1 controls the camera, and keys 2 to 4 control the opening and closing of three bands of lamp beads; the number of keys can also be 2, such as key 1 controls the camera, key 2 controls spectrum 1 by pressing once, controls spectrum 2 by pressing twice, controls spectrum 3 by pressing 3 times, and turns off the spectrum by pressing 4 times. The input port in the input and output ports 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 end, which is used to process the image to be tested, identify the crack defects of the target object, and calculate the depth of the crack defect. Specifically, the data processing end performs image preprocessing on the image to be tested, removes defect noise such as scratches and wear marks, and enhances the image contrast; uses image brightness binarization processing to enhance the crack edge and distinguish it from the background image; uses the least squares filter to extract the brightness value of the pixels around the defect, obtains the maximum brightness and the coordinates of the crack edge, and the difference between the two is the crack defect depth.
[0083] In one embodiment, Figure 1 As shown, the detection device also 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, which is used to power the imaging module, the multi-spectral module, the measurement control module, and the 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 satisfies the requirement of illuminating the surface to be measured from a 360-degree angle so as to obtain clear images of scratches, wear and tear, and elongated depressions of inconsistent depths on an image acquisition device. It can also measure the occurrence depth values of scratches, wear and tear, and elongated depression defects in the measured area and the area size of the defective region.
[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 tested 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 in 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 of the steps of crack defect identification and detection according to an 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, a lighting spectrum suitable for the current environment is provided to the target object through a multi-spectral module.
[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 tested.
[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 processing, crack enhancement processing, and crack recognition processing 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: the brightness values of all pixel points in the image to be measured are accumulated, and the average brightness value L is calculated after the accumulation. avg ; pixel points with brightness values greater than or equal to the average brightness value L avg are assigned a first weight value; pixel points with brightness values less than the average brightness value L avg are assigned a second weight value; the brightness weighted average value of all pixel points in the image to be measured is calculated 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 pixel points greater than or equal to the average brightness value; L l is the brightness value of 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 processing is performed through the following steps: for the preprocessed image, pixel points with brightness values less than the first threshold are removed, where the first threshold is B×L wavg (0 < B < 1); for the image after removal, the brightness value gradient and its direction of each pixel point are calculated; the entire image is traversed, and according to the brightness value gradient direction, pixel points with brightness value gradients greater than the second threshold are found, and these pixel points are connected adjacent to each other 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 processing is performed through the following steps: using the brightness value enhancement coefficient, pixel points on the crack edge and pixel points with brightness values greater than or equal to the brightness weighted average value within the crack edge are enhanced, where the second threshold C is used as the brightness value enhancement coefficient.
[0102] In one embodiment, in step S503, crack recognition processing is performed through the following steps: for the image after crack enhancement, the region composed of pixel points with brightness values greater than or equal to the third threshold is recognized and recorded 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, based on the crack defect image, the three-dimensional depth of the crack is measured, the depth of all pixels in the crack defect image is calculated, 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 by the following expression:
[0107]
[0108] Among them, Δd is the depth of the crack defect; l is the crack opening length value of the crack defect in the image taken 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 taken 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 step S504-step 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: preprocessing, crack edge detection, crack enhancement, and crack identification of 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, two images to be tested are obtained by taking two cameras respectively, and the shooting parameters, light source positions, and shooting angles of the two cameras are transmitted to the data processing end through an information transmission module, wherein the images to be tested taken by the two cameras should contain the edges of the cracks to be tested;
[0114] S5. Perform depth calculation on all pixel points in the crack area to be tested, obtain the depth calculation result, and generate a crack depth map according to the depth value.
[0115] In the prior art, the common equipment crack defect detection is the traditional manual detection method, which has low detection accuracy and poor real-time performance. The detection workers are very prone to fatigue and are too subjective. In addition, there are detection methods based on machine vision in the prior art, which only rely on abnormal representation to detect whether there are defects on the surface for identification. It is impossible to effectively distinguish scratches from cracks because the representations of the two are similar, resulting in low recognition accuracy. Cracks seriously affect the appearance and operation quality of the equipment. Ordinary scratches only have a partial impact on the appearance of the equipment and have no significant impact on the operation. Therefore, it is necessary to effectively identify crack defects so that the defect information can be fed back to the enterprise.
[0116] The present invention can solve the problem that scratches, abrasions, wear and thin long depressions on the surface of petrochemical equipment and parts are difficult to identify. In view of the problem that scratches, abrasions, wear and thin long depressions have different depths, the present invention solves the problem that traditional methods are difficult to detect defects of different depths.
[0117] The present invention can identify some cracks that are thin and long in appearance and have a certain depth; during the identification process, interference from shallow defects such as wear and scratches can be eliminated, 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 under the ambient light, and realizes the problem of identifying scratches, abrasions, and elongated concave defects in the overexposure area. The present invention solves the problem that the prior art cannot accurately measure the depth and size of scratches, abrasions, abrasions, and elongated concave defects.
[0119] The present invention can be widely used in defect identification and detection of equipment in the petroleum and chemical fields, can overcome the interference of complex ambient light in petrochemical industry scenes, and effectively improve the accuracy of defect identification and detection efficiency.
[0120] The detection method and device for obtaining inner and outer wall crack defects provided by the present invention can also be used in conjunction with a computer-readable storage medium, on which a computer program is stored, and the computer program is executed to run a detection method for obtaining inner and outer wall crack defects. The computer program can run computer instructions, and the computer instructions include computer program codes, which can be in source code form, object code form, executable file or some intermediate form, etc.
[0121] Computer-readable storage media may include: any entity or device that can carry computer program code, recording media, USB flash drives, mobile hard disks, 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 based on the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, based on 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 located under outdoor ambient light, and a green light spectrum is selected as the illumination; under the green light ring illumination, the camera photographs the surface area of the target object; image preprocessing is performed on the image to be tested, and the brightness values of all pixel points in the image to be tested 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 values 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 preprocessed images, the brightness value is less than Pixels are removed; for the removed image, 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 whose brightness gradient is greater than the threshold 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 edge 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 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 according to the depth values.
[0124] In one embodiment, the outer surface of the target object is located in a dark light environment, and the red light spectrum is selected as the illumination; under the red light ring illumination, the camera photographs the surface area of the target object; the image to be tested is preprocessed, and the brightness values of all pixels in the image to be tested 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 values 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 preprocessed images, the brightness value is less than Pixels are removed; for the removed image, 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 whose brightness gradient is greater than the threshold 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 edge 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 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 according to the depth values.
[0125] In summary, the present invention provides a detection method and device for obtaining inner and outer wall crack defects, which has the following advantages compared with the prior art:
[0126] The present invention is useful for identifying the types of scratches and crack defects on the surface of petrochemical equipment and parts. The present invention is useful for overcoming the problem of differences in the depth of scratches and crack defects, and is suitable for defect detection of different depths. The present invention is useful for overcoming the difficulty of identifying scratches and crack defects in the exposure area, and realizing the function of defect identification and measurement in the overexposed area. The present invention is useful for accurately measuring the depth of scratches and crack defects and the size of the area where they occur. The present invention can identify some cracks that are thin and long in appearance and have a certain depth; in 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.
[0127] It should be understood that the embodiments disclosed in the present invention are not limited to the specific structures, processing steps or materials disclosed herein, but should be extended to equivalent substitutions of these features understood by ordinary technicians in the relevant field. It should also be understood that the terms used herein are only used for the purpose of describing specific embodiments and are not meant to be limiting.
[0128] In the description of the present invention, unless otherwise specified, "plurality" means two or more than two; the orientations or positional relationships indicated by the terms "upper", "lower", "left", "right", "inner", "outer", "front end", "rear end", "head", "tail", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0129] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0130] Certain terms are used throughout this application document to indicate specific system components. As those skilled in the art will recognize, different names can usually be used to indicate the same components, so this application document is not intended to distinguish those 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 form, and therefore should be interpreted as meaning "including but not limited to...". In addition, the terms "substantially", "substantially" or "approximately" that may be used in this article relate to the tolerances of the corresponding terms accepted by the industry. The term "coupling" as may be used in this article includes direct coupling and indirect coupling via other components, elements, circuits, or modules, wherein for indirect coupling, the components, elements, circuits, or modules between them do not change the information of the signal but can adjust its current level, voltage level, and / or power level. Inferred coupling (for example, one of the elements is coupled to another element by inference) includes direct and indirect coupling between two elements in the same way as "coupling".
[0131] The "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" appearing in various places throughout the specification do not necessarily refer to the same embodiment.
[0132] The embodiments of the present invention are given for the purpose 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 of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.
[0133] Although the embodiments disclosed in the present invention are as above, the contents described are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.
Claims
1. A detection device for obtaining inner and outer wall crack defects, characterized in that: The device comprises: An imaging module, which is used to acquire an image to be measured of the target object; Multi-spectral module, which has multi-band lighting capability and is used to provide corresponding lighting spectra to target objects in different environments; A measurement control module is connected to the imaging module and is used to control the acquisition process of the imaging module.
2. A detection device 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 device for obtaining inner and outer wall crack defects as claimed in claim 2, characterized in that: The multi-spectral module comprises: 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 device for obtaining inner and outer wall crack defects as claimed in 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° apart, and the lamp beads in different bands are spaced 15° apart.
5. A detection device for obtaining inner and outer wall crack defects as claimed in claim 4, characterized in that: The device also includes: a multi-spectrum control module, which includes three buttons, which are respectively 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.
6. A detection device for obtaining inner and outer wall crack defects as claimed in claim 5, characterized in that: The measurement control module is used to control the opening and closing of the imaging module and the multi-spectrum module, wherein the measurement control module and the multi-spectrum control module independently control the opening and closing of the multi-spectrum module.
7. A detection device for obtaining 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 tested, identify crack defects of the target object, and calculate the depth of the crack defects.
8. A detection device for obtaining inner and outer wall crack defects as claimed in 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 device for obtaining inner and outer wall crack defects as claimed in 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. A method for detecting inner and outer wall crack defects, characterized in that: Executed by the apparatus according to any one of claims 1 to 9, the method comprises: Acquire an image of the target object to be tested by the imaging module; Providing corresponding lighting spectra to target objects in different environments through the multi-spectral module having multi-band lighting capabilities; The acquisition process of the imaging module is controlled by a measurement control module connected to the imaging module.
11. A detection method for obtaining inner and outer wall crack defects according to claim 10, characterized in that: The method comprises: 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; Using the imaging module to photograph the target object to obtain the image to be tested; 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, 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.
12. A detection method for obtaining inner and outer wall crack defects according to claim 11, characterized in that: Image preprocessing is performed by the following steps: 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 ; For brightness values greater than or equal to the brightness average value L avg The pixel point is assigned a first weight value; For brightness values less than the brightness average value L avg The pixel point is assigned a second weight value; The weighted average brightness of all pixels in the image to be tested is calculated by 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 N is the number of pixels with brightness greater than or equal to the average value; l is the number of pixels with brightness less than the average value.
13. A detection method for obtaining inner and outer wall crack defects according to claim 12, characterized in that: The crack edge detection process is performed through the following steps: For the preprocessed image, pixels whose brightness value is less than a first threshold are removed, where the first threshold is B×L wavg (0 <B<1); For the image after elimination, calculate the brightness value gradient and its direction of each pixel; Traverse the entire image, find the pixel points whose brightness gradient is greater than the second threshold according to the brightness 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).
14. A detection method for obtaining inner and outer wall crack defects according to claim 13, characterized in that: The crack enhancement processing is performed through the following steps: using the brightness value enhancement coefficient, the pixel points at 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.
15. A detection method for obtaining inner and outer wall crack defects according to claim 14, characterized in that: The crack recognition process is performed by the following steps: for the crack enhanced image, the area composed of pixels whose brightness value is 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 .
16. A detection method for obtaining inner and outer wall crack defects according to any one of claims 11 to 15, characterized in that: The two-dimensional size measurement of the crack is performed 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.
17. A detection method for obtaining inner and outer wall crack defects according to claim 16, characterized in that: The crack defect depth is calculated by the following expression: Among them, Δd is the depth of the crack defect; l is the crack opening length value of the crack defect in the image taken 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 taken 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.
18. A storage medium, characterized in that: It contains a series of instructions for executing the method steps as claimed in any one of claims 10-17.
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
Cited By
On-line detection method, system and equipment for bevel edge gypsum board and medium
CN120356017A
Wafer packaging quality identification method and system based on image identification
CN120495637A
External thread quality detection device
CN120801316A