PE pipe quality detection method and system based on target image

Through multi-angle image acquisition and preprocessing, the target features are extracted and matched, and defects are identified and positioned, and the existing PE pipe quality detection methods are solved, and accurate evaluation and efficient detection of PE pipe quality are achieved.

CN119273679BActive Publication Date: 2025-03-07JIANGSU COCON TECH +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411784857.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-07
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The existing PE pipe quality detection methods have problems with low detection efficiency and low accuracy, especially in complex surface textures or minor defects, and are prone to missed inspections, and cannot adapt to defect detection of various types of pipes.

Method used

The PE pipe quality detection method based on the target image is adopted to improve the comprehensiveness and clarity of image data through multi-angle image acquisition and preprocessing, extract and match target features, identify and locate defects, and evaluate quality levels.

Benefits of technology

It improves the adaptability and accuracy of the detection system, reduces false detection and missed inspection, realizes accurate evaluation of the quality of PE pipes, and improves the efficiency and reliability of the inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273679B_ABST
    Figure CN119273679B_ABST
Patent Text Reader

Abstract

The present invention discloses a PE pipe quality detection method and system based on target images, and relates to the technical field of pipe quality detection. In order to solve the problem that multi-angle image data cannot be obtained, false detection or missed detection may occur in the case of complex surface textures or slight defects, thereby affecting the accuracy of detection, and the problem that it cannot adapt to the defect detection of various types of pipes; through multi-angle image acquisition and preprocessing, the comprehensiveness and clarity of image data are improved, the false detection or missed detection caused by complex surface textures or slight defects is reduced, the adaptability of the detection system is enhanced, the extraction and matching of target features can more accurately identify the key detection area of ​​PE pipes, and compare the preset standards and key features to achieve accurate evaluation of PE pipe quality, improve the accuracy and efficiency of detection, and facilitate operators to quickly identify problems through visual output and detailed detection reports.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipe quality detection, and in particular to a PE pipe quality detection method and system based on a target image. Background Art

[0002] At present, PE pipe quality inspection mainly adopts traditional manual inspection and mechanical inspection methods, but these methods have the problems of low inspection efficiency and low accuracy. Regarding PE pipe quality inspection, a Chinese patent with publication number: CN116258716A discloses a plastic pipe quality inspection method based on image processing, which characterizes the local difference index by the grayscale change in the local neighborhood range of the plastic pipe surface image, characterizes the difference degree gradient law index by the local difference index change area in the preset neighborhood window, obtains the crack cracking degree of the plastic pipe surface image by the size and distribution of the difference degree gradient law index, characterizes the crack characteristic value of each pixel point by the crack cracking degree, the difference degree gradient law index and the local difference index, constructs a terrain feature image by the crack characteristic value, and finally performs image segmentation on the terrain feature image to obtain a narrow and long connected domain for plastic pipe quality inspection.

[0003] The above patent completes the quality inspection of plastic pipes by performing image segmentation on the constructed terrain feature image, but it cannot obtain multi-angle image data. In the case of complex surface textures or minor defects, false detection or missed detection may occur, thereby affecting the accuracy of the inspection, and it cannot adapt to the defect detection of various types of pipes. Summary of the invention

[0004] The purpose of the present invention is to provide a PE pipe quality detection method and system based on target images. Through multi-angle image acquisition and preprocessing, the comprehensiveness and clarity of image data are improved, the false detection or missed detection caused by complex surface textures or minor defects is reduced, the adaptability of the detection system is enhanced, the key detection areas of PE pipes are more accurately identified, and accurate evaluation of PE pipe quality is achieved to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] The PE pipe quality detection method based on target image includes the following steps:

[0007] Step 1: Image acquisition: The image of the PE pipe is acquired based on the camera, and the acquired image data is preprocessed;

[0008] Step 2: Target recognition: extract the target features of PE pipes from the preprocessed image data, input the target features into the PE pipe database for key detection feature matching, and screen out key features related to quality inspection based on the matching results;

[0009] Step 3: Quality inspection: Compare the selected key features with the preset PE pipe quality standards to determine whether the quality of the PE pipe meets the requirements, identify and locate the existing defects, and evaluate the quality grade of the PE pipe according to the type and degree of defects;

[0010] Step 4: Visual output: Visualize the test results, mark the unqualified areas and the assessed quality level in the image of the PE pipe, and generate a test report for the PE pipe.

[0011] Furthermore, in step 1, the collected image data is preprocessed, specifically:

[0012] Pixel block extraction: Divide the collected PE pipe image data into multiple pixel blocks, determine the size of the main pixel block and the number of adjacent auxiliary pixel blocks, and extract each main pixel block and its adjacent auxiliary pixel blocks;

[0013] Grayscale processing: extracting the brightness value of each main pixel block and auxiliary pixel block, determining the difference between the brightness value of the main pixel block and the brightness value of the auxiliary pixel block based on the brightness reference value, and determining the target grayscale value of the main pixel block according to the difference, adjusting the main pixel block based on the target grayscale value of the main pixel block, and outputting the processed grayscale image;

[0014] Denoising and enhancement: Perform noise detection on grayscale images, determine the type and degree of noise in the grayscale image, match the corresponding denoising algorithm based on the type and degree of noise in the grayscale image, and perform denoising processing.

[0015] Further, determining a target grayscale value of the main pixel block according to the difference includes:

[0016] Retrieving the brightness value and brightness reference value of each primary pixel block and auxiliary pixel block;

[0017] Using each of the main pixel blocks and the brightness reference value, obtaining a brightness difference between each of the main pixel blocks and the brightness reference value as first difference data;

