A visual inspection device for composite hose packaging and its defect rejection system

CN122922079APending Publication Date: 2026-10-16REGO PACKING GZ IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611344996.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

但由于形变引起的灰度畸变与真实缺陷导致的灰度变化在空间频率和幅值范围上存在重叠,常规预处理并无法有效区分二者,误检和漏检问题突出

Benefits of technology

[0016]The beneficial effects of this invention compared to existing technologies are as follows: Existing visual inspection schemes treat the elastic deformation of the composite flexible tube under printing pressure as a source of detection interference. They attempt to eliminate this influence through image enhancement and filtering preprocessing. However, because the grayscale distortion caused by deformation is highly similar in visual features to real defects such as dents and wrinkles, conventional preprocessing cannot effectively distinguish between the two, leading to a large number of false positives and false negatives. This invention uses dual-light source 3D reconstruction technology to obtain the 3D contour of the tube surface and unfolds it circumferentially into a circumferential deformation sequence. It further constructs the circumferential deformation entropy value as a defect criterion, transforming the tube deformation from a source of detection interference into an effective signal for defect identification. This improves the problem of detection failure where it is difficult to distinguish between deformation and real defects in flexible substrates, and achieves effective identification of both dents and wrinkles. In the above calculations, each radial displacement is normalized using the nominal radius of the composite flexible tube as a reference. That is, the radial displacement at each circumferential angle position is divided by the nominal radius of the composite flexible tube to obtain the normalized radial displacement, making the final calculated circumferential deformation entropy value dimensionless.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122922079A_ABST
    Figure CN122922079A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of composite hose packaging printing detection, and specifically discloses a visual detection device and system for composite hose packaging. The device comprises: a first light source and a second light source, the included angle of which with the axial direction of the composite hose is not equal; a first image acquisition unit that acquires a first image and a second image of the surface of the composite hose under the irradiation of the two light sources; a deformation ring decomposition unit that reconstructs the three-dimensional profile of the surface according to the first image and the second image and expands it into a ring deformation sequence along the circumferential direction; a deformation entropy construction unit that adaptively divides the sub-intervals according to the ring deformation sequence and calculates the ring deformation entropy value; and a defect mode judgment unit that judges the defect type according to the ring deformation entropy value. A defect rejection system comprising the device is also disclosed. The present application realizes effective identification of the concave and wrinkle defects of the composite hose by converting the deformation of the pipe body from detection interference into a defect criterion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of composite tube packaging printing inspection technology, and in particular to a visual inspection device and defect rejection system for composite tube packaging. Background Technology

[0002] Composite flexible tubes are widely used in packaging for industries such as daily chemicals, pharmaceuticals, and food due to their lightweight, foldability, and corrosion resistance. In recent years, consumer demands for packaging appearance quality have continued to rise. Therefore, quality inspection of the tube surface after printing to identify appearance defects such as dents, wrinkles, and bubbles has become a crucial step in the composite flexible tube production process. Currently, the industry commonly uses automated optical inspection systems based on machine vision to perform this task. This involves deploying industrial cameras in the printing production line to capture images of the tube surface, and then using image processing algorithms such as template comparison and differential detection to identify defects. The basic idea of ​​this approach is to compare the captured images with standard templates or adjacent tube images and then determine the presence of defects based on grayscale differences.

[0003] However, this approach faces significant challenges in the inspection of composite flexible tubes. Composite flexible tubes are typical flexible printing substrates, and during the printing process, the tube body undergoes localized elastic deformation under the pressure of the impression cylinder. This deformation manifests as non-defect-like grayscale distortion in the image, and its visual appearance—uneven grayscale distribution and localized brightness variations—is highly similar to real-world defects such as dents and wrinkles. Most existing solutions treat tube deformation as pure detection interference, attempting to eliminate it through image enhancement and filtering preprocessing. However, because the grayscale distortion caused by deformation overlaps with the grayscale changes caused by real defects in terms of spatial frequency and amplitude range, conventional preprocessing cannot effectively distinguish between the two, leading to significant false positives and false negatives. Some studies have attempted to introduce multi-angle illumination or structured light projection to obtain three-dimensional information of the tube body in order to separate deformation from defects, but this approach is complex and costly, and has not yet been widely validated in production lines. In other words, existing technologies have not yet solved the core problem of how to separate flexible deformation from detection signals or convert it into usable information, and the technical obstacle of effectively distinguishing between flexible substrate deformation and real defects still exists.

[0004] Therefore, the present invention proposes a visual inspection device and a defect rejection system for composite tube packaging. Summary of the Invention

[0005] This invention provides a visual inspection device and its defect rejection system for composite flexible tube packaging. It transforms the deformation of the composite flexible tube from a source of detection interference into a defect criterion. It achieves effective identification of dents and wrinkles through circumferential deformation entropy value, thus improving the technical problem of distinguishing between deformation and real defects of flexible substrates.

[0006] This invention provides a visual inspection device for composite tube packaging, comprising: A first light source and a second light source. The first light source emits light rays that form a first angle with the direction of the composite hose axis and illuminate the surface of the composite hose. The second light source emits light rays that form a second angle with the direction of the composite hose axis and illuminate the surface of the composite hose. The first angle and the second angle are not equal. The first image acquisition unit acquires a first image of the surface of the composite hose under the illumination of a first light source, and acquires a second image of the surface of the composite hose under the illumination of a second light source. The deformation circumferential decomposition unit reconstructs the three-dimensional surface morphology contour of the composite hose based on the first and second images, and unfolds the three-dimensional surface morphology contour into a circumferential deformation sequence with the axis of the composite hose as the central axis. The deformation entropy construction unit adaptively divides one or more sub-intervals according to the circumferential deformation sequence, and calculates the circumferential deformation entropy value based on the correlation between the deformation fluctuation amplitude and the length of the sub-interval in each sub-interval; The defect mode determination unit determines the defect type of the composite hose based on the circumferential deformation entropy value.

[0007] Furthermore, the deformation circumferential decomposition unit extracts the gray values ​​of each corresponding pixel on the surface of the composite hose in the first image and the second image, and reconstructs the three-dimensional morphological contour of the surface of the composite hose based on the difference in gray values ​​of the corresponding pixels. The deformation circumferential decomposition unit takes the axis of the composite hose as the central axis, and uniformly samples the three-dimensional morphology contour of the surface along the circumferential direction at a preset angle interval. It obtains the total radial displacement along the axis at each circumferential angle position as a subsequence, and takes the average value of all radial displacements in each subsequence as the radial displacement at that circumferential angle position. The radial displacements at all circumferential angular positions are arranged in circumferential order to form a circumferential deformation sequence.

