An image recognition method for surface defect detection of a cable protection pipe
By calculating the transverse light intensity abrupt divergence and polarization tail factor, and reconstructing the light intensity value by combining motion alignment weights, the problem of polarization artifacts in the high-speed extrusion process of the Stokes parametric analytical algorithm is solved, and accurate differentiation between water droplets and defects and edge fidelity are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU WORRUN ELECTRIC POWER EQUIPMENT CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-06-23
AI Technical Summary
In existing technologies, the Stokes parametric analysis algorithm suffers from polarization artifacts caused by sub-pixel-level displacement during the high-speed extrusion of cable protection pipes, making it unable to effectively distinguish between water droplets and defects, leading to false alarms and missed detections.
By acquiring the light intensity values of four-channel images, calculating the transverse light intensity abrupt divergence and polarization tail factor, and combining motion alignment weights to reconstruct the light intensity data, the corrected polarization degree is obtained. The corrected polarization degree is then used to generate a polarization feature map to determine water droplet interference and pipe surface defects.
It achieves accurate differentiation between water droplets and defects under high-speed motion, solves the polarization artifact problem, ensures edge fidelity and artifact suppression, and improves detection accuracy.
Smart Images

Figure CN122265252A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image detection technology. More specifically, this invention relates to an image recognition method for detecting surface defects in cable protection pipes. Background Technology
[0002] Cable protection pipes are widely used in underground pipelines for power equipment. Their production typically involves high-temperature extrusion molding and cooling via water-cooling tanks on an assembly line. During the quality inspection process of high-speed continuous extrusion of the pipes, cooling water droplets and workshop dust easily adhere to the surface. Since the grayscale and contours of water droplets, dust, and surface defects such as bubbles and impurities caused by poor molding of the actual pipes are extremely similar in the case of conventional two-dimensional visual images, they can easily lead to false alarms and missed detections by the detection system.
[0003] To address the technical challenge of distinguishing between water droplets and real defects, the existing technology introduces the Stokes parametric analysis algorithm. This algorithm utilizes a focal plane beam splitting polarization camera to acquire a photosensitive array containing four polarization directions. By extracting each polarization array as a macropixel and performing Stokes matrix operations, the degree of polarization is calculated, thereby distinguishing liquid water droplets from solid pipe wall defects from the optical polarization dimension of the material's physical properties.
[0004] However, this core technology has serious limitations in actual cable protection pipe production lines: polarization analysis is based on the premise that the polarization array collects the light intensity of the absolute same physical point; under the dynamic condition of continuous high-speed linear extrusion of the pipe, the sharp edges of water droplets or tiny bubbles will undergo sub-pixel-level relative spatial displacement between four adjacent micropixels at the moment of camera exposure; this tiny spatial physical misalignment directly breaks the physical premise of Stokes calculation, resulting in strong polarization artifacts calculated at the edges of water droplets and defects, generating false high-polarization or low-polarization contours, which in turn causes tearing of image edge features and makes it impossible to effectively achieve high-precision separation of defects and water droplets. Summary of the Invention
[0005] To address the technical problem of the inability to accurately separate the aforementioned defects from water droplets, this invention provides an image recognition method for detecting surface defects in cable protection pipes. The method includes: acquiring an original image of the cable protection pipe; extracting a four-channel image from the original image; calculating the light intensity values of the four-channel images; and constructing a macro-pixel array structure. For each pixel: based on the cross-product balance deviation of the light intensity values of the two sets of vertical polarization channels within the macro-pixel array structure, the transverse light intensity abrupt divergence is obtained. The longitudinal grayscale change rate along the extrusion direction of the cable protection pipe and the transverse grayscale change rate perpendicular to the extrusion direction are obtained, and the transverse light intensity abrupt divergence is projected onto the longitudinal and transverse grayscale change rates. Linear gain amplification is performed to obtain the polarization tail factor. Based on the polarization tail factor of each pixel and the global arithmetic mean of the polarization tail factor, a discreteness mapping is performed to obtain the motion alignment weight. Using the motion alignment weight, the original light intensity value of each channel is weighted and summed with the historical reference light intensity value after alignment by motion vector tracing to obtain the reconstructed light intensity value of each channel. Based on the reconstructed light intensity value, two Stokes parameters after reconstruction are obtained and the polarization vector magnitude is synthesized. The reconstructed light intensity value is normalized to obtain the corrected polarization degree of each pixel. The corrected polarization degree is used to generate a polarization feature map, and water droplet interference and pipe surface defects in the polarization feature map are determined according to the preset high polarization discrimination threshold.
[0006] This scheme evaluates pixel reliability under dynamic conditions by introducing transverse intensity abrupt divergence and polarization tail factor, and realizes spatiotemporal reconstruction of intensity data by combining motion alignment weight; it effectively solves the polarization artifact problem caused by sub-pixel displacement of focal plane polarization camera on high-speed extrusion production line. Through the corrected polarization degree, it can accurately distinguish water droplet interference and pipe surface defects, solve the problem of polarization artifact under high-speed movement, and achieve a dynamic balance between edge fidelity and artifact suppression.
[0007] Preferably, the four-channel image includes Channel light intensity map , Channel light intensity map , Channel light intensity map as well as Channel light intensity map .
[0008] Preferably, the formula for calculating the transverse intensity abrupt divergence is: In the formula, coordinates Transverse intensity abrupt divergence in the original image; The x-coordinate of the original image; The vertical coordinate is the one in the original image; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; It is the natural logarithm function; Indicates taking the absolute value; A minimum constant preset to prevent the denominator from being zero.
[0009] By calculating the cross product balance deviation of the light intensity values of the two sets of vertical polarization channels and taking the absolute logarithm, abnormal fluctuations in light intensity caused by motion misalignment within macro pixels can be keenly detected. This design does not rely on complex edge detection algorithms and can identify physical consistency broken by displacement at the pixel level, providing a highly sensitive original evaluation index for subsequent artifact suppression.
[0010] Preferably, the formula for calculating the polarization tailing factor is: In the formula, coordinates Polarization tail factor at the location; coordinates Transverse intensity abrupt divergence in the original image; The coordinates (x, y) represent the omnidirectional grayscale value in the original image; coordinates The longitudinal grayscale change rate obtained along the direction of pipe extrusion; coordinates The rate of change of lateral grayscale obtained perpendicular to the extrusion direction; A minimum constant preset to prevent the denominator from being zero; It is a natural exponential function.
[0011] By projecting the abrupt divergence onto the longitudinal and transverse grayscale change rates for gain amplification, the specific directional characteristics of the pipe extrusion motion are fully utilized. Through the nonlinear mapping of the natural exponential function, the edge tearing characteristics in the motion direction are amplified, enabling the algorithm to accurately identify which areas are affected by motion tailing and enhancing the identification accuracy of dynamic interference features.
[0012] Preferably, the formula for calculating the motion alignment weight is: In the formula, coordinates Motion alignment weights at the location; The polarization tailing factor at coordinates (x, y); This is the global arithmetic mean of the trailing factor matrix for the current entire frame image; It is a hyperbolic sine function.
[0013] By utilizing a hyperbolic sine function to handle the dispersion of local factors and the global mean, a nonlinear sensitive response mechanism is realized. When an abnormal displacement occurs in a local region, the weights decay rapidly, thereby flexibly switching data sources. This adaptive adjustment ensures that static regions retain their original physical characteristics, while dynamic misaligned regions can accurately trigger the compensation mechanism, guaranteeing the reliability of the entire field data.
[0014] Preferably, the two reconstructed Stokes parameters are calculated by multiplying by the motion alignment weights. The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel, minus the motion alignment weight multiplied by The original light intensity value of the channel is multiplied by the difference between 1 and the motion alignment weight. The first Stokes component is obtained by summing the historical reference light intensity values of the channel; similarly, it is multiplied by the motion alignment weight. The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel, minus the motion alignment weight multiplied by The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel yields the second Stokes component.
[0015] By matching the weights and complement weights, the original light intensity of the current frame is deeply fused with the historical reference light intensity. This reconstruction logic completes the physical point complement repair before component calculation, so that the first and second Stokes components obtained in the end eliminate false high polarization or low polarization artifacts and restore the physical premise of polarization solution.
[0016] Preferably, the global arithmetic mean is obtained by traversing and accumulating the polarization tail factor of all pixels in the current frame image, and then dividing by the total number of pixels in the image to obtain the statistical average value, which is used as the global arithmetic mean.
[0017] Preferably, the corrected polarization degree is calculated by taking the arithmetic square root of the sum of the squares of the first Stokes component and the second Stokes component, and dividing it by the total light intensity components of the four channels plus a very small constant.
[0018] Preferably, the total light intensity of the four channels is targeted at... , , as well as These four polarization channels are obtained by multiplying the motion alignment weight by the original light intensity value of each channel, adding the difference between 1 and the motion alignment weight, multiplying by the historical reference light intensity value of each channel after alignment via motion vector tracing, and summing the results.
[0019] Preferably, the method for determining water droplet interference and pipe surface defects is as follows: pixels with a polarization degree value higher than the high polarization distinction threshold are determined to be water droplet interference, and pixels with a polarization degree lower than the high polarization distinction threshold are determined to be pipe surface defects.
[0020] The beneficial effects of this invention are as follows: This scheme evaluates pixel reliability under dynamic conditions by introducing transverse intensity abrupt divergence and polarization tail factor, and realizes spatiotemporal reconstruction of intensity data by combining motion alignment weight; it effectively solves the polarization artifact problem caused by sub-pixel displacement of focal plane polarization camera on high-speed extrusion production line. Through the corrected polarization degree, it can accurately distinguish water droplet interference and pipe surface defects, solve the problem of polarization artifact under high-speed movement, and achieve a dynamic balance between edge fidelity and artifact suppression. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating an image recognition method for detecting surface defects in cable protection pipes according to the present invention. Figure 2 It is the original image of the fluid target; Figure 3 This is a schematic diagram of edge distortion after conventional alignment processing; Figure 4 This is a schematic diagram of edge reconstruction after processing by the algorithm of this invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0024] This invention discloses an image recognition method for detecting surface defects in cable protection pipes, referring to... Figure 1 This includes steps S1 to S5: The system acquires four-channel images of the cable protection pipe, calculates the light intensity value, and constructs a macro-pixel array structure.
[0025] It should be noted that a light source and a focal plane beam-splitting polarization camera are installed above the high-speed extrusion production line of the cable protection pipe; the light source is preferably a high-brightness coaxial light-emitting diode light source to ensure the uniformity of reflection on the pipe surface; the camera continuously acquires original images of the pipe surface with cooling water droplets and potential defects.
[0026] Furthermore, since the image sensor of the focal plane beam-splitting polarization camera integrates a micro-polarization filter array, the current frame corresponding to the image can be extracted from the original image according to the array arrangement. Channel light intensity map , Channel light intensity map , Channel light intensity map as well as Channel light intensity map The four-channel image, in the spatial coordinate system, forms a size of The macro-pixel array structure serves as the basic data unit for subsequent polarization analysis.
[0027] For each pixel, the transverse light intensity abrupt divergence is obtained based on the macro-pixel array structure.
[0028] It should be noted that in order to evaluate the light intensity distribution distortion within a macropixel under high-speed motion conditions, it is first necessary to evaluate the local energy balance state in the original image.
[0029] Specifically, this step involves calculating two sets of vertical polarization channels. and , and Balance the deviation of the cross product of light intensity to construct the cross-directional light intensity abrupt divergence. The operation is as follows: assess whether there is an abnormal energy distribution between diagonal pixels that does not conform to the polarization modulation law; when the sampling point is in a stable region, the vertical energy product tends to be equal and the divergence remains low; when the water droplet or defect edge undergoes sub-pixel displacement at the moment of camera exposure, the vertical energy balance is broken and the divergence surges.
[0030] Furthermore, the transverse intensity abrupt divergence is calculated based on the light intensity values of the four-channel images, serving as a preliminary screening index for identifying polarization artifacts. The formula for calculating the transverse intensity abrupt divergence is:
[0031] In the formula, coordinates Transverse intensity abrupt divergence in the original image; used for evaluation The degree of disorder in the polarization energy distribution within a macropixel; The x-coordinate of the original image; The vertical coordinate is the one in the original image; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; It is the natural logarithm function; Indicates taking the absolute value; A minimum constant preset to prevent the denominator from being zero.
[0032] Among them, when When the value increases, it indicates that the energy balance between the vertical polarization channels is broken instantaneously, and the measured surface may be in a sub-pixel spatial misalignment state caused by high-speed extrusion motion. At this time, the calculated polarization degree will produce edge feature tearing or artifacts. Furthermore, only the high divergence state has the risk of defects being confused with water droplets due to motion blur. The low divergence state with stable signal or minimal motion influence does not require complex phase alignment. Therefore, through the preliminary screening of the pipe surface state, the computational resources are concentrated on processing the sub-pixel misalignment region with high uncertainty. Since the natural logarithm function is used for nonlinear compression, this index takes into account both high sensitivity and numerical stability when evaluating the degree of local distortion of the polarization physical state.
[0033] The polarization tail factor is obtained by projecting the transverse light intensity abrupt divergence onto the longitudinal and transverse grayscale change rates of the cable protection pipe for gain amplification.
[0034] It should be noted that, in order to accurately identify the polarization distortion caused by the unidirectional motion of the production line, it is necessary to project the transverse light intensity abrupt divergence onto the physical dimension of the actual movement of the pipe; specifically, this step constructs the polarization tail factor by calculating the grayscale change rate of the image.
[0035] The Sobel operator is used to obtain the longitudinal grayscale change rate along the pipe extrusion direction and the transverse grayscale change rate perpendicular to the extrusion direction. By calculating the proportion of the longitudinal grayscale change rate in the total grayscale change rate, the transverse light intensity abrupt divergence is projected onto the longitudinal grayscale change rate and the transverse grayscale change rate for gain amplification, and the polarization tail factor is obtained.
[0036] Furthermore, the formula for calculating the polarization trailing factor based on the motion grayscale change rate of the extrusion scene is as follows:
[0037] In the formula, coordinates The polarization tail factor at the point is used to characterize the intensity of artifacts caused by unidirectional motion of a pixel; coordinates Transverse intensity abrupt divergence in the original image; used for evaluation The degree of disorder in the polarization energy distribution within a macropixel; coordinates The longitudinal grayscale change rate obtained along the direction of pipe extrusion represents the edge response intensity of the image on the principal axis of motion. coordinates The lateral grayscale change rate obtained perpendicular to the extrusion direction is used to monitor edge disturbances in non-motion directions; The local omnidirectional grayscale change rate represents the total change intensity of the image brightness of a pixel. A very small constant is preset to prevent the denominator from being zero, thus ensuring the stability of the numerical operation of the underlying algorithm; It is a natural exponential function used to perform nonlinear gain amplification on divergence values that conform to motion characteristics.
[0038] When the value of the polarization tail factor increases, it indicates that the light intensity grayscale change rate in the current region has extremely high axial purity, that is, the longitudinal grayscale change rate is much greater than the transverse grayscale change rate. At this time, the transverse light intensity abrupt divergence is nonlinearly amplified to the maximum extent by the exponential function, resulting in an extremely high polarization tail factor. This indicates that the misalignment is caused by the physical behavior of high-speed unidirectional extrusion of the pipeline, rather than by static random noise of the sensor or diffuse reflection of stationary dust.
[0039] Motion alignment weights are obtained based on the polarization tail factor of each pixel.
[0040] It should be noted that in order to transform the polarization tail factor, which characterizes the severity of axial misalignment, into a compensation parameter that can be directly applied to the Stokes algorithm operation, an adaptive motion alignment weight allocation mechanism needs to be constructed.
[0041] Specifically, this step uses a hyperbolic sine function to inversely map the trailing abnormal regions that deviate from the overall frame background state, and constructs motion alignment weights.
[0042] Motion alignment weighting is a nonlinear feedback technique based on numerical confidence. Its operation involves: using the average polarization tail factor of the entire frame as a benchmark, calculating the dispersion of the local polarization tail factor from the global background; utilizing the characteristic of the hyperbolic sine function's explosive growth in value far from its equilibrium point, performing phase stretching on physically misaligned sampled pixels, thereby restoring the physical point alignment confidence of the data at a mathematical analytical level; furthermore, the formula for calculating the motion alignment weight based on the polarization tail factor is:
[0043] In the formula, coordinates The motion alignment weight at the location has a theoretical range of values. It is used to perform a weighted summation of the historical reference light intensity values after alignment via motion vector tracing to obtain the reconstructed light intensity values for each channel; The polarization tailing factor at coordinates (x, y); The global arithmetic mean of the polarization trailing factor of the entire current frame image is used as a dynamic benchmark to determine whether abnormal displacement has occurred in a local area; this is achieved by traversing and accumulating the polarization trailing factor of all pixels in the current frame image, and then dividing by the total number of pixels in the image. The obtained statistical average; It is a hyperbolic sine function used to achieve a nonlinear sensitive response to the degree of misalignment. ; This indicates taking the absolute value.
[0044] Among them, when the motion alignment weight decreases and approaches the value When the polarization tail factor in a local area is much larger than the global arithmetic mean of the polarization tail factor, it indicates that the pixel has experienced severe sub-pixel-level axial misalignment. At this point, due to the mapping effect of the hyperbolic sine function, the denominator term increases sharply, causing the motion alignment weight of the dependent variable to decay rapidly. When the motion alignment weight is small, it is determined that the currently acquired raw light intensity data cannot be directly used due to the displacement deviation, and thus the corresponding historical reference light intensity value is called for data repair. Conversely, when the motion alignment weight increases and approaches a certain value... When the local polarization tailing factor is close to or less than the global mean, the region is at a high confidence level of polarization physical state stability and will tend to retain the original Stokes solution results.
[0045] Furthermore, since the motion alignment weights exhibit a smooth nonlinear transition with the change of the polarization tail factor, if the polarization tail factor only shifts slightly, the motion alignment weights will be slightly adjusted to maintain the subtle texture of the image; if the polarization tail factor undergoes a drastic change, the motion alignment weights will decisively fail to suppress artifacts. This design avoids miscompensation for minor fluctuations within the normal motion tolerance while ensuring effective identification of severely torn feature regions, thus achieving a dynamic balance between maintaining image edge fidelity and suppressing motion artifacts.
[0046] Using motion alignment weights, the historical reference light intensity values are weighted and summed to obtain the reconstructed light intensity value; based on the reconstructed light intensity value, two Stokes components are obtained and the polarization vector magnitude is synthesized to obtain the corrected polarization degree; using the corrected polarization degree, water droplet interference and pipe surface defects are determined according to the high polarization distinction threshold.
[0047] It should be noted that in order to eliminate polarization analytical distortion caused by motion misalignment, it is necessary to dynamically reconstruct the light intensity combination within the pixel using motion alignment weights; and construct the reconstructed Stokes vector.
[0048] Furthermore, when the motion alignment weight is higher than the preset level, it indicates that the physical state of the pixel is stable, and the original light intensity value of the four channels of the current frame is directly used for calculation; when the motion alignment weight is reduced, it indicates that there is motion misalignment, and the light intensity value of the corresponding channel of the historical frame after motion trajectory alignment is introduced to proportionally compensate the damaged channel data of the current frame, thereby completing the physical reconstruction of the light intensity data before calculating the components and eliminating polarization artifacts caused by motion.
[0049] First, regarding , , and These four polarization channels are each multiplied by the original light intensity value of each channel in the current frame using motion alignment weights, plus the difference weight between 1 and the motion alignment weights multiplied by the historical reference light intensity value of each channel after motion vector tracing and alignment, and outputting the total light intensity component of each of the four channels. The total light intensity component of the four channels is obtained by adding them together.
[0050] Furthermore, the motion alignment weights are multiplied by The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel, minus the motion alignment weight multiplied by The original light intensity value of the channel is multiplied by the difference between 1 and the motion alignment weight. The first Stokes component is obtained by summing the historical reference light intensity values of the channel; similarly, it is multiplied by the motion alignment weight. The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel, minus the motion alignment weight multiplied by The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel yields the second Stokes component.
[0051] Specifically, when the motion alignment weights approach... When the motion alignment weight approaches the difference between historical reference light intensities, it will automatically be converted into a calculation of the difference between historical reference light intensities, thereby completely eliminating artifact interference caused by motion misalignment in the current frame; At that time, the standard deviation between the original channels is analyzed, ensuring that the original physical characteristics of the statically stable region are not destroyed.
[0052] Based on this, according to the definition of the Stokes vector in polarization optics, the method to calculate the corrected degree of polarization that reflects the physical properties of the measured surface and is not affected by fluctuations in light intensity is as follows: take the arithmetic square root of the sum of the squares of the first Stokes component and the second Stokes component, and divide it by the total light intensity components of the four channels plus a very small constant.
[0053] Because liquid water droplets exhibit specific refractive indices and strong polarization responses under dynamic extrusion conditions on a production line, their polarization characteristics are significantly different from those of solid tube wall defects in terms of physical nature; therefore, a high polarization discrimination threshold is set in the polarization characteristic map.
[0054] The preset high polarization discrimination threshold is used to define the reliability physical boundary of the tested area as water droplet interference or pipe surface defects. Since the theoretical range of the corrected polarization degree is [0,1], if the high polarization discrimination threshold is set too small, it may cause normal small roughness fluctuations or slight environmental stray light reflections on the pipe surface to be misjudged as high polarization water droplets, thus over-masking the image area and causing the loss or missed detection of real defect features. If it is set too large, it may not be able to effectively identify and filter out small-diameter water droplets or thin water films with relatively weak polarization response, causing these liquid interferences to remain in the polarization feature map and be misreported as bubbles or impurity defects, reducing the detection accuracy of the system. Therefore, the reasonable range of the high polarization discrimination threshold is [missing value]. In this embodiment, it is set to , The set value is based on balancing the identification sensitivity of polarization physical characteristics and the complexity of moisture interference in industrial production sites. It ensures thorough filtration of water droplets with strong polarization response while avoiding false damage to targets with low polarization response defects, thus achieving a balance between anti-interference capability and detection accuracy. In other embodiments, the implementer can flexibly adjust the high polarization discrimination threshold within the range according to the actual spray cooling intensity of the production line and the refractive index characteristics of the pipe material.
[0055] Specifically, a polarization feature map reflecting the distribution of physical properties of the measured surface is generated using the corrected polarization degree calculated from each pixel. The image is binarized and classified according to the high polarization discrimination threshold. Pixels with corrected polarization degrees higher than the high polarization discrimination threshold are identified as water droplet interference, while pixels with values lower than the high polarization discrimination threshold are identified as pipe surface defects.
[0056] Based on this, a neighborhood search algorithm is used to logically associate spatially adjacent pixels that are all determined to have high polarization attributes, thereby constructing a set of water droplet connected regions representing water droplet interference. At the same time, mask filtering is performed on the identified water droplet connected regions. While completely eliminating the interference of water droplet connected regions, the real surface defects with low polarization response are locked and retained, thereby achieving high-precision separation of defects and water droplets.
[0057] For example, Figure 2 The image shows the original state of the fluid target, including moving water droplets and tiny bubbles. The edges of the fluid target overlap with the background texture, and the initial outline of the target has complex light and dark features due to the influence of ambient light reflection and lens refraction.
[0058] For example, Figure 3 This is a schematic diagram of edge distortion after conventional alignment processing; it shows the reconstruction result after using a conventional multi-frame alignment algorithm; due to the displacement and polarization characteristics of the fluid target, sub-pixel level misalignment occurs in the edge areas of water droplets and bubbles, resulting in discontinuous breaks in the edge contour and obvious edge tearing; at the same time, polarization artifacts are generated at the target edge, causing the physical boundary of the target to expand or contract, resulting in a decrease in contour fidelity.
[0059] For example, Figure 4 This is a schematic diagram of edge reconstruction after processing by the algorithm of the present invention; it shows the reconstruction result after applying the dynamic alignment and artifact suppression algorithm of the present invention; in this result, by accurately compensating the edges of the dynamic target, the edge tearing phenomenon disappears, and the boundaries of water droplets and bubbles are restored to a continuous and smooth state, forming a complete edge; at the same time, the polarization artifacts at the edge are effectively suppressed, and the geometric contour of the target is highly consistent with the real physical shape, proving the technical advantages of the present invention in dynamic detail restoration.
Claims
1. An image recognition method for detecting surface defects in cable protection pipes, characterized in that, include: The original image of the cable protection pipe is obtained, four-channel images are extracted from the original image, the light intensity values of the four-channel images are calculated, and a macro-pixel array structure is formed. For each pixel: the cross product balance deviation of the light intensity values of the two sets of vertical polarization channels within the macro-pixel array structure is used to obtain the transverse light intensity abrupt divergence. The longitudinal grayscale change rate along the extrusion direction of the cable protection pipe and the transverse grayscale change rate perpendicular to the extrusion direction are obtained. The transverse light intensity abrupt divergence is projected onto the longitudinal grayscale change rate and the transverse grayscale change rate for gain amplification, and the polarization tailing factor is obtained. The motion alignment weight is obtained by mapping the degree of discreteness between the polarization tail factor of each pixel and the global arithmetic mean of the polarization tail factor. Using motion alignment weights, the original light intensity values of each channel are weighted and summed with the historical reference light intensity values after motion vector tracing alignment to obtain the reconstructed light intensity values of each channel; based on the reconstructed light intensity values, the two reconstructed Stokes parameters are obtained and the polarization vector magnitude is synthesized; the reconstructed light intensity values are normalized to obtain the corrected polarization degree of each pixel. A polarization feature map is generated by correcting the degree of polarization, and water droplet interference and pipe surface defects in the polarization feature map are determined according to a preset high polarization discrimination threshold.
2. The image recognition method for detecting surface defects in cable protection pipes according to claim 1, characterized in that, The four-channel image includes Channel light intensity map , Channel light intensity map , Channel light intensity map as well as Channel light intensity map .
3. The image recognition method for detecting surface defects in cable protection pipes according to claim 1, characterized in that, The formula for calculating the transverse intensity abrupt divergence is: In the formula, coordinates Transverse intensity abrupt divergence in the original image; The x-coordinate of the original image; The vertical coordinate is the one in the original image; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; coordinates In the original image The light intensity value of the polarization channel; It is the natural logarithm function; Indicates taking the absolute value; A minimum constant preset to prevent the denominator from being zero.
4. The image recognition method for detecting surface defects in cable protection pipes according to claim 1, characterized in that, The formula for calculating the polarization tail factor is: In the formula, coordinates Polarization tail factor at the location; coordinates Transverse intensity abrupt divergence in the original image; The coordinates (x, y) represent the omnidirectional grayscale value in the original image; coordinates The longitudinal grayscale change rate obtained along the direction of pipe extrusion; coordinates The rate of change of lateral grayscale obtained perpendicular to the extrusion direction; A minimum constant preset to prevent the denominator from being zero; It is a natural exponential function.
5. The image recognition method for detecting surface defects in cable protection pipes according to claim 1, characterized in that, The formula for calculating the motion alignment weight is: In the formula, coordinates Motion alignment weights at the location; The polarization tailing factor at coordinates (x, y); This is the global arithmetic mean of the trailing factor matrix for the current entire frame image; It is a hyperbolic sine function; This indicates taking the absolute value.
6. The image recognition method for detecting surface defects in cable protection pipes according to claim 2, characterized in that, The two reconstructed Stokes parameters are calculated by multiplying by the motion alignment weight. The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel, minus the motion alignment weight multiplied by The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel yields the first Stokes component; Similarly, by multiplying the motion alignment weights... The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel, minus the motion alignment weight multiplied by The difference between the original light intensity value of the channel and the motion alignment weight is multiplied by 1. The sum of the historical reference light intensity values of the channel yields the second Stokes component.
7. The image recognition method for detecting surface defects in cable protection pipes according to claim 1, characterized in that, The method for obtaining the global arithmetic mean is as follows: The global arithmetic mean is obtained by iterating through and accumulating the polarization tail factor of all pixels in the current frame image, and then dividing by the total number of pixels in the image.
8. The image recognition method for detecting surface defects in cable protection pipes according to claim 6, characterized in that, The corrected polarization degree is calculated by taking the arithmetic square root of the sum of the squares of the first Stokes component and the second Stokes component, and dividing it by the total light intensity components of the four channels plus a very small constant.
9. The image recognition method for detecting surface defects in cable protection pipes according to claim 8, characterized in that, The total light intensity of the four channels is targeted at , , as well as These four polarization channels are obtained by multiplying the motion alignment weight by the original light intensity value of each channel, adding the difference between 1 and the motion alignment weight, multiplying by the historical reference light intensity value of each channel after alignment via motion vector tracing, and summing the results.
10. The image recognition method for detecting surface defects in cable protection pipes according to claim 1, characterized in that, The method for determining water droplet interference and pipe surface defects is as follows: pixels with a polarization degree value higher than the high polarization distinction threshold are determined to be water droplet interference, and pixels with a polarization degree lower than the high polarization distinction threshold are determined to be pipe surface defects.