[0018] Using the plurality of auxiliary pixel blocks corresponding to each of the primary pixel blocks and the brightness reference value, obtaining a plurality of brightness difference values ​​between the plurality of auxiliary pixel blocks and the brightness reference value as a plurality of second difference value data;

[0019] Obtaining a first grayscale adjustment coefficient corresponding to each main pixel block by using the first difference data and a plurality of second difference data;

[0020] The first grayscale adjustment coefficient is obtained by the following formula:

[0021]

[0022] Wherein, K represents the first grayscale adjustment coefficient; n represents the number of auxiliary pixel blocks; D fi represents the second difference data of the i-th auxiliary pixel block; D fb represents the standard deviation of the second difference data corresponding to the n auxiliary pixel blocks; D z represents the first difference data corresponding to the main pixel block; L fb represents the standard deviation of the brightness values ​​corresponding to n secondary pixel blocks;

[0023] Comparing the first grayscale adjustment coefficient with a preset coefficient threshold;

[0024] The target grayscale value of the main pixel block is obtained according to the quantitative relationship between the first grayscale adjustment coefficient and a preset coefficient threshold.

[0025] Further, obtaining a target grayscale value of the main pixel block according to a quantitative relationship between the first grayscale adjustment coefficient and a preset coefficient threshold includes:

[0026] When the first grayscale adjustment coefficient does not exceed the preset coefficient threshold, the original grayscale value of the main pixel block and the original grayscale value of the auxiliary pixel block are retrieved;

[0027] Obtaining a target grayscale value of the main pixel block by combining the original grayscale value of the main pixel block and the original grayscale value of the auxiliary pixel block using the first grayscale adjustment coefficient;

[0028] The target grayscale value of the main pixel block is obtained by the following formula:

[0029]

[0030] Among them, H m represents the target grayscale value of the main pixel block; H0 represents the original grayscale value of the main pixel block; n represents the number of auxiliary pixel blocks; K represents the first grayscale adjustment coefficient; H i represents the original grayscale value of the ith auxiliary pixel block; S represents the adjustment coefficient, and the adjustment coefficient is obtained by the following formula:

[0031]

[0032] Where S represents the adjustment coefficient; n represents the number of auxiliary pixel blocks; H b H represents the standard deviation of the original grayscale values ​​of n secondary pixel blocks; irepresents the original grayscale value of the ith auxiliary pixel block; sqrt[] represents the square root processing of the value inside the brackets;

[0033] When the first grayscale adjustment coefficient exceeds a preset coefficient threshold, the central grayscale value extracted from the PE pipe image data and the original grayscale value of the main pixel block and the original grayscale value of the auxiliary pixel block are retrieved;

[0034] Subtracting the center grayscale value in the PE pipe image data from the original grayscale value of the main pixel block to obtain a first grayscale difference value;

[0035] Subtracting the central grayscale value in the PE pipe image data from the original grayscale values ​​of the plurality of auxiliary pixel blocks corresponding to the main pixel block to obtain a plurality of second grayscale difference values;

[0036] Obtaining a target grayscale value of the main pixel block by using the first grayscale difference value and a plurality of second grayscale differences in combination with a first grayscale adjustment coefficient;

[0037] The target grayscale value of the main pixel block is obtained by the following formula:

[0038]

[0039] Among them, H m represents the target grayscale value of the main pixel block; H0 represents the original grayscale value of the main pixel block; n represents the number of auxiliary pixel blocks; K represents the first grayscale adjustment coefficient; Z i represents the second grayscale difference corresponding to the ith auxiliary pixel block; Z represents the first grayscale difference corresponding to the main pixel block; Z b represents the standard deviation of the second grayscale difference corresponding to the secondary pixel block n; Z max and Z min Indicates the maximum second grayscale difference value and the minimum second grayscale difference value corresponding to the secondary pixel block n.

[0040] Furthermore, the step 1 of collecting the image of the PE pipe based on the camera also includes:

[0041] Set up at least one image acquisition point, and deploy a camera at each image acquisition point to obtain image data of the PE pipe at several viewing angles acquired by the camera;

[0042] The image data obtained from several perspectives are associated with the PE pipe to construct an image dataset of the PE pipe. At the same time, the PE pipe is uniquely identified.

[0043] Furthermore, the target features of the PE pipe are extracted in step 2, specifically including:

[0044] Obtain image data in the image data set of the PE pipe, and select one image data from several viewing angles as a reference image;

[0045] Extract the pipe features from all image data, match the corresponding feature points between images of different viewpoints based on the extracted pipe features, and estimate the geometric transformation model between the images based on the matching results;

[0046] The non-reference image is transformed according to the geometric transformation model, aligned to the coordinate system of the reference image, and the transformed non-reference image is superimposed on the reference image based on the coordinate system;

[0047] The superimposed images are subjected to seam processing, color correction and image optimization to generate fused PE pipe 3D image data, and target features for quality inspection are extracted from the PE pipe 3D image data.

[0048] Furthermore, the key detection feature screening is performed in step 2, specifically including:

[0049] Perform preliminary screening on the extracted PE pipe target features and remove features irrelevant to quality inspection;

[0050] The weight of the initially screened target features is evaluated according to the preset feature weight threshold, and standardized processing is performed based on the screening results;

[0051] The standardized target features are input into the PE pipe database for key detection feature matching, and the similarity between the input features and the features in the PE pipe database is calculated;