[0008] Furthermore, the deformation entropy construction unit starts from the first element of the cyclic deformation sequence and accumulates elements one by one backward, with the current element as the starting point; For each accumulated element, the current accumulated sequence is converted into a symbolic sequence. Run-length encoding is performed on the symbolic sequence to obtain the run-length sequence. The run-length complexity value of the current accumulated sequence is the product of the standard deviation of all elements in the run-length sequence and the length of the run-length sequence. When the rate of change of the run complexity value relative to the run complexity value at the previous cumulative position is lower than the preset rate of change threshold for the first time, the end point of the current cumulative sequence is used as the boundary of the first sub-interval. Repeat the above operation in the remaining sequence until the sub-interval boundary is triggered or the termination condition is met, thus obtaining the sub-interval sequence.

[0009] Furthermore, when the deformation entropy construction unit converts the current cumulative sequence into a symbolic sequence, it uses the difference sign between the (i+1)th element and the ith element in the current cumulative sequence as the value of the ith symbol in the symbolic sequence. When the difference is positive, the symbol is an ascending sign; when the difference is negative, the symbol is a descending sign; and when the difference is zero, the symbol is a neutral sign. When the deformation entropy construct unit performs run-length encoding on the symbolized sequence, it merges consecutive identical symbols in the symbolized sequence into one run and records the number of repetitions of consecutive identical symbols in each run; The number of repetitions of all runs are arranged in the order of their appearance in the symbolic sequence to form the run length sequence.

[0010] Furthermore, when the deformation entropy construction unit calculates the rate of change of the increment of the run complexity value relative to the run complexity value of the previous cumulative position, it divides the difference between the run complexity value of the current cumulative position and the run complexity value of the previous cumulative position by the difference in the number of elements of the current cumulative position and the previous cumulative position to obtain the rate of change. The preset rate of change threshold is 5% of the run complexity value of the previous cumulative position.

[0011] Furthermore, the deformation entropy building block after the repetitive operation terminates: When the number of tail-remaining elements in the circumferential deformation sequence that have not yet been assigned to any determined sub-interval is less than half the number of accumulated elements corresponding to the last boundary determination when the repeated operation terminates, the tail-remaining elements are merged into the last sub-interval. When the number of remaining elements at the tail in the circumferential deformation sequence is not less than half of the number of accumulated elements corresponding to the last boundary determination when the repeated operation terminates, the remaining elements at the tail are divided into a separate sub-interval.

[0012] Furthermore, for each sub-interval, the deformation entropy construction unit uses the number of sign changes of adjacent elements within the sub-interval as the sign flip frequency of the sub-interval, and the ratio of the length of the sub-interval to the length of the circumferential deformation sequence as the length weight of the sub-interval. The deformation entropy construction unit uses the difference between the maximum and minimum radial displacements of all elements within a sub-interval as the radial displacement range of the sub-interval. When the radial displacement range is not less than a preset minimum displacement range threshold, the deformation entropy construction unit divides the product of the sign flipping frequency and the length weight of the sub-interval by the radial displacement range to obtain the deformation local entropy value of the sub-interval. When the radial displacement range is less than the preset minimum displacement range threshold, the deformation entropy construction unit sets the deformation local entropy value of the sub-interval to zero. The deformation entropy construction unit adds up the local deformation entropy values ​​of all sub-intervals to obtain the circumferential deformation entropy value.

[0013] Furthermore, the defect mode determination unit compares the circumferential deformation entropy value with a first preset entropy threshold and a second preset entropy threshold, wherein the first preset entropy threshold is less than the second preset entropy threshold. When the circumferential deformation entropy value is less than the first preset entropy value threshold, the defect mode determination unit determines that the composite hose is a defect-free hose body. When the circumferential deformation entropy value is greater than or equal to the first preset entropy value threshold and less than the second preset entropy value threshold, the defect mode determination unit determines that the composite hose is a concave defect hose body. When the circumferential deformation entropy value is greater than or equal to the second preset entropy threshold, the defect mode determination unit determines that the composite hose is a pleated defect hose body.

[0014] Furthermore, it also includes a defect location unit; When the defect mode determination unit determines that the defect is a dented pipe body, the defect location unit outputs the circumferential angle position corresponding to the element with the smallest radial displacement in the circumferential deformation sequence as the dent center position. The defect location unit extends element by element from the center of the depression to both sides in the circumferential deformation sequence. All consecutive elements whose radial displacement does not exceed the product of the radial displacement at the center of the depression minus the product of the radial displacement at the center of the depression and a preset multiplier are marked as the depression boundary interval. The starting and ending circumferential angle positions of the depression boundary interval are output.

[0015] This invention provides a visual inspection and defect rejection system for composite tube packaging, comprising: Such as any of the above-mentioned visual inspection devices for composite tube packaging; An image processing unit is connected to the first image acquisition unit. The image processing unit includes a deformation circumferential decomposition unit, a deformation entropy construction unit, and a defect mode determination unit. The rejection execution unit is located in the composite hose transport path and connected to the image processing unit. It receives the defect judgment result. When the defect judgment result is a concave defect or a wrinkled defect, the rejection execution unit separates the composite hose from the transport path.

[0016] The beneficial effects of this invention compared to existing technologies are as follows: Existing visual inspection schemes treat the elastic deformation of the composite flexible tube under printing pressure as a source of detection interference. They attempt to eliminate this influence through image enhancement and filtering preprocessing. However, because the grayscale distortion caused by deformation is highly similar in visual features to real defects such as dents and wrinkles, conventional preprocessing cannot effectively distinguish between the two, leading to a large number of false positives and false negatives. This invention uses dual-light source 3D reconstruction technology to obtain the 3D contour of the tube surface and unfolds it circumferentially into a circumferential deformation sequence. It further constructs the circumferential deformation entropy value as a defect criterion, transforming the tube deformation from a source of detection interference into an effective signal for defect identification. This improves the problem of detection failure where it is difficult to distinguish between deformation and real defects in flexible substrates, and achieves effective identification of both dents and wrinkles. In the above calculations, each radial displacement is normalized using the nominal radius of the composite flexible tube as a reference. That is, the radial displacement at each circumferential angle position is divided by the nominal radius of the composite flexible tube to obtain the normalized radial displacement, making the final calculated circumferential deformation entropy value dimensionless.

[0017] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in this application.

[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall data processing flowchart of the visual inspection device for composite tube packaging in an embodiment of the present invention; Figure 2 This is a data processing flowchart of the deformation circumferential decomposition unit in an embodiment of the present invention; Figure 3 This is a data processing flowchart of the deformation entropy construction unit in an embodiment of the present invention; Figure 4 This is a schematic diagram of a production line for a visual inspection device for composite tube packaging according to an embodiment of the present invention. Detailed Implementation

[0020] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0021] refer to Figure 1The present invention provides an embodiment of a visual inspection device for composite tube packaging, comprising: A first light source and a second light source. The first light source emits light rays that form a first angle with the direction of the composite hose axis and illuminate the surface of the composite hose. The second light source emits light rays that form a second angle with the direction of the composite hose axis and illuminate the surface of the composite hose. The first angle and the second angle are not equal. The first image acquisition unit acquires a first image of the surface of the composite hose under the illumination of a first light source, and acquires a second image of the surface of the composite hose under the illumination of a second light source. The deformation circumferential decomposition unit reconstructs the three-dimensional surface morphology contour of the composite hose based on the first and second images, and unfolds the three-dimensional surface morphology contour into a circumferential deformation sequence with the axis of the composite hose as the central axis. The deformation entropy construction unit adaptively divides one or more sub-intervals according to the circumferential deformation sequence, and calculates the circumferential deformation entropy value based on the correlation between the deformation fluctuation amplitude and the length of the sub-interval in each sub-interval; The defect mode determination unit determines the defect type of the composite hose based on the circumferential deformation entropy value.

