Method and system for detecting quality of plastic pipe irradiated by multi-angle light source
By collecting pipe properties and ambient light information to optimize light source parameters and combining iterative optimization with pre-trained plug-ins, the problem of unstable detection caused by fixed light source parameters in traditional detection methods is solved, and accurate detection of bubble defects in plastic pipes is achieved.
Patent Information
- Application Number
- CN202511120030.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing plastic pipe inspection methods are unable to adapt to different materials and changes in ambient light, resulting in unstable bubble defect visualization and insufficient detection 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. The pre-trained bubble defect visibility prediction plug-in is used for iterative optimization to generate the optimal illumination parameters for detection.
It achieves accurate detection of bubble defects on the surface of plastic pipes, improves the adaptability and stability of detection results, and improves the accuracy and stability of bubble defect identification.
Smart Images

Figure CN120629007A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of plastic pipe inspection, and in particular to a method and system for inspecting the quality of plastic pipes using multi-angle light sources. Background Art
[0002] As quality control requirements for plastic pipe production continue to increase, accurate detection of surface bubble defects has become critical to ensuring product quality. Currently, traditional inspection methods rely on fixed-parameter vision systems, which are less adaptable to pipes of varying materials and colors. This is especially true for high-gloss or dark-colored pipes, where low image contrast under standard lighting can easily overwhelm defect signals with background information. This often results in unclear bubble identification and high misjudgment rates.
[0003] Existing detection methods only perform image acquisition and recognition based on preset light source parameters, which makes it difficult to adapt to differences in pipe properties and changes in ambient light. This results in unstable bubble defect visualization, insufficient detection accuracy and stability, and makes it difficult to meet the demand for defect detection consistency in high-quality plastic pipe production. Summary of the Invention
[0004] In order to solve the above technical problems, the present application provides a plastic pipe quality inspection method and system with multi-angle light source illumination, which improves the adaptability of plastic pipe quality inspection to actual inspection scenarios, adapts the light source effect to the inspection requirements, enhances the effect of showing bubble defects on the pipe surface, and makes up for the defects of traditional methods in insufficient inspection accuracy and stability due to fixed parameters.
[0005] The embodiments of this application disclose the following technical solutions: In a first aspect, embodiments of the present application provide a method for detecting the quality of plastic pipes using multi-angle light sources, the method comprising: Collect the pipe property information of the plastic pipe to be inspected and the ambient light information of the inspection area in the current time zone; Obtain the illumination parameter adjustment space of the target light source; Taking maximizing the visibility of bubble defects on the tube surface as the optimization goal, within the illumination parameter adjustment space, the illumination parameters are iteratively optimized and searched according to the tube property information and ambient light information until convergence, and the optimal illumination parameters are output; The target light source is controlled to illuminate the plastic pipe to be inspected according to the optimal illumination parameters, and then a surface image of the plastic pipe to be inspected is collected to perform bubble defect detection, and a pipe bubble defect detection result is output.
[0006] In a second aspect, an embodiment of the present application provides a plastic pipe quality inspection system using multi-angle light sources, the system comprising: An information collection module is used to collect the pipe property information of the plastic pipe to be inspected and the ambient light information of the inspection area in the current time zone; A parameter space definition module is used to obtain the illumination parameter adjustment space of the target light source; A parameter iterative optimization module is used to maximize the visibility of bubble defects on the tube surface, perform iterative optimization search of the illumination parameters according to the tube property information and ambient light information within the illumination parameter adjustment space, and output the optimal illumination parameters until convergence; The defect detection output module is used to control the target light source to illuminate the plastic pipe to be inspected according to the optimal illumination parameters, then collect the surface image of the plastic pipe to be inspected for bubble defect detection, and output the pipe bubble defect detection result.
[0007] One or more technical solutions provided in this application have at least the following technical effects or advantages: This application proposes a plastic pipe quality inspection method and system using multi-angle light source illumination. By combining the pipe property continuation with the ambient light characteristics to optimize the light source illumination parameters, accurate detection of bubble defects on the surface of plastic pipes is achieved. First, the pipe property information such as the material and size of the pipe to be inspected and the ambient light information of the inspection area are collected, and the light source illumination parameter adjustment space is obtained based on this, providing basic data for the subsequent targeted optimization of the illumination parameters; then, with the goal of maximizing the visibility of bubble defects, the illumination parameters are iteratively optimized and searched in the light source illumination parameter adjustment space, and the effects of the illumination parameters are evaluated through a pre-trained bubble defect visibility prediction plug-in to generate the optimal illumination parameters to accurately lock the illumination parameters that are most conducive to the appearance of bubble defects; finally, the pipe is illuminated according to the optimal illumination parameters and its surface image is collected. The pipe bubble defect detection results are obtained through defect detection output, so that the detection results adapt to the pipe characteristics and environmental changes, and the accuracy and stability of bubble defect recognition are improved.
[0008] The technical solution of this application realizes the scenario-based adaptation of light source illumination parameters through the technical solution of dynamic optimization of illumination parameters and intelligent prediction of bubble defect visibility. It not only accurately adjusts the pipe property information and ambient light characteristics, but also quantifies the visibility of bubble defects through multi-dimensional evaluation indicators. It solves the technical problems of fixed light source parameter settings and unstable detection effects in traditional detection, and provides an efficient and scientific method for plastic pipe quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A schematic flow chart of a method for inspecting plastic pipe quality using multi-angle light sources provided in an embodiment of the present application; Figure 2 This is a structural diagram of a plastic pipe quality inspection system with multi-angle light source illumination provided in an embodiment of the present application.
[0011] In the accompanying drawings, the components represented by the reference numerals are described as follows: Information collection module 01, parameter space definition module 02, parameter iterative optimization module 03, defect detection output module 04. DETAILED DESCRIPTION
[0012] The present application provides a plastic pipe quality inspection method and system with multi-angle light source illumination, which is used to solve the technical problem in the prior art that the traditional inspection method cannot set the light source illumination parameters according to the actual inspection scenario, resulting in the light source illumination effect being unable to adapt to the inspection requirements, affecting the appearance of bubble defects on the pipe surface, and causing insufficient accuracy and stability in bubble defect detection.
[0013] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0014] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the described features. In the description of this application, "plurality" means two or more, unless otherwise specifically specified.
[0015] In the description of this application, the term "for example" is used to mean "used as an example, illustration or explanation". 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 given to enable any person skilled in the art to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art will recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.
[0016] Example 1, as shown in the attached Figure 1 As shown, the present application provides a method for detecting the quality of plastic pipes using multi-angle light sources, the method comprising the following steps: S110: Collecting pipe property information of the plastic pipe to be inspected and ambient light information of the inspection area in the current time zone; In the embodiment of the present 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 property information of the plastic pipe to be inspected and the light characteristics of the inspection environment to provide basic data support for subsequent optimization of light source illumination parameters.
[0017] Specifically, first, the key pipe property information of the plastic pipe to be tested is collected through professional testing tools.
[0018] Among them, the pipe attribute information includes pipe material, pipe diameter, pipe wall thickness, surface color depth, surface gloss and surface roughness. These pipe attribute information directly affect the reflection and scattering effects of light on the pipe surface and are the basic factors that determine the light source illumination effect.
[0019] At the same time, the ambient light information of the detection area in the current time zone is collected through the ambient light detection device.
[0020] Among them, the ambient light information includes the ambient light color temperature, ambient light intensity and ambient light incident angle. These collected ambient light information will produce superimposed interference with the illumination effect of the target light source to ensure that the subsequent parameter optimization can specifically offset its influence and avoid blurred imaging of bubble defects caused by ambient light.
[0021] This step accurately collects pipe property information and ambient light information, providing basic data for subsequent iterative optimization of light source illumination parameters and determination of optimal illumination parameters, thereby ensuring that the detection process can adapt to the actual state of pipe characteristics and ambient light.
[0022] Step S110 of the method provided in the embodiment of the present application includes: 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; The ambient light color temperature, ambient light intensity, and ambient light incident angle of the detection area in the current time zone are collected as ambient light information.
[0023] In the present embodiment, during the bubble defect detection process on the surface of plastic pipes, the pipe's inherent properties and ambient light conditions jointly influence the illumination effect and defect imaging quality. Therefore, it is necessary to accurately collect key information data on the pipe's properties and ambient light conditions to provide a foundational data basis for subsequent optimization of light source illumination parameters.
[0024] Among them, due to the different light reflection characteristics of different pipe materials, the pipe diameter, wall thickness, etc. affect the penetration and scattering of light, and the surface color depth, glossiness, and roughness will also change the light reflection pattern; if the ambient light color temperature, intensity, and incident angle are not matched, it is easy to interfere with the target light source, causing the bubble defect to be unclear.
[0025] Therefore, it is necessary to collect pipe property information and ambient light information in a targeted manner to obtain basic data that fits the actual detection scenario.
[0026] 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 pipe material, pipe diameter, pipe wall thickness, surface color depth, surface gloss, and surface roughness of the plastic pipe to be tested, and use them as pipe property information to clarify the inherent characteristics of the interaction between light and pipes.
[0027] For example, a material composition analyzer is used to analyze a certain plastic pipe through infrared spectroscopy. The spectral match with the standard PE material is more than 95%, and it is determined to be PE material. Its light reflectivity is relatively moderate, providing a material property basis for the subsequent adaptation of the light source irradiation parameters; the diameter of the pipe is measured with a laser diameter gauge. For example, 8 points are taken at equal distances along the circumference, and the average value is calculated to be 50.1mm. 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.
[0028] In addition, an ultrasonic thickness gauge is used to detect the pipe wall thickness. Points are selected at different axial and circumferential positions on the pipe and the thickness is calculated based on the ultrasonic reflection time difference and propagation speed formula "Pipe wall thickness = (ultrasonic propagation speed × reflection time difference) / 2". This data is related to the appearance of bubble defects on the inner wall after light penetrates, and is a key reference for setting light source irradiation parameters.
[0029] At the same time, use a colorimeter to measure the surface color depth according to the CIE standard. If the average L* value of the pipe surface is 30 (the smaller the value, the darker the color), the dark color absorbs light more strongly, and the brightness of the light source needs to be increased to offset the absorption effect. Use a gloss meter to measure the surface gloss according to the standard. If a certain pipe has an average of 80.67GU, the high gloss is easy to cover defects with mirror reflection, and the parameter optimization needs to be adjusted in a targeted manner. Use a surface roughness measuring instrument to measure the Ra value. If it is 0.8μm, it indicates that the rough surface of the pipe has obvious diffuse reflection, and the light source illumination parameters need to be adapted to adjust the reflection.
[0030] At the same time, ambient light detection equipment (such as color temperature meters, illuminance meters, and angle meters) is used to collect the ambient light color temperature, ambient light intensity, and ambient light incident angle of the detection area in the current time zone, and use them as ambient light information to understand the environmental factors that interfere with the target light source in the detection scene in the current time zone.
[0031] For example, the color temperature of the ambient light in the inspection area in the morning is measured to be 5500K using a color thermometer, which will make the image bluish and may reduce the color contrast between the bubble defect and the pipe surface, so color compensation needs to be performed in the light source parameters; with the help of an illuminance meter, 5 points are evenly selected on the plane of the pipe surface in the inspection area, and the average ambient light intensity is measured to be 804lx. Too high an intensity will weaken the relative brightness of the target light source, providing a data reference for adjusting the target light source intensity; the angle of incidence of the ambient light is measured to be 30° through an angle measuring instrument. This angle may form specific reflections on the pipe surface, and its interference needs to be offset when optimizing the illumination parameters.
[0032] The collection of pipe property information and ambient light information through the above steps provides a basis for clearly defining the internal and external factors that affect the light source effect in the detection scene. This provides comprehensive and accurate data support for subsequent analysis of the impact of the two on the light source effect and iterative optimization of illumination parameters, ensuring that bubble defects are clearly displayed.
[0033] S120: Obtaining the illumination parameter adjustment space of the target light source; In the embodiment of the present application, in order to achieve accurate optimization of the light source illumination parameters, it is necessary to pre-determine the adjustable range of each illumination parameter of the target light source, laying the foundation for subsequent iterative optimization search within the range to find the optimal illumination parameters, and ensuring that the parameter optimization process is orderly and efficient.
[0034] Specifically, the illumination parameter adjustment space of the target light source is obtained by calibrating historical detection data.
[0035] Among them, the illumination parameter adjustment space includes the light source height threshold, light source incident angle threshold, light source color temperature threshold and light source illumination intensity threshold. These thresholds define the effective adjustment range of each illumination parameter and are insurmountable boundary conditions when optimizing the illumination parameters.
[0036] Step S120 in the method provided in the embodiment of the present application includes: An illumination parameter adjustment space of a target light source is obtained, wherein the illumination parameter adjustment space includes a light source height threshold, a light source incident angle threshold, a light source color temperature threshold, and a light source illumination intensity threshold.
[0037] In the examples of this application, during the illumination parameter optimization process for bubble defect detection on the surface of plastic pipes, clarifying the adjustable range of each illumination parameter of the target light source is a prerequisite for accurate optimization. This range is determined by combining equipment performance, inspection scenario requirements, and pipe material properties, providing a framework for subsequent search for optimal illumination parameters within a reasonable range.
[0038] Specifically, first, the effective illumination parameter range data accumulated in the historical detection data records is called up, and calibration is performed 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 illumination intensity threshold, which together constitute the illumination parameter adjustment space, so as to clarify the allowable adjustment range of each illumination parameter.
[0039] Among them, 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 irradiation height of 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 light due to too high a height.
[0040] In addition, the light source incident angle threshold limits the angle range between the light and the normal of the pipe surface, such as 15°-75°. Different angles will change the light and shadow form of the bubble defect. For example, low-angle incidence tends to highlight the shadow of the bubble edge, while high-angle incidence can 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 glossiness and roughness).
[0041] In addition, the light source color temperature threshold determines the adjustable color temperature range of the light source, such as 2700K-6500K, which needs to match the color depth of the pipe surface and the color temperature of the ambient light. For example, when detecting dark pipes, the light source color temperature can be appropriately increased to enhance the color difference between the bubbles and the background.
[0042] At the same time, the light source intensity threshold defines the adjustment range of the light source brightness, such as 500-5000lx. It is necessary to take into account the pipe's ability to absorb light (for example, dark pipes require higher intensity) and the dynamic range of the image sensor to avoid loss of details due to excessive intensity or noise interference due to excessive intensity.
[0043] For example, for a PE pipe with a diameter of 50 mm and a surface gloss of 80 GU, the illumination parameter adjustment space determined after calibration is: the light source height threshold is 50-150 cm to ensure coverage of the upper and lower surfaces of the pipe; the light source incident angle threshold is 30°-60° to reduce specular reflections on high-gloss surfaces; the light source color temperature threshold is 4000K-5500K to achieve adaptation to the ambient light of 5500K and reduce color interference; the light source illumination intensity threshold is 1000-3000lx to balance the absorption of dark surfaces and image clarity.
[0044] The irradiation parameter adjustment space obtained through the above steps clarifies the effective range for the subsequent iterative optimization search aimed at maximizing bubble defect visibility. This ensures that the irradiation parameter adjustment neither exceeds the equipment capabilities nor accurately adapts to the pipe and environmental characteristics in the current inspection scenario, laying the foundation for efficiently finding the optimal irradiation parameters.
[0045] S130: maximizing the visibility of bubble defects on the tube surface is used as an optimization goal. Within the illumination parameter adjustment space, illumination parameters are iteratively optimized and searched according to the tube property information and ambient light information until convergence is achieved, and optimal illumination parameters are output. In the embodiment of the present application, in order to find the light source illumination parameters that can make the bubble defects on the surface of the pipe appear most clearly, it is necessary to combine the collected pipe property information and ambient light information, and perform a systematic iterative optimization search of the illumination parameters within the established illumination parameter adjustment space to ensure that the bubble defect characteristics are significant during subsequent image acquisition.
[0046] Specifically, based on historical plastic pipe inspection records, pipe material, diameter, and wall thickness are selected as screening conditions, and a set of sample irradiation plans and a set of sample pipe surface images are retrieved and collected.
[0047] At the same time, the bubble defect visibility evaluation index is configured and a sample bubble defect visibility set is constructed. The sample set is then used to train the deep learning model until convergence, and a pre-trained bubble defect visibility prediction plug-in is constructed to provide a prediction tool for subsequent parameter optimization.
[0048] Among them, the pre-trained bubble defect visibility prediction plug-in takes the simulated irradiation scheme as input, and outputs the visibility of bubble defects on the pipe surface through calculation and processing of the deep learning model, realizing the rapid prediction of the bubble defect appearance effect under different irradiation schemes.
[0049] Furthermore, several illumination parameters are randomly selected in the illumination parameter adjustment space, and simulated illumination schemes are constructed by combining the pipe property information and the ambient light information, and several simulated illumination schemes are generated to cover a variety of possible illumination scenarios.
[0050] At the same time, the pre-trained bubble defect visibility prediction plug-in is used to predict the visibility of bubble defects on the pipe surface for these simulated irradiation schemes respectively, and several predicted bubble defect visibilities are output to provide an evaluation basis for subsequent iterative optimization.
[0051] Finally, the irradiation parameters are iteratively optimized and searched based on several predicted bubble defect visibilities within the irradiation parameter adjustment space until the preset number of convergences is reached to output the optimal irradiation parameters.
[0052] This step achieves accurate screening of optimal illumination parameters in complex scenarios through systematic iterative parameter optimization search, combined with the predictive capabilities of the pre-trained bubble defect visibility prediction plug-in, laying the foundation for the subsequent clear presentation of bubble defects.
[0053] Step S130 in the method provided in the embodiment of the present application includes: Pre-trained bubble defect visibility prediction plug-in; Randomly selecting a number of irradiation parameters in the irradiation parameter adjustment space, respectively building a simulated irradiation scheme based on the pipe property information and the ambient light information, and generating a number of simulated irradiation schemes; Using the bubble defect visibility prediction plug-in, respectively predict the visibility of bubble defects on the pipe surface for the plurality of simulated irradiation schemes, and output a plurality of predicted bubble defect visibilities; In the irradiation parameter adjustment space, an iterative optimization search of irradiation parameters is performed based on the plurality of predicted bubble defect visibilities until a preset number of convergences is reached, and the optimal irradiation parameters are output.
[0054] In the embodiment of the present application, during the bubble defect detection process on the surface of a plastic pipe, in order to find the solution that can make the bubble defect appear most clearly from a variety of light source illumination parameter combinations, it is necessary to achieve precise optimization through a systematic illumination parameter iterative optimization search process.
[0055] Specifically, the bubble defect visibility prediction plug-in needs to be pre-trained first.
[0056] In the method provided in the embodiment of the present application, the step of “pre-training the bubble defect visibility prediction plug-in” includes: Selecting the pipe material, pipe diameter, and pipe wall thickness from the pipe attribute information as screening conditions, using bubble defects on the pipe surface as a guide, and performing information retrieval based on historical plastic pipe inspection records, to collect a set of sample irradiation plans and a set of sample pipe surface images; Configuring bubble defect visibility evaluation indicators, wherein the bubble defect visibility evaluation indicators include bubble-background contrast, bubble-background signal-to-noise ratio, bubble edge clarity, and bubble-background color difference; performing visibility evaluation on a plurality of sample tube surface images in the sample tube surface image set according to the bubble defect visibility evaluation index, outputting a plurality of sample bubble defect visibilities, and constructing a sample bubble defect visibility set; The sample irradiation scheme set and the sample bubble defect visibility set are used to train a deep learning model until convergence, thereby obtaining a bubble defect visibility prediction plug-in.
[0057] In the embodiment of the present application, the pre-trained bubble defect visibility prediction plug-in is a key link in 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 through historical detection data, providing an efficient evaluation tool for subsequent irradiation parameter optimization.
[0058] First, sample data is collected and screened.
[0059] Specifically, the pipe material, pipe diameter and pipe wall thickness in the pipe attribute information are selected as the core screening conditions. This is because the material determines the interaction between light and the pipe (such as reflectivity and absorptivity), and 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 properties that affect the imaging of bubble defects.
[0060] 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 plan set and sample pipe surface image set.
[0061] The sample illumination scheme set includes combinations of illumination parameters such as light source height, incident angle, color temperature, and intensity. The sample tube surface image set uses a high-definition industrial camera to capture the tube surface under the corresponding sample illumination scheme. These images clearly demonstrate the morphology and distribution of bubble defects on the tube surface under different lighting conditions.
[0062] For example, for a pipe made of PE, with a diameter of 50 mm and a wall thickness of 6 mm, under the illumination parameter combination of light source height 80 cm, light source incident angle 45°, light source color temperature 5000K, and light source illumination intensity 2000 lx, in the sample pipe surface image taken by a high-definition industrial camera, bubbles with a diameter of about 2 mm show obvious bright spot characteristics, forming a significant contrast with the surrounding pipe surface.
[0063] On the contrary, under the parameter combination of light source height 120cm, light source incident angle 30°, light source color temperature 3000K, and light source illumination intensity 1500lx, the visibility of the same bubble is reduced, the edge is 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.
[0064] Furthermore, a bubble defect visibility evaluation index is configured to quantify the appearance effect of bubble defects from multiple dimensions.
[0065] Among them, the bubble defect visibility evaluation indicators include bubble-background contrast, bubble-background signal-to-noise ratio, bubble edge clarity 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.
[0066] 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 the bubble area - average brightness of the background area) / (average brightness of the bubble area + average brightness of the background area)". The larger the bubble-background contrast value, the more obvious the distinction between the bubbles and the background, and the easier it is to identify the position and shape of the bubbles from the image.
[0067] In addition, the bubble-background signal-to-noise ratio is used to reflect the ratio of the bubble signal to the image noise. It is calculated using the formula "bubble-background signal-to-noise ratio = bubble area signal intensity / background area noise intensity". The higher the bubble-background signal-to-noise ratio, the less the bubble characteristics are affected by noise interference, and the clearer the details of the bubbles in the image.
[0068] In addition, the bubble edge clarity is measured by extracting the bubble contour through an edge detection algorithm (such as the Canny algorithm) and the sum of the gradient values of the contour pixels. The larger the bubble edge clarity value, the sharper the bubble edge and the easier it is to separate the bubble boundary from the background.
[0069] In addition, the bubble-background color difference calculates the difference in hue and saturation between the bubbles and the background based on the CIELab color space in the existing technology. The larger the bubble-background color difference, the higher the color distinction. Even when the brightness difference is not large, the bubbles can be identified by the color difference.
[0070] Furthermore, according to the obtained bubble defect visibility evaluation index, visibility evaluation is performed on multiple sample tube surface images in the sample tube surface image set to output multiple sample bubble defect visibilities, thereby constructing a sample bubble defect visibility set.
[0071] Specifically, for each sample tube surface image, the specific values of the bubble-background contrast, bubble-background signal-to-noise ratio, bubble edge clarity, and bubble-background color difference are first calculated. The values of these four indicators are then standardized (i.e., mapped to the range of 0-100). Subsequently, the average method is used to add the four standardized indicator values and divide them by 4 to obtain the sample bubble defect visibility of the sample image.
[0072] For example, if the four indicators of a sample tube surface image are standardized to 80, 75, 85, and 70, respectively, then its sample bubble defect visibility is (80 + 75 + 85 + 70) / 4 = 77.5. By performing the above calculation on all images in the sample tube surface image set, multiple sample bubble defect visibilities are output, and then a sample bubble defect visibility set is constructed.
[0073] Furthermore, the obtained sample irradiation scheme set and sample bubble defect visibility set are used to train the deep learning model until convergence to obtain a bubble defect visibility prediction plug-in.
[0074] Specifically, a convolutional neural network (CNN) was selected as the basic model architecture to construct a bubble defect visibility prediction plug-in. This convolutional neural network can effectively extract spatial features and irradiation parameter association patterns in the input data, and is suitable for processing the complex mapping relationship between irradiation parameters, pipe properties and bubble visibility.
[0075] First, the various parameters in the sample irradiation scheme set (light source height, incident angle, color temperature, irradiation intensity) are fused with the corresponding pipe attribute information (material, diameter, and wall thickness) as the input feature vector of the model, and the numerical value in the sample bubble defect visibility set is used as the output label of the model.
[0076] Furthermore, during the model training process, the mean square error (MSE) is used as the loss function, and the weight parameters of the network layer are continuously adjusted through the back-propagation algorithm to minimize the error between the predicted value and the actual sample visibility.
[0077] At the same time, set a reasonable number of training rounds (such as 200 rounds) and batch size (such as 32), and introduce a dropout mechanism (the dropout rate is set to 0.3) to prevent the model from overfitting and improve the generalization ability of the model.
[0078] For example, the pipe material properties of PE, 50mm diameter, and 6mm wall thickness are combined with the parameters of light source height 80cm, light source incident angle 45°, light source color temperature 5000K, and light source illumination intensity 2000lx as input. The model initially predicts the bubble visibility to be 70, while the actual sample visibility is 77.5. At this time, the error is calculated through the loss function and the parameters are adjusted in reverse. After multiple rounds of training, when the same features are input, the model prediction value gradually approaches 77.5, until the average prediction error of the entire training set is less than 2%, indicating that the model converges.
[0079] Ultimately, the trained bubble defect visibility prediction plug-in can accept any combination of irradiation parameters and pipe property information, and output accurate bubble defect visibility prediction results in a short period of time, providing an efficient and reliable evaluation basis for subsequent iterative optimization of irradiation parameters.
[0080] For example, when the input pipe property information is PVC, diameter 80mm, and wall thickness 10mm, as well as the parameter combination of light source height 100cm, light source incident angle 60°, light source color temperature 4000K, and light source illumination intensity 2500lx, the trained bubble defect visibility prediction plug-in can immediately output a bubble defect visibility prediction value of 83.0, while the actual sample visibility detected under this combination is 83.1. The deviation between the two is only 0.1, which fully demonstrates the prediction accuracy of the prediction plug-in and can efficiently support the iterative optimization search process of subsequent illumination parameters.
[0081] Furthermore, after the bubble defect visibility prediction plug-in training is completed, several irradiation parameters are randomly selected in the irradiation parameter adjustment space, and a simulated irradiation plan is constructed by combining the pipe property information and the ambient light information, and several corresponding simulated irradiation plans are generated.
[0082] Specifically, based on the determined illumination parameter adjustment space including the light source height threshold, the light source incident angle threshold, the light source color temperature threshold and the light source illumination intensity threshold, a value is selected from the range of each parameter threshold by random sampling.
[0083] For example, if the light source height threshold is 50-150 cm, the light source incident angle threshold is 30°-60°, the light source color temperature threshold is 3000K-6000K, and the light source illumination 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.
[0084] Subsequently, each set of illumination parameters was integrated with the pipe property information of the pipe to be inspected (such as the pipe material is PP, the pipe diameter is 60mm, the pipe wall thickness is 7mm, etc.) and the ambient light information (such as the ambient light color temperature of 5500K, the light source illumination intensity of 800lx, and the light source incident angle of 25°) to construct 200 simulated illumination schemes. Each scheme fully reflects the comprehensive scenario of specific lighting conditions, pipe characteristics and environmental interference.
[0085] At the same time, the trained bubble defect visibility prediction plug-in is used to predict the visibility of bubble defects on the pipe surface for several generated simulated irradiation schemes, and then several predicted bubble defect visibilities are output.
[0086] Specifically, the illumination parameters, pipe property information, and ambient light information contained in each simulated illumination scheme are input into the trained bubble defect visibility prediction plug-in. After the plug-in calculates through the internal algorithm, it outputs the corresponding predicted bubble defect visibility.
[0087] For example, for a certain simulated illumination scheme (light source height 90cm, incident angle 45°, color temperature 4500K, illumination intensity 2200lx, combined with the PP pipe material properties and the above-mentioned ambient light information), the bubble defect visibility prediction plug-in outputs a predicted visibility of 85 points; after predicting 200 simulation schemes one by one, 200 predicted values ranging from 50 to 90 points were obtained. These values intuitively reflect the potential manifestation effects of bubble defects under different schemes.
[0088] Furthermore, within the obtained irradiation parameter adjustment space, an iterative optimization search of the irradiation parameters is performed based on the output of several predicted bubble defect visibilities until a preset number of convergence times is reached to output the optimal irradiation parameters.
[0089] In the method provided in an embodiment of the present application, the step of “performing an iterative optimization search for irradiation parameters based on the plurality of predicted bubble defect visibilities within the irradiation parameter adjustment space until a preset number of convergences is reached and outputting the optimal irradiation parameters” includes: Taking the irradiation parameters as the initial solution, based on a number of predicted bubble defect visibilities, the initial solutions are arranged from large to small according to the predicted bubble defect visibilities to generate an initial solution sequence; The first 10% of the solutions in the initial solution sequence are set as optimal solutions, and the last 90% of the solutions are set as inferior solutions. The inferior solutions are then divided into equal-value clusters with the optimal solution as the center to obtain K solution sets, where K is the number of initial solutions; In the K solution sets, taking the best solution in the solution set as the optimization direction, adjusting the inferior solutions in the solution set according to a preset step size to obtain K updated solution sets, wherein if the updated inferior solution exceeds the illumination parameter adjustment space, any illumination parameter in the illumination parameter adjustment space is randomly selected for replacement; Using the bubble defect visibility prediction plug-in, respectively predict the inferior solutions in the K updated solution sets. 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 is used to replace the superior solution. Iterate the optimization until the 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.
[0090] In the embodiment of the present application, in order to efficiently screen out the solution that can make the bubble defects appear most clearly from the numerous potential irradiation parameter combinations, the initial solutions need to be arranged and classified in an orderly manner to achieve the targetedness and efficiency of the subsequent iterative optimization search.
[0091] 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.
[0092] For example, if there are 200 initial solutions (i.e., irradiation parameters), and the predicted visibility output by the bubble defect visibility prediction plug-in is distributed between 60 and 90 points, they are sorted from high to low by score to form an ordered sequence of initial solutions.
[0093] Furthermore, the top 10% of the solutions in the initial solution sequence (such as the top 20 solutions) are set as optimal solutions. The irradiation parameters corresponding to these solutions have a good bubble visualization effect; the bottom 90% of the solutions (such as the remaining 180 solutions) are set as inferior solutions.
[0094] At the same time, using each optimal solution as the center, we used equivalued clustering to partition the inferior solutions, assigning each inferior solution to the solution set containing the optimal solution with the closest irradiation parameter characteristics. This ultimately resulted in K solution sets (K being the number of initial solutions, i.e., 200). This equivalued clustering method achieved an orderly partitioning of the irradiation parameter adjustment space, allowing subsequent iterative optimization searches to focus on the optimal direction.
[0095] Furthermore, the illumination parameters are adjusted and updated within each solution set. This means that the optimal solution within the solution set is used as the optimization direction, and the illumination parameters of the inferior solutions (i.e., light source height, light source incident angle, light source color temperature, and light source illumination intensity) are fine-tuned according to a preset step size.
[0096] The step size is set according to the range of the illumination parameter adjustment space and the detection accuracy requirements, so as to ensure the meticulousness of the illumination parameter adjustment while ensuring the search efficiency, avoiding missing the optimal solution due to a large step size, or causing too many iterations and low efficiency due to a small step size.
[0097] For example, if the preset step size is set to ±5cm for light source height, ±3° for light source incident angle, ±200K for light source color temperature, and ±100lx for light source illumination intensity, then a poor solution (90cm for light source height, 40° for light source incident angle, 4500K for light source color temperature, and 2000lx for light source illumination intensity) is adjusted based on the optimal solution (85cm for light source height, 45° for light source incident angle, 5000K for light source color temperature, and 2200lx for light source illumination intensity) to obtain updated parameters (87cm for light source height, 43° for light source incident angle, 4700K for light source color temperature, and 2100lx for light source illumination intensity), forming an updated solution set.
[0098] Among them, if the adjusted parameters exceed the illumination parameter adjustment space (for example, the light source height is adjusted to 40 cm, which is lower than the threshold of 50 cm), any similar illumination parameter (such as 55 cm) will be randomly selected in the space for replacement to ensure the validity of the illumination parameter.
[0099] At the same time, the bubble defect visibility prediction plug-in is used to predict the visibility of bubble defects for the inferior solutions in the updated solution set. If the predicted visibility of a certain inferior solution is greater than or equal to the optimal solution in the same solution set, the inferior solution is used to replace the optimal solution to continuously improve the quality of the optimal solution in the solution set and promote the entire search process to approach a better parameter combination.
[0100] For example, if the predicted visibility of the best solution in a solution set is 82 points, and the predicted visibility of a poor solution after adjustment is 85 points, the poor solution is upgraded to a new best solution, so that subsequent parameter adjustments can be based on a better starting point, further improving the efficiency and accuracy of optimization.
[0101] Furthermore, the adjustment, prediction and replacement processes in the above steps are repeated until a preset number of convergence times is reached.
[0102] In the method provided in the embodiment of the present application, the step of setting the “preset number of convergence times” includes: Using the pipe attribute information as a constraint, collect historical bubble defect density averages and historical bubble defect diameter averages of similar pipes within a historical time range, and obtain historical overall bubble defect density averages and historical overall bubble defect diameter averages of plastic pipes; The ratio of the historical bubble defect density mean to the historical overall bubble defect density mean and the ratio of the historical overall bubble defect diameter mean to the historical bubble defect diameter mean are added and summed to obtain a convergence adjustment coefficient; 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.
[0103] In the embodiment of the present application, the reasonable setting of the preset number of convergences is the key to ensuring the efficiency and accuracy of the iterative optimization search of the irradiation parameters. Its core purpose is to dynamically adjust the number of iterations according to the actual bubble defect characteristics of the pipe to avoid insufficient optimization or waste of resources due to a fixed number of times. Therefore, it is necessary to combine historical data and pipe property information for targeted settings.
[0104] First, with the pipe property information as a constraint, historical bubble defect data of similar pipes and historical overall bubble defect data of plastic pipes were collected.
[0105] Specifically, the material, diameter, wall thickness and other attribute information of the pipe to be inspected are first selected as constraints, and the bubble defect conditions of similar pipes within a certain time range in the historical inspection records are retrieved. The historical mean bubble defect density (the number of bubbles per unit area) and the historical mean bubble defect diameter (the average diameter of the bubbles) are calculated.
[0106] Among them, the calculation formula for the historical mean bubble defect density is "historical mean bubble defect density = total number of bubble defects of similar pipes within the historical time range / total inspection area of similar pipes within the historical time range", and the calculation formula for the historical mean bubble defect diameter is "historical mean bubble defect diameter = sum of all bubble defect diameters of similar pipes within the historical time range / total number of bubble defects of similar pipes within the historical time range".
[0107] At the same time, the historical average overall bubble defect density and the historical average overall bubble defect diameter of all plastic pipes (not limited to the same type) are obtained and used as a reference benchmark.
[0108] For example, for a pipe made of PE and with a diameter of 50 mm, the average bubble defect density is 4 / m 2 The historical average diameter of bubble defects is 1.2 mm; the historical average density of overall bubble defects in plastic pipes is 2 per m 2 The historical average diameter of bubble defects is 2.4 mm.
[0109] Furthermore, the ratio of the historical bubble defect density mean to the historical overall bubble defect density mean and the ratio of the historical overall bubble defect diameter mean to the historical bubble defect diameter mean are calculated, and the two are added together to obtain the convergence adjustment coefficient.
[0110] Among them, the density ratio obtained by comparing the historical average bubble defect density of the same type of pipes with the historical average overall bubble defect density of plastic pipes reflects the difference in the density of bubble defects in the same type of pipes relative to the overall level; the diameter ratio obtained by comparing the historical average overall bubble defect diameter of plastic pipes with the historical average bubble defect diameter of the same type of pipes reflects the difference in the smallness of bubble defects in the same type of pipes relative to the overall level.
[0111] At the same time, the calculation formula of the convergence adjustment coefficient can be expressed as "convergence adjustment coefficient = historical bubble defect density average / historical overall bubble defect density average + historical overall bubble defect diameter average / historical bubble defect diameter average", which is used to comprehensively reflect the density and fineness of bubble defects in similar pipes relative to the overall level, and quantify the difficulty of optimization.
[0112] For example, the density ratio of the same PE pipe as in the above example is 4 / 2=2, and the diameter ratio is 2.4 / 1.2=2. The convergence adjustment coefficient obtained by adding the two together is 2+2=4. The larger the convergence adjustment coefficient, the more difficult it is to optimize the bubble defects of the same type of pipe, and more iterations are required to fully explore the parameter space to ensure that the optimal irradiation parameters are found.
[0113] 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".
[0114] Among them, the standard convergence times are usually set in the range of 50-200 times, and can be specifically set based on the industry's detection accuracy requirements and equipment computing capabilities (such as the default of 100 times).
[0115] For example, in the same example above, when the convergence adjustment coefficient is 4 and the standard convergence number is selected as 100 times, the preset convergence number is 4×100=400 times; if the convergence adjustment coefficient of a certain type of pipe is 1.5 and the standard convergence number is selected as 80 times, the preset convergence number is 1.5×80=120 times.
[0116] The preset number of convergences set in the above steps can accurately match the difficulty of optimizing bubble defects for different pipes. This ensures that there are enough iterations to find the optimal irradiation parameters in complex scenarios, while avoiding invalid iterations in simple scenarios. This ensures detection accuracy while improving the overall efficiency of parameter iterative optimization search.
[0117] Furthermore, when the iterative optimization search reaches a preset number of convergence times, K current updated solution sets are output, and the optimal irradiation parameters need to be selected from these solution sets.
[0118] Specifically, all optimal solutions in the K currently updated solution sets are screened to find the optimal solution with the highest predicted bubble defect visibility. The irradiation parameters corresponding to the optimal solution are the final optimal irradiation parameters.
[0119] For example, after 400 iterative optimization searches with a preset convergence number, the predicted bubble defect visibility of the best solutions in the 200 currently updated solution sets is between 85 and 93 points.
[0120] Among them, the predicted bubble defect visibility of the optimal solution in a certain solution set is 93 points. The corresponding illumination parameters are light source height 85 cm, light source incident angle 50°, light source color temperature 5200K, and light source illumination intensity 2300lx. This illumination parameter is the optimal illumination parameter that can make the bubble defects on the surface of the pipe to be inspected appear most clearly.
[0121] S140: controlling the target light source to illuminate the plastic pipe to be inspected according to the optimal illumination parameters, then collecting a surface image of the plastic pipe to be inspected to perform bubble defect detection, and outputting a pipe bubble defect detection result.
[0122] In the embodiment of the present application, after determining the optimal illumination parameters, the final pipe bubble defect detection result is obtained by precisely controlling the light source illumination and pipe surface image acquisition, and combining bubble defect detection, so as to achieve accurate identification and judgment of bubble defects on the surface of plastic pipes.
[0123] Specifically, first, various illumination parameters of the target light source are precisely adjusted based on the obtained optimal illumination parameters.
[0124] Specifically, according to the optimal light source height, light source incident angle, light source color temperature and light source illumination intensity, the physical position, angle and luminous characteristics of the light source are adjusted to ensure that the light source illuminates the plastic pipe to be inspected in a preset optimal manner.
[0125] At this time, the bubble defects on the pipe surface are most obvious under this lighting condition, and the distinction from the background is the highest, providing a good visual basis for the subsequent surface image acquisition of the plastic pipe to be inspected.
[0126] Furthermore, a high-definition industrial camera is used to capture images of the surface of the plastic pipe to be inspected under optimal lighting conditions.
[0127] Among them, the shooting parameters of the high-definition industrial camera (such as focal length, exposure time, resolution, etc.) need to be adapted to the light source illumination parameters to ensure that the collected surface images are clear and rich in details, and can fully present the bubble defect morphology on the pipe surface.
[0128] For example, for pipes with high surface gloss, image overexposure caused by strong light reflection can be avoided under optimal illumination parameters. High-definition industrial cameras, combined with appropriately shortened exposure time, can more clearly capture the edges and internal structures of bubble defects.
[0129] Furthermore, after obtaining a high-definition surface image of the plastic pipe to be inspected, the image is inspected for bubble defects.
[0130] Specifically, the image is first preprocessed using existing image processing algorithms (such as the Canny edge detection algorithm) to remove noise interference and enhance the characteristics of bubble defects. The preprocessed image is then analyzed using existing object recognition algorithms (such as the YOLO object detection algorithm) to identify bubble defects and count information such as the number, size, and location of the bubbles.
[0131] Finally, based on the detected bubble defect information, a bubble defect detection result is generated for the plastic pipe to be inspected. This bubble defect detection result includes specific defect parameters (such as the diameter and distribution area of each bubble defect) and a quality assessment of the plastic pipe to be inspected (such as whether it is qualified and the defect level).
[0132] For example, when the number of bubble defects detected exceeds a preset threshold or the diameter of the largest bubble defect is greater than the specified standard, the pipe is judged to be unqualified, and the defect location and characteristics are marked in detail in the pipe bubble defect detection results.
[0133] This step converts the optimal irradiation parameters into actual light source control instructions, combines them with high-precision image acquisition and intelligent defect detection, and realizes a closed loop from iterative optimization of irradiation parameters to final pipe quality determination. It effectively ensures the accuracy and stability of bubble defect detection on the surface of plastic pipes, and provides a reliable basis for pipe quality control.
[0134] The embodiments of the present application achieve the following technical effects through the above specific implementation methods: This application proposes a plastic pipe quality inspection method using multi-angle light source illumination. First, the pipe property information of the pipe to be inspected and the ambient light information of the inspection area are collected. This information directly affects the interaction between light and pipe and the imaging effect, providing comprehensive and practical basic data for subsequent light source parameter optimization; then, the illumination parameter adjustment space of the target light source is obtained, which includes the threshold range of light source height, light source incident angle, light source color temperature, and light source illumination intensity, clarifies the effective boundary of parameter optimization, and avoids parameter adjustment exceeding the equipment capability or deviating from the inspection requirements; then, with the goal of maximizing the visibility of bubble defects on the pipe surface, the illumination parameters are iteratively optimized and searched within the illumination parameter adjustment space: the effects of different parameter combinations are evaluated through a pre-trained bubble defect visibility prediction plug-in, and the optimal illumination parameters are generated after multiple rounds of iterative search, thereby achieving precise adaptation of the illumination parameters to the pipe properties and ambient light; finally, the light source is controlled to irradiate the pipe according to the optimal illumination parameters, the pipe surface image is collected and bubble defect detection is performed, and the pipe bubble defect detection results are output, effectively improving the accuracy and stability of bubble defect detection on the pipe surface.
[0135] The method provided in the embodiment of the present application adopts the technical solution of "data acquisition-spatial definition-parameter optimization-detection output". It first builds an analysis basis based on pipe property information and ambient light information, and then determines the optimal illumination parameters through iterative optimization search and intelligent prediction of bubble defect visibility, ultimately achieving efficient detection of bubble defects. It breaks through the problem of poor detection effect caused by fixed parameters of traditional methods and provides a scientific solution for plastic pipe quality inspection.
[0136] Example 2, as shown in the attached Figure 2 As shown, based on the inventive concept of the plastic pipe quality detection method using multi-angle light source illumination provided in Example 1, the present application also provides a plastic pipe quality detection system using multi-angle light source illumination, specifically comprising: Information collection module 01 is used to collect the pipe property information of the plastic pipe to be inspected and the ambient light information of the inspection area in the current time zone; Parameter space definition module 02, used to obtain the illumination parameter adjustment space of the target light source; Parameter iterative optimization module 03 is used to maximize the visibility of bubble defects on the pipe surface. Within the illumination parameter adjustment space, iterative optimization search of illumination parameters is performed according to the pipe property information and ambient light information until convergence, and the optimal illumination parameters are output; The defect detection output module 04 is used to control the target light source to illuminate the plastic pipe to be inspected according to the optimal illumination parameters, then collect the surface image of the plastic pipe to be inspected for bubble defect detection, and output the pipe bubble defect detection result.
[0137] In one embodiment, the information collection module 01 is further configured to: 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; The ambient light color temperature, ambient light intensity, and ambient light incident angle of the detection area in the current time zone are collected as ambient light information.
[0138] In one embodiment, the parameter space definition module 02 is further configured to: An illumination parameter adjustment space of a target light source is obtained, wherein the illumination parameter adjustment space includes a light source height threshold, a light source incident angle threshold, a light source color temperature threshold, and a light source illumination intensity threshold.
[0139] In one embodiment, the parameter iteration optimization module 03 is further configured to: Pre-trained bubble defect visibility prediction plug-in; Randomly selecting a number of irradiation parameters in the irradiation parameter adjustment space, respectively building a simulated irradiation scheme based on the pipe property information and the ambient light information, and generating a number of simulated irradiation schemes; Using the bubble defect visibility prediction plug-in, respectively predict the visibility of bubble defects on the pipe surface for the plurality of simulated irradiation schemes, and output a plurality of predicted bubble defect visibilities; In the irradiation parameter adjustment space, an iterative optimization search of irradiation parameters is performed based on the plurality of predicted bubble defect visibilities until a preset number of convergences is reached, and the optimal irradiation parameters are output.
[0140] It should be noted that the order in which the embodiments of the present application are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0141] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
[0142] This specification and drawings are merely illustrative of the present application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Obviously, those skilled in the art may make various modifications and variations to this application without departing from the scope of this application. Thus, this application is intended to include such modifications and variations as fall within the scope of this application and its equivalents.
Claims
1. A method for inspecting the quality of plastic pipes using multi-angle light sources, characterized in that: Methods include: Collect the pipe property information of the plastic pipe to be inspected and the ambient light information of the inspection area in the current time zone; Obtain the illumination parameter adjustment space of the target light source; Taking maximizing the visibility of bubble defects on the tube surface as the optimization goal, within the illumination parameter adjustment space, the illumination parameters are iteratively optimized and searched according to the tube property information and ambient light information until convergence, and the optimal illumination parameters are output; The target light source is controlled to illuminate the plastic pipe to be inspected according to the optimal illumination parameters, and then a surface image of the plastic pipe to be inspected is collected to perform bubble defect detection, and a pipe bubble defect detection result is output.
2. The plastic pipe quality inspection method using multi-angle light source illumination according to claim 1, characterized in that: Collect the pipe property information of the plastic pipe to be inspected, as well as the ambient light information of the inspection area in 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; The ambient light color temperature, ambient light intensity, and ambient light incident angle of the detection area in the current time zone are collected as ambient light information.
3. The plastic pipe quality inspection method using multi-angle light source illumination according to claim 1, characterized in that: An illumination parameter adjustment space of a target light source is obtained, wherein the illumination parameter adjustment space includes a light source height threshold, a light source incident angle threshold, a light source color temperature threshold, and a light source illumination intensity threshold.
4. The method for detecting the quality of plastic pipes by irradiating with a multi-angle light source according to claim 1, characterized in that: Taking maximizing the visibility of bubble defects on the pipe surface as the optimization goal, an iterative optimization search of the illumination parameters is performed within the illumination parameter adjustment space according to the pipe property information and the ambient light information, including: Pre-trained bubble defect visibility prediction plug-in; Randomly selecting a number of irradiation parameters in the irradiation parameter adjustment space, respectively building a simulated irradiation scheme based on the pipe property information and the ambient light information, and generating a number of simulated irradiation schemes; Using the bubble defect visibility prediction plug-in, respectively predict the visibility of bubble defects on the pipe surface for the plurality of simulated irradiation schemes, and output a plurality of predicted bubble defect visibilities; In the irradiation parameter adjustment space, an iterative optimization search of irradiation parameters is performed based on the plurality of predicted bubble defect visibilities until a preset number of convergences is reached, and the optimal irradiation parameters are output.
5. The plastic pipe quality inspection method using multi-angle light source illumination according to claim 4, characterized in that: Pre-trained bubble defect visibility prediction plug-in, including: Selecting the pipe material, pipe diameter, and pipe wall thickness from the pipe attribute information as screening conditions, using bubble defects on the pipe surface as a guide, and performing information retrieval based on historical plastic pipe inspection records, to collect a set of sample irradiation plans and a set of sample pipe surface images; Configuring bubble defect visibility evaluation indicators, wherein the bubble defect visibility evaluation indicators include bubble-background contrast, bubble-background signal-to-noise ratio, bubble edge clarity, and bubble-background color difference; performing visibility evaluation on a plurality of sample tube surface images in the sample tube surface image set according to the bubble defect visibility evaluation index, outputting a plurality of sample bubble defect visibilities, and constructing a sample bubble defect visibility set; The sample irradiation scheme set and the sample bubble defect visibility set are used to train a deep learning model until convergence, thereby obtaining a bubble defect visibility prediction plug-in.
6. The method for detecting the quality of plastic pipes by irradiating with a multi-angle light source according to claim 4, characterized in that: In the irradiation parameter adjustment space, an irradiation parameter iterative optimization search is performed based on the plurality of predicted bubble defect visibilities until a preset number of convergences is reached, and the optimal irradiation parameters are output, including: Taking the irradiation parameters as the initial solution, based on a number of predicted bubble defect visibilities, the initial solutions are arranged from large to small according to the predicted bubble defect visibilities to generate an initial solution sequence; The first 10% of the solutions in the initial solution sequence are set as optimal solutions, and the last 90% of the solutions are set as inferior solutions. The inferior solutions are then divided into equal-value clusters with the optimal solution as the center to obtain K solution sets, where K is the number of initial solutions; In the K solution sets, taking the best solution in the solution set as the optimization direction, adjusting the inferior solutions in the solution set according to a preset step size to obtain K updated solution sets, wherein if the updated inferior solution exceeds the illumination parameter adjustment space, any illumination parameter in the illumination parameter adjustment space is randomly selected for replacement; Using the bubble defect visibility prediction plug-in, respectively predict the inferior solutions in the K updated solution sets. 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 is used to replace the superior solution. Iterate the optimization until the 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.
7. The plastic pipe quality inspection method using multi-angle light source illumination according to claim 6, characterized in that: The step of setting the preset number of convergence times includes: Using the pipe attribute information as a constraint, collect historical bubble defect density averages and historical bubble defect diameter averages of similar pipes within a historical time range, and obtain historical overall bubble defect density averages and historical overall bubble defect diameter averages of plastic pipes; The ratio of the historical bubble defect density mean to the historical overall bubble defect density mean and the ratio of the historical overall bubble defect diameter mean to the historical bubble defect diameter mean are added and summed to obtain a convergence adjustment coefficient; 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.
8. The plastic pipe quality inspection system with multi-angle light source illumination is characterized by: The system is used to perform the plastic pipe quality detection method using multi-angle light source illumination according to any one of claims 1 to 7, and the system comprises: An information collection module is used to collect the pipe property information of the plastic pipe to be inspected and the ambient light information of the inspection area in the current time zone; A parameter space definition module is used to obtain the illumination parameter adjustment space of the target light source; A parameter iterative optimization module is used to maximize the visibility of bubble defects on the tube surface, perform iterative optimization search of the illumination parameters according to the tube property information and ambient light information within the illumination parameter adjustment space, and output the optimal illumination parameters until convergence; The defect detection output module is used to control the target light source to illuminate the plastic pipe to be inspected according to the optimal illumination parameters, then collect the surface image of the plastic pipe to be inspected for bubble defect detection, and output the pipe bubble defect detection result.
Citation Information
Patent Citations
Magnet surface defect detection equipment control method for AI optimization and controller
CN119290894A
Self-adaptive PVC plate defect detection system and method based on deep learning regression algorithm
CN119887648A
Product defect detection method and system based on multispectral imaging
CN120147310A
Printing piece flaw detection method and system based on machine vision
CN120334236A
Intelligent quality detection system based on machine vision
CN120369618A
Cited By
Intelligent plastic pipe manufacturing whole process digital management system and method
CN121168997A
Light internal partition wall board defect detection method and system based on image recognition
CN122024058A