[0052] Determine the similarity threshold based on the similarity calculation result, analyze the matching degree between the target feature and the feature in the database, and select the target features with a matching degree higher than the preset similarity threshold as potential key detection features;

[0053] The potential key detection features are verified, the potential key detection features are optimized according to the verification results, and the optimized key detection features are used as key features related to quality detection.

[0054] Furthermore, the step three: quality inspection specifically includes:

[0055] Feature comparison: Establish a test standard feature library as a benchmark for quality comparison, and input the optimized key features into the test standard feature library for comparison. The test standard feature library includes qualified and unqualified PE pipe features;

[0056] Defect identification and location: Determine the difference between each key feature and the corresponding inspection standard feature based on the comparison results, and mark the key features that exceed the preset comparison threshold as potential defects based on the difference;

[0057] Verify potential defects based on image data from multiple perspectives, determine the location of defects on the PE pipe based on the verification results, classify the identified defects, and record the defect parameters;

[0058] Quality assessment: The severity of defects is assessed based on the defect location, defect type and defect parameters. The severity of defects of the same PE pipe is obtained based on the unique identification of the PE pipe;

[0059] Perform a comprehensive quality score on PE pipes, compare it with the preset PE pipe quality standards, determine whether the pipes meet the quality requirements, and generate quality assessment results.

[0060] Furthermore, the step three also includes determining the specification and type of the corresponding pipe according to the extracted key features, matching the corresponding quality inspection standards according to the specification and type of the pipe, and performing quality inspection based on the matching results.

[0061] The present invention provides another technical solution, a PE pipe quality detection system based on a target image, comprising:

[0062] An image acquisition module is used to acquire image data of at least two PE pipes based on a camera, mark the received image data with information, establish an association relationship with the PE pipe, and construct an image data set of the PE pipe;

[0063] The image processing module is used to preprocess the image data set of PE pipes, construct three-dimensional image data of PE pipes based on image data of multiple perspectives, extract target features from the three-dimensional image data, perform preliminary screening and weight evaluation on the extracted target features, and screen out key features related to PE pipe quality inspection;

[0064] The quality assessment module is used to compare the selected key features with the preset PE pipe quality standards, conduct quality inspection, determine whether the quality of the PE pipe meets the requirements, identify and locate existing defects, and evaluate the quality grade of the PE pipe according to the type and degree of defects, and generate a PE pipe inspection report.

[0065] Compared with the prior art, the present invention has the following beneficial effects:

[0066] Through multi-angle image acquisition and preprocessing, the comprehensiveness and clarity of image data are improved, false detection or missed detection caused by complex surface textures or minor defects are reduced, and the adaptability of the detection system is enhanced. The extraction and matching of target features can more accurately identify the key detection areas of PE pipes, providing a reliable data basis for subsequent quality inspections. By comparing preset standards and key features, accurate evaluation of PE pipe quality is achieved, and the accuracy and efficiency of inspections are improved. Through visual output and detailed inspection reports, the inspection results are more intuitive and easy to understand, which facilitates operators to quickly identify problems and take corresponding measures. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 This is a flow chart of the PE pipe quality detection method based on target image of the present invention. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0069] In order to solve the problem that the multi-angle image data cannot be obtained, in the case of complex surface textures or slight defects, false detection or missed detection may occur, thus affecting the accuracy of detection, and it is not suitable for the technical problem of defect detection of various types of pipes. Please refer to Figure 1 , this embodiment provides the following technical solutions:

[0070] The PE pipe quality detection method based on target image includes the following steps:

[0071] Step 1: Image acquisition: The image of the PE pipe is acquired based on the camera, and the acquired image data is preprocessed, including denoising, enhancement, correction, etc., to improve the image quality and analysis accuracy;

[0072] In this embodiment, the step 1 of collecting an image of the PE pipe based on a camera also includes:

[0073] Set up at least one image acquisition point, and deploy a camera at each image acquisition point to obtain image data of the PE pipe at several viewing angles acquired by the camera;

[0074] Establish an association relationship between the image data obtained from several viewing angles and the PE pipe, construct an image dataset of the PE pipe, and at the same time, uniquely identify the PE pipe;

[0075] Step 2: Target recognition: Extract target features of PE pipes, such as color, texture, shape, etc., from the preprocessed image data, and input the target features into the PE pipe database for key detection feature matching, and screen out key features related to quality inspection based on the matching results;

[0076] Step 3: Quality inspection: Compare the selected key features with the preset PE pipe quality standards to determine whether the quality of the PE pipe meets the requirements, identify and locate the existing defects, and evaluate the quality grade of the PE pipe according to the type and degree of defects;

[0077] Determine the specifications and types of the corresponding pipes based on the extracted key features, match the corresponding quality inspection standards based on the specifications and types of the pipes, and perform quality inspection based on the matching results;

[0078] Step 4: Visual output: Visualize the test results and mark the unqualified areas and assessed quality levels in the PE pipe image to improve the readability and usability of the results, and generate a test report for the PE pipe, including information such as test time, pipe number, and defect details.

[0079] In this embodiment, through multi-angle image acquisition and preprocessing, the comprehensiveness and clarity of image data are improved, false detection or missed detection caused by complex surface textures or minor defects is reduced, the adaptability of the detection system is enhanced, and the extraction and matching of target features can more accurately identify the key detection areas of PE pipes, providing a reliable data basis for subsequent quality inspections. By comparing preset standards and key features, accurate assessment of PE pipe quality is achieved, and the accuracy and efficiency of inspection are improved. Through visual output and detailed inspection reports, the inspection results are more intuitive and easy to understand, which facilitates operators to quickly identify problems and take corresponding measures.