[0022] In this embodiment, when the composite hose is subjected to pressure from the printing roller during the printing process, the hose body will undergo local elastic deformation. This deformation is represented in the image as the displacement of each position on the surface of the hose body in the radial direction (i.e., from the axis of the composite hose body to the outer surface of the hose body). The radial displacement is negative when the hose body is concave inward and positive when it is convex outward. The magnitude of the value reflects the degree to which the hose body is concave inward or convex outward at that position.

[0023] In this embodiment, the first included angle refers to the angle between the direction of the light emitted by the first light source and the direction of the composite hose axis. The first included angle is an acute angle, meaning that the first light source illuminates the surface of the composite hose from above. The second included angle refers to the angle between the direction of the light emitted by the second light source and the direction of the composite hose axis. The second included angle is an obtuse angle, meaning that the second light source illuminates the surface of the composite hose from below. The different illumination angles of the two light sources cause the same location on the hose to exhibit different grayscale responses under the illumination of the two light sources, thereby enabling the capture of the three-dimensional morphological information of the hose surface from two angles. The acquisition direction of the first image acquisition unit is perpendicular to the direction of the composite hose axis, meaning that the first image acquisition unit captures the surface of the composite hose from directly above.

[0024] The specific illumination angles of the first and second light sources are known parameters that have been pre-calibrated. In this embodiment, the angle between the illumination direction of the first light source and the axis of the composite hose is 30°, and the angle between the illumination direction of the second light source and the axis of the composite hose is 150°. That is, the first light source illuminates from above and the second light source illuminates from below.

[0025] The basic principle of the deformation circumferential decomposition unit in reconstructing the three-dimensional topography of the surface based on the first and second images is as follows: under the assumption that the surface of the composite hose satisfies the Lambertian reflection model, the grayscale response of the same surface position under illumination from different directions has a definite mathematical relationship with the surface normal direction at that position; the deformation circumferential decomposition unit solves for the surface normal direction corresponding to the pixel point based on the known illumination directions of the first and second light sources and the difference in grayscale values ​​of the corresponding pixels in the first and second images, and then performs height integration along the surface normal to obtain the height value along the acquisition direction.

[0026] In this embodiment, the three-dimensional surface topography contour refers to the geometric shape of the composite hose surface in three-dimensional space reconstructed by analyzing the grayscale value differences of corresponding pixels at various locations on the surface of the composite hose in the first and second images. The circumferential deformation sequence is a one-dimensional sequence of data obtained by unfolding the three-dimensional surface topography contour along the circumference of the composite hose. Each element in the sequence corresponds to a circumferential angular position, and the element value is the radial displacement at that circumferential angular position. This sequence can reflect the deformation distribution of the composite hose body at various angular positions within the actual detectable circumferential range.

[0027] In this embodiment, adaptive partitioning refers to the deformation entropy construction unit automatically determining the number and boundary positions of sub-intervals based on the numerical distribution characteristics of the circumferential deformation sequence itself, rather than dividing it equally according to fixed angular intervals. The partitioning principle is: when the deformation fluctuation characteristics of adjacent elements in the sequence change significantly, a sub-interval boundary is set at that position, ensuring that the deformation fluctuation pattern within each sub-interval is relatively consistent, while the deformation fluctuation patterns differ between different sub-intervals. Deformation fluctuation amplitude refers to the degree of deviation of the radial displacement corresponding to each element within a sub-interval from the center value of the radial displacement within that sub-interval. Sub-interval length refers to the number of elements contained in that sub-interval.

[0028] In this embodiment, the circumferential deformation entropy value is an index used to quantify the degree of disorder in the deformation distribution of the composite hose at various circumferential angular positions. The lower the value, the more uniform the deformation distribution at various circumferential positions of the hose; the higher the value, the more uneven the deformation distribution. When the hose is defect-free, the deformation is evenly distributed circumferentially, and the circumferential deformation entropy value is low. When there are depressions in the hose, the deformation is concentrated in local areas, and the circumferential deformation entropy value increases to a moderate level. When there are wrinkles in the hose, the deformation occurs alternately at multiple positions, and the circumferential deformation entropy value increases to a high level.

[0029] In this embodiment, the defect mode determination unit compares the circumferential deformation entropy value with a first preset entropy threshold and a second preset entropy threshold, and determines the defect type based on the comparison result; wherein the first preset entropy threshold is less than the second preset entropy threshold.

[0030] In this embodiment, the first and second preset entropy thresholds are obtained by statistically analyzing the circumferential deformation entropy values ​​of multiple composite hose samples with known defect types. Specifically, at least 30 samples each of defect-free hoses, dented hoses, and wrinkled hoses are collected. The circumferential deformation entropy value of each sample is calculated, and the entropy value distribution ranges for the three types are statistically analyzed. The upper limit of the entropy value distribution for defect-free hoses is used as the first preset entropy threshold, and the upper limit of the entropy value distribution for dented hoses is used as the second preset entropy threshold.

[0031] refer to Figure 2 In another embodiment of the present invention, the deformation circumferential decomposition unit extracts the gray values ​​of each corresponding pixel on the surface of the composite hose in the first image and the second image, and reconstructs the three-dimensional morphological contour of the surface of the composite hose based on the difference in gray values ​​of the corresponding pixels. The deformation circumferential decomposition unit takes the axis of the composite hose as the central axis, and uniformly samples the three-dimensional morphology contour of the surface along the circumferential direction at a preset angle interval. It obtains the total radial displacement along the axis at each circumferential angle position as a subsequence, and takes the average value of all radial displacements in each subsequence as the radial displacement at that circumferential angle position. The radial displacements at all circumferential angular positions are arranged in circumferential order to form a circumferential deformation sequence.

[0032] In this embodiment, the deformation circumferential decomposition unit estimates the three-dimensional shape contour of the composite hose surface based on the difference in grayscale values ​​of corresponding pixels on the surface of the composite hose in the first and second images, combined with the prior constraint that the radial displacement of the composite hose surface changes continuously along the circumference. Specifically, the implementation method is as follows: The first and second images are images of the same composite hose surface acquired under different lighting conditions. The deformation circumferential decomposition unit extracts the grayscale value of each pixel in the first image and the corresponding grayscale value of the second image. The illumination directions of the first and second light sources are pre-calibrated known parameters.

