A metal appearance defect recognition system and method based on computer vision
By designing a computer vision-based metal appearance defect recognition system that can be detected by rotation, the problem that existing systems require a large amount of training data and manual labeling is solved, and efficient identification and judgment of the inner surface depression of the metal tube is achieved, cost and error probability are reduced, and the practicality of the system is improved.
Patent Information
- Application Number
- CN202410530868.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-04-29
AI Technical Summary
The existing metal appearance defect recognition system based on computer vision requires a large amount of training data for manual labeling, which is costly and cannot effectively identify the depressions on the inner surface of the metal tube, making it prone to error data, and has limited practicality.
A metal appearance defect recognition system based on computer vision is designed. By rotating the metal tube, the device can detect from two directions and reduce the probability of error. The system includes an identification unit, a data processing unit and a data determination unit, which can automatically identify and judge the opening area, width and type of the depression, calculate the identification depth of the depression, without entering training data in advance or manually marking it.
It realizes efficient identification and judgment of the inner surface depression of the metal tube, reduces operating costs and error probability, and improves the practicality and accuracy of the system.
Smart Images

Figure FDA0005055449410000041 
Figure FDA0005055449410000042 
Figure HDA0004818090000000011
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect recognition, and in particular to a computer vision-based metal appearance defect recognition system and method. Background Art
[0002] The metal appearance defect recognition system and method based on computer vision is a system and method that uses computer vision technology to detect and identify defects on the surface of metal products. The system and method generally include data acquisition, image preprocessing, feature extraction, defect detection and classification, defect recognition and evaluation, etc. The metal appearance defect recognition system and method based on computer vision has important application value in the fields of metal manufacturing and quality inspection, and can improve production efficiency and product quality.
[0003] Data acquisition uses cameras or other visual sensors to capture images of metal products and obtain image data of the metal surface. Image preprocessing preprocesses the captured images, including denoising and image enhancement, to improve the accuracy and effect of subsequent processing. Feature extraction uses computer vision algorithms to extract defect-related features from images. These features may include color, texture, shape, etc. Defect detection and classification uses machine learning or deep learning algorithms to detect and classify the extracted features. These algorithms can be based on traditional image processing techniques such as edge detection and morphological operations, or deep learning methods such as convolutional neural networks (CNNs). Defect recognition and evaluation identifies and evaluates defects based on the detected defect features. Defects can be classified and graded according to their type and degree for subsequent repair or processing.
[0004] Existing computer vision-based metal appearance defect recognition systems and methods require a large amount of training data, and these data need to be manually labeled, which is costly. In addition, they do not identify defects on the inner surface of metal tubes, which is prone to erroneous data and has certain limitations in practicality. Summary of the invention
[0005] The present invention provides a metal appearance defect recognition system and method based on computer vision, which has the function of rotating the metal tube to be detected so that the equipment can detect the metal tube from two directions, reducing the error probability, and the overall operation is simple and the cost is low. Defect recognition is performed on the depression on the inner surface of the metal tube, and the relevant data of the depression is identified and judged, so as to calculate the recognition depth of the depression. It does not need to enter training data in advance, nor does it need manual labeling. The metal tube is screened and classified according to the acquired and calculated data, which solves the problem that in the defect recognition process mentioned in the above background technology, a large amount of training data is required, and these data need to be manually labeled, which is costly, and there is no defect recognition for the depression on the inner surface of the metal tube, which is prone to erroneous data and its practicality has certain limitations.
[0006] The present invention provides the following technical solution: a computer vision-based metal appearance defect recognition system and method, comprising:
[0007] Identification unit: used to obtain defect data on the inner surface of the metal pipe;
[0008] Data processing unit: used to integrate the defect data obtained by the identification unit and obtain the concave data in the defect data;
[0009] Data determination unit: determines the metal tube according to the depression data obtained by the data processing unit;
[0010] The concavity data includes normal concavity, larger concavity, and smaller concavity.
[0011] As an optional solution of the computer vision-based metal appearance defect recognition system and method of the present invention, the recognition unit includes:
[0012] Pipeline illumination: detect the inner surface of the metal pipe and take pictures of the inner surface of the metal pipe;
[0013] Light source input module: illuminates the inside of the metal tube during the detection process;
[0014] Camera module: images the actual information of the axial cylindrical surface of the inner wall of the metal tube into a plane image;
[0015] Fixture: Place the metal pipe to be detected and tighten it;
[0016] Rotating axis: During the detection process, the fixture that holds the metal pipe is rotated;
[0017] Sliding platform: used to carry the fixture so that the fixture slides on the sliding platform.
[0018] As an optional solution of the computer vision-based metal appearance defect recognition system and method of the present invention, wherein: the searchlight pipeline includes a camera, a searchlight viewport, an adjustment block, an airbag, an air tube, and an elastic gasket;
[0019] The adjustment block is inflated and deflated through the airbag and the trachea to form an angle adjustment strategy;
[0020] The angle adjustment strategy includes deflation adjustment and inflation adjustment;
[0021] Deflation adjustment: the airbag and the air tube are deflated, and the adjustment block moves toward the camera side, at which time the angle between the searchlight viewport and the camera becomes larger;
[0022] Inflation adjustment: the airbag and trachea are inflated, and the adjustment block moves to the other side. At this time, the angle between the searchlight viewport and the camera becomes smaller.
[0023] As an optional solution of the computer vision-based metal appearance defect recognition system and method of the present invention, wherein: according to the angle adjustment strategy, the recognition unit forms a detection step;
[0024] The detection step specifically includes:
[0025] S10, adjusting the angle between the searchlight viewport and the inner wall of the pipeline according to the angle adjustment strategy;
[0026] S11, controlling the searchlight pipe with the adjusted angle to enter the metal pipe placed in the fixture from the first port to the second port;
[0027] S12, light source input module controls illumination;
[0028] S13, the camera module controls the camera to shoot the inner surface of the metal tube to obtain shadow data;
[0029] S14, the sliding platform controls the fixture to move toward the camera side;
[0030] S15, during the movement of the fixture, the camera module continuously obtains the concave data;
[0031] S16, the searchlight pipe completes the detection of the inner surface of the metal pipe from the first port to the second port, and the sliding platform controls the clamp to move to the other side, so that the metal pipe moves away from the searchlight pipe;
[0032] S17, shaft control rotation;
[0033] S18, controlling the searchlight pipe with the adjusted angle to enter the metal pipe placed in the fixture from the second port to the first port;
[0034] S19. Repeat S12-S15.
[0035] As an optional solution of the computer vision-based metal appearance defect recognition system and method of the present invention, wherein: according to the detection step, a concave data determination strategy is formed;
[0036] The concave data determination strategy specifically includes:
[0037] S20, obtaining the opening area of the depression;
[0038] S21, setting a first opening area threshold and a second opening area threshold;
[0039] S22, if the opening area of the depression is greater than the first opening area threshold, it is determined to be a relatively large depression, and the data determination unit directly determines that the metal tube is an unqualified metal tube;
[0040] S23, if the opening area of the depression is smaller than the second opening area threshold, it is determined to be a small depression, and the data determination unit directly determines that the metal tube is a qualified metal tube;
[0041] S24, if the opening area of the depression is between the first opening area threshold and the second opening area threshold, it is determined to be a normal depression;
[0042] S25. For a metal tube with a normal depression, obtain the reflection condition of the inner surface of the metal tube when it is illuminated by a searchlight viewport;
[0043] S26, if there is no shadow in both directions, the data determination unit determines that the metal tube is a qualified metal tube;
[0044] S27, if there is a shadow detected in any direction, the metal tube with the shadow is set as the metal tube to be screened;
[0045] S28. Form a metal tube determination strategy for the metal tubes to be screened.
[0046] As an optional solution of the computer vision-based metal appearance defect recognition system and method of the present invention, wherein: the metal tube determination strategy includes a first dent determination strategy;
[0047] The first depression determination strategy specifically includes:
[0048] S30, obtaining the reflection conditions of the inner surface of the metal tube to be screened from two directions;
[0049] S31, if there is a shadow in both detections, then the depression is determined to be the first depression;
[0050] S32, setting a depression depth threshold c0;
[0051] S33, for the first recess, obtaining the opening area and opening width b1 of the first recess;
[0052] S34, for the first depression, adjusting the illumination angle a1 of the searchlight viewport until there is no shadow in the depression;
[0053] S35, if there is always a shadow in the depression, the data determination unit determines that the metal tube is an unqualified metal tube;
[0054] S36, if there is no shadow in the concave, obtain the corresponding illumination angle a1, including the first illumination angle a11 and the second illumination angle a12;
[0055] S37, calculating the recognized depth c1 of the first concave;
[0056] S38, if the identified depth c1 of the first depression is greater than or equal to the depression depth threshold c0, the metal tube is determined to be an unqualified metal tube;
[0057] S39: If the recognized depth c1 of the first depression is less than the depression depth threshold c0, the metal tube is determined to be a qualified metal tube.
[0058] As an optional solution of the computer vision-based metal appearance defect recognition system and method of the present invention, wherein: the dent situation determination strategy includes a second dent determination strategy;
[0059] The second depression determination strategy specifically includes:
[0060] S40, executing S30;
[0061] S41, if there is a shadow only once in the two detections, then determine that the depression is the second depression;
[0062] S42, setting a depression depth threshold c0;
[0063] S43, for the second recess, obtaining an illumination angle a2 of the searchlight viewport, including a first illumination angle a21 and a second illumination angle a22;
[0064] S44, obtain the second concave opening area and opening width b2
[0065] S45, calculating the recognized depth c2 of the second concave;
[0066] S46, if the recognized depth c2 of the second depression is greater than or equal to the depression depth threshold c0, the metal tube is determined to be an unqualified metal tube;
[0067] S47: If the recognized depth c2 of the second depression is less than the depression depth threshold c0, the metal tube is determined to be a qualified metal tube.
[0068] As an optional solution of the computer vision-based metal appearance defect recognition system and method of the present invention, the concave depth threshold c0 calculation step is specifically as follows:
[0069] S50, obtaining an opening width b0 corresponding to a first opening area threshold;
[0070] S51, obtaining an illumination angle a0 of a searchlight viewport, including a first illumination angle a01 and a second illumination angle a02;
[0071] S52: Calculate the depression depth threshold c0.
[0072] As an optional solution of the computer vision-based metal appearance defect recognition system and method of the present invention, wherein: the depression depth threshold
[0073] The identified depth of the first depression
[0074] The recognized depth of the second recess is c2=tan(a22)×b2.
[0075] The present invention has the following beneficial effects:
[0076] 1. The computer vision-based metal appearance defect recognition system and method can rotate the metal tube to be inspected, so that the equipment can inspect the metal tube from two directions, reducing the probability of error, and the overall operation is simple and the cost is low.
[0077] 2. The computer vision-based metal appearance defect recognition system and method can identify the dents on the inner surface of the metal tube, recognize and determine the opening area, opening width, approximate shape and type of the dent, and thus calculate the recognized depth of the dent. It does not require the advance entry of training data or manual labeling.
[0078] 3. The computer vision-based metal appearance defect recognition system and method first classifies metal tubes into qualified metal tubes, unqualified metal tubes and metal tubes to be screened by obtaining the opening area, then sets a depression depth threshold, and judges whether the metal tube to be screened is a qualified metal tube or an unqualified metal tube based on the calculated depression recognition depth. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 A block diagram of a computer vision-based metal appearance defect recognition system and method of the present invention;
[0080] Figure 2 For the present invention Figure 1 Partial enlarged image A;
[0081] Figure 3A schematic diagram of the depression data threshold division of the present invention;
[0082] Figure 4 It is a schematic cross-sectional diagram of a larger depression and a smaller depression of the present invention;
[0083] Figure 5 This is a schematic diagram of obtaining data of the depression depth threshold of the present invention;
[0084] Figure 6 It is a schematic diagram of the first depression detection direction and cross section of the present invention;
[0085] Figure 7 It is a schematic diagram of the second depression detection direction and cross section of the present invention. DETAILED DESCRIPTION
[0086] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0087] Example 1
[0088] See also Figure 1-2 , a metal appearance defect recognition system and method based on computer vision, comprising:
[0089] Identification unit: used to obtain defect data on the inner surface of the metal tube, display the acquired defect data through images, and transmit it to the data processing unit for integration. The defect data includes but is not limited to dents, etc.;
[0090] Data processing unit: including for integrating the defect data obtained by the recognition unit, obtaining the concave data in the defect data, centrally integrating and processing the relevant data of the concave obtained by the recognition unit, and obtaining the opening area and opening width of each concave through the existing technology;
[0091] Data determination unit: determines the metal tube according to the concave data obtained by the data processing unit, calculates the concave identification depth through the integrated data, sets the concave depth threshold, compares the concave identification depth with the concave depth threshold, determines the metal tube according to the comparison result and the opening area, and determines the metal tube as a qualified or unqualified metal tube;
[0092] The depression data includes normal depressions, larger depressions, and smaller depressions. The depression data is divided into three types of depressions, namely, normal depressions, larger depressions, and smaller depressions, by setting a first opening area threshold and a second opening area threshold, and comparing the opening areas of all the acquired depressions with the two opening area thresholds.
[0093] The identification unit comprises:
[0094] Pipeline illumination: detect the inner surface of the metal pipe and take pictures of the inner surface of the metal pipe;
[0095] Light source input module: During the detection process, the inside of the metal pipe is illuminated, so that the camera module can obtain the situation of the inner surface of the metal pipe through the camera and search viewport of the search pipe, and the recessed part will produce a shadow part through the light source, so that the data processing unit and the data determination unit can determine the type of recess and calculate the depth of the recess through the shadow part, so as to determine whether the metal pipe is qualified;
[0096] Camera module: It images the actual information of the axial cylindrical surface of the inner wall of the metal tube into a plane image, and transmits the plane image data to the data processing unit for centralized integration;
[0097] Fixture: Place the metal pipe to be detected and tighten it;
[0098] Rotating axis: During the detection process, the fixture that holds the metal pipe is rotated;
[0099] Sliding platform: used to carry the fixture so that the fixture slides on the sliding platform.
[0100] The searchlight pipeline includes a camera, a searchlight viewport, an adjustment block, an air bag, an air pipe, and an elastic gasket;
[0101] The surface of one end of the searchlight pipe is connected to one side of the elastic gasket, and the other side of the elastic gasket is connected to the searchlight viewport;
[0102] An air bag is arranged at the top of the searchlight pipe, one end of the air bag is connected to the regulating block, the other end of the air bag is connected to the air pipe inside the searchlight pipe, and the regulating block is in contact with the surface of the searchlight viewport;
[0103] A connecting rod is provided inside the searchlight pipe, and one end of the connecting rod is connected to a camera;
[0104] The other end of the searchlight pipe and the other end of the connecting rod are connected to the camera;
[0105] The adjustment block is inflated and deflated through the airbag and the trachea to form an angle adjustment strategy;
[0106] The angle adjustment strategy includes deflation adjustment and inflation adjustment;
[0107] Deflation adjustment: the airbag and the air tube are deflated, and the adjustment block moves toward the camera side, at which time the angle between the searchlight viewport and the camera becomes larger;
[0108] Inflation adjustment: the airbag and trachea are inflated, and the adjustment block moves to the other side. At this time, the angle between the searchlight viewport and the camera becomes smaller.
[0109] Through the above-mentioned units and modules, the recognition unit can identify defects on the inner surface of the metal tube, display the defect data in the form of images, and transmit them to the data processing unit at the same time. The data processing unit extracts and integrates the depression-related data inside the metal tube, and divides the depression into normal depression, larger depression, and smaller depression according to the opening area of the depression. Therefore, the data determination unit determines whether the metal tube with normal depression, larger depression, and smaller depression is a qualified metal tube, and the data determination unit further determines whether the metal tube with normal depression is a qualified metal tube.
[0110] Example 2
[0111] This embodiment is an improvement made on the basis of embodiment 1. Figure 3-4 , the computer vision-based metal appearance defect recognition system and method, according to the angle adjustment strategy, the recognition unit forms a detection step;
[0112] The detection step specifically includes:
[0113] S10, adjusting the angle between the searchlight viewport and the inner wall of the pipeline according to the angle adjustment strategy. Different angles between the searchlight viewport and the inner wall of the pipeline result in different irradiation angles, and thus different shadows are formed when irradiating the concave. Therefore, errors in the concave determination data may occur.
[0114] S11, controlling the searchlight pipe with the adjusted angle to enter the metal pipe placed in the fixture from the first port to the second port;
[0115] S12, the light source input module controls the lighting, such as turning on or off the light source, controlling the light brightness, etc.;
[0116] S13, the camera module controls the camera to shoot the inner surface of the metal tube to obtain shadow data. The camera module can directly obtain the opening area and opening width of the depression, and the shadow data is the searchlight viewport that projects a light source into the metal tube through the light source input module. If there is a normal depression or a small depression on the inner surface of the metal tube, a shadow will appear at the depression, so that the recognized depth of the depression can be calculated;
[0117] S14, the sliding platform controls the fixture to move toward the camera side, so that the searchlight pipe can penetrate into the metal pipe for detection;
[0118] S15, during the movement of the fixture, the camera module continuously obtains the concave data;
[0119] S16, the searchlight pipe completes the detection of the inner surface of the metal pipe from the first port to the second port, and the sliding platform controls the clamp to move to the other side, so that the metal pipe moves away from the searchlight pipe;
[0120] S17, the shaft is controlled to rotate so that the searchlight pipe can enter the metal pipe again from the other end for detection, so that the searchlight pipe can detect the inner surface of the metal pipe from two directions, thereby making the detection result more accurate and reducing the error rate;
[0121] S18, controlling the searchlight pipe with the adjusted angle to enter the metal pipe placed in the fixture from the second port to the first port;
[0122] S19, repeat S12-S15, so that the searchlight pipe enters the metal pipe from the second port to the first port for detection again, the sliding platform controls the clamp to move toward the camera side again, so that the searchlight pipe penetrates into the metal pipe again for detection, and the camera module continuously obtains the depression data, and the detection process is completely completed.
[0123] According to the detection steps, a depression data determination strategy is formed;
[0124] The concave data determination strategy specifically includes:
[0125] S20, obtaining the opening area of the depression;
[0126] S21, setting a first opening area threshold and a second opening area threshold;
[0127] S22, if the opening area of the depression is greater than the first opening area threshold, it is determined to be a relatively large depression, and the data determination unit directly determines that the metal tube is an unqualified metal tube;
[0128] S23, if the opening area of the depression is smaller than the second opening area threshold, it is determined to be a small depression, and the data determination unit directly determines that the metal tube is a qualified metal tube;
[0129] S24, if the opening area of the depression is between the first opening area threshold and the second opening area threshold, it is determined to be a normal depression;
[0130] S25. For a metal tube with a normal depression, obtain the reflection condition of the inner surface of the metal tube when it is illuminated by a searchlight viewport;
[0131] S26, if there is no shadow in both directions, the data determination unit determines that the metal tube is a qualified metal tube;
[0132] S27, if there is a shadow detected in any direction, the metal tube with the shadow is set as the metal tube to be screened;
[0133] S28. Form a metal tube determination strategy for the metal tubes to be screened.
[0134] This solution takes into account that the cross-sectional shapes of the depressions may be different. Different cross-sectional shapes of the depressions will result in different shadow data to be detected and different methods for calculating the depth of the depressions.
[0135] Example 3
[0136] This embodiment is an improvement made on the basis of embodiment 2. Figure 5-7 ,In this embodiment, the metal tube determination strategy includes a first depression determination strategy;
[0137] The first depression determination strategy specifically includes:
[0138] S30, obtaining the reflection conditions of the inner surface of the metal tube to be screened from two directions;
[0139] S31, if there is a shadow in both detections, then the depression is determined to be the first depression;
[0140] S32, setting a depression depth threshold c0;
[0141] S33, for the first recess, obtaining the opening area and opening width b1 of the first recess;
[0142] S34, for the first depression, adjusting the illumination angle a1 of the searchlight viewport until there is no shadow in the depression;
[0143] S35, if there is always a shadow in the depression, the data determination unit determines that the metal tube is an unqualified metal tube;
[0144] S36, if there is no shadow in the concave, obtain the corresponding illumination angle a1, including the first illumination angle a11 and the second illumination angle a12;
[0145] S37, calculating the recognized depth c1 of the first concave;
[0146] S38, if the identified depth c1 of the first depression is greater than or equal to the depression depth threshold c0, the metal tube is determined to be an unqualified metal tube;
[0147] S39: If the recognized depth c1 of the first depression is less than the depression depth threshold c0, the metal tube is determined to be a qualified metal tube.
[0148] The depression situation determination strategy includes a second depression determination strategy;
[0149] The second depression determination strategy specifically includes:
[0150] S40, execute S30;
[0151] S41, if there is a shadow only once in the two detections, then determine that the depression is the second depression;
[0152] S42, setting a depression depth threshold c0;
[0153] S43, for the second recess, obtaining an illumination angle a2 of the searchlight viewport, including a first illumination angle a21 and a second illumination angle a22;
[0154] S44, obtain the second concave opening area and opening width b2
[0155] S45, calculating the recognized depth c2 of the second concave;
[0156] S46, if the recognized depth c2 of the second depression is greater than or equal to the depression depth threshold c0, the metal tube is determined to be an unqualified metal tube;
[0157] S47: If the recognized depth c2 of the second depression is less than the depression depth threshold c0, the metal tube is determined to be a qualified metal tube.
[0158] This embodiment also provides that the step of calculating the depression depth threshold c0 is specifically as follows:
[0159] S50, obtaining an opening width b0 corresponding to a first opening area threshold;
[0160] S51, obtaining an illumination angle a0 of a searchlight viewport, including a first illumination angle a01 and a second illumination angle a02;
[0161] S52: Calculate the depression depth threshold c0.
[0162] This embodiment also provides that the depression depth threshold
[0163] The identified depth of the first depression
[0164] The recognized depth of the second recess is c2=tan(a22)×b2.
[0165] The identified depth of the depression is not the exact depth of the depression, but the approximate depth calculated based on the acquired shadow data at the depression section. The identified depth of the depression does not consider the exact cross-sectional shape of the depression. If there are slight uneven areas in the depression, only the approximate contour of the depression is considered.
[0166] In this embodiment, a normal depression is judged, and the recognition depth of the normal depression is calculated through the cross-sectional shape of the normal depression, the shadow cast on the depression by the light projected from the searchlight viewport, and the obtained opening width of the depression. The recognition depth and the calculated and set depression depth threshold are compared, and based on the comparison result, the data judgment unit determines whether the metal tube to be screened is a qualified metal tube.
[0167] The data processing unit in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as laptop computers, PADs (tablet computers), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, as well as fixed terminals.
[0168] The data processing unit may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the data processing unit are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0169] Typically, the following devices may be connected to the I / O interface: input devices including, for example, a touch screen, a touch pad, an image sensor, a microphone, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and communication devices. The communication devices may allow the data processing unit to communicate with other devices wirelessly or by wire to exchange data.
[0170] The embodiments of the present disclosure also provide a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the computer vision-based metal appearance defect recognition system and method in the aforementioned method embodiments.
[0171] It should be noted that more specific examples of computer-readable storage media may include portable computer disks, hard disks, erasable programmable read-only memories (EPROM or flash memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present disclosure, computer-readable storage media may be any tangible medium containing or storing a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device, and the computer-readable medium may be included in the data processing unit; or it may exist independently without being assembled into the data processing unit.
[0172] The computer-readable medium carries one or more programs. When the one or more programs are executed by the data processing unit, the data processing unit can implement the solution provided by the method embodiment.
[0173] Computer program code for performing operations of the present disclosure may be written in one or more programming languages or a combination thereof, and may be executed entirely on a user's computer, partially on a user's computer, as a stand-alone software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0174] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0175] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A metal appearance defect recognition system based on computer vision, characterized by: include: Identification unit: used to obtain defect data on the inner surface of the metal pipe; Data processing unit: used to integrate the defect data obtained by the identification unit and obtain the concave data in the defect data; Data determination unit: determines the metal tube according to the depression data obtained by the data processing unit; The concave data includes normal concave, larger concave, and smaller concave; The identification unit comprises: Pipeline illumination: detect the inner surface of the metal pipe and take pictures of the inner surface of the metal pipe; Light source input module: illuminates the inside of the metal tube during the detection process; Camera module: images the actual information of the axial cylindrical surface of the inner wall of the metal tube into a plane image; Fixture: Place the metal pipe to be detected and tighten it; Rotating axis: During the detection process, the fixture that holds the metal pipe is rotated; Sliding platform: used to carry the fixture so that the fixture slides on the sliding platform; The searchlight pipeline includes a camera, a searchlight viewport, an adjustment block, an air bag, an air pipe, and an elastic gasket; The adjustment block is inflated and deflated through the airbag and the trachea to form an angle adjustment strategy; The angle adjustment strategy includes deflation adjustment and inflation adjustment; Deflation adjustment: the airbag and the air tube are deflated, and the adjustment block moves toward the camera side, at which time the angle between the searchlight viewport and the camera becomes larger; Inflation adjustment: the airbag and trachea are inflated, and the adjustment block moves to the other side, at which time the angle between the searchlight viewport and the camera becomes smaller; According to the angle adjustment strategy, the recognition unit forms a detection step; The detection step specifically includes: S10, adjusting the angle between the searchlight viewport and the inner wall of the pipeline according to the angle adjustment strategy; S11, controlling the searchlight pipe with the adjusted angle to enter the metal pipe placed in the fixture from the first port to the second port; S12, light source input module controls illumination; S13, the camera module controls the camera to shoot the inner surface of the metal tube to obtain shadow data; S14, the sliding platform controls the fixture to move toward the camera side; S15, during the movement of the fixture, the camera module continuously obtains the concave data; S16, the searchlight pipe completes the detection of the inner surface of the metal pipe from the first port to the second port, and the sliding platform controls the clamp to move to the other side, so that the metal pipe moves away from the searchlight pipe; S17, shaft control rotation; S18, controlling the searchlight pipe with the adjusted angle to enter the metal pipe placed in the fixture from the second port to the first port; S19, repeat S12-S15; According to the detection steps, a depression data determination strategy is formed; The concave data determination strategy specifically includes: S20, obtaining the opening area of the depression; S21, setting a first opening area threshold and a second opening area threshold; S22, if the opening area of the depression is greater than the first opening area threshold, it is determined to be a relatively large depression, and the data determination unit directly determines that the metal tube is an unqualified metal tube; S23, if the opening area of the depression is smaller than the second opening area threshold, it is determined to be a small depression, and the data determination unit directly determines that the metal tube is a qualified metal tube; S24, if the opening area of the depression is between the first opening area threshold and the second opening area threshold, it is determined to be a normal depression; S25. For a metal tube with a normal depression, obtain the reflection condition of the inner surface of the metal tube when it is illuminated by a searchlight viewport; S26, if there is no shadow in both directions, the data determination unit determines that the metal tube is a qualified metal tube; S27, if there is a shadow detected in any direction, the metal tube with the shadow is set as the metal tube to be screened; S28. Form a metal tube determination strategy for the metal tubes to be screened.
2. A method for using the computer vision-based metal appearance defect recognition system according to claim 1, characterized in that: The metal tube determination strategy includes a first depression determination strategy; The first depression determination strategy specifically includes: S30, obtaining the reflection conditions of the inner surface of the metal tube to be screened from two directions; S31, if there is a shadow in both detections, then the depression is determined to be the first depression; S32, setting a depression depth threshold c0; S33, for the first recess, obtaining the opening area and opening width b1 of the first recess; S34, for the first depression, adjusting the illumination angle a1 of the searchlight viewport until there is no shadow in the depression; S35, if there is always a shadow in the depression, the data determination unit determines that the metal tube is an unqualified metal tube; S36, if there is no shadow in the concave, obtain the corresponding illumination angle a1, including the first illumination angle a11 and the second illumination angle a12; S37, calculating the recognized depth c1 of the first concave; S38, if the identified depth c1 of the first depression is greater than or equal to the depression depth threshold c0, the metal tube is determined to be an unqualified metal tube; S39: If the recognized depth c1 of the first depression is less than the depression depth threshold c0, the metal tube is determined to be a qualified metal tube.
3. The method of the metal appearance defect recognition system based on computer vision according to claim 2 is characterized in that: The depression situation determination strategy includes a second depression determination strategy; The second depression determination strategy specifically includes: S40, execute S30; S41, if there is a shadow only once in the two detections, then determine that the depression is the second depression; S42, setting a depression depth threshold c0; S43, for the second recess, obtaining an illumination angle a2 of the searchlight viewport, including a first illumination angle a21 and a second illumination angle a22; S44, obtain the second concave opening area and opening width b2 S45, calculating the recognized depth c2 of the second concave; S46, if the recognized depth c2 of the second depression is greater than or equal to the depression depth threshold c0, the metal tube is determined to be an unqualified metal tube; S47: If the recognized depth c2 of the second depression is less than the depression depth threshold c0, the metal tube is determined to be a qualified metal tube.
4. The method of the metal appearance defect recognition system based on computer vision according to claim 3 is characterized in that: The specific calculation steps of the depression depth threshold c0 are as follows: S50, obtaining an opening width b0 corresponding to a first opening area threshold; S51, obtaining an illumination angle a0 of a searchlight viewport, including a first illumination angle a01 and a second illumination angle a02; S52: Calculate the depression depth threshold c0.
5. The method of the metal appearance defect recognition system based on computer vision according to claim 4 is characterized in that: The depression depth threshold The identified depth of the first depression The recognized depth of the second recess is c2=tan(a22)×b2.
Citation Information
Patent Citations
High-pressure gas cylinder inner surface defect detection system based on machine vision
CN112051272A