[0080] In this embodiment, the collected image data is preprocessed in step 1, specifically:

[0081] Pixel block extraction: Divide the collected PE pipe image data into multiple pixel blocks, determine the size of the main pixel block and the number of adjacent auxiliary pixel blocks to adapt to the surface characteristics of the PE pipe, and extract each main pixel block and its adjacent auxiliary pixel blocks;

[0082] Grayscale processing: extracting the brightness value of each main pixel block and auxiliary pixel block, determining the difference between the brightness value of the main pixel block and the brightness value of the auxiliary pixel block based on the brightness reference value, and determining the target grayscale value of the main pixel block according to the difference, adjusting the main pixel block based on the target grayscale value of the main pixel block, and outputting the processed grayscale image to achieve standardization and enhancement of the grayscale value;

[0083] Denoising and enhancement: Perform noise detection on grayscale images, determine the type (such as Gaussian noise, salt and pepper noise, etc.) and degree of noise in the grayscale image, match the corresponding denoising algorithm based on the noise type and degree in the grayscale image, and perform denoising processing while maintaining the details and clarity of the image to improve the overall quality of the image.

[0084] In this embodiment, by dividing the image data into multiple pixel blocks and extracting them, it is possible to more accurately adapt to the characteristics of the PE pipe surface, ensuring the pertinence and accuracy of the detection; by grayscale processing, the brightness value of each pixel block is extracted and adjusted, and the grayscale value is standardized and enhanced, thereby improving the image contrast and the clarity of defect recognition; by detecting and matching the corresponding denoising algorithm, the image noise is effectively reduced, the image details and clarity are maintained, the overall quality of the image is further improved, a high-quality image foundation is provided, and the false detection and missed detection caused by poor image quality are effectively reduced, thereby enhancing the robustness of the detection system and the adaptability to defect detection of different types of pipes.

[0085] Specifically, determining the target grayscale value of the main pixel block according to the difference includes:

[0086] Retrieving the brightness value and brightness reference value of each primary pixel block and auxiliary pixel block;

[0087] Using each of the main pixel blocks and the brightness reference value, obtaining a brightness difference between each of the main pixel blocks and the brightness reference value as first difference data;

[0088] Using the plurality of auxiliary pixel blocks corresponding to each of the primary pixel blocks and the brightness reference value, obtaining a plurality of brightness difference values ​​between the plurality of auxiliary pixel blocks and the brightness reference value as a plurality of second difference value data;

[0089] Obtaining a first grayscale adjustment coefficient corresponding to each main pixel block by using the first difference data and a plurality of second difference data;

[0090] The first grayscale adjustment coefficient is obtained by the following formula:

[0091]

[0092] Wherein, K represents the first grayscale adjustment coefficient; n represents the number of auxiliary pixel blocks; D fi represents the second difference data of the i-th auxiliary pixel block; D fb represents the standard deviation of the second difference data corresponding to the n auxiliary pixel blocks; D z represents the first difference data corresponding to the main pixel block; L fb represents the standard deviation of the brightness values ​​corresponding to n secondary pixel blocks;

[0093] Comparing the first grayscale adjustment coefficient with a preset coefficient threshold;

[0094] The target grayscale value of the main pixel block is obtained according to the quantitative relationship between the first grayscale adjustment coefficient and a preset coefficient threshold.

[0095] The technical effect of the above technical solution is: the technical solution can accurately identify the brightness change area in the image by calculating the brightness difference (first difference data and second difference data) between each main pixel block and its corresponding auxiliary pixel block and the brightness reference value. This refined brightness difference analysis helps to enhance the contrast of the image in subsequent processing, especially in maintaining image details. By introducing the first grayscale adjustment coefficient, the scheme can dynamically adjust the grayscale value of the main pixel block according to the brightness change of the surrounding pixels, thereby effectively avoiding the loss of details while enhancing the contrast. Using the first grayscale adjustment coefficient formula, the scheme comprehensively considers the brightness difference of the auxiliary pixel block, the standard deviation of the brightness value, and the brightness difference of the main pixel block itself, and realizes the fine adjustment of the grayscale value. This adjustment method not only takes into account the change of local brightness, but also incorporates the statistical characteristics of global brightness, so that the adjusted grayscale value is more in line with the visual habits of the human eye, thereby improving the overall quality of the image. In addition, by comparing the first grayscale adjustment coefficient with the preset coefficient threshold, it can be further ensured that the adjustment of the grayscale value is within a reasonable range, avoiding image distortion caused by excessive adjustment. The calculation formula of the first grayscale adjustment coefficient in the technical solution fully considers the number of auxiliary pixel blocks (n) and the distribution characteristics of their brightness difference (such as the standard deviation D fb ), which enables the algorithm to show good robustness and adaptability when facing different image contents and different lighting conditions. Whether it is a high-brightness area or a low-brightness area, the algorithm can make appropriate grayscale value adjustments according to the specific situation, thereby ensuring the stability and consistency of image processing. Although the technical solution involves multiple calculation steps, each step is aimed at efficiently utilizing image information and reducing unnecessary calculation consumption. For example, by calculating the standard deviation of brightness values ​​and the standard deviation of brightness differences, the algorithm can quickly identify key feature areas in the image, so as to make targeted grayscale value adjustments. In addition, the preset coefficient threshold further simplifies the decision-making process, allowing the algorithm to maintain a high processing efficiency when processing large amounts of image data. The technical solution provides an intelligent grayscale value adjustment method for image processing, which can automatically optimize the grayscale value according to the image content without manual intervention. This not only reduces the complexity of manual operations, but also improves the automation level of image processing, providing strong support for the further development of image recognition, image analysis and other fields.