[0033] Assuming the composite hose surface satisfies the Lambertian reflection model, the grayscale response at the same surface location has an inner product relationship with the surface normal vector and the light source direction. The deformation circumferential decomposition unit (ECU) establishes two linear equations with the surface normal vector corresponding to the pixel as the unknown and the known direction vectors of the first and second light sources as coefficients. Since the unknown surface normal vector contains three components, this system of equations is underdetermined. The ECU applies a smoothing prior to the normal vector, constrained by the continuous circumferential variation of the radial displacement of the composite hose surface. It solves for the numerical solution of the surface normal vector corresponding to the pixel by minimizing the objective function composed of the sum of squared residuals of the two grayscale equations and the smoothing regularization term. The ECU performs the above calculations on all pixels to obtain the surface normal vector of each pixel.

[0034] The deformation circumferential decomposition unit uses the ratio of the normal component to the tangential component of the surface normal vector along the image acquisition direction as the gradient value of that pixel along the tangential direction. The unit uses the axis of the composite hose as the starting point of the integration path, setting the height at that point to zero as the integration reference. It numerically integrates the gradient value along both the axis and circumferential directions of the composite hose to obtain the height value of each position on the composite hose surface relative to the integration reference along the image acquisition direction. The unit then converts the height value into a radial displacement in the radial direction of the composite hose, using the axis of the composite hose as the reference, to obtain the three-dimensional surface contour.

[0035] In this embodiment, the preset angle interval refers to the fixed angle step size used by the deformation circumferential decomposition unit when unfolding the three-dimensional topography contour of the surface along the circumference. For example, the actual detectable range circumferentially is evenly divided into a corresponding number of sampling positions at every 1 degree. The value of the preset angle interval is set according to the detection accuracy requirements. The smaller the value, the higher the resolution of the circumferential deformation sequence.

[0036] In this embodiment, the total radial displacement along the axial direction at each circumferential angle position is taken as a subsequence corresponding to that circumferential angle position. Each element in this subsequence is the radial displacement at different positions along the axial direction of the composite hose within the three-dimensional surface topography contour at that circumferential angle position. The deformation circumferential decomposition unit takes the arithmetic mean of all radial displacements in this subsequence as the radial displacement at that circumferential angle position. This average value can represent the overall deformation level of the hose at that circumferential angle position, thereby eliminating the interference caused by local fluctuations along the axial direction on the circumferential deformation analysis. It should be noted that the circumferential deformation sequence is the data sequence corresponding to the actual detectable circumferential range of the composite hose. In the above adaptive partitioning and circumferential deformation entropy calculation process, the first element of the circumferential deformation sequence is used as the starting point of the sequence and processed in a linear order.

[0037] refer to Figure 3 In another embodiment of the present invention, before starting the above accumulation operation, the deformation entropy construction unit first checks the number of elements in the circumferential deformation sequence; if the number of elements in the circumferential deformation sequence is less than the preset minimum accumulation length (e.g., not less than 3 elements), then adaptive partitioning is no longer performed, and the entire circumferential deformation sequence is treated as a sub-interval. The deformation entropy construction unit accumulates elements one by one from the first element of the circumferential deformation sequence, with the current element as the starting point; For each accumulated element, the current accumulated sequence is converted into a symbolic sequence. Run-length encoding is performed on the symbolic sequence to obtain the run-length sequence. The run-length complexity value of the current accumulated sequence is the product of the standard deviation of all elements in the run-length sequence and the length of the run-length sequence. When the rate of change of the run complexity value relative to the run complexity value at the previous cumulative position is lower than the preset rate of change threshold for the first time, the end point of the current cumulative sequence is used as the boundary of the first sub-interval. Repeat the above operation in the remaining sequence until the sub-interval boundary is triggered or the termination condition is met, thus obtaining the sub-interval sequence.

[0038] Before starting the above accumulation operation, the deformation entropy construction unit checks the number of elements in the circumferential deformation sequence. If the total number of elements in the circumferential deformation sequence is less than the preset minimum accumulation length, the adaptive partitioning process will not be executed, and the entire circumferential deformation sequence will be treated as a sub-interval for subsequent local deformation entropy value calculation.

[0039] In this embodiment, the deformation entropy construction unit accumulates elements one by one from the first element of the circumferential deformation sequence, starting with the current element. This means that the deformation entropy construction unit starts from the first element of the circumferential deformation sequence, takes the first element as the initial accumulation sequence, adds the second element to the accumulation sequence to form a new accumulation sequence, adds the third element to the accumulation sequence to form an updated accumulation sequence, and so on, gradually expanding the range of the accumulation sequence. After each accumulation operation is completed, the deformation entropy construction unit performs subsequent symbolization transformation and run complexity value calculation on the current accumulation sequence to determine whether to set a sub-interval boundary at the end position of the current accumulation sequence.

[0040] In this embodiment, for each accumulated element, the deformation entropy construction unit converts the current accumulated sequence into a symbolic sequence. Specifically, the deformation entropy construction unit sequentially compares the size relationship between every two adjacent elements in the current accumulated sequence. Each pair of adjacent elements includes a preceding element and a following element. When the following element increases in value relative to the preceding element, the symbol corresponding to the pair of adjacent elements is marked as an ascending symbol; when the following element decreases in value relative to the preceding element, the symbol corresponding to the pair of adjacent elements is marked as a descending symbol; when the following element is equal in value relative to the preceding element, the symbol corresponding to the pair of adjacent elements is marked as a level symbol. The sequence formed by arranging the symbols corresponding to all adjacent element pairs in their original order is the symbolic sequence.

[0041] In this embodiment, the symbolized sequence is run-length encoded to obtain the run-length sequence. The specific encoding method is as follows: the deformation entropy construction unit starts from the first symbol in the symbolized sequence and traverses all symbols in the symbolized sequence in turn. The identical symbols that appear consecutively are merged into a run. Each run records the number of times the identical symbols appear consecutively in the run. The sequence formed by arranging the number of repetitions of all runs according to the order of appearance of each run in the symbolized sequence is the run-length sequence.

[0042] In this embodiment, the deformation entropy construction unit uses the product of the standard deviation of all elements in the run-length sequence and the length of the run-length sequence as the run complexity value of the current cumulative sequence. The physical meaning of the run complexity value is as follows: the standard deviation of all elements in the run-length sequence reflects the uniformity of the sign change of the circumferential deformation sequence within the current cumulative range. The larger the standard deviation, the greater the difference in the fluctuation pattern of different regions in the circumferential deformation sequence. The length of the run-length sequence reflects the frequency of the sign change of the circumferential deformation sequence within the current cumulative range. The larger the length, the more violent the fluctuation of the circumferential deformation sequence. Multiplying the standard deviation by the length can comprehensively characterize the complexity of deformation fluctuation in the current cumulative sequence.

[0043] The standard deviation of all elements in the run-length sequence is calculated using the overall standard deviation. When all symbols in the symbolized sequence are the same (i.e., the run-length sequence contains only one run), the run-length sequence contains only one element with a standard deviation of zero. At this time, the run complexity of the current cumulative sequence is zero.

