Multi-angle light source irradiation plastic pipe quality detection method and system
By collecting pipe material properties and ambient light information to optimize light source illumination parameters, and combining this with pre-trained plugins for iterative optimization, the problem of detection instability caused by fixed light source parameters in traditional detection methods has been solved, and accurate detection of bubble defects in plastic pipes has been achieved.
Patent Information
- Application Number
- CN202511120030.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Traditional plastic pipe testing methods cannot adapt to different materials and changes in ambient light, resulting in unstable visibility of bubble defects and insufficient testing accuracy and stability.
By collecting pipe property information and ambient light information, the light source illumination parameters are optimized to maximize the visibility of bubble defects. A multi-angle light source illumination detection method is adopted, and the optimal illumination parameters are generated by iterative optimization in combination with a pre-trained bubble defect visibility prediction plugin.
It enables accurate detection of bubble defects on the surface of plastic pipes, improves the adaptability and stability of the detection results, and enhances the accuracy and stability of bubble defect identification.
Smart Images

Figure CN120629007B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of plastic pipe testing, and in particular to a method and system for testing the quality of plastic pipes using multi-angle light source irradiation. Background Technology
[0002] With the increasing demands for quality control in plastic pipe production, accurate detection of surface bubble defects has become crucial for ensuring product quality. Currently, traditional detection methods rely on vision systems with fixed parameters, which have poor adaptability to pipes of different materials and colors. Especially on pipes with high gloss or dark colors, the image contrast is low under ordinary lighting, and defect signals are easily submerged by background information, often resulting in problems such as unclear bubble identification and high false positive rates.
[0003] Existing detection methods rely solely on preset light source parameters for image acquisition and recognition, which is difficult to adapt to differences in pipe properties and changes in ambient light. This results in unstable bubble defect visibility, insufficient detection accuracy and stability, and an inability to meet the consistent defect detection requirements in the production of high-quality plastic pipes. Summary of the Invention
[0004] To address the aforementioned technical issues, this application provides a method and system for quality inspection of plastic pipes using multi-angle light source illumination. This method improves the adaptability of plastic pipe quality inspection to actual inspection scenarios, adapts the light source effect to inspection requirements, enhances the visibility of bubble defects on the pipe surface, and compensates for the shortcomings of traditional methods in terms of insufficient accuracy and stability due to fixed parameters.
[0005] The embodiments of this application disclose the following technical solutions:
[0006] In a first aspect, embodiments of this application provide a method for quality inspection of plastic pipes irradiated by multi-angle light sources, the method comprising:
[0007] Collect pipe property information of the plastic pipe to be tested, as well as ambient light information of the testing area in the current time zone;
[0008] Obtain the adjustment space for the illumination parameters of the target light source;
[0009] With the goal of maximizing the visibility of bubble defects on the pipe surface, the irradiation parameters are iteratively optimized within the irradiation parameter adjustment space based on the pipe attribute information and ambient light information until convergence, and the optimal irradiation parameters are output.
[0010] The target light source is controlled to irradiate the plastic pipe to be tested according to the optimal irradiation parameters. Then, the surface image of the plastic pipe to be tested is acquired to detect bubble defects, and the bubble defect detection result of the pipe is output.
[0011] Secondly, embodiments of this application provide a quality inspection system for plastic pipes irradiated by multi-angle light sources, the system comprising:
[0012] The information acquisition module is used to collect the pipe property information of the plastic pipe to be tested, as well as the ambient light information of the testing area in the current time zone;
[0013] The parameter space definition module is used to obtain the adjustment space of the illumination parameters of the target light source;
[0014] The parameter iteration optimization module is used to maximize the visibility of bubble defects on the pipe surface as the optimization objective. Within the irradiation parameter adjustment space, it performs iterative optimization search of irradiation parameters based on the pipe attribute information and ambient light information until convergence, and outputs the optimal irradiation parameters.
[0015] The defect detection output module is used to control the target light source to irradiate the plastic pipe to be inspected according to the optimal irradiation parameters, and then acquire the surface image of the plastic pipe to be inspected to detect bubble defects and output the bubble defect detection result of the pipe.
[0016] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0017] This application proposes a method and system for quality inspection of plastic pipes using multi-angle light source illumination. By combining pipe property information with ambient light characteristics to optimize light source illumination parameters, accurate detection of bubble defects on the surface of plastic pipes is achieved. First, pipe property information such as material and size of the pipe to be inspected, as well as ambient light information of the inspection area, are collected. Based on this, the adjustment space for light source illumination parameters is obtained, providing basic data for subsequent targeted optimization of illumination parameters. Then, with the goal of maximizing the visibility of bubble defects, the illumination parameters are iteratively optimized and searched within the adjustment space. The effect of the illumination parameters is evaluated through a pre-trained bubble defect visibility prediction plugin to generate the optimal illumination parameters, accurately locking the most favorable illumination parameters for bubble defect manifestation. Finally, the pipe is illuminated according to the optimal illumination parameters, and its surface image is acquired. The defect detection output yields the pipe bubble defect detection result, making the detection result adaptable to pipe characteristics and environmental changes, improving the accuracy and stability of bubble defect identification.
[0018] The technical solution of this application achieves scenario-based adaptation of light source irradiation parameters through dynamic optimization of irradiation parameters and intelligent prediction of bubble defect visibility. It not only precisely adjusts the parameters according to the pipe material properties and ambient light characteristics, but also quantifies the visibility of bubble defects through multi-dimensional evaluation indicators. This solves the technical problems of fixed light source parameter settings and unstable detection results in traditional testing, and provides an efficient and scientific method for the quality inspection of plastic pipes. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic flowchart illustrating the method for quality inspection of plastic pipes irradiated by multi-angle light sources provided in this application embodiment;
[0021] Figure 2 This is a schematic diagram of the structure of a plastic pipe quality inspection system irradiated by a multi-angle light source, as provided in an embodiment of this application.
[0022] The components represented by each number in the attached diagram are explained below:
[0023] Information acquisition module 01, parameter space definition module 02, parameter iterative optimization module 03, defect detection output module 04. Detailed Implementation
[0024] This application provides a method and system for quality inspection of plastic pipes using multi-angle light source irradiation. It addresses the technical problem that existing traditional inspection methods cannot set light source irradiation parameters specifically for actual inspection scenarios, resulting in the light source irradiation effect being unsuitable for inspection needs, affecting the visibility of bubble defects on the pipe surface, and causing insufficient accuracy and stability in bubble defect detection.
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0027] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0028] Example 1, as shown in the appendix Figure 1 As shown, this application provides a method for quality inspection of plastic pipes irradiated by multi-angle light sources, the method comprising the following steps:
[0029] S110: Collect pipe property information of the plastic pipe to be tested, as well as ambient light information of the testing area in the current time zone;
[0030] In this embodiment of the application, in order to achieve accurate detection of bubble defects in plastic pipes based on multi-angle light sources, it is necessary to first understand the core attribute information of the plastic pipe to be tested and the light characteristics of the testing environment, so as to provide basic data support for subsequent optimization of light source illumination parameters.
[0031] Specifically, the key pipe property information of the plastic pipe to be tested is first collected using professional testing tools.
[0032] Among them, the pipe material properties include pipe material, pipe diameter, pipe wall thickness, surface color depth, surface gloss and surface roughness. These pipe material properties directly affect the reflection and scattering of light on the pipe surface and are the basic factors that determine the illumination effect of the light source.
[0033] At the same time, ambient light information of the detection area within the current time zone is collected through ambient light detection equipment.
[0034] Among them, ambient light information includes ambient light color temperature, ambient light intensity, and ambient light incident angle. This collected ambient light information will superimpose and interfere with the illumination effect of the target light source to ensure that subsequent parameter optimization can specifically counteract its influence and avoid blurred imaging of bubble defects caused by ambient light.
[0035] This step, by accurately collecting pipe material attribute information and ambient light information, provides basic data for subsequent iterative optimization of light source illumination parameters and determination of optimal illumination parameters, ensuring that the detection process can adapt to the actual state of pipe material characteristics and ambient light.
[0036] Step S110 in the method provided in this application embodiment includes:
[0037] Collect the pipe material, pipe diameter, pipe wall thickness, surface color depth, surface gloss and surface roughness of the plastic pipe to be tested as pipe attribute information;
[0038] Collect ambient light color temperature, ambient light intensity, and ambient light incidence angle in the detection area within the current time zone as ambient light information.
[0039] In this embodiment, during the detection of bubble defects on the surface of plastic pipes, the pipe's inherent properties and ambient light conditions jointly affect the light source illumination effect and the defect imaging quality. Therefore, it is necessary to accurately collect key information data on pipe properties and ambient light to provide a basis for subsequent optimization of light source illumination parameters.
[0040] Among them, different pipe materials have different light reflection characteristics. Pipe diameter, wall thickness and other factors affect light penetration and scattering. Surface color depth, gloss and roughness will also change the light reflection pattern. If the ambient light color temperature, intensity and incident angle are not suitable, it will easily interfere with the target light source and make the bubble defects unclear.
[0041] Therefore, it is necessary to collect pipe material attribute information and ambient light information in a targeted manner to obtain basic data that fits the actual testing scenario.
[0042] Specifically, for the first time, professional testing tools (such as material composition analyzers, laser diameter gauges, ultrasonic thickness gauges, colorimeters, gloss meters, and surface roughness measuring instruments) are used to accurately obtain the material, diameter, wall thickness, surface color depth, surface gloss, and surface roughness of the plastic pipe to be tested, and these are used as pipe attribute information to clarify the inherent characteristics of the interaction between light and the pipe.
[0043] For example, using a material composition analyzer, infrared spectroscopy analysis of a certain plastic pipe shows a spectral match of over 95% with standard PE material, thus identifying it as PE material. Its light reflectivity is relatively moderate, providing a material characteristic basis for subsequent light source irradiation parameter adaptation. The diameter of the pipe is measured using a laser diameter gauge. If eight points are taken at equal intervals along the circumference, the average value is calculated to be 50.1 mm. This diameter affects the projection range of the light source on the pipe surface, and the coverage effect needs to be considered when optimizing the parameters.
[0044] In addition, the thickness of the pipe wall is measured by using an ultrasonic thickness gauge. Points are selected at different axial and circumferential positions of the pipe. The thickness is calculated based on the formula "pipe wall thickness = (ultrasonic propagation speed × reflection time difference) / 2" for ultrasonic reflection time difference and propagation speed. This data is related to the appearance of bubble defects on the inner wall after light penetration and is a key reference for setting the light source irradiation parameters.
[0045] Meanwhile, the surface color depth is measured using a colorimeter according to CIE standards. If the average L* value of the pipe surface is 30 (the smaller the value, the darker the color), the darker the color, the stronger the absorption of light. Therefore, the brightness of the light source needs to be increased to offset the absorption effect. The surface gloss is measured using a gloss meter according to standards. If the average gloss of a certain pipe is 80.67 GU, the high gloss easily causes specular reflection to cover up defects. The parameters need to be adjusted accordingly. The Ra value is measured using a surface roughness measuring instrument. If it is 0.8 μm, it indicates that the rough surface of the pipe has obvious diffuse reflection. The reflection needs to be adjusted according to the light source illumination parameters.
[0046] Meanwhile, ambient light color temperature, ambient light intensity, and ambient light incident angle in the detection area within the current time zone are collected by ambient light detection equipment (such as color temperature meter, illuminance meter, and angle measuring instrument) and used as ambient light information to understand the environmental factors that interfere with the target light source in the detection scene within the current time zone.
[0047] For example, the color temperature of the ambient light in the detection area in the morning, measured by a color temperature meter, is 5500K. This will cause the image to appear bluish, which may reduce the color contrast between the bubble defects and the pipe surface. Color compensation needs to be performed in the light source parameters. Using a illuminance meter, five points are evenly selected on the surface of the pipe in the detection area. The average ambient light intensity is measured to be 804 lx. Excessive intensity will weaken the relative brightness of the target light source, providing data reference for adjusting the intensity of the target light source. The incident angle of the ambient light is measured to be 30° using an angle measuring instrument. This angle may form a specific reflection on the pipe surface, and its interference needs to be counteracted when optimizing the illumination parameters.
[0048] By collecting pipe material attribute information and ambient light information through the above steps, we can clearly define the internal and external factors that affect the light source effect in the detection scenario. This provides comprehensive and accurate data support for subsequent analysis of the impact of the two factors on the light source effect and iterative optimization of irradiation parameters, ensuring that bubble defects are clearly displayed.
[0049] S120: Obtain the adjustment space for the illumination parameters of the target light source;
[0050] In this embodiment of the application, in order to achieve precise optimization of the illumination parameters of the light source, it is necessary to determine in advance the adjustable range of each illumination parameter of the target light source, so as to lay the foundation for subsequent iterative optimization search within this range to find the optimal illumination parameters, and ensure that the parameter optimization process is orderly and efficient.
[0051] Specifically, the adjustment space of the target light source's illumination parameters is obtained by calibrating using historical detection data.
[0052] The irradiation parameter adjustment space includes the light source height threshold, the light source incident angle threshold, the light source color temperature threshold, and the light source irradiation intensity threshold. These thresholds define the effective adjustment range of each irradiation parameter and are boundary conditions that cannot be exceeded when optimizing irradiation parameters.
[0053] Step S120 in the method provided in this application embodiment includes:
[0054] The illumination parameter adjustment space of the target light source is obtained, wherein the illumination parameter adjustment space includes the light source height threshold, the light source incident angle threshold, the light source color temperature threshold, and the light source illumination intensity threshold.
[0055] In this embodiment, during the optimization of irradiation parameters for detecting bubble defects on the surface of plastic pipes, clearly defining the adjustable range of each irradiation parameter of the target light source is a prerequisite for achieving accurate optimization. This range needs to be comprehensively determined by considering equipment performance, detection scenario requirements, and pipe material properties, providing a framework for subsequently searching for the optimal irradiation parameters within a reasonable range.
[0056] Specifically, the effective irradiation parameter range data accumulated in the historical detection data record is first called up and calibrated in combination with the hardware specifications of the target light source (such as maximum brightness, adjustable angle range, etc.) to determine the light source height threshold, light source incident angle threshold, light source color temperature threshold and light source irradiation intensity threshold, which together constitute the irradiation parameter adjustment space, thereby clarifying the allowable adjustment range of each irradiation parameter.
[0057] The light source height threshold specifies the upper and lower limits of the light source in the vertical direction. For example, it is set to 30-180cm. This range needs to cover the optimal illumination height for pipes of different diameters (such as 20-150mm) to ensure that the light can evenly cover the surface of the pipe and avoid local overexposure due to too low a height or insufficient illumination due to too high a height.
[0058] In addition, the incident angle threshold of the light source limits the range of the angle between the light and the normal of the pipe surface, such as 15°-75°. Different angles will change the light and shadow shape of the bubble defect. For example, low-angle incident light will easily highlight the shadow of the bubble edge, while high-angle incident light will enhance the brightness difference between the bubble and the background. A reasonable range needs to be set according to the reflective characteristics of the pipe surface (such as gloss and roughness).
[0059] In addition, the color temperature threshold of the light source determines the adjustable color temperature range of the light source, such as 2700K-6500K, which needs to be matched with the color depth of the pipe surface and the color temperature of the ambient light. For example, when inspecting dark pipes, the color temperature of the light source can be appropriately increased to enhance the color difference between the bubbles and the background.
[0060] Meanwhile, the light source intensity threshold defines the adjustment range of the light source brightness, such as 500-5000 lx. It is necessary to take into account the light absorption capacity of the pipe (such as dark pipes which require higher intensity) and the dynamic range of the image sensor, so as to avoid loss of detail due to excessive intensity or noise interference due to insufficient intensity.
[0061] For example, for a PE pipe with a diameter of 50mm and a surface gloss of 80GU, the calibrated irradiation parameters are adjusted as follows: the light source height threshold is 50-150cm to ensure coverage of the upper and lower surfaces of the pipe; the light source incident angle threshold is 30°-60° to reduce specular reflection on the high-gloss surface; the light source color temperature threshold is 4000K-5500K to adapt to the ambient light of 5500K and reduce color interference; and the light source irradiation intensity threshold is 1000-3000lx to balance the absorption of dark surfaces with the clarity of the image.
[0062] The adjustment space of the irradiation parameters obtained through the above steps clarifies the effective range for subsequent iterative optimization searches aimed at maximizing the visibility of bubble defects. This ensures that the adjustment of irradiation parameters will not exceed the equipment's capabilities and can accurately adapt to the characteristics of the pipe material and environment in the current detection scenario, laying the foundation for efficiently finding the optimal irradiation parameters.
[0063] S130: With the goal of maximizing the visibility of bubble defects on the pipe surface, within the irradiation parameter adjustment space, the irradiation parameters are iteratively optimized and searched based on the pipe attribute information and ambient light information until convergence, and the optimal irradiation parameters are output.
[0064] In this embodiment of the application, in order to find the light source illumination parameters that make the bubble defects on the pipe surface most clearly visible, it is necessary to combine the collected pipe attribute information and ambient light information, and to conduct a systematic iterative optimization search of the illumination parameters within the predetermined illumination parameter adjustment space, so as to ensure that the bubble defect features are significant when subsequent images are acquired.
[0065] Specifically, based on historical plastic pipe testing records, pipe material, diameter, and wall thickness were selected as screening criteria to retrieve and collect sample irradiation scheme sets and sample pipe surface image sets.
[0066] Simultaneously, a bubble defect visibility evaluation index is configured and a sample bubble defect visibility set is constructed. Then, a deep learning model is trained using the sample set until convergence, and a pre-trained bubble defect visibility prediction plugin is built to provide a prediction tool for subsequent parameter optimization.
[0067] The pre-trained bubble defect visibility prediction plugin takes a simulated irradiation scheme as input and outputs the visibility of bubble defects on the pipe surface through the calculation and processing of a deep learning model, thus realizing the rapid prediction of the bubble defect display effect under different irradiation schemes.
[0068] Furthermore, within the illumination parameter adjustment space, several illumination parameters are randomly selected, and simulated illumination schemes are constructed by combining pipe material attribute information and ambient light information, thereby generating several simulated illumination schemes to cover a variety of possible lighting scenarios.
[0069] Meanwhile, using a pre-trained bubble defect visibility prediction plugin, the visibility of bubble defects on the pipe surface is predicted for each of these simulated irradiation schemes, so as to output several predicted bubble defect visibilitys and provide an evaluation basis for subsequent iterative optimization.
[0070] Finally, the optimal irradiation parameters are output by iteratively optimizing the irradiation parameters within the irradiation parameter adjustment space based on several predicted bubble defect visibilitys until the preset number of convergences is reached.
[0071] This step, through systematic parameter iterative optimization search, combined with the predictive capabilities of the pre-trained bubble defect visibility prediction plugin, achieves accurate selection of optimal illumination parameters in complex scenarios, laying the foundation for clear presentation of bubble defects in the future.
[0072] Step S130 in the method provided in this application embodiment includes:
[0073] Pre-trained bubble defect visibility prediction plugin;
[0074] Within the irradiation parameter adjustment space, several irradiation parameters are randomly selected, and simulated irradiation schemes are constructed by combining the pipe material attribute information and ambient light information, thereby generating several simulated irradiation schemes.
[0075] Using the bubble defect visibility prediction plugin, the visibility of bubble defects on the pipe surface is predicted for each of the several simulated irradiation schemes, and several predicted bubble defect visibilitys are output.
[0076] Within the irradiation parameter adjustment space, the irradiation parameters are iteratively optimized and searched based on the several predicted bubble defect visibilitys until a preset number of convergences is reached, and the optimal irradiation parameters are output.
[0077] In this embodiment of the application, in the process of detecting bubble defects on the surface of plastic pipes, in order to find the solution that can make the bubble defects most clearly visible from a variety of light source irradiation parameter combinations, it is necessary to achieve accurate optimization through a systematic irradiation parameter iterative optimization search process.
[0078] Specifically, the first step is to pre-train the bubble defect visibility prediction plugin.
[0079] The method provided in this application embodiment includes the following steps in the "pre-trained bubble defect visibility prediction plugin":
[0080] The pipe material, pipe diameter, and pipe wall thickness in the pipe attribute information are selected as screening conditions. Guided by the surface bubble defect of the pipe, information retrieval is performed based on historical plastic pipe inspection records, and a sample irradiation scheme set and a sample pipe surface image set are collected.
[0081] Configure bubble defect visibility evaluation indicators, wherein the bubble defect visibility evaluation indicators include bubble-background contrast, bubble-background signal-to-noise ratio, bubble edge sharpness, and bubble-background color difference;
[0082] According to the bubble defect visibility evaluation index, the visibility of multiple sample pipe surface images in the sample pipe surface image set is evaluated, and the visibility of multiple sample bubble defects is output to construct a sample bubble defect visibility set.
[0083] Using the sample illumination scheme set and the sample bubble defect visibility set, a deep learning model is trained until convergence to obtain a bubble defect visibility prediction plugin.
[0084] In this embodiment, the pre-trained bubble defect visibility prediction plugin is a key component for achieving accurate detection of bubble defects on the pipe surface. Its core purpose is to train a model that can quickly and accurately predict the visibility of bubble defects under different irradiation schemes using historical detection data, providing an efficient evaluation tool for subsequent irradiation parameter optimization.
[0085] First, sample data is collected and screened.
[0086] Specifically, pipe material, pipe diameter, and pipe wall thickness from the pipe property information are selected as the core screening conditions. This is because the material determines the way light interacts with the pipe (such as reflectivity and absorptivity), while the pipe diameter and pipe wall thickness affect the propagation path of light on the surface and inside the pipe. The three together constitute the key basic attributes that affect the imaging of bubble defects.
[0087] Furthermore, guided by the bubble defects on the pipe surface, information retrieval is performed based on historical plastic pipe inspection records to collect the corresponding sample irradiation scheme set and sample pipe surface image set.
[0088] The sample illumination scheme set includes combinations of illumination parameters such as light source height, light source incident angle, light source color temperature, and light source illumination intensity. The sample pipe surface image set is created by capturing images of the pipe surface under the corresponding sample illumination scheme using a high-definition industrial camera. These images clearly show the morphology and distribution of bubble defects on the pipe surface under different lighting conditions.
[0089] For example, for a pipe made of PE with a diameter of 50mm and a wall thickness of 6mm, under the irradiation parameters of 80cm light source height, 45° light source incident angle, 5000K light source color temperature, and 2000lx light source irradiation intensity, in the sample pipe surface image obtained by a high-definition industrial camera, bubbles with a diameter of about 2mm show obvious bright spot characteristics, forming a significant contrast with the surrounding pipe surface.
[0090] Conversely, under the parameter combination of a light source height of 120cm, a light source incident angle of 30°, a light source color temperature of 3000K, and a light source illumination intensity of 1500lx, the visibility of the same bubble is reduced, the edges are blurred, and the distinction from the background is weakened. These images with different effects together constitute the sample pipe surface image set of this type of pipe.
[0091] Furthermore, a bubble defect visibility evaluation index is configured to quantify the manifestation effect of bubble defects from multiple dimensions.
[0092] Among them, the visibility evaluation indicators for bubble defects include bubble-background contrast, bubble-background signal-to-noise ratio, bubble edge sharpness, and bubble-background color difference, so as to comprehensively and objectively evaluate the visibility of bubble defects under different illumination schemes and provide accurate label data for subsequent model training.
[0093] Specifically, the bubble-background contrast is used to measure the brightness difference between the bubble area and the surrounding pipe surface. The specific calculation formula is "bubble-background contrast = (average brightness of bubble area - average brightness of background area) / (average brightness of bubble area + average brightness of background area)". The larger the bubble-background contrast value, the more obvious the distinction between the bubble and the background, and the easier it is to identify the position and shape of the bubble from the image.
[0094] In addition, the bubble-background signal-to-noise ratio reflects the ratio of bubble signal to image noise. It is calculated by the formula "bubble-background signal-to-noise ratio = signal intensity in bubble region / noise intensity in background region". The higher the bubble-background signal-to-noise ratio, the less noise interference the bubble features are, and the clearer the details of the bubbles in the image.
[0095] In addition, the bubble edge sharpness is measured by extracting the bubble outline using an edge detection algorithm (such as the Canny algorithm) and using the sum of the gradient values of the outline pixels. The higher the bubble edge sharpness value, the sharper the bubble edge and the easier it is to separate the bubble boundary from the background.
[0096] In addition, the bubble-background color difference is calculated based on the CIELab color space in the existing technology to determine the difference in hue and saturation between the bubble and the background. The larger the bubble-background color difference value, the higher the color differentiation. Even when the brightness difference is not large, the bubble can be identified by the color difference.
[0097] Furthermore, based on the obtained bubble defect visibility evaluation index, the visibility of multiple sample pipe surface images in the sample pipe surface image set is evaluated to output the visibility of multiple sample bubble defects, thereby constructing a sample bubble defect visibility set.
[0098] Specifically, for each sample pipe surface image, the specific values of bubble-background contrast, bubble-background signal-to-noise ratio, bubble edge sharpness, and bubble-background color difference are first calculated. Then, the values of these four indicators are standardized (i.e. mapped to the range of 0-100). Subsequently, the average value is calculated, and the standardized values of the four indicators are added together and divided by 4 to obtain the sample bubble defect visibility of the sample image.
[0099] For example, if the four indicators of a sample pipe surface image are standardized to 80, 75, 85, and 70 respectively, then the visibility of its sample bubble defects is (80+75+85+70) / 4=77.5. By performing the above calculation on all images in the sample pipe surface image set, multiple sample bubble defect visibilitys are output, thereby constructing a sample bubble defect visibility set.
[0100] Furthermore, using the obtained sample illumination scheme set and sample bubble defect visibility set, a deep learning model is trained until convergence to obtain a bubble defect visibility prediction plugin.
[0101] Specifically, a convolutional neural network (CNN) was selected as the basic model architecture to build a bubble defect visibility prediction plugin. This CNN can effectively extract spatial features and illumination parameter correlation patterns from the input data, and is suitable for handling the complex mapping relationship between illumination parameters, pipe properties and bubble visibility.
[0102] First, the parameters (light source height, incident angle, color temperature, irradiation intensity) in the sample illumination scheme set are fused with the corresponding pipe material properties (material, diameter, pipe wall thickness) to form the input feature vector of the model, and the values of the sample bubble defect visibility set are used as the output label of the model.
[0103] Furthermore, during model training, mean squared error (MSE) is used as the loss function, and the weight parameters of the network layers are continuously adjusted through the backpropagation algorithm to minimize the error between the predicted value and the actual sample visibility.
[0104] At the same time, set reasonable training epochs (e.g., 200 epochs) and batch size (e.g., 32), and introduce a dropout mechanism (dropout rate set to 0.3) to prevent model overfitting and improve the model's generalization ability.
[0105] For example, the pipe material is PE, with a diameter of 50mm and a wall thickness of 6mm. These properties are combined with the parameters of a light source height of 80cm, an incident angle of 45°, a color temperature of 5000K, and an intensity of 2000lx as input. The model initially predicts the bubble visibility to be 70, while the actual sample visibility is 77.5. At this point, the error is calculated using a loss function, and the parameters are adjusted in reverse. After multiple rounds of training, when the same features are input, the model's predicted value gradually approaches 77.5 until the average prediction error of the entire training set is less than 2%, indicating that the model has converged.
[0106] Ultimately, the trained bubble defect visibility prediction plugin can receive any combination of irradiation parameters and pipe property information, and output accurate bubble defect visibility prediction results in a short time, providing an efficient and reliable evaluation basis for subsequent iterative optimization of irradiation parameters.
[0107] For example, when the input pipe material is PVC, diameter is 80mm, wall thickness is 10mm, and the parameters are a light source height of 100cm, light source incident angle of 60°, light source color temperature of 4000K, and light source illumination intensity of 2500lx, the trained bubble defect visibility prediction plugin can immediately output a bubble defect visibility prediction value of 83.0, while the actual detected sample visibility under this combination is 83.1, with a deviation of only 0.1. This fully demonstrates the prediction accuracy of the plugin and can efficiently support the subsequent iterative optimization search process of illumination parameters.
[0108] Furthermore, after the bubble defect visibility prediction plugin is trained, several irradiation parameters are randomly selected within the irradiation parameter adjustment space. Simultaneously, a simulated irradiation scheme is constructed by combining pipe material attribute information and ambient light information, and several simulated irradiation schemes are generated accordingly.
[0109] Specifically, based on the established irradiation parameter adjustment space, which includes the light source height threshold, light source incident angle threshold, light source color temperature threshold, and light source irradiation intensity threshold, values are selected from the threshold range of each parameter by random sampling.
[0110] For example, if the light source height threshold is 50-150cm, the light source incident angle threshold is 30°-60°, the light source color temperature threshold is 3000K-6000K, and the light source irradiation intensity threshold is 1000-3000lx, then 200 sets of parameter combinations are randomly selected, and each set of parameters covers the specific values of the above four dimensions.
[0111] Subsequently, each set of irradiation parameters was fused with the pipe material properties (such as pipe material being PP, pipe diameter being 60mm, and pipe wall thickness being 7mm) and ambient light information (such as ambient light color temperature being 5500K, light source irradiation intensity being 800lx, and light source incident angle being 25°) of the pipe to be tested, thus constructing 200 simulated irradiation schemes. Each scheme fully reflects the comprehensive scenario of specific lighting conditions, pipe material characteristics, and environmental interference.
[0112] Meanwhile, using the trained bubble defect visibility prediction plugin, the visibility of bubble defects on the pipe surface is predicted for several generated simulated irradiation schemes, and then several predicted bubble defect visibility values are output.
[0113] Specifically, the irradiation parameters, pipe material properties, and ambient light information contained in each simulated irradiation scheme are input into the trained bubble defect visibility prediction plugin. After the plugin performs calculations through its internal algorithm, it outputs the corresponding predicted bubble defect visibility.
[0114] For example, for a certain simulated illumination scheme (light source height 90cm, incident angle 45°, color temperature 4500K, illumination intensity 2200lx, combined with the properties of PP material pipe and the above-mentioned ambient light information), the bubble defect visibility prediction plugin outputs a predicted visibility score of 85. After predicting each of the 200 simulated schemes, 200 predicted values distributed between 50 and 90 are obtained. These values intuitively reflect the potential manifestation effect of bubble defects under different schemes.
[0115] Furthermore, within the obtained irradiation parameter adjustment space, the irradiation parameters are iteratively optimized and searched based on several predicted bubble defect visibility values until a preset number of convergences is reached, so as to output the optimal irradiation parameters.
[0116] The method provided in this application embodiment includes the step of "performing iterative optimization search of irradiation parameters based on the plurality of predicted bubble defect visibilitys within the irradiation parameter adjustment space until a preset number of convergences is reached, and outputting the optimal irradiation parameters" as follows:
[0117] Using the irradiation parameters as initial solutions, and based on several predicted bubble defect visibilitys, the initial solutions are arranged in descending order of predicted bubble defect visibility to generate an initial solution sequence.
[0118] The first 10% of the solutions in the initial solution sequence are designated as excellent solutions, and the last 90% are designated as inferior solutions. The inferior solutions are then divided into equal-value clusters centered on the excellent solutions to obtain K solution sets, where K is the number of initial solutions.
[0119] Within the K solution sets, the optimal solutions within the solution sets are used as the optimization direction, and the inferior solutions within the solution sets are adjusted according to a preset step size to obtain K updated solution sets. If the updated inferior solution exceeds the irradiation parameter adjustment space, any irradiation parameter is randomly selected within the irradiation parameter adjustment space for replacement.
[0120] Using the bubble defect visibility prediction plugin, inferior solutions in the K updated solution sets are predicted respectively. If the predicted bubble defect visibility of the inferior solution is greater than or equal to the predicted bubble defect visibility of the superior solution in the same solution set, the inferior solution replaces the superior solution.
[0121] Perform iterative optimization until a preset number of convergences is reached, output K current updated solution sets, and select the optimal solution corresponding to the maximum predicted bubble defect visibility in the K current updated solution sets as the optimal irradiation parameter.
[0122] In this embodiment of the application, in order to efficiently screen out the solution that can make the bubble defect most clearly visible from a large number of potential irradiation parameter combinations, the initial solution needs to be arranged and classified in an orderly manner to achieve the targeting and efficiency of subsequent iterative optimization search.
[0123] Specifically, the initial solutions are first arranged and classified. That is, the irradiation parameters are used as the initial solutions, and the initial solutions are arranged in descending order according to the corresponding predicted bubble defect visibility to generate an initial solution sequence.
[0124] For example, if there are 200 initial solutions (i.e., illumination parameters), and the predicted visibility output by the bubble defect visibility prediction plugin is distributed between 60 and 90 points, then they are sorted from high to low to form an ordered sequence of initial solutions.
[0125] Furthermore, the top 10% of solutions in the initial solution sequence (such as the top 20 solutions) are designated as excellent solutions, as the irradiation parameters corresponding to these solutions already have a good bubble display effect; the remaining 90% of solutions (such as the remaining 180 solutions) are designated as inferior solutions.
[0126] Simultaneously, using each optimal solution as the center, the inferior solutions are divided using the equi-clustering method, so that each inferior solution belongs to the solution set of the optimal solution whose illumination parameter characteristics are closest to its own, ultimately resulting in K solution sets (K being the initial number of solutions, i.e., 200). Through the equi-clustering method, an ordered partitioning of the illumination parameter adjustment space is achieved, allowing subsequent iterative optimization searches of illumination parameters to proceed around the optimal direction.
[0127] Furthermore, the illumination parameters are adjusted and updated within each solution set. That is, taking the optimal solution within the solution set as the optimization direction, the illumination parameters (i.e., light source height, light source incident angle, light source color temperature, and light source illumination intensity) of the inferior solution are fine-tuned according to a preset step size.
[0128] The step size is set according to the range of the irradiation parameter adjustment space and the detection accuracy requirements. This ensures both search efficiency and the fineness of irradiation parameter adjustment, avoiding missing the optimal solution due to an excessively large step size, or resulting in too many iterations and low efficiency due to an excessively small step size.
[0129] For example, if the preset step size is set to light source height ±5cm, light source incident angle ±3°, light source color temperature ±200K, and light source irradiation intensity ±100lx, for a certain inferior solution (light source height 90cm, light source incident angle 40°, light source color temperature 4500K, light source irradiation intensity 2000lx), after adjusting the direction with the superior solution (light source height 85cm, light source incident angle 45°, light source color temperature 5000K, light source irradiation intensity 2200lx), the updated parameters (light source height 87cm, light source incident angle 43°, light source color temperature 4700K, light source irradiation intensity 2100lx) are obtained, forming an updated solution set.
[0130] If the adjusted parameter exceeds the irradiation parameter adjustment space (e.g., the light source height is adjusted to 40cm, which is lower than the threshold of 50cm), then any similar irradiation parameter (e.g., 55cm) is randomly selected within the space to replace it, in order to ensure the effectiveness of the irradiation parameter.
[0131] Meanwhile, the bubble defect visibility prediction plugin is used to predict the bubble defect visibility of inferior solutions in the updated solution set. If the predicted visibility of an inferior solution is greater than or equal to that of an excellent solution in the same solution set, the inferior solution is used to replace the excellent solution, so as to continuously improve the quality of the optimal solution in the solution set and drive the entire search process to approach a better combination of parameters.
[0132] For example, if the prediction visibility of a superior solution in a certain solution set is 82 points, and the prediction visibility of a inferior solution after adjustment is 85 points, then the inferior solution is upgraded to a new superior solution, so that subsequent parameter adjustments can be carried out based on a better starting point, further improving the efficiency and accuracy of optimization.
[0133] Furthermore, repeat the adjustment, prediction, and replacement process in the above steps until the preset number of convergences is reached.
[0134] The method provided in this application embodiment includes the following steps for setting the "preset number of convergences":
[0135] Using the pipe material attribute information as a constraint, the average historical bubble defect density and average historical bubble defect diameter of similar pipe materials within a historical time range are collected, as well as the average historical overall bubble defect density and average historical overall bubble defect diameter of plastic pipe materials are obtained.
[0136] The convergence adjustment coefficient is obtained by summing the ratio of the historical average bubble defect density to the historical average overall bubble defect density and the ratio of the historical average overall bubble defect diameter to the historical average bubble defect diameter.
[0137] The product of the convergence adjustment coefficient and the standard convergence number is set as the preset convergence number, wherein the standard convergence number is greater than or equal to 50 and less than or equal to 200.
[0138] In this embodiment, the reasonable setting of the preset convergence number is the key to ensuring the efficiency and accuracy of the irradiation parameter iterative optimization search. Its core purpose is to dynamically adjust the number of iterations according to the actual bubble defect characteristics of the pipe, so as to avoid insufficient optimization or waste of resources due to a fixed number of iterations. Therefore, it is necessary to make targeted settings in combination with historical data and pipe attribute information.
[0139] First, using pipe material attribute information as a constraint, historical bubble defect data of similar pipe materials and historical overall bubble defect data of plastic pipe materials are collected.
[0140] Specifically, the material, diameter, wall thickness and other attribute information of the pipe to be tested are first selected as constraints. The bubble defect situation of the same type of pipe in the historical test records within a certain time range is retrieved, and the average density of historical bubble defects (number of bubbles per unit area) and the average diameter of historical bubble defects (average diameter of bubbles) are calculated.
[0141] The formula for calculating the average density of historical bubble defects is: "Average density of historical bubble defects = Total number of bubble defects of the same type of pipe within the historical time range / Total area of the same type of pipe within the historical time range". The formula for calculating the average diameter of historical bubble defects is: "Average diameter of historical bubble defects = Sum of the diameters of all bubble defects of the same type of pipe within the historical time range / Total number of bubble defects of the same type of pipe within the historical time range".
[0142] At the same time, the historical average density and diameter of all plastic pipes (not limited to the same type) were obtained and used as a reference benchmark.
[0143] For example, for a PE pipe with a diameter of 50mm, the average historical bubble defect density was 4 bubbles / m. 2 The historical average diameter of bubble defects was 1.2 mm; while the historical average density of overall bubble defects in plastic pipes was 2 per m. 2 The historical average diameter of the overall bubble defect was 2.4 mm.
[0144] Furthermore, the ratios of the historical average bubble defect density to the historical average overall bubble defect density and the ratio of the historical average overall bubble defect diameter to the historical average bubble defect diameter are calculated, and the two are summed to obtain the convergence adjustment coefficient.
[0145] Among them, the density ratio obtained by comparing the historical average density of bubble defects of the same type of pipe with the historical average density of overall bubble defects of plastic pipe reflects the difference in the density of bubble defects of the same type of pipe relative to the overall level; the diameter ratio obtained by comparing the historical average diameter of overall bubble defects of plastic pipe with the historical average diameter of bubble defects of the same type of pipe reflects the difference in the fineness of bubble defects of the same type of pipe relative to the overall level.
[0146] Meanwhile, the formula for calculating the convergence adjustment coefficient can be expressed as "convergence adjustment coefficient = historical average density of bubble defects / historical average density of overall bubble defects + historical average diameter of overall bubble defects / historical average diameter of bubble defects", which is used to comprehensively reflect the density and fineness of bubble defects in similar pipe materials relative to the overall level, and to quantify the difficulty of optimization.
[0147] For example, in the same PE pipe as in the example above, the density ratio is 4 / 2=2 and the diameter ratio is 2.4 / 1.2=2. The convergence adjustment coefficient obtained by adding the two is 2+2=4. The larger the convergence adjustment coefficient, the more difficult it is to find the optimal irradiation parameters for the same type of pipe. More iterations are needed to fully explore the parameter space and ensure that the optimal irradiation parameters are found.
[0148] Finally, the obtained convergence adjustment coefficient is multiplied by the standard convergence number to obtain the preset convergence number. The specific calculation formula can be expressed as "preset convergence number = convergence adjustment coefficient × standard convergence number".
[0149] The standard number of convergences is usually set in the range of 50-200, and the specific number can be set according to the industry's testing accuracy requirements and the equipment's computing power (such as the default of 100 times).
[0150] For example, in the same example above, when the convergence adjustment coefficient is 4 and the standard convergence count is 100, the preset convergence count is 4 × 100 = 400; if the convergence adjustment coefficient for a certain type of pipe is 1.5 and the standard convergence count is 80, the preset convergence count is 1.5 × 80 = 120.
[0151] By setting the preset number of convergences through the above steps, the difficulty of finding the optimal bubble defect can be accurately matched to different pipe materials. This ensures that there are enough iterations to find the optimal irradiation parameters in complex scenarios, while avoiding invalid iterations in simple scenarios. Thus, while ensuring detection accuracy, the overall efficiency of parameter iteration optimization search is improved.
[0152] Furthermore, after the iterative optimization search reaches the preset number of convergences, K currently updated solution sets are output, and the optimal irradiation parameters need to be selected from these solution sets.
[0153] Specifically, all optimal solutions within the K currently updated solution sets are filtered to find the optimal solution with the highest predicted visibility of bubble defects. The irradiation parameters corresponding to this optimal solution are the final optimal irradiation parameters.
[0154] For example, after 400 iterations of optimization search with a preset convergence number, the predicted bubble defect visibility of the 200 best solutions in the current updated solution set is between 85 and 93 points.
[0155] Among them, the predicted bubble defect visibility of a certain optimal solution in the solution set is 93 points. The corresponding illumination parameters are light source height 85cm, light source incident angle 50°, light source color temperature 5200K, and light source illumination intensity 2300lx. These illumination parameters are the optimal illumination parameters that can make the bubble defects on the surface of the pipe to be inspected most clearly visible.
[0156] S140: Control the target light source to irradiate the plastic pipe to be tested according to the optimal irradiation parameters, then acquire the surface image of the plastic pipe to be tested to detect bubble defects, and output the bubble defect detection result of the pipe.
[0157] In this embodiment of the application, after determining the optimal irradiation parameters, the final bubble defect detection result of the pipe is obtained by precisely controlling the light source irradiation and the image acquisition of the pipe surface, and combining it with bubble defect detection, so as to achieve accurate identification and judgment of bubble defects on the surface of plastic pipes.
[0158] Specifically, the first step is to precisely adjust the various illumination parameters of the target light source based on the obtained optimal illumination parameters.
[0159] Specifically, the physical position, angle, and luminous characteristics of the light source are adjusted according to the optimal light source height, incident angle, color temperature, and illumination intensity to ensure that the light source irradiates the plastic pipe to be tested in the preset optimal manner.
[0160] At this time, the bubble defects on the surface of the pipe are most obvious under this lighting condition, and the distinction between them and the background is the highest, providing a good visual basis for subsequent surface image acquisition of the plastic pipe to be inspected.
[0161] Furthermore, a high-definition industrial camera is used to acquire images of the surface of the plastic pipe to be inspected under optimal lighting conditions.
[0162] Among them, the shooting parameters of the high-definition industrial camera (such as focal length, exposure time, resolution, etc.) need to be matched with the light source illumination parameters to ensure that the acquired surface image is clear and rich in detail, and can fully present the bubble defect morphology on the pipe surface.
[0163] For example, for pipes with high surface gloss, image overexposure caused by strong light reflection can be avoided under optimal irradiation parameters. High-definition industrial cameras, in conjunction with appropriately shortened exposure time, can more clearly capture the edges and internal structure of bubble defects.
[0164] Furthermore, after acquiring high-resolution images of the surface of the plastic pipe to be inspected, bubble defect detection is performed on the images.
[0165] Specifically, the image is first preprocessed using existing image processing algorithms (such as the Canny edge detection algorithm) to remove noise interference and enhance bubble defect features. Then, the preprocessed image is analyzed using existing target recognition algorithms (such as the YOLO target detection algorithm) to identify bubble defects and to count the number, size, and location of bubbles.
[0166] Finally, based on the detected bubble defect information, the bubble defect detection result of the plastic pipe to be tested is generated. The bubble defect detection result includes the specific parameters of the defect (such as the diameter and distribution area of each bubble defect) and the quality judgment of the plastic pipe to be tested (such as whether it is qualified, the defect level, etc.).
[0167] For example, when the number of detected bubble defects exceeds a preset threshold or the diameter of the largest bubble defect is greater than a specified standard, the pipe is determined to be a non-conforming product, and the location and characteristics of the defects are marked in detail in the pipe bubble defect detection results.
[0168] This step transforms the optimal irradiation parameters into actual light source control commands. Combined with high-precision image acquisition and intelligent defect detection, it achieves a closed loop from iterative optimization of irradiation parameters to final pipe quality assessment. This effectively ensures the accuracy and stability of surface bubble defect detection in plastic pipes and provides a reliable basis for pipe quality control.
[0169] The embodiments of this application, through the specific implementation methods described above, achieve the following technical effects:
[0170] This application proposes a method for quality inspection of plastic pipes using multi-angle light source illumination. First, it collects information on the pipe's properties and the ambient light of the inspection area. This information directly affects the interaction between the light and the pipe, as well as the imaging effect, providing comprehensive and realistic basic data for subsequent light source parameter optimization. Then, it obtains the target light source's illumination parameter adjustment space, which includes threshold ranges for light source height, incident angle, color temperature, and intensity. This clarifies the effective boundaries for parameter optimization, preventing parameter adjustments from exceeding equipment capabilities or deviating from inspection requirements. Next, with the goal of maximizing the visibility of bubble defects on the pipe surface, iteratively optimizes and searches for illumination parameters within the illumination parameter adjustment space. A pre-trained bubble defect visibility prediction plugin evaluates the effects of different parameter combinations, and multiple rounds of iterative searching generate the optimal illumination parameters, achieving precise adaptation between the illumination parameters and the pipe's properties and ambient light. Finally, it controls the light source to illuminate the pipe according to the optimal illumination parameters, acquires images of the pipe surface, performs bubble defect detection, and outputs the bubble defect detection results, effectively improving the accuracy and stability of bubble defect detection on the pipe surface.
[0171] The method provided in this application adopts a technical solution of "data acquisition-spatial definition-parameter optimization-detection output". First, it constructs an analysis basis based on pipe material attribute information and ambient light information. Then, it determines the optimal irradiation parameters through iterative optimization search and intelligent prediction of bubble defect visibility. Finally, it achieves efficient detection of bubble defects, which breaks through the problem of poor detection effect caused by fixed parameters in traditional methods. It provides a scientific solution for the quality inspection of plastic pipes.
[0172] Example 2, as shown in the appendix Figure 2 As shown, based on the inventive concept of the multi-angle light source irradiation plastic pipe quality inspection method provided in Embodiment 1, this application also provides a multi-angle light source irradiation plastic pipe quality inspection system, specifically including:
[0173] Information acquisition module 01 is used to acquire the pipe property information of the plastic pipe to be tested, as well as the ambient light information of the detection area in the current time zone;
[0174] The parameter space definition module 02 is used to obtain the target light source illumination parameter adjustment space;
[0175] The parameter iteration optimization module 03 is used to perform iterative optimization search of irradiation parameters within the irradiation parameter adjustment space, based on the pipe attribute information and ambient light information, with the optimization objective of maximizing the visibility of bubble defects on the pipe surface, until convergence, and output the optimal irradiation parameters.
[0176] The defect detection output module 04 is used to control the target light source to irradiate the plastic pipe to be inspected according to the optimal irradiation parameters, and then acquire the surface image of the plastic pipe to be inspected to detect bubble defects and output the bubble defect detection result of the pipe.
[0177] In one embodiment, the information acquisition module 01 is further configured to:
[0178] Collect the pipe material, pipe diameter, pipe wall thickness, surface color depth, surface gloss and surface roughness of the plastic pipe to be tested as pipe attribute information;
[0179] Collect ambient light color temperature, ambient light intensity, and ambient light incidence angle in the detection area within the current time zone as ambient light information.
[0180] In one embodiment, the parameter space delimitation module 02 is further configured to:
[0181] The illumination parameter adjustment space of the target light source is obtained, wherein the illumination parameter adjustment space includes the light source height threshold, the light source incident angle threshold, the light source color temperature threshold, and the light source illumination intensity threshold.
[0182] In one embodiment, the parameter iteration optimization module 03 is further configured to:
[0183] Pre-trained bubble defect visibility prediction plugin;
[0184] Within the irradiation parameter adjustment space, several irradiation parameters are randomly selected, and simulated irradiation schemes are constructed by combining the pipe material attribute information and ambient light information, thereby generating several simulated irradiation schemes.
[0185] Using the bubble defect visibility prediction plugin, the visibility of bubble defects on the pipe surface is predicted for each of the several simulated irradiation schemes, and several predicted bubble defect visibilitys are output.
[0186] Within the irradiation parameter adjustment space, the irradiation parameters are iteratively optimized and searched based on the several predicted bubble defect visibilitys until a preset number of convergences is reached, and the optimal irradiation parameters are output.
[0187] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.
[0188] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0189] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and variations fall within the scope of this application and its equivalents, this application intends to include such modifications and variations.
Claims
1. A method for quality inspection of plastic pipes irradiated by multi-angle light sources, characterized in that, The methods include: Collect pipe property information of the plastic pipe to be tested, as well as ambient light information of the testing area in the current time zone; Obtain the adjustment space for the illumination parameters of the target light source; With the goal of maximizing the visibility of bubble defects on the pipe surface, the irradiation parameters are iteratively optimized within the irradiation parameter adjustment space based on the pipe attribute information and ambient light information until convergence, and the optimal irradiation parameters are output. The target light source is controlled to irradiate the plastic pipe to be tested according to the optimal irradiation parameters. Then, the surface image of the plastic pipe to be tested is acquired to detect bubble defects, and the bubble defect detection result of the pipe is output. Among them, with maximizing the visibility of bubble defects on the pipe surface as the optimization objective, within the irradiation parameter adjustment space, the irradiation parameters are iteratively optimized and searched based on the pipe attribute information and ambient light information, including: Pre-trained bubble defect visibility prediction plugin; Within the irradiation parameter adjustment space, several irradiation parameters are randomly selected, and simulated irradiation schemes are constructed by combining the pipe material attribute information and ambient light information, thereby generating several simulated irradiation schemes. Using the bubble defect visibility prediction plugin, the visibility of bubble defects on the pipe surface is predicted for each of the several simulated irradiation schemes, and several predicted bubble defect visibilitys are output. Within the irradiation parameter adjustment space, the irradiation parameters are iteratively optimized and searched based on the several predicted bubble defect visibilitys until a preset number of convergences is reached, and the optimal irradiation parameters are output. Within the irradiation parameter adjustment space, the irradiation parameters are iteratively optimized and searched based on the several predicted bubble defect visibilitys until a preset number of convergences is reached, and the optimal irradiation parameters are output, including: Using the irradiation parameters as initial solutions, and based on several predicted bubble defect visibilitys, the initial solutions are arranged in descending order of predicted bubble defect visibility to generate an initial solution sequence. The first 10% of the solutions in the initial solution sequence are designated as excellent solutions, and the last 90% are designated as inferior solutions. The inferior solutions are then divided into equal-value clusters centered on the excellent solutions to obtain K solution sets, where K is the number of initial solutions. Within the K solution sets, the optimal solutions within the solution sets are used as the optimization direction, and the inferior solutions within the solution sets are adjusted according to a preset step size to obtain K updated solution sets. If the updated inferior solution exceeds the irradiation parameter adjustment space, any irradiation parameter is randomly selected within the irradiation parameter adjustment space for replacement. Using the bubble defect visibility prediction plugin, inferior solutions in the K updated solution sets are predicted respectively. If the predicted bubble defect visibility of the inferior solution is greater than or equal to the predicted bubble defect visibility of the superior solution in the same solution set, the inferior solution replaces the superior solution. Perform iterative optimization until a preset number of convergences is reached, output K current updated solution sets, and select the optimal solution corresponding to the maximum predicted bubble defect visibility in the K current updated solution sets as the optimal irradiation parameters; The steps for setting the preset number of convergence iterations include: Using the pipe material attribute information as a constraint, the average historical bubble defect density and average historical bubble defect diameter of the same type of pipe material within a historical time range are collected, as well as the average historical overall bubble defect density and average historical overall bubble defect diameter of all plastic pipe materials, not limited to the same type, are obtained. The convergence adjustment coefficient is obtained by summing the ratio of the historical average bubble defect density to the historical average overall bubble defect density and the ratio of the historical average overall bubble defect diameter to the historical average bubble defect diameter. The product of the convergence adjustment coefficient and the standard convergence number is set as the preset convergence number, wherein the standard convergence number is greater than or equal to 50 and less than or equal to 200.
2. The method for quality inspection of plastic pipes irradiated by multi-angle light sources according to claim 1, characterized in that, Collect pipe property information of the plastic pipe to be tested, as well as ambient light information of the testing area within the current time zone, including: Collect the pipe material, pipe diameter, pipe wall thickness, surface color depth, surface gloss and surface roughness of the plastic pipe to be tested as pipe attribute information; Collect ambient light color temperature, ambient light intensity, and ambient light incidence angle in the detection area within the current time zone as ambient light information.
3. The method for quality inspection of plastic pipes irradiated by multi-angle light sources according to claim 1, characterized in that, The illumination parameter adjustment space of the target light source is obtained, wherein the illumination parameter adjustment space includes the light source height threshold, the light source incident angle threshold, the light source color temperature threshold, and the light source illumination intensity threshold.
4. The method for quality inspection of plastic pipes irradiated by multi-angle light sources according to claim 1, characterized in that, The pre-trained bubble defect visibility prediction plugin includes: The pipe material, pipe diameter, and pipe wall thickness in the pipe attribute information are selected as screening conditions. Guided by the surface bubble defect of the pipe, information retrieval is performed based on historical plastic pipe inspection records, and a sample irradiation scheme set and a sample pipe surface image set are collected. Configure bubble defect visibility evaluation indicators, wherein the bubble defect visibility evaluation indicators include bubble-background contrast, bubble-background signal-to-noise ratio, bubble edge sharpness, and bubble-background color difference; According to the bubble defect visibility evaluation index, the visibility of multiple sample pipe surface images in the sample pipe surface image set is evaluated, and the visibility of multiple sample bubble defects is output to construct a sample bubble defect visibility set. Using the sample illumination scheme set and the sample bubble defect visibility set, a deep learning model is trained until convergence to obtain a bubble defect visibility prediction plugin.
5. A quality inspection system for plastic pipes irradiated by multi-angle light sources, characterized in that, The system is used to perform the method for quality inspection of plastic pipes irradiated by a multi-angle light source as described in any one of claims 1-4, the system comprising: The information acquisition module is used to collect the pipe property information of the plastic pipe to be tested, as well as the ambient light information of the testing area in the current time zone; The parameter space definition module is used to obtain the adjustment space of the illumination parameters of the target light source; The parameter iteration optimization module is used to maximize the visibility of bubble defects on the pipe surface as the optimization objective. Within the irradiation parameter adjustment space, it performs iterative optimization search of irradiation parameters based on the pipe attribute information and ambient light information until convergence, and outputs the optimal irradiation parameters. The defect detection output module is used to control the target light source to irradiate the plastic pipe to be inspected according to the optimal irradiation parameters, and then acquire the surface image of the plastic pipe to be inspected to detect bubble defects and output the bubble defect detection result of the pipe.
Citation Information
Patent Citations
Intelligent quality detection system based on machine vision
CN120369618A