[0096] In summary, this technical solution has shown significant performance improvement and technical effects in the field of image processing. It not only enhances the contrast and detail retention of images, but also optimizes the grayscale distribution, improves the robustness and adaptability of the algorithm, reduces the computational complexity, and promotes the intelligence and automation of image processing. These technical effects have jointly promoted the continuous progress and development of image processing technology.

[0097] Specifically, obtaining the target grayscale value of the main pixel block according to the quantitative relationship between the first grayscale adjustment coefficient and a preset coefficient threshold includes:

[0098] When the first grayscale adjustment coefficient does not exceed the preset coefficient threshold, the original grayscale value of the main pixel block and the original grayscale value of the auxiliary pixel block are retrieved;

[0099] Obtaining a target grayscale value of the main pixel block by combining the original grayscale value of the main pixel block and the original grayscale value of the auxiliary pixel block using the first grayscale adjustment coefficient;

[0100] The target grayscale value of the main pixel block is obtained by the following formula:

[0101]

[0102] Among them, H m represents the target grayscale value of the main pixel block; H0 represents the original grayscale value of the main pixel block; n represents the number of auxiliary pixel blocks; K represents the first grayscale adjustment coefficient; H i represents the original grayscale value of the ith auxiliary pixel block; S represents the adjustment coefficient, and the adjustment coefficient is obtained by the following formula:

[0103]

[0104] Where S represents the adjustment coefficient; n represents the number of auxiliary pixel blocks; H b H represents the standard deviation of the original grayscale values ​​of n secondary pixel blocks; i represents the original grayscale value of the ith auxiliary pixel block; sqrt[] represents the square root processing of the value inside the brackets;

[0105] When the first grayscale adjustment coefficient exceeds a preset coefficient threshold, the central grayscale value extracted from the PE pipe image data and the original grayscale value of the pixel block and the original grayscale value of the auxiliary pixel block are retrieved;

[0106] Subtracting the center grayscale value in the PE pipe image data from the original grayscale value of the main pixel block to obtain a first grayscale difference value;

[0107] Subtracting the central grayscale value in the PE pipe image data from the original grayscale values ​​of the plurality of auxiliary pixel blocks corresponding to the main pixel block to obtain a plurality of second grayscale difference values;

[0108] Obtaining a target grayscale value of the main pixel block by using the first grayscale difference value and a plurality of second grayscale differences in combination with a first grayscale adjustment coefficient;

[0109] The target grayscale value of the main pixel block is obtained by the following formula:

[0110]

[0111] Among them, H m represents the target grayscale value of the main pixel block; H0 represents the original grayscale value of the main pixel block; n represents the number of auxiliary pixel blocks; K represents the first grayscale adjustment coefficient; Z i represents the second grayscale difference corresponding to the ith auxiliary pixel block; Z represents the first grayscale difference corresponding to the main pixel block; Z b represents the standard deviation of the second grayscale difference corresponding to the secondary pixel block n; Z max and Z min Indicates the maximum second grayscale difference value and the minimum second grayscale difference value corresponding to the secondary pixel block n.

[0112] The technical effect of the above technical solution is: the technical solution realizes fine adjustment of the target grayscale value of the main pixel block by introducing the first grayscale adjustment coefficient K and combining the original grayscale values ​​of the main pixel block and its auxiliary pixel block. When K does not exceed the preset coefficient threshold, the target grayscale value H of the main pixel block is calculated by a specific formula using K and the grayscale information of the auxiliary pixel block. m This process fully considers the influence of surrounding pixels on the central pixel, which helps to improve the uniformity and naturalness of the overall grayscale distribution while maintaining image details. Compared with simple linear adjustment or fixed threshold processing, this adjustment method can more accurately reflect the grayscale changes in the image, thereby improving image quality. The introduction of the adjustment coefficient S in the technical solution further enhances the adaptability of the algorithm. S is calculated by calculating the standard deviation H of the grayscale value of the auxiliary pixel block bTo dynamically adjust, the algorithm can maintain stable performance when facing PE pipe images with different brightness, contrast or noise levels. This dynamic adjustment mechanism helps the algorithm maintain consistent grayscale optimization effects in various complex scenarios, improving the robustness of the algorithm. When the first grayscale adjustment coefficient K exceeds the preset coefficient threshold, the technical solution adopts a different processing strategy, that is, the grayscale difference is calculated using the central grayscale value in the PE pipe image data, and the target grayscale value is obtained in combination with the K value. This optimization of the processing flow avoids the complex calculations that the algorithm may fall into in extreme cases (such as high contrast or strong noise environments), thereby improving computational efficiency. At the same time, by introducing the standard deviation Z of the grayscale difference b and the maximum value Z max and the minimum value Z min , the algorithm can more accurately evaluate the range of grayscale changes, providing a more reliable basis for subsequent grayscale adjustment. In the process of grayscale value optimization, this technical solution not only considers the relative relationship between pixels, but also incorporates the global features of PE pipe image data (such as central grayscale value). This processing method helps to strengthen key features in the image, such as edges, textures, etc., thereby improving accuracy in subsequent image recognition, analysis or detection tasks. Especially in applications such as PE pipe quality inspection and size measurement, accurate grayscale value optimization can significantly improve the accuracy and reliability of detection results. This technical solution realizes adaptive processing of PE pipe image data by introducing an intelligent grayscale adjustment mechanism. This intelligent processing method not only improves the efficiency and accuracy of image processing, but also promotes the development of image processing technology towards a more intelligent and automated direction. With the continuous advancement of artificial intelligence and machine learning technologies, this technical solution is expected to achieve more complex and efficient image processing tasks in the future, providing more powerful support for industrial inspection, medical image analysis and other fields.