[0044] In this embodiment, the deformation entropy construction unit calculates the rate of change of the increment of the run complexity value relative to the run complexity value of the previous accumulation position. Specifically, the calculation method is as follows: the deformation entropy construction unit subtracts the run complexity value of the previous accumulation position from the run complexity value of the current accumulation position to obtain the increment of the run complexity value; it subtracts the number of accumulated elements corresponding to the previous accumulation position from the number of accumulated elements corresponding to the current accumulation position to obtain the element quantity difference; and it divides the increment of the run complexity value by the element quantity difference to obtain the rate of change. A preset rate of change threshold is 5% of the run complexity value of the previous accumulation position, meaning the deformation entropy construction unit compares the calculated rate of change with 5% of the run complexity value of the previous accumulation position.

[0045] The standard deviation of all elements in the run-length sequence is calculated using the population standard deviation. When the run-length sequence contains only one run (i.e., all signs are the same), the standard deviation of the elements in the run-length sequence is zero, and the run complexity is zero.

[0046] In this embodiment, when the rate of change is lower than the preset rate of change threshold for the first time, the deformation entropy construction unit uses the end point of the current cumulative sequence as the boundary of the first sub-interval. The determination logic is as follows: the rate of change reflects the growth rate of the run complexity value as the number of accumulated elements increases; when the rate of change is lower than 5% of the run complexity value of the previous accumulated position, it indicates that the growth rate of the run complexity value of the current cumulative sequence has slowed down significantly, that is, continuing to add elements no longer significantly changes the complexity characteristics of the sequence. At this time, the end point of the current cumulative sequence is the turning point where the deformation fluctuation pattern in the circumferential deformation sequence changes significantly. Using this turning point as the boundary of the first sub-interval can make the deformation fluctuation pattern inside the divided sub-interval relatively consistent.

[0047] When the run complexity of the current accumulation position is zero and the run complexity of the current accumulation position is also zero, it is determined that the rate of change is not lower than the preset rate of change threshold. The next element is accumulated, and the above symbolization transformation and run complexity calculation are re-executed. When the number of remaining unprocessed elements in the circumferential deformation sequence is less than the preset minimum accumulation length but the sub-interval boundary is not triggered, the adaptive partitioning process is terminated, and the current accumulation sequence is merged with all remaining elements as the last sub-interval.

[0048] In this embodiment, after completing the division of the first sub-interval, the deformation entropy construction unit starts from the first element of the remaining sequence, that is, from the next element immediately following the boundary of the previous sub-interval in the circumferential deformation sequence, and repeatedly performs the complete process of accumulating elements one by one from the first element, converting the symbolic sequence, obtaining the run length sequence through run-length encoding, calculating the run complexity value, calculating the rate of change and comparing it with a preset rate of change threshold, until the rate of change of the run complexity value of the remaining elements in the circumferential deformation sequence is lower than the preset rate of change threshold for the first time. Then, the end point of the current accumulated sequence is used as the boundary of the next sub-interval. The deformation entropy construction unit continuously repeats the above operation until the sub-interval boundary is normally triggered or the termination condition is met in the above adaptive partitioning process, and the determination of the sub-interval boundary is completed, and a sub-interval sequence is obtained. Each element in the sub-interval sequence is a sub-interval.

[0049] In another embodiment of the present invention, when the deformation entropy construction unit converts the current cumulative sequence into a symbolic sequence, it uses the difference sign between the (i+1)th element and the ith element in the current cumulative sequence as the value of the ith symbol in the symbolic sequence. When the difference is positive, the symbol is an ascending sign; when the difference is negative, the symbol is a descending sign; and when the difference is zero, the symbol is a neutral sign. When the deformation entropy construct unit performs run-length encoding on the symbolized sequence, it merges consecutive identical symbols in the symbolized sequence into one run and records the number of repetitions of consecutive identical symbols in each run; The number of repetitions of all runs are arranged in the order of their appearance in the symbolic sequence to form the run length sequence.

[0050] In this embodiment, when the deformation entropy construction unit converts the current cumulative sequence into a symbolic sequence, it uses the difference between the (i+1)th element and the ith element in the current cumulative sequence as the value of the ith symbol in the symbolic sequence, where i is a positive integer from 1 to the length of the current cumulative sequence minus 1, and the ith element and the (i+1)th element are adjacent element pairs arranged in the original order in the current cumulative sequence. The deformation entropy construction unit calculates the difference between each pair of adjacent elements (i.e., the value of the (i+1)th element minus the value of the ith element), determines the corresponding symbol value based on the positive or negative attribute of the difference, and arranges the symbol values ​​corresponding to all adjacent element pairs in ascending order of i to form a symbolic sequence.

[0051] In this embodiment, when the difference is positive, the sign is an ascending sign, which means that the radial displacement of the circumferential deformation sequence at the position of the adjacent element pair increases with the increase of the circumferential angle; when the difference is negative, the sign is a descending sign, which means that the radial displacement of the circumferential deformation sequence at the position of the adjacent element pair decreases with the increase of the circumferential angle; when the difference is zero, the sign is a neutral sign, which means that the radial displacement of the circumferential deformation sequence at the position of the adjacent element pair remains unchanged with the increase of the circumferential angle.

[0052] In this embodiment, when the deformation entropy construction unit performs run-length encoding on the symbolized sequence, it merges consecutive identical symbols in the symbolized sequence into one run. That is, when the symbol values ​​of multiple adjacent positions in the symbolized sequence are exactly the same, the symbols of these multiple adjacent positions are merged into the same run. When the symbol value of a position is different from the symbol value of the previous position, that position is used as the starting position of a new run. The deformation entropy construction unit records the number of repetitions of consecutive identical symbols in each run (i.e., the number of symbols contained in the run), which is used as the run length value of the run. The run length values ​​of all runs are arranged in the order of appearance of each run in the symbolized sequence, and the resulting sequence is the run length sequence.

[0053] In another embodiment of the present invention, when the deformation entropy construction unit calculates the rate of change of the increment of the run complexity value relative to the run complexity value of the previous accumulation position, it divides the difference between the run complexity value of the current accumulation position and the run complexity value of the previous accumulation position by the difference in the number of elements between the current accumulation position and the previous accumulation position to obtain the rate of change. The preset rate of change threshold is 5% of the run complexity value of the previous cumulative position.