[0113] In summary, this technical solution has demonstrated significant technical advantages in the field of image processing. It has achieved performance improvement in grayscale value optimization of PE pipe image data by fine-tuning grayscale adjustment, dynamically adapting to different scenarios, optimizing processing procedures, strengthening image features, and promoting the intelligent development of image processing technology. These technical effects have jointly promoted the continuous advancement of image processing technology and provided more reliable and efficient technical support for applications in related fields.

[0114] In this embodiment, the step 2 of extracting the target features of the PE pipe specifically includes:

[0115] Obtain image data in the image data set of the PE pipe, and select one image data from several viewing angles as a reference image;

[0116] Extract the pipe features from all image data, match the corresponding feature points between images of different viewpoints based on the extracted pipe features, and estimate the geometric transformation model between the images based on the matching results;

[0117] The non-reference image is transformed according to the geometric transformation model, aligned to the coordinate system of the reference image, and the transformed non-reference image is superimposed on the reference image based on the coordinate system;

[0118] Perform seam processing, color correction and image optimization on the superimposed images to generate fused PE pipe 3D image data, and extract target features for quality inspection from the PE pipe 3D image data;

[0119] In this embodiment, by extracting pipe features from image data of multiple perspectives, using feature point matching to estimate the geometric transformation model, aligning the non-reference image to the reference image coordinate system, and then undergoing seam processing, color correction and image optimization, high-quality PE pipe three-dimensional image data is generated, which not only significantly enhances the extraction accuracy of target features, but also ensures that the subtle structure and potential defects of the pipe are captured from all-round perspectives. The extracted target features are more comprehensive and accurate, providing a solid foundation for subsequent quality inspection, and greatly improving the efficiency and reliability of PE pipe quality inspection.

[0120] In this embodiment, the step 2 is to screen key detection features, which specifically includes:

[0121] Perform preliminary screening on the extracted PE pipe target features to remove features irrelevant to quality inspection, including color changes under the influence of ambient light, textures other than the pipe itself, noise or shadows during image acquisition, etc.

[0122] The target features of the preliminary screening are weighted and evaluated according to the preset feature weight threshold, and standardized based on the screening results, including the unification of feature scales and the standardization of feature expressions, so as to effectively match the key detection features in the PE pipe database;

[0123] The standardized target features are input into the PE pipe database for key detection feature matching, and the similarity between the input features and the features in the PE pipe database is calculated;

[0124] Determine the similarity threshold based on the similarity calculation result, analyze the matching degree between the target feature and the feature in the database, and select the target features with a matching degree higher than the preset similarity threshold as potential key detection features;

[0125] Potential key detection features are verified and optimized based on the verification results, such as adjusting feature weights, merging similar features, etc. The optimized key detection features are used as key features related to quality detection.

[0126] In this embodiment, through preliminary screening, features related to PE pipe quality inspection are retained, such as surface defects, dimensional deviations, shape distortions, etc., and weight evaluation is performed on the retained features according to the preset feature weight threshold, and features with higher weights are screened out to ensure the accuracy and efficiency of subsequent matching. The accuracy and effectiveness of the features are verified by comparison with the actual pipe quality inspection results, thereby ensuring the accuracy of subsequent quality inspections.

[0127] In this embodiment, the step three: quality inspection, specifically includes:

[0128] Feature comparison: Establish a test standard feature library as a benchmark for quality comparison, and input the optimized key features into the test standard feature library for comparison. The test standard feature library includes qualified and unqualified PE pipe features. The comparison includes multi-dimensional features such as color, texture, and shape, not limited to a single feature, to obtain a more comprehensive quality assessment;

[0129] Defect identification and location: Determine the difference between each key feature and the corresponding inspection standard feature based on the comparison results, and mark the key features that exceed the preset comparison threshold as potential defects based on the difference;

[0130] Verify potential defects based on image data from multiple perspectives, determine the location of defects on PE pipes based on the verification results, and classify identified defects such as surface scratches, pits, color differences, etc., and record parameters such as length, width, and depth of the defects;

[0131] Quality assessment: The severity of defects is assessed based on the defect location, defect type and defect parameters. The severity of defects of the same PE pipe is obtained based on the unique identification of the PE pipe;

[0132] The comprehensive quality score of PE pipes is compared with the preset PE pipe quality standards to determine whether the pipes meet the quality requirements and generate quality assessment results, including pass / fail judgment, defect details, quality grade, etc.

[0133] In this embodiment, by comparing the optimized key features with the multi-dimensional features in the detection standard feature library, an accurate assessment of the quality of PE pipes is achieved. Not only are potential defects accurately marked, but they are also verified based on image data from multiple perspectives, ensuring the accuracy of defect identification and the accuracy of position positioning. The defects are carefully classified and detailed parameters are recorded, providing a sufficient basis for quality assessment and effectively improving the comprehensiveness and reliability of PE pipe quality inspection.

[0134] In order to better demonstrate the implementation of the PE pipe quality detection method based on the target image, the present invention provides a PE pipe quality detection system based on the target image, comprising:

[0135] An image acquisition module is used to acquire image data of at least two PE pipes based on a camera, mark the received image data with information such as timestamp and pipe number, establish an association relationship with the PE pipe, and construct an image data set of the PE pipe;

[0136] The image processing module is used to preprocess the image data set of PE pipes, construct three-dimensional image data of PE pipes based on image data of multiple perspectives, extract target features from the three-dimensional image data, perform preliminary screening and weight evaluation on the extracted target features, and screen out key features related to PE pipe quality inspection;

[0137] The quality assessment module is used to compare the selected key features with the preset PE pipe quality standards, conduct quality inspection, determine whether the quality of the PE pipe meets the requirements, identify and locate existing defects, and evaluate the quality grade of the PE pipe according to the type and degree of defects, and generate a PE pipe inspection report.

[0138] In this embodiment, a complete PE pipe image data set is constructed through multi-view image acquisition, and the key quality features of the pipe are accurately extracted by using three-dimensional image reconstruction and feature extraction algorithms, thereby improving the accuracy and comprehensiveness of feature extraction, significantly improving the reliability and efficiency of quality assessment, and automatically comparing key features with preset quality standards, accurately judging the quality of the pipe, identifying and locating defects, evaluating the quality grade, and generating a detailed inspection report, thereby avoiding the subjectivity and uncertainty of manual inspection, greatly improving the inspection speed and accuracy, and improving the intelligence level of PE pipe quality inspection.

[0139] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A PE pipe quality detection method based on target image, characterized in that: The following steps are involved: Step 1: Collect images of PE pipes based on a camera and pre-process the collected image data; Step 2: extracting target features of PE pipes from the preprocessed image data, and inputting the target features into the PE pipe database for key detection feature matching, and screening out key features related to quality inspection based on the matching results; Step 3: Compare the selected key features with the preset PE pipe quality standards to determine whether the quality of the PE pipe meets the requirements, identify and locate the existing defects, and evaluate the quality grade of the PE pipe according to the type and degree of defects; Step 4: Visualize the test results, mark the unqualified areas and the assessed quality levels in the PE pipe image, and generate a test report for the PE pipe; In the step 1, the collected image data is preprocessed, specifically: Divide the collected PE pipe image data into multiple pixel blocks, determine the size of the main pixel block and the number of adjacent auxiliary pixel blocks, and extract each main pixel block and its adjacent auxiliary pixel blocks; Extracting the brightness value of each primary pixel block and the secondary pixel block, determining the difference between the brightness value of the primary pixel block and the brightness value of the secondary pixel block based on the brightness reference value, determining the target grayscale value of the primary pixel block according to the difference, adjusting the primary pixel block based on the target grayscale value of the primary pixel block, and outputting a processed grayscale image; Perform noise detection on the grayscale image, determine the type and degree of noise in the grayscale image, match the corresponding denoising algorithm based on the type and degree of noise in the grayscale image, and perform denoising processing; Determining a target grayscale value of the main pixel block according to the difference includes: Retrieving the brightness value and brightness reference value of each primary pixel block and auxiliary pixel block; Using each of the main pixel blocks and the brightness reference value, obtaining a brightness difference between each of the main pixel blocks and the brightness reference value as first difference data; Using the plurality of auxiliary pixel blocks corresponding to each of the primary pixel blocks and the brightness reference value, obtaining a plurality of brightness difference values ​​between the plurality of auxiliary pixel blocks and the brightness reference value as a plurality of second difference value data; Obtaining a first grayscale adjustment coefficient corresponding to each main pixel block by using the first difference data and a plurality of second difference data; The first grayscale adjustment coefficient is obtained by the following formula: ; Wherein, K represents the first grayscale adjustment coefficient; n represents the number of auxiliary pixel blocks; D fi represents the second difference data of the i-th auxiliary pixel block; D fb represents the standard deviation of the second difference data corresponding to the n auxiliary pixel blocks; D z represents the first difference data corresponding to the main pixel block; L fb represents the standard deviation of the brightness values ​​corresponding to n secondary pixel blocks; Comparing the first grayscale adjustment coefficient with a preset coefficient threshold; Obtaining a target grayscale value of the main pixel block according to a quantitative relationship between the first grayscale adjustment coefficient and a preset coefficient threshold; Obtaining a target grayscale value of the main pixel block according to a quantitative relationship between the first grayscale adjustment coefficient and a preset coefficient threshold value includes: When the first grayscale adjustment coefficient does not exceed the preset coefficient threshold, the original grayscale value of the main pixel block and the original grayscale value of the auxiliary pixel block are retrieved; Obtaining a target grayscale value of the main pixel block by combining the original grayscale value of the main pixel block and the original grayscale value of the auxiliary pixel block using the first grayscale adjustment coefficient; The target grayscale value of the main pixel block is obtained by the following formula: ; Among them, H m represents the target grayscale value of the main pixel block; H0 represents the original grayscale value of the main pixel block; n represents the number of auxiliary pixel blocks; K represents the first grayscale adjustment coefficient; H i represents the original grayscale value of the ith auxiliary pixel block; S represents the adjustment coefficient, and the adjustment coefficient is obtained by the following formula: ; Where S represents the adjustment coefficient; n represents the number of auxiliary pixel blocks; H b H represents the standard deviation of the original grayscale values ​​of n secondary pixel blocks; i represents the original grayscale value of the ith auxiliary pixel block; sqrt[] represents the square root processing of the value inside the brackets; When the first grayscale adjustment coefficient exceeds a preset coefficient threshold, the central grayscale value extracted from the PE pipe image data and the original grayscale value of the main pixel block and the original grayscale value of the auxiliary pixel block are retrieved; Subtracting the center grayscale value in the PE pipe image data from the original grayscale value of the main pixel block to obtain a first grayscale difference value; Subtracting the central grayscale value in the PE pipe image data from the original grayscale values ​​of the plurality of auxiliary pixel blocks corresponding to the main pixel block to obtain a plurality of second grayscale difference values; Obtaining a target grayscale value of the main pixel block by using the first grayscale difference value and a plurality of second grayscale differences in combination with a first grayscale adjustment coefficient; The target grayscale value of the main pixel block is obtained by the following formula: ; Among them, H m represents the target grayscale value of the main pixel block; H0 represents the original grayscale value of the main pixel block; n represents the number of auxiliary pixel blocks; K represents the first grayscale adjustment coefficient; Z i represents the second grayscale difference corresponding to the ith auxiliary pixel block; Z represents the first grayscale difference corresponding to the main pixel block; Z b represents the standard deviation of the second grayscale difference corresponding to the secondary pixel block n; Z max and Z min Indicates the maximum second grayscale difference value and the minimum second grayscale difference value corresponding to the secondary pixel block n.