[0054] In this embodiment, when the deformation entropy construction unit calculates the rate of change of the run complexity value relative to the run complexity value of the previous accumulation position, it divides the difference between the run complexity value of the current accumulation position and the run complexity value of the previous accumulation position by the difference in the number of elements at the current accumulation position and the previous accumulation position to obtain the rate of change. The preset rate of change threshold is 5% of the run complexity value of the previous accumulation position. Here, the current accumulation position refers to the total number of elements contained in the current accumulation sequence after the deformation entropy construction unit completes the current accumulation operation; the previous accumulation position refers to the total number of elements contained in the previous accumulation sequence after the deformation entropy construction unit completes the previous accumulation operation. The difference between the run complexity value of the current accumulation position and the run complexity value of the previous accumulation position is the increment of the run complexity value, which reflects the amount of change in the run complexity value caused by the addition of new elements from the previous accumulation position to the current accumulation position. The difference in the number of elements between the current accumulation position and the previous accumulation position represents the number of new elements added between the two accumulation operations. The deformation entropy construction unit divides the increment of the run complexity value by the difference in the number of elements to obtain the average change in the run complexity value brought about by each new element, which is taken as the rate of change. The deformation entropy construction unit compares the calculated rate of change with a preset rate of change threshold (i.e., 5% of the run complexity value of the previous accumulation position) to determine whether to set a sub-interval boundary at the end position of the current accumulation sequence.

[0055] In another embodiment of the invention, after the deformation entropy construction unit terminates the repetitive operation: When the number of tail-remaining elements in the circumferential deformation sequence that have not yet been assigned to any determined sub-interval is less than half the number of accumulated elements corresponding to the last boundary determination when the repeated operation terminates, the tail-remaining elements are merged into the last sub-interval. When the number of remaining elements at the tail in the circumferential deformation sequence is not less than half of the number of accumulated elements corresponding to the last boundary determination when the repeated operation terminates, the remaining elements at the tail are divided into a separate sub-interval.

[0056] In this embodiment, after the sub-interval boundary trigger termination of the aforementioned adaptive partitioning process, there may be some tail elements in the circumferential deformation sequence that have not yet been assigned to any determined sub-interval (i.e., elements located between the last determined sub-interval boundary and the end of the circumferential deformation sequence). The number of remaining tail elements is the number of these elements. The cumulative number of elements in the current sub-interval partition refers to the total number of elements contained in the cumulative sequence at the determination time when the deformation entropy construction unit makes its last determination of the sub-interval boundary.

[0057] In this embodiment, the deformation entropy construction unit compares the number of tail-end remaining elements with half the number of elements accumulated in the current sub-interval division. When the number of tail-end remaining elements is less than half the number of elements accumulated in the current sub-interval division, it indicates that the number of tail-end remaining elements is small. The deformation entropy construction unit incorporates the tail-end remaining elements into the last sub-interval; that is, the tail-end remaining elements do not form a separate sub-interval but are part of the last sub-interval. When the number of tail-end remaining elements is not less than half the number of elements accumulated in the current sub-interval division, it indicates that the number of tail-end remaining elements has reached or exceeded half the number of elements accumulated in the current sub-interval division. The deformation entropy construction unit divides the tail-end remaining elements into a separate sub-interval; that is, the tail-end remaining elements form an independent sub-interval and are not incorporated into the last sub-interval.

[0058] In another embodiment of the present invention, the deformation entropy construction unit uses the number of times the symbols of adjacent elements in the sub-interval change as the symbol flip frequency of the sub-interval for each sub-interval, and uses the ratio of the length of the sub-interval to the length of the circumferential deformation sequence as the length weight of the sub-interval. The deformation entropy construction unit uses the difference between the maximum and minimum radial displacements of all elements within the sub-interval as the radial displacement range of the sub-interval. When the radial displacement range is not less than a preset minimum displacement range threshold, the deformation entropy construction unit divides the product of the sign flipping frequency and the length weight of the sub-interval by the radial displacement range to obtain the deformation local entropy value of the sub-interval. When the radial displacement range is less than the preset minimum displacement range threshold, the deformation entropy construction unit sets the deformation local entropy value of the sub-interval to zero. The deformation entropy construction unit adds up the local deformation entropy values ​​of all sub-intervals to obtain the circumferential deformation entropy value.

[0059] In this embodiment, a sub-interval refers to one or more sub-intervals obtained by the deformation entropy construction unit through adaptive partitioning. The deformation entropy construction unit calculates the deformation local entropy value for each sub-interval. A sign change between adjacent elements refers to the difference in sign values ​​(i.e., ascending, descending, or neutral) between two adjacent elements within the sub-interval. For example, if one element has an ascending sign while its adjacent element has a descending sign, or if one element has an ascending sign while its adjacent element has a neutral sign, this constitutes a sign change. The number of sign changes occurring among all adjacent element pairs within the sub-interval is the sign flip frequency of that sub-interval.

[0060] In this embodiment, the deformation entropy construction unit uses the ratio of the sub-interval length to the circumferential deformation sequence length as the length weight of the sub-interval. The sub-interval length refers to the number of elements contained in the sub-interval, and the circumferential deformation sequence length refers to the total number of elements contained in the circumferential deformation sequence. The length weight reflects the proportion of the sub-interval in the circumferential deformation sequence; the longer the sub-interval length, the greater its contribution to the circumferential deformation entropy value.

[0061] In this embodiment, the deformation entropy construction unit obtains the deformation local entropy value of the sub-interval by dividing the product of the sign flip frequency and the length weight of the sub-interval by the difference between the maximum and minimum radial displacement values ​​of all elements within the sub-interval. When the difference (i.e., the difference between the maximum and minimum radial displacement values ​​of all elements within the sub-interval) is less than a preset minimum displacement range threshold, it indicates that the radial displacement values ​​within the sub-interval are basically consistent and there is no significant deformation fluctuation, and the deformation local entropy value of the sub-interval is set to zero. The product of the sign flip frequency and the length weight reflects the combined effect of the intensity of deformation fluctuation changes within the sub-interval and the size of the sub-interval; the difference between the maximum and minimum radial displacement values ​​of all elements within the sub-interval reflects the amplitude of radial displacement changes within the sub-interval; when the difference is not less than the minimum displacement range threshold, dividing the two allows the deformation local entropy value to comprehensively characterize the relative relationship between the intensity of deformation fluctuation changes and the amplitude of radial displacement changes within the sub-interval. After calculating the local entropy value of deformation for each sub-interval, the deformation entropy construction unit adds up the local entropy values ​​of deformation for each sub-interval to obtain the circumferential deformation entropy value.

[0062] In this embodiment, the preset minimum displacement range threshold is set to 0.02 mm.

[0063] In another embodiment of the present invention, the defect mode determination unit compares the circumferential deformation entropy value with a first preset entropy value threshold and a second preset entropy value threshold, wherein the first preset entropy value threshold is less than the second preset entropy value threshold. When the circumferential deformation entropy value is less than the first preset entropy value threshold, the defect mode determination unit determines that the composite hose is a defect-free hose body. When the circumferential deformation entropy value is greater than or equal to the first preset entropy value threshold and less than the second preset entropy value threshold, the defect mode determination unit determines that the composite hose is a concave defect hose body. When the circumferential deformation entropy value is greater than or equal to the second preset entropy threshold, the defect mode determination unit determines that the composite hose is a pleated defect hose body.