2. The PE pipe quality detection method based on target image according to claim 1 is characterized in that: The step 1 includes collecting an image of the PE pipe based on a camera, and further comprising: Set up at least one image acquisition point, and deploy a camera at each image acquisition point to obtain image data of the PE pipe at several viewing angles acquired by the camera; The image data obtained from several perspectives are associated with the PE pipe to construct an image dataset of the PE pipe. At the same time, the PE pipe is uniquely identified.

3. The PE pipe quality detection method based on target image according to claim 2 is characterized in that: The target features of the PE pipe are extracted in step 2, specifically including: Obtain image data in the image data set of the PE pipe, and select one image data from several viewing angles as a reference image; Extract the pipe features from all image data, match the corresponding feature points between images of different viewpoints based on the extracted pipe features, and estimate the geometric transformation model between the images based on the matching results; The non-reference image is transformed according to the geometric transformation model, aligned to the coordinate system of the reference image, and the transformed non-reference image is superimposed on the reference image based on the coordinate system; The superimposed images are subjected to seam processing, color correction and image optimization to generate fused PE pipe 3D image data, and target features for quality inspection are extracted from the PE pipe 3D image data.

4. The PE pipe quality detection method based on target image according to claim 3 is characterized in that: The step 2 includes screening key detection features, specifically including: Perform preliminary screening on the extracted PE pipe target features and remove features irrelevant to quality inspection; The weight of the initially screened target features is evaluated according to the preset feature weight threshold, and standardized processing is performed based on the screening results; The standardized target features are input into the PE pipe database for key detection feature matching, and the similarity between the input features and the features in the PE pipe database is calculated; Determine the similarity threshold based on the similarity calculation result, analyze the matching degree between the target feature and the feature in the database, and select the target features with a matching degree higher than the preset similarity threshold as potential key detection features; The potential key detection features are verified, the potential key detection features are optimized according to the verification results, and the optimized key detection features are used as key features related to quality detection.

5. The PE pipe quality detection method based on target image according to claim 2, characterized in that: The step three: quality inspection, specifically includes: Feature comparison: Establish a test standard feature library as a benchmark for quality comparison, and input the optimized key features into the test standard feature library for comparison. The test standard feature library includes qualified and unqualified PE pipe features; Defect identification and location: Determine the difference between each key feature and the corresponding inspection standard feature based on the comparison results, and mark the key features that exceed the preset comparison threshold as potential defects based on the difference; Verify potential defects based on image data from multiple perspectives, determine the location of defects on the PE pipe based on the verification results, classify the identified defects, and record the defect parameters; Quality assessment: The severity of defects is assessed based on the defect location, defect type and defect parameters. The severity of defects of the same PE pipe is obtained based on the unique identification of the PE pipe; Perform a comprehensive quality score on PE pipes, compare it with the preset PE pipe quality standards, determine whether the pipes meet the quality requirements, and generate quality assessment results.

6. The PE pipe quality detection method based on target image according to claim 5, characterized in that: The step three also includes determining the specification and type of the corresponding pipe according to the extracted key features, matching the corresponding quality inspection standard according to the specification and type of the pipe, and performing quality inspection based on the matching result.

7. The target image-based PE pipe quality detection system is applied to the target image-based PE pipe quality detection method as claimed in claim 6, characterized in that: include: An image acquisition module is used to acquire image data of at least two PE pipes based on a camera, mark the received image data with information, establish an association relationship with the PE pipe, and construct an image data set of the PE pipe; The image processing module is used to preprocess the image data set of PE pipes, construct three-dimensional image data of PE pipes based on image data of multiple perspectives, extract target features from the three-dimensional image data, perform preliminary screening and weight evaluation on the extracted target features, and screen out key features related to PE pipe quality inspection; The quality assessment module is used to compare the selected key features with the preset PE pipe quality standards, conduct quality inspection, determine whether the quality of the PE pipe meets the requirements, identify and locate existing defects, and evaluate the quality grade of the PE pipe according to the type and degree of defects, and generate a PE pipe inspection report.

Citation Information

Patent Citations

  • Plastic pipe quality detection method based on image processing

    CN116258716A

  • Three-dimensional modeling shadow recognition system based on deep learning

    CN114998545A

  • Strip steel defect detection method based on image recognition

    CN116071316A

  • Fault automatic detection and repair method for self-healing intelligent power line

    CN118739184A

  • Method and structure for generating picture compensation signal, and restoring system

    US20190104294A1