[0064] In this embodiment, both the first preset entropy threshold and the second preset entropy threshold are pre-set numerical boundaries for defect type determination, and the first preset entropy threshold is less than the second preset entropy threshold. The first preset entropy threshold is used to distinguish between defect-free pipe bodies and pipe bodies with defects, and the second preset entropy threshold is used to distinguish between dented defect pipe bodies and wrinkled defect pipe bodies.

[0065] In this embodiment, the defect mode determination unit compares the circumferential deformation entropy value with the first preset entropy value threshold. When the circumferential deformation entropy value is less than the first preset entropy value threshold, it indicates that the circumferential deformation entropy value is at a low level, that is, the radial displacement of the tube surface at various circumferential angles is relatively uniform, and there is no significant local deformation concentration or alternating deformation at multiple positions. The defect mode determination unit determines that the composite hose is a defect-free tube.

[0066] In this embodiment, when the circumferential deformation entropy value is greater than or equal to the first preset entropy value threshold and less than the second preset entropy value threshold, it indicates that the circumferential deformation entropy value is at a medium level, that is, the radial displacement of the pipe surface at various circumferential angle positions is locally concentrated, but has not yet reached the degree of alternating deformation at multiple positions. The defect mode determination unit determines that the composite hose is a concave defect pipe body.

[0067] In this embodiment, when the circumferential deformation entropy value is greater than or equal to the second preset entropy value threshold, it indicates that the circumferential deformation entropy value is at a high level, that is, the radial displacement of the pipe surface at various circumferential angles deviates alternately at multiple positions, and the defect mode determination unit determines that the composite hose is a folded defect pipe body.

[0068] In another embodiment of the invention, a defect location unit is also included; When the defect mode determination unit determines that the defect is a dented pipe body, the defect location unit outputs the circumferential angle position corresponding to the element with the smallest radial displacement in the circumferential deformation sequence as the dent center position. The defect location unit extends element by element from the center of the depression to both sides in the circumferential deformation sequence. All consecutive elements whose radial displacement does not exceed the product of the radial displacement at the center of the depression minus the product of the radial displacement at the center of the depression and a preset multiplier are marked as the depression boundary interval. The starting and ending circumferential angle positions of the depression boundary interval are output.

[0069] In this embodiment, the defect location unit initiates a location operation when the defect mode determination unit determines that the pipe body has a dented defect. The characteristic of a dented defect pipe body is that there is a local dented area on the surface of the pipe body. In the circumferential deformation sequence corresponding to this area, the radial displacement is significantly smaller than that of the surrounding area in the local range. That is, the radial displacement is the smallest at the center of the dent, and the radial displacement gradually increases to the normal level when extending from the center of the dent to both sides.

[0070] In this embodiment, the defect location unit outputs the circumferential angle position corresponding to the element with the smallest radial displacement in the circumferential deformation sequence as the center position of the depression. Each element in the circumferential deformation sequence corresponds to a circumferential angle position. The defect location unit traverses all elements in the circumferential deformation sequence, finds the element with the smallest radial displacement value, and determines the circumferential angle position corresponding to that element as the center position of the depression.

[0071] In this embodiment, the preset multiplier is a pre-set coefficient used to determine the concave boundary interval. The radial displacement at the concave center position minus the product of the preset multiplier and the radial displacement at the concave center position yields the boundary determination threshold. The defect location unit extends element by element from the concave center position in the circumferential deformation sequence towards both the decreasing and increasing circumferential angle directions. Upon reaching each element, the radial displacement of that element is compared with the boundary determination threshold. If the radial displacement of an element continuously does not exceed the boundary determination threshold, that element belongs to the concave boundary interval. When the radial displacement of an element first exceeds the boundary determination threshold, the extension in that direction stops. The defect location unit marks all continuous elements covered by the extension from the concave center position to both sides as the concave boundary interval. The circumferential angle position corresponding to the element with the smallest circumferential angle in the interval is output as the starting circumferential angle position, and the circumferential angle position corresponding to the element with the largest circumferential angle in the interval is output as the ending circumferential angle position.

[0072] In this embodiment, the preset magnification ratio ranges from one-tenth to three-tenths. For composite hoses with higher rigidity, the preset magnification ratio is 0.15; for composite hoses with higher flexibility, the preset magnification ratio is 0.25.

[0073] refer to Figure 4 This invention provides an embodiment of a visual inspection and defect rejection system for composite tube packaging, comprising: Such as any of the above-mentioned visual inspection devices for composite tube packaging; An image processing unit is connected to the first image acquisition unit. The image processing unit includes a deformation circumferential decomposition unit, a deformation entropy construction unit, and a defect mode determination unit. The rejection execution unit is located in the composite hose transport path and connected to the image processing unit. It receives the defect judgment result. When the defect judgment result is a concave defect or a wrinkled defect, the rejection execution unit separates the composite hose from the transport path.

[0074] In this embodiment, the image processing unit is connected to the first image acquisition unit and receives the first image and the second image output by the first image acquisition unit. The image processing unit has built-in functions of a deformation circumferential decomposition unit, a deformation entropy construction unit, and a defect mode determination unit. After receiving the first image and the second image, the image processing unit calls the deformation circumferential decomposition unit to reconstruct the three-dimensional surface topography contour of the composite hose based on the first image and the second image, and unfolds the surface three-dimensional topography contour into a circumferential deformation sequence with the composite hose axis as the central axis; the image processing unit inputs the circumferential deformation sequence into the deformation entropy construction unit, which adaptively divides one or more sub-intervals based on the circumferential deformation sequence and calculates the circumferential deformation entropy value based on the correlation between the deformation fluctuation amplitude and the length of each sub-interval; the image processing unit inputs the circumferential deformation entropy value into the defect mode determination unit, which determines the defect type of the composite hose based on the circumferential deformation entropy value and outputs the defect determination result.

[0075] In this embodiment, the rejection execution unit is located downstream of the vision inspection device in the composite hose conveying path. The rejection execution unit is connected to the image processing unit and receives the defect determination result output by the image processing unit. When the defect determination result is a defect-free hose, the rejection execution unit does not perform the rejection action, and the composite hose continues to advance along the conveying path to the subsequent station. When the defect determination result is a dented or wrinkled hose, the rejection execution unit initiates the rejection action, separating the composite hose from the conveying path. The separation method includes, but is not limited to, air-blowing rejection, mechanical push rod rejection, or swing arm rejection.

[0076] The image processing unit determines the time delay from the moment of image acquisition to the moment of triggering the rejection action based on the conveying speed of the composite hose, the distance between the visual inspection device and the rejection execution unit, and the total time from image acquisition to processing completion, so as to ensure that the defect judgment result is correctly matched with the corresponding hose delivered to the rejection position.

[0077] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of this invention and its equivalents, this invention also intends to include these modifications and variations.

Claims

1. A visual inspection device for composite tube packaging, characterized in that, include: A first light source and a second light source. The first light source emits light rays that form a first angle with the direction of the composite hose axis and illuminate the surface of the composite hose. The second light source emits light rays that form a second angle with the direction of the composite hose axis and illuminate the surface of the composite hose. The first angle and the second angle are not equal. The first image acquisition unit acquires a first image of the surface of the composite hose under the illumination of a first light source, and acquires a second image of the surface of the composite hose under the illumination of a second light source. The deformation circumferential decomposition unit reconstructs the three-dimensional surface morphology contour of the composite hose based on the first and second images, and unfolds the three-dimensional surface morphology contour into a circumferential deformation sequence with the axis of the composite hose as the central axis. The deformation entropy construction unit adaptively divides one or more sub-intervals according to the circumferential deformation sequence, and calculates the circumferential deformation entropy value based on the correlation between the deformation fluctuation amplitude and the length of the sub-interval in each sub-interval; The defect mode determination unit determines the defect type of the composite hose based on the circumferential deformation entropy value.

2. The visual inspection device for composite tube packaging according to claim 1, characterized in that, The deformation circumferential decomposition unit extracts the gray values ​​of corresponding pixels on the surface of the composite hose in the first and second images, and reconstructs the three-dimensional morphological contour of the surface of the composite hose based on the difference in gray values ​​of corresponding pixels. The deformation circumferential decomposition unit takes the axis of the composite hose as the central axis, and uniformly samples the three-dimensional morphology contour of the surface along the circumferential direction at a preset angle interval. It obtains the total radial displacement along the axis at each circumferential angle position as a subsequence, and takes the average value of all radial displacements in each subsequence as the radial displacement at that circumferential angle position. The radial displacements at all circumferential angular positions are arranged in circumferential order to form a circumferential deformation sequence.

3. The visual inspection device for composite tube packaging according to claim 1, characterized in that, The deformation entropy construction unit starts from the first element of the cyclic deformation sequence and accumulates elements one by one backward, with the current element as the starting point. For each accumulated element, the current accumulated sequence is converted into a symbolic sequence. Run-length encoding is performed on the symbolic sequence to obtain the run-length sequence. The run-length complexity value of the current accumulated sequence is the product of the standard deviation of all elements in the run-length sequence and the length of the run-length sequence. When the rate of change of the run complexity value relative to the run complexity value at the previous cumulative position is lower than the preset rate of change threshold for the first time, the end point of the current cumulative sequence is used as the boundary of the first sub-interval. Repeat the above operation in the remaining sequence until the sub-interval boundary is triggered or the termination condition is met, thus obtaining the sub-interval sequence.

4. The visual inspection device for composite tube packaging according to claim 3, characterized in that, When the deformation entropy construction unit converts the current cumulative sequence into a symbolic sequence, it uses the difference between the (i+1)th element and the ith element in the current cumulative sequence as the value of the ith symbol in the symbolic sequence. When the difference is positive, the symbol is an ascending sign; when the difference is negative, the symbol is a descending sign; and when the difference is zero, the symbol is a neutral sign. When the deformation entropy construct unit performs run-length encoding on the symbolized sequence, it merges consecutive identical symbols in the symbolized sequence into one run and records the number of repetitions of consecutive identical symbols in each run; The number of repetitions of all runs are arranged in the order of their appearance in the symbolic sequence to form the run length sequence.

5. The visual inspection device for composite tube packaging according to claim 4, characterized in that, When calculating the rate of change of the increment of the run complexity value relative to the run complexity value of the previous cumulative position, the difference between the run complexity value of the current cumulative position and the run complexity value of the previous cumulative position is divided by the difference in the number of elements between the current cumulative position and the previous cumulative position to obtain the rate of change. The preset rate of change threshold is 5% of the cumulative run complexity value of the previous position.

6. The visual inspection device for composite tube packaging according to claim 3, characterized in that, After the deformation entropy building block terminates the repetitive operation: When the number of tail-remaining elements in the circumferential deformation sequence that have not yet been assigned to any determined sub-interval is less than half the number of accumulated elements corresponding to the last boundary determination when the repeated operation terminates, the tail-remaining elements are merged into the last sub-interval. When the number of remaining elements at the tail in the circumferential deformation sequence is not less than half of the number of accumulated elements corresponding to the last boundary determination when the repeated operation terminates, the remaining elements at the tail are divided into a separate sub-interval.

7. The visual inspection device for composite tube packaging according to claim 3, characterized in that, For each subinterval, the deformation entropy construction unit uses the number of sign changes of adjacent elements within the subinterval as the sign flip frequency of the subinterval, and the ratio of the length of the subinterval to the length of the circumferential deformation sequence as the length weight of the subinterval. The deformation entropy construction unit uses the difference between the maximum and minimum radial displacements of all elements within a sub-interval as the radial displacement range of the sub-interval. When the radial displacement range is not less than a preset minimum displacement range threshold, the deformation entropy construction unit divides the product of the sign flipping frequency and the length weight of the sub-interval by the radial displacement range to obtain the deformation local entropy value of the sub-interval. When the radial displacement range is less than the preset minimum displacement range threshold, the deformation entropy construction unit sets the deformation local entropy value of the sub-interval to zero. The deformation entropy construction unit adds up the local deformation entropy values ​​of all sub-intervals to obtain the circumferential deformation entropy value.

8. The visual inspection device for composite tube packaging according to claim 1, characterized in that, The defect mode determination unit compares the circumferential deformation entropy value with a first preset entropy threshold and a second preset entropy threshold, wherein the first preset entropy threshold is less than the second preset entropy threshold; When the circumferential deformation entropy value is less than the first preset entropy value threshold, the defect mode determination unit determines that the composite hose is a defect-free hose body. When the circumferential deformation entropy value is greater than or equal to the first preset entropy value threshold and less than the second preset entropy value threshold, the defect mode determination unit determines that the composite hose is a concave defect hose body. When the circumferential deformation entropy value is greater than or equal to the second preset entropy value threshold, the defect mode determination unit determines that the composite hose is a pleated defect hose body.

9. The visual inspection device for composite tube packaging according to claim 1, characterized in that, It also includes a defect location unit; When the defect mode determination unit determines that the defect is a dented pipe body, the defect location unit outputs the circumferential angle position corresponding to the element with the smallest radial displacement in the circumferential deformation sequence as the dent center position. The defect location unit extends element by element from the center of the depression to both sides in the circumferential deformation sequence. All consecutive elements whose radial displacement does not exceed the product of the radial displacement at the center of the depression minus the product of the radial displacement at the center of the depression and a preset multiplier are marked as the depression boundary interval. The starting and ending circumferential angle positions of the depression boundary interval are output.

10. A visual inspection and defect rejection system for composite tube packaging, characterized in that, include: A visual inspection device for composite tube packaging as described in any one of claims 1 to 9; An image processing unit is connected to the first image acquisition unit. The image processing unit includes a deformation circumferential decomposition unit, a deformation entropy construction unit, and a defect mode determination unit. The rejection execution unit is located in the composite hose transport path and connected to the image processing unit. It receives the defect judgment result. When the defect judgment result is a concave defect or a wrinkled defect, the rejection execution unit separates the composite hose from the transport path.