Visual-based evaluation method for adhesive uniformity of water-based casein adhesive for labeling glass bottles
By acquiring and normalizing white light images and combining them with bottle geometric references, the problem of unstable evaluation of uniformity in the testing of water-based casein glue coating for glass bottle labeling was solved, achieving stable and interpretable uniformity assessment and risk identification without changing the glue formulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN UNISAI NEW MATERIAL TECH CO LTD
- Filing Date
- 2026-03-26
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies for testing water-based casein adhesive coatings on glass bottles make it difficult to consistently evaluate coating uniformity without altering the adhesive formulation. This is especially true under conditions of curved glass surfaces, strong reflections in wet conditions, and fluctuations in illumination, making it challenging to achieve interpretable and reproducible uniformity evaluations.
By acquiring diffuse white light and grazing white light images, performing illumination normalization, and combining the bottle's geometric reference to unfold and align the adhesive tape, a coating response map is constructed. The circumferential discontinuity entropy and boundary swing ratio are calculated, and a uniformity determination coefficient is obtained through comprehensive analysis, thereby achieving uniformity determination and risk positioning.
Under different bottle types and optical disturbance conditions, stable evaluation of adhesive coating uniformity was achieved, reducing misjudgments and omissions caused by reflections and background textures, providing reliable uniformity assessment and risk identification, and supporting the feasibility and maintenance stability of labeling quality control.
Smart Images

Figure CN121921322B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of labeling process quality control, and more specifically, to a vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles. Background Technology
[0002] On glass bottle wet adhesive labeling production lines, water-based adhesive is typically applied to designated areas on the label or bottle body before labeling to ensure reliable adhesion. Since this type of adhesive is often nearly transparent or light-colored when wet, and the glass bottle surface is highly reflective, and the bottle body is curved and changes posture during transport and rotation, industrial vision is often introduced on-site to assess the adhesive application status online. Existing technologies include methods that add fluorescent agents to the adhesive and use ultraviolet light and cameras for image capture to detect adhesive leakage. These methods also subdivide the detection area and add overlaps to reduce missed detections. The corresponding prior art is Chinese Patent Publication CN106770343A, application number 201710192124.8, which explicitly uses fluorescent agent-containing adhesive combined with ultraviolet light imaging to achieve adhesive application detection. Another approach points out that traditional methods often rely on ultraviolet light color development to obtain images that only contain adhesive information, which can easily lead to inaccurate location determination. Therefore, by fusing images from ordinary light sources and ultraviolet light sources, the fused image contains both the product outline and adhesive information. Based on this, it can be determined whether the adhesive covers the pre-defined adhesive area. The corresponding prior art is Chinese patent application publication CN108896545A (application number 201810437014.8, subsequent authorization announcement number CN108896545B). This approach emphasizes improving the accuracy of adhesive detection through dual-light source imaging and image fusion.
[0003] When the aforementioned industrial vision-based adhesive coating inspection approach is applied to water-based casein adhesive for glass bottle labeling, there are still unavoidable core shortcomings: One approach bases detection on the premise that the adhesive must allow the addition of fluorescent agents and develop color under ultraviolet light. This ties the inspection system to the adhesive formulation. If the production line does not wish to change the adhesive composition due to reasons such as adhesive system stability, process adaptability, or compliance management, the vision inspection loses its universal basis for implementation. Simultaneously, the strong reflectivity and brightness fluctuations caused by the curved glass surface and the wet adhesive surface make it difficult for changes in brightness in the image to consistently correspond to variations in the thickness of the adhesive layer. To ensure continuity, even if existing solutions improve the reliability of determining whether there is coverage or whether it is in a designated location by subdividing the area, repeating imaging, or combining ordinary light and ultraviolet light, they are still essentially making qualification judgments based on coverage and location. It is difficult to provide an interpretable and reproducible evaluation conclusion on the uniformity of adhesive application. On-site, it is also difficult to establish a stable correspondence between abnormal morphology and specific working conditions such as adhesive supply, transfer, stringing and tailing, and local adhesive shortage. Ultimately, the test results are prone to fluctuate under different bottle types, different reflective conditions, and different cycle disturbances, which is difficult to maintain in the long term and cannot support the process adjustment of labeling.
[0004] To address the aforementioned problems, a technical solution is provided. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles. This method involves acquiring diffuse white light and grazing white light images and performing illumination normalization. The adhesive strip is then unfolded and aligned using the bottle's geometric references to construct an adhesive response map and determine the effective area of the adhesive layer. Furthermore, the circumferential discontinuity entropy and boundary swing ratio are calculated and comprehensively analyzed to obtain a uniformity determination coefficient. Based on this coefficient, uniformity determination and risk location output are completed, thereby solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] S1: Acquire diffuse white light images and grazing white light images sequentially within the same field of view on the same bottle, and calculate the grayscale mean on the preset uncoated tape to form a pair of illumination normalization parameters as a reference benchmark for the same frame.
[0008] S2: Extract the bottle body boundary based on the diffuse white light image and fit it to obtain the bottle body geometric reference. After mapping the target label tape to unfolded coordinates, perform the same unfolded transformation on the two images to obtain the aligned glue unfolded image.
[0009] S3: Normalize the two coating unfolded maps on the same scale using the illumination normalization parameter and generate a coating response map. Then, construct a self-reference background using the local statistical results of the non-coated strip to obtain the effective area of the adhesive layer.
[0010] S4: Generate continuous structural features and stable boundary features of adhesive coating from the adhesive coating response map within the effective area of the adhesive layer. Input both into a boundary learning model to obtain uniformity determination coefficients. Output uniformity conclusions and risk location results based on the uniformity determination coefficients.
[0011] S5: The risk location results are fed back to the corresponding position of the bottle body geometric datum and a uniformity assessment report is generated. The report includes a description of the defect type and working condition information.
[0012] Furthermore, step S1 includes:
[0013] An industrial camera is fixedly installed at the labeling station. The lighting system is equipped with a diffuse white light source and a grazing white light source. After the bottle is in place, the diffuse white light source is turned on first to acquire a diffuse white light image, and then the grazing white light source is turned on to acquire a grazing white light image. The uncoated tape is preset to be a fixed height ring above or below the labeling area of the bottle. The uncoated tape area is cropped in the diffuse white light image by a pre-calibrated pixel row range. The grayscale mean of the uncoated tape area in the two images is calculated separately and combined to form a lighting normalization parameter pair as a reference benchmark for the same frame.
[0014] Furthermore, step S2 includes:
[0015] Edge detection is performed on the diffuse white light image to obtain a binary edge map. The left and right vertical edge point sets with the longest connected component length are selected as the left and right boundary point sets. For each height, the average of the left and right boundary horizontal coordinates is taken to form a center point sequence and fitted to the bottle axis. The median value of the width sequence is calculated to estimate the radius. A fixed proportion height range in the middle of the bottle body is selected as the target labeling tape height range to form the bottle body geometric reference.
[0016] Furthermore, step S2 also includes:
[0017] Define the unfolded coordinate system so that the horizontal axis corresponds to the circumferential unfolded length and the vertical axis corresponds to the bottle height. Establish a reverse mapping to calculate the original image coordinates and use bilinear interpolation to resample. Perform the same unfolding transformation on the diffuse white light image and the grazing white light image to obtain pixel-aligned diffuse coating unfolded image and grazing coating unfolded image.
[0018] Furthermore, step S3 includes:
[0019] The diffuse coating development map and the grazing coating development map are normalized by grayscale division using illumination normalization parameters to obtain normalized diffuse development map and normalized grazing development map. The normalized grazing development map and the normalized diffuse development map are then subtracted, and the parts of the difference result that are less than 0 are set to 0 to generate the coating response map. Contrast stretching is then performed on the coating response map.
[0020] Furthermore, step S3 also includes:
[0021] In the unfolded coordinate system, the uncoated area is marked. Local median statistics are performed on the coating response map to construct a self-referenced background map. The background correction response map is obtained by subtracting the self-referenced background map from the coating response map. Adaptive region growth binarization is performed to generate a binary mask for the effective area of the adhesive layer.
[0022] Furthermore, step S4 includes:
[0023] The continuous structure characteristics of the adhesive coating include circumferential discontinuous entropy, and the stability characteristics of the adhesive coating boundary include the boundary swing ratio;
[0024] Scan the effective region of the adhesive layer line by line along the circumference of the binary mask, identify the length sequence of continuous segments and discontinuous segments, normalize to obtain the probability distribution, calculate the line discontinuity complexity and summarize it into the circumferential discontinuity entropy, and record the location range of abnormal segments and write it into the discontinuity distribution map.
[0025] The upper and lower boundary positions are extracted from the effective region of the adhesive layer using a binary mask. The boundary trajectory is normalized, and a gradually varying baseline is obtained by moving average filtering. The oscillation residual and intensity ratio are calculated to form the boundary oscillation ratio, while high oscillation positions are retained and written into the oscillation residual map.
[0026] Furthermore, step S4 also includes:
[0027] The circumferential discontinuity entropy and the boundary swing ratio are input into a type of boundary learning model to calculate the degree of deviation and normalize it into a uniform determination coefficient. The uniformity is determined based on the uniform determination coefficient, the dominant deviation dimension is analyzed to distinguish the risk type, and the risk location result is output by combining the discontinuity distribution map and the swing residual map to map the circumferential position.
[0028] Furthermore, step S5 includes:
[0029] Using the bottle's geometric reference, reverse coordinate mapping is performed to convert the circumferential risk location results into the original image projection point set and bottle angle position labels. Color boxes and arrows are superimposed on the original diffuse white light image or grazing white light image to mark the risk areas, forming a labeled risk image, while also marking the dominant risk type and angle position.
[0030] Furthermore, step S5 also includes:
[0031] The system integrates uniformity conclusions, uniformity determination coefficients, risk-dominant types, risk area lists, and attached diagrams to generate a uniformity assessment report. The risk area list describes the angle and location, defect type, and operating condition orientation information. The defect type distinguishes between internal discontinuity and boundary oscillation. The operating condition orientation has preset mapping rules. The report is output in PDF or screen display format.
[0032] The technical effects and advantages of this invention's vision-based method for evaluating the uniformity of water-based casein glue coating on glass bottles are as follows:
[0033] This invention acquires two types of white light imaging information within the same field of view, uses the uncoated tape as a frame reference to normalize the illumination, and then uniformly unfolds the coated tape on the curved bottle body onto a consistent coordinate system for evaluation. This ensures that the transparent, wet, water-based casein adhesive remains stably and repeatedly visible even under strong reflection, curvature variations, and posture fluctuations during labeling. Furthermore, this invention does not rely on changing the adhesive formulation or adding additional fluorescent markers. Instead, it uses the discontinuous morphology and edge stability within the effective area of the adhesive layer as the core criteria, and incorporates a uniformity judgment coefficient obtained through comprehensive analysis. This maintains a consistent judgment scale under different bottle types and optical disturbance conditions, significantly reducing misjudgments and omissions caused by reflection and background texture, making the adhesive uniformity evaluation more closely reflect actual bonding risks.
[0034] Meanwhile, the judgment results of this invention not only provide a conclusion on whether the coating is uniform, but also project the abnormal landing point back to the actual position on the bottle and indicate the morphological characteristics of the risk area in a readable manner. This allows production line personnel to quickly understand where the problem is concentrated on the coating tape and what kind of unevenness it manifests. In this way, the coating quality problem that was originally difficult to explain and trace is transformed into on-site information that can be located and handled, thereby improving the feasibility and maintenance stability of labeling quality control. Attached Figure Description
[0035] Figure 1 This is a flowchart illustrating the vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles according to the present invention. Detailed Implementation
[0036] 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 embodiments of the present invention, and not all embodiments. 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.
[0037] Example 1: Figure 1 This invention presents a vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles, comprising:
[0038] S1: Acquire diffuse white light images and grazing white light images sequentially within the same field of view on the same bottle, and calculate the grayscale mean on the preset uncoated tape to form a lighting normalization parameter pair as a reference benchmark for the same frame.
[0039] S2: Extract the bottle boundary based on the diffuse white light image and fit it to obtain the bottle geometric reference. After mapping the target label tape to unfolded coordinates, perform the same unfolded transformation on the two images to obtain the aligned glue unfolded image.
[0040] S3: Normalize the two coating patterns on the same scale using the illumination normalization parameter and generate a coating response map. Then, construct a self-reference background using the local statistical results of the non-coated strip to obtain the effective area of the adhesive layer.
[0041] S4: Generate continuous structural features and stable boundary features of adhesive coating from the adhesive coating response map within the effective area of the adhesive layer. Input both into a boundary learning model to obtain uniformity determination coefficients. Output uniformity conclusions and risk location results based on the uniformity determination coefficients.
[0042] S5: The risk location results are fed back to the corresponding position of the bottle body geometric benchmark and a uniformity assessment report is generated. The report includes a description of the defect type and working condition information to support on-site handling.
[0043] This invention addresses the practical challenges of wet adhesive labeling on glass bottles. It tackles the difficulties of evaluating adhesive uniformity using traditional visual methods due to the near-transparency of water-based casein adhesive in a wet state, the strong reflectivity of curved glass surfaces, and the instability caused by variations in production line posture and lighting. The invention proposes a uniformity assessment approach centered on industrial vision. First, two types of white light imaging information are acquired within the same field of view. Lighting is normalized using a non-adhesive-coated strip as a frame reference, reducing the impact of reflection and brightness variations on the judgment from the source. Then, a geometric benchmark is established for the bottle body, unfolding the curved adhesive strip onto a consistent coordinate system, making the adhesive information comparable for different bottle shapes and postures. Based on this, an adhesive response map is constructed, and the effective area of the adhesive layer is determined. Uniformity evaluation focuses on two key morphologies: continuous spread within the adhesive layer and stable boundaries. A uniformity judgment coefficient is formed by calculating the circumferential discontinuity entropy and the boundary swing ratio, and then uniformity judgment and risk location output are completed. This enables a stable and interpretable assessment of the uniformity of transparent wet casein adhesive coating without altering the adhesive formulation, allowing the assessment results to be used for quality judgment and to provide a clear basis for on-site handling.
[0044] On a glass bottle wet adhesive labeling production line, water-based casein adhesive is nearly transparent in its wet state, and the curved surface of the glass bottle is highly reflective and changes its posture as it rotates during transport. This results in extremely unstable grayscale performance in the adhesive-coated area. Existing solutions relying on fluorescent agents or dual-light source fusion are difficult to reliably evaluate the uniformity of the adhesive coating without changing the adhesive formulation. To achieve reliable perception of the transparent adhesive layer under pure white light imaging, this invention starts by acquiring white light images under two different illumination methods. By using the non-adhesive-coated area as a reference for illumination within the same frame, it effectively compensates for illumination disturbances, thus laying a stable foundation for subsequent geometric reference extraction and uniformity evaluation.
[0045] In the background art, existing solutions either add fluorescent agents to the adhesive formulation or improve the accuracy of position determination by fusing ordinary light and ultraviolet light images. However, these methods still struggle to achieve stable quantification of adhesive layer thickness fluctuations and spreading continuity when faced with pure water-based casein adhesive, highly reflective curved surfaces, and production line lighting fluctuations. However, in step S1 of this invention, diffuse white light images and grazing white light images are sequentially acquired within the same field of view on the same bottle. A preset uncoated tape is used as a reference within the same frame to calculate the grayscale mean, forming a lighting normalization parameter. This eliminates grayscale fluctuations caused by uneven lighting and changes in bottle posture without altering the adhesive composition, providing a consistent image basis for subsequent steps.
[0046] S101: Diffused white light images and grazing white light images are sequentially acquired within the same field of view on the same bottle.
[0047] During the transport of glass bottles on the labeling production line, the curved surface of the bottle will exhibit significant specular highlights and uneven brightness due to rotation and changes in illumination angle. If only a single illumination method is used, the visual representation of the transparent water-based casein adhesive layer will be extremely unstable. In order to reliably perceive the morphology of the adhesive layer without changing the adhesive formulation, it is necessary to use two complementary white light illumination methods to highlight different features, thereby providing a complete information basis for subsequent illumination normalization and geometric reference extraction.
[0048] An industrial camera is fixedly installed at the labeling station to ensure that the target labeling area on the bottle is fully visible. The lighting system is equipped with two independently controlled white light sources. The first is a diffuse white light source, which uses a ring or dome-shaped diffuser to produce uniform, non-directional illumination. The second is a grazing white light source, which uses a low-angle strip light source to illuminate the bottle tangentially.
[0049] The acquisition process is as follows: After the bottle is positioned, the diffuse white light source is turned on and the grazing white light source is turned off. The camera then captures a diffuse white light image. Immediately afterwards, the diffuse white light source is turned off and the grazing white light source is turned on. During the time interval when the bottle's posture remains basically unchanged, a grazing white light image is captured. The two images correspond to the same bottle and the same field of view, with pixel positions corresponding one-to-one.
[0050] In one embodiment, when the labeling production line is running, a 500ml glass beer bottle enters the camera's field of view along the conveyor belt. The system detects that the bottle is in position, first lights up the dome-shaped diffused white light source, and the camera captures a diffused white light image with uniform brightness and clear outline of the bottle. Then, it quickly switches to a side low-angle grazing white light source, and the camera captures another image, obtaining a grazing white light image with significantly magnified edges and thickness undulations of the adhesive layer. Both images are acquired with almost no rotation of the bottle.
[0051] Diffuse white light images can suppress local overexposure caused by strong reflections on curved surfaces, thus stabilizing the overall grayscale distribution of the bottle. Grazing white light images can enhance the contrast between the adhesive layer and the glass substrate, highlighting the subtle height undulations and refractive differences on the adhesive layer surface. The two complement each other, providing necessary information for the subsequent generation of adhesive response maps.
[0052] S102: Preset identification of uncoated tape and calculation of grayscale mean.
[0053] In the two white light images acquired, the brightness of the bottle surface will still drift due to ambient light disturbances, weak light source attenuation, or slight differences in bottle posture. To eliminate such lighting fluctuations within the same frame, a stable area unaffected by the adhesive layer must be selected within the image as a reference, and its grayscale statistics must be calculated to form a reliable lighting compensation benchmark.
[0054] The preset non-adhesive tape is a fixed-height ring above or below the labeling area on the bottle. This area is never coated with adhesive and only exposes the surface of the glass substrate. Its width occupies a preset proportion of the image height to ensure a sufficient number of sampled pixels.
[0055] In the diffuse white light image, the non-adhesive tape area is directly cropped from a pre-calibrated pixel row range. Since the bottle outline is clear under diffuse illumination, this area can be stably extracted using only a fixed coordinate template, without the need for complex segmentation algorithms. This pixel row range can be synchronously translated and corrected based on the positioning results of the bottle's upper and lower boundaries in the diffuse white light image to accommodate slight height drift of the bottle during transport.
[0056] The mean gray values of the two images in the same uncoated area are calculated separately. The calculation process is as follows: First, all pixels in the uncoated area are traversed, and the sum of the gray values of each pixel is accumulated. At the same time, the number of valid pixels is counted (excluding pixels with the maximum gray value). Then, the sum of the accumulated gray values is divided by the number of valid pixels to obtain the mean gray value of the uncoated area of the diffuse white light image and the mean gray value of the uncoated area of the grazing white light image.
[0057] In one embodiment, the aforementioned acquisition process of a 500ml glass beer bottle continues. In the diffuse white light image, the system cuts out a ring at a fixed height above the shoulder of the bottle as the non-coated area according to a preset template. This area only shows the clean glass surface. The total grayscale value of the pixels in the traversal area is divided by the total number of pixels to obtain the average grayscale value of the non-coated area in the diffuse white light image. The same operation is performed in the grazing white light image at the same location to obtain the average grayscale value of the non-coated area in the grazing white light image. The two reflect the difference in the current light intensity.
[0058] The area without adhesive tape is only affected by the glass substrate and the current lighting conditions, and is not affected by the adhesive layer. Its grayscale average value can truly reflect the brightness changes caused by the overall lighting intensity and bottle posture in the current frame, providing a comparable lighting benchmark for the two images in the same frame.
[0059] S103: Form illumination normalization parameters as a reference benchmark within the same frame.
[0060] The grayscale mean values of the two images in the non-coated area have been obtained through the aforementioned sub-steps. In order to achieve the same-scale grayscale compensation of the coated unfolded image in the subsequent process, these mean values must be combined into a directly usable parameter pair. At the same time, auxiliary ratios are calculated to monitor the stability of the light source, thereby ensuring that the entire evaluation process remains consistent under different lighting conditions.
[0061] The average gray value of the uncoated tape in the diffuse white light image and the average gray value of the uncoated tape in the grazing white light image are combined to form an illumination normalization parameter pair, which is directly used as the reference benchmark for subsequent same-scale normalization.
[0062] Meanwhile, the ratio between the two is calculated as an auxiliary monitoring indicator. The calculation process is as follows: the average gray value of the uncoated tape in the grazing white light image is divided by the average gray value of the uncoated tape in the diffuse white light image to obtain the illumination ratio. This ratio reflects the intensity consistency of grazing illumination relative to diffuse illumination and is used for monitoring the stability of the production line light source, but it does not directly participate in the subsequent image normalization processing.
[0063] By preserving the original uncoated tape grayscale mean pairs, subsequent steps can divide the two coated tape unfolded images by their corresponding mean values after unfolding transformation, thereby achieving the conversion of pixel grayscale to relative reflectivity and eliminating the overall brightness drift caused by bottle rotation, ambient light disturbance, or slight attenuation of the light source.
[0064] After step S1 is completed, the diffuse white light image, grazing white light image and illumination normalization parameter pair are output. This provides an image basis for illumination consistency for subsequent bottle boundary extraction, geometric reference fitting and glue application response map generation, ensuring that the visual representation of transparent water-based casein glue on glass bottle labeling site has cross-bottle and repeatable grayscale stability.
[0065] Although the two images provided in step S1 have eliminated the overall brightness drift, the cylindrical surface of the bottle causes the target label to exhibit arc-shaped deformation and width compression within the image plane. The adhesive layer features at different circumferential locations are non-uniformly stretched, making direct pixel-level comparison and statistical analysis difficult. However, step S2 prioritizes using the diffuse white light image to extract and fit the bottle's geometric reference, mapping the target label to a cylindrical unfolded coordinate system. It then applies the exact same unfolding transformation to both the diffuse and grazing white light images, obtaining a pixel-aligned planarized adhesive unfolded image. This eliminates the geometric interference caused by surface distortion, providing a geometrically consistent analytical basis for subsequent same-scale normalization and adhesive response image generation.
[0066] S201: Extracting bottle boundaries based on diffuse white light images.
[0067] The diffuse white light image has suppressed specular highlights in step S1, and the bottle outline contrasts sharply with the background. To ensure the accuracy of the geometric reference fitting, a stable and reliable set of bottle boundary points must be extracted from it first.
[0068] To perform edge detection on a diffuse white light image, the horizontal and vertical gradients are calculated first. The horizontal gradient is obtained by convolving the image with a specific convolution kernel, which is a 3x3 matrix. The elements in the first column are -1, -2, -1 from top to bottom; the elements in the second column are 0, 0, 0 from top to bottom; and the elements in the third column are 1, 2, 1 from top to bottom. The vertical gradient is obtained by convolving the image with another 3x3 matrix, which is also a 3x3 matrix. The elements in the first row are -1, -2, -1 from left to right; the elements in the second row are 0, 0, 0 from left to right; and the elements in the third row are 1, 2, 1 from left to right.
[0069] The gradient magnitude is then calculated by first summing the squared gradients in the horizontal and vertical directions, then taking the square root of the sum to obtain the gradient magnitude map. Finally, a double threshold hysteresis processing is applied to the gradient magnitude map to generate a binary edge map.
[0070] In the binary edge graph, select the two sets of vertical edge points with the longest connected component length, and denot them as the left boundary point set and the right boundary point set, respectively. The point set is composed of the x-coordinate and y-coordinate pairs at the same height, and the height range covers the main body of the bottle.
[0071] In one embodiment, after performing the above edge detection on a diffuse white light image of a 500ml cylindrical glass bottle, the nearly straight boundaries on the left and right sides of the bottle are clearly highlighted. The double threshold hysteresis processing removes small noise edges, and approximately 800 pixels are extracted from each of the left and right boundaries. The pixel set is continuously distributed along the height direction without obvious breaks.
[0072] The extracted left and right boundary point sets accurately reflect the projected contour of the bottle, providing reliable data for subsequent axis and radius fitting.
[0073] S202: Fitting to obtain the geometric datum of the bottle body.
[0074] The set of boundary points of the bottle body has been extracted. In order to establish a unified geometric reference, the central axis, radius and target labeling height range of the bottle body must be calculated from it to form a geometric reference of the bottle body that can be directly used for coordinate mapping.
[0075] First, calculate the centerline of the bottle. For each height, take the average of the x-coordinates of the left boundary point set and the right boundary point set as the center x-coordinate, and keep the y-coordinate at the original height to form a sequence of center points. Then, perform least squares linear fitting on the center point sequence to obtain the equation of the bottle axis. The axis equation consists of the tilt coefficient and the intercept parameter.
[0076] Then, the radius of the bottle is estimated. The left and right boundary point sets are projected onto a direction perpendicular to the axis. The width value at each height is calculated. The median value of the width sequence is taken as the diameter estimate. The diameter estimate is then divided by two to obtain the radius, in pixels.
[0077] Finally, the target labeling tape height range is determined. According to the process preset, a fixed proportion of the height range in the middle of the bottle body is selected and recorded as the vertical axis range, which corresponds to the target labeling tape.
[0078] In one embodiment, in the aforementioned 500ml glass bottle image, the width of the left and right boundaries is stably distributed in the middle, the tilt coefficient of the fitted axis is close to zero, the radius is estimated to be about 200 pixels, and the height range of the target label tape is locked in the middle part of the vertical coordinate of the image, covering the entire label pasting area.
[0079] The fitted bottle geometry includes axis parameters, radius, and target labeling tape height range, providing an accurate cylindrical model for subsequent coordinate mapping.
[0080] S203: Map the target labeling tape to unfolded coordinates.
[0081] The geometric datum of the bottle body has been established. In order to eliminate the geometric distortion caused by the cylindrical surface, the target label tape must be converted from the image plane coordinate system to the cylindrical unfolded coordinate system, and an orthogonal grid in the circumference and height must be established.
[0082] The unfolded coordinate system is defined as follows: the horizontal axis corresponds to the circumferential unfolded length, ranging from 0 to the radius multiplied by 2 times pi; the vertical axis corresponds to the height of the bottle, which corresponds to the height range of the target labeling tape.
[0083] For any pixel within the target labeling band, first calculate the normalized horizontal coordinate offset relative to the axis. This is done by subtracting the horizontal coordinate of the axis from the corresponding vertical coordinate of the pixel. Then, calculate the circumferential angle by taking the arctangent of the offset divided by the radius. If the offset is negative, add pi to ensure angle continuity. Finally, calculate the unfolded horizontal coordinate as the circumferential angle multiplied by the radius, and the vertical coordinate as the original vertical coordinate minus the vertical coordinate of the top of the target labeling band, forming an unfolded coordinate pair. The grid resolution is set to one pixel per unit.
[0084] This mapping process flattens the cylindrical surface into a rectangle with a fixed circumferential length and the original height, ensuring that the same bottle position corresponds to the same unfolded coordinates under different postures.
[0085] S204: Perform the same unfolding transformation on the two images to obtain an aligned unfolded image of the adhesive coating.
[0086] The coordinate mapping has been defined. To obtain a planarized coating representation, the same inverse mapping must be applied to both the diffuse white light image and the grazing white light image for grayscale resampling.
[0087] Create a unfolded grid with a resolution that corresponds to the height difference of the target labeling strip, rounded down to the circumferential unfolded length.
[0088] For each position in the unfolded image, calculate the corresponding coordinates of the original image. The process is as follows: first, calculate the vertical coordinate by adding the vertical coordinate of the unfolded vertical coordinate to the top vertical coordinate of the target labeling strip; the circumferential angle is the unfolded horizontal coordinate divided by the radius; if the angle is greater than pi, subtract 2 times pi and adjust the offset sign; then calculate the offset by multiplying the radius by the tangent of the circumferential angle, and then add the horizontal coordinate value of the axis under the corresponding vertical coordinate.
[0089] If the calculated original image coordinates fall within the image, bilinear interpolation is used to calculate the gray value. The bilinear interpolation process involves taking the gray values of the four pixels around the coordinates and averaging them by distance; otherwise, the background gray value is assigned.
[0090] The above resampling was performed on the diffuse white light image and the grazing white light image respectively to obtain the diffuse coating unfolded image and the grazing coating unfolded image, and the pixel positions of the two are strictly aligned.
[0091] In one embodiment, in the case of a 500ml glass bottle, the unfolded image has a horizontal width of approximately 1256 pixels and a vertical width of 400 pixels. In both unfolded images, the adhesive layer appears as a regular rectangular band, with the edge streaks displayed consistently in the circumferential direction, without any surface compression distortion.
[0092] Aligned diffuse coating development and grazing coating development eliminate geometric deformation caused by bottle curvature and posture changes, allowing the coating morphology to be directly compared in planar coordinates.
[0093] After step S2 is completed, the bottle body geometric reference and the aligned diffuse coating unfolded map and grazing coating unfolded map are output. This provides a geometrically consistent and distortion-free image basis for subsequent same-scale normalization and coating response map generation, ensuring that the uniformity evaluation of transparent water-based casein glue has reproducible coordinate references under different bottle shapes and orientations.
[0094] Steps S1 and S2 have provided a planarized image with illumination compensation and geometric consistency. However, the unfolded adhesive coating pattern is still affected by overall illumination drift and local background texture interference. The grayscale contrast between the transparent adhesive layer and the glass substrate is weak, making it difficult to directly distinguish the adhesive layer from the non-adhesive area. However, step S3 uses illumination normalization parameters to perform same-scale normalization on the two adhesive coating unfolded patterns to compensate for brightness fluctuations, generating an adhesive coating response map that highlights the characteristics of the adhesive layer. Then, a self-reference background is constructed using the local statistical results of the non-adhesive strip under the unfolded coordinates, thereby extracting the effective area of the adhesive layer. This allows for stable separation of the adhesive layer under strong reflection and background interference, providing a clean and comparable analytical object for subsequent uniformity quantification.
[0095] S301: Normalize the two coating patterns to the same scale using illumination normalization parameters.
[0096] The diffuse coating unfolded image and the grazing coating unfolded image have been geometrically aligned through step S2. In order to unify the grayscale scale under different lighting conditions, the illumination normalization parameters formed in step S1 must be used to perform grayscale compensation on the two images respectively, and the absolute grayscale is converted into a relative reflectance representation.
[0097] The illumination normalization parameters include the mean gray values of the uncoated tape in the diffuse white light image and the mean gray values of the uncoated tape in the grazing white light image.
[0098] Normalization is performed on the diffuse coating unfolded image by iterating through each pixel in the unfolded coordinates and dividing the gray value of each pixel in the diffuse coating unfolded image by the mean gray value of the non-coated strip in the diffuse white light image to obtain the normalized diffuse unfolded image.
[0099] Normalization is performed on the grazing coating unfolded image by iterating through each pixel in the unfolded coordinates and dividing the gray value of each pixel in the grazing coating unfolded image by the mean gray value of the non-coated strip in the grazing white light image to obtain the normalized grazing unfolded image.
[0100] After normalization, the range of pixel values is compressed to close to the 0 to 2 range, while saturated pixels retain their original values to avoid introducing artifacts.
[0101] In one embodiment, in the unfolded pattern of a 500ml glass bottle, the overall grayscale of the diffuse coating unfolded pattern is relatively high. After normalization, the grayscale of the non-coated area is close to one, while the grayscale of the coating area is slightly lower. The grayscale of the highlight area of the grazing coating unfolded pattern is relatively high. After normalization, the grayscale of the non-coated area is also close to one, and the variation in coating thickness is relatively enhanced.
[0102] Normalized diffuse and normalized grazing surface developments eliminate overall brightness drift, making the grayscale performance of the adhesive layer comparable for different bottle shapes and under different lighting conditions.
[0103] S302: Generate adhesive application response map.
[0104] Normalized diffuse and normalized grazing diffuse patterns have achieved the same grayscale. In order to fully reflect the surface scattering differences caused by the transparent adhesive layer, it is necessary to differentially fuse the two information streams to generate a single adhesive response pattern to enhance the contrast of the adhesive layer.
[0105] The adhesive response map is obtained by subtracting the normalized grazing unfolded map and the normalized diffuse unfolded map. The process involves traversing each pixel under the unfolded coordinates, calculating the difference between the corresponding pixel values, and setting the part of the difference result that is less than 0 to 0, so that the response of the non-adhesive area is close to zero and the adhesive layer area retains a positive response.
[0106] Contrast stretching is performed on the glue application response map. The process involves first truncating the response value to the range of 0 to 2 (0 for values less than 0 and 2 for values greater than 2), and then linearly mapping it to a gray level of 0 to 255. The calculation method is to multiply the response value by 255 and divide by 2.
[0107] In one embodiment, in the aforementioned 500ml glass bottle example, the non-coated area in the adhesive response diagram exhibits a uniform low grayscale, the adhesive layer area exhibits a higher grayscale band, the edge trailing and localized areas with insufficient adhesive show a significant reduction in grayscale, and the stringy pattern is clearly highlighted.
[0108] The adhesive response map centrally reflects the information on the presence and thickness variation of the adhesive layer, suppresses interference from background texture and residual reflection, and provides high-contrast input for adhesive layer area extraction.
[0109] S303: Construct a self-referenced background using local statistical results of uncoated tape.
[0110] The adhesive response map has highlighted the characteristics of the adhesive layer. In order to remove the residual local background unevenness under the unfolded coordinates, such as bottle texture or lighting gradient, local statistics must be performed in the area not corresponding to the adhesive strip to construct a self-referenced background map containing only low-frequency background.
[0111] First, mark the area corresponding to the non-coated tape in the unfolded coordinate system. Based on the bottle body geometry reference in step S2, map the fixed-width rings above and below the target labeling tape to the top and bottom rectangular bands of the unfolded diagram, which are recorded as the unfolded non-coated tape area. The width is a fixed proportion of the height of the unfolded diagram.
[0112] For the glued response map, perform local median statistics within the expanded non-glue strip area. The process is as follows: for each pixel location, select a large square neighborhood centered on it (pixels within the neighborhood are limited to the expanded non-glue strip area), sort all response values within the neighborhood, and take the median value as the background value to obtain the background image.
[0113] Expand the background image to the entire image and fill it with vertical interpolation so that the background value within the target labeling tape is smoothly transitioned from the background value of the adjacent uncoated tape areas.
[0114] The self-referenced background image only reflects the low-frequency components of the glass substrate and the gradual change in light, and does not contain the high-frequency characteristics of the adhesive layer.
[0115] S304: Obtain the effective area of the adhesive layer.
[0116] The self-referenced background map has been constructed. To accurately define the extent of the adhesive layer, the background must be subtracted from the adhesive application response map and binarized to generate a binary mask of the effective area of the adhesive layer.
[0117] First, the background correction response map is calculated by iterating through each pixel in the expanded coordinate system and subtracting the corresponding pixel value of the self-referenced background map from the pixel value of the adhesive response map.
[0118] Then, adaptive binarization is performed. The process involves finding the peak response position within the target labeling band as a seed point, expanding it using a region growing algorithm, and growing it under the condition that the pixels are eight connected and the background correction response value is greater than half of the peak value. The growth boundary stops at a fixed percentage where the response value drops to the peak value.
[0119] Finally, a binary mask of the effective area of the adhesive layer is generated, where a value of one represents an adhesive layer pixel and a value of zero represents a non-adhesive pixel. At the same time, isolated components with too small an area are excluded to remove noise.
[0120] In one embodiment, in the adhesive response image of a 500ml glass bottle, the contrast of the adhesive layer is further improved after background correction. After binarization, a complete rectangular mask is obtained, and local gaps and uneven edges are displayed as defects. The mask boundary accurately corresponds to the actual adhesive layer contour.
[0121] The effective area of the adhesive layer is accurately defined by a binary mask, eliminating background interference and non-adhesive areas, providing a clean input for subsequent calculations of circumferential discontinuous entropy and boundary swing ratio.
[0122] After step S3 is completed, the coating response map, self-referenced background map, and binary mask of the effective area of the adhesive layer are output. This provides high-contrast adhesive layer data without background interference for the subsequent generation of circumferential discontinuity entropy and boundary swing ratio within the effective area of the adhesive layer and for uniformity determination. This ensures that the uniformity evaluation of transparent water-based casein adhesive remains stable and accurate under strong reflection and local texture disturbance.
[0123] Steps S1 to S3 provide clean adhesive layer data; however, subtle fluctuations in the thickness of the transparent adhesive layer and local disturbances still make it difficult for simple indicators such as overall coverage to sensitively capture structural discontinuities and edge sway risks. Step S4, however, generates two dimensionless parameters—circumferential discontinuity entropy and boundary sway ratio—from the adhesive response map within the effective area of the adhesive layer. These parameters quantify the internal discontinuity complexity and the relative intensity of rapid boundary swaying, respectively. The two-dimensional parameters are then input into a boundary learning model to obtain uniformity determination coefficients. These coefficients are combined with the discontinuity distribution map and the sway residual map to achieve risk localization, thereby outputting stable and interpretable uniformity conclusions and specific anomaly locations under different bottle types and optical disturbances.
[0124] S401: Generate circumferential discontinuous entropy and discontinuous distribution map.
[0125] The continuous structure of the adhesive coating includes circumferential discontinuous entropy.
[0126] The binary mask of the effective area of the adhesive layer has provided the range of the pure adhesive layer. In order to sensitively quantify the structural discontinuities of the internal spreading, it is necessary to analyze the length distribution of continuous and discontinuous segments in the mask line by line along the circumference. The dimensionless index is formed by the distribution dispersion, and the position of abnormal segments is recorded for localization.
[0127] The input consists of an adhesive response map and a binary mask of the effective area of the adhesive layer, where pixels with a value of one constitute the adhesive layer.
[0128] The mask is processed line by line along the unfolded coordinate axis. For each line, the circumferential coordinates are traversed to identify all continuous segments. The start and end positions and lengths of continuous segments with a value of one and the start and end positions and lengths of discontinuous segments with a value of zero are recorded to form the sequence of continuous segment lengths and discontinuous segment lengths for that line. These are then merged into the sequence of all segment lengths for that line.
[0129] At the same time, the location range of each discontinuous segment and abnormal short connected fragment is written into the discontinuous distribution map. This map is a labeled map of the same size as the unfolded map. The discontinuous position is assigned a positive value proportional to the length, and the abnormal fragment position is assigned a negative value.
[0130] Normalization is performed on the sequence of row segment lengths by first calculating the effective circumferential span of the row as the sum of all segment lengths, and then dividing each segment length by the effective circumferential span to obtain the probability distribution.
[0131] The discontinuous complexity of the row is calculated by iterating through each non-zero probability value in the probability distribution, first calculating its base-2 logarithm, then multiplying it by -1 and multiplying it by the probability value, and finally summing all terms to obtain the row entropy. Zero probability terms are skipped.
[0132] The sum of the circumferential discontinuous entropy is the average of the entropies of all valid rows, and a valid row is defined as a row covered by the adhesive layer.
[0133] In one embodiment, when the mask is unfolded in a 500ml glass bottle, in a normal uniform sample, there is only one long continuous fragment per row of the gel layer, the segment length sequence is single, the probability is concentrated, the row entropy is close to zero, and the circumferential discontinuity entropy is low; in an abnormal local gel-poor sample, there are multiple short discontinuities and fragmented pieces, the segment length sequence is dispersed, the row entropy is increased, the circumferential discontinuity entropy is significantly increased, and at the same time, the discontinuity distribution map shows multiple bright discontinuous bands at the corresponding circumferential positions.
[0134] The circumferential discontinuity entropy is dimensionless and insensitive to the overall coverage. It is only highly sensitive to structural discontinuities such as fragmentation, striping, or periodic gaps. The discontinuity distribution map retains the circumferential location information of abnormal segments.
[0135] S402: Generate boundary swing ratio and swing residual plot.
[0136] The stability characteristics of the adhesive coating boundary include the boundary swing ratio.
[0137] The effective region of the adhesive layer has been defined by a binary mask. In order to reliably quantify the rapid unstable morphology of the boundary, it is necessary to extract two circumferential boundary trajectories and separate the slowly changing direction and the rapidly oscillating component. The dimensionless index is formed by the ratio of the rapid oscillation to the total variation.
[0138] Two circumferential boundaries are extracted from the binary mask of the effective area of the adhesive layer. For each circumferential position, the mask column is scanned along the height coordinate. The minimum height value of the adhesive layer pixel is recorded as the upper boundary position, and the maximum height value is recorded as the lower boundary position.
[0139] Normalization is performed on the two trajectories separately. The process involves calculating the number of pixels at the height of the label strip, dividing the upper and lower boundary positions by the number of pixels at the height of the label strip, and obtaining the normalized upper boundary trajectory and the normalized lower boundary trajectory in the range of 0 to 1.
[0140] For each normalized trajectory, a gradual and rapid decomposition is performed. The process involves using a one-dimensional large window moving average filter with a window width that is a fixed proportion of the circumferential unfolding length. The average value at each position is calculated to obtain the gradually varying baseline. The oscillation residual is then obtained by subtracting the gradually varying baseline value from the normalized trajectory value.
[0141] The overall strength of a single boundary is calculated by first calculating the mean value of the trajectory, then subtracting the absolute value of the mean value of the trajectory from the cumulative trajectory value at each circumferential position, and dividing by the total number of circumferential positions to obtain the total strength. The rapid oscillation strength is calculated by dividing the absolute value of the cumulative oscillation residual at each circumferential position by the total number of circumferential positions.
[0142] The single-boundary swing ratio is the rapid swing intensity divided by the total intensity.
[0143] The final boundary swing ratio is the average of the upper and lower boundary swing ratios. At the same time, the swing residual plot of the upper and lower residuals is retained. This plot is of the same size and is assigned the absolute value of the residual, with high values highlighted.
[0144] In one embodiment, in a normal sample from a 500ml glass bottle, the boundary trajectory is nearly straight, the gradually changing baseline is stable, the residual is small, the rapid swing intensity is much lower than the total intensity, the boundary swing amplitude ratio is low, and the swing residual map is generally low grayscale; in an abnormal trailing sample, multiple abrupt changes occur on one side of the boundary, the residual map shows multiple bright segments in the corresponding circumferential direction, the rapid swing intensity is close to the total intensity, and the boundary swing amplitude ratio is significantly increased.
[0145] The boundary swing amplitude is dimensionless, highlighting the relative intensity of rapid and unstable patterns such as wire trailing and uneven edges relative to the overall trend. The swing residual map retains the circumferential position information of high swing.
[0146] S403: Input a type of boundary learning model to obtain uniform decision coefficients.
[0147] The circumferential discontinuity entropy and boundary swing ratio have quantified the risks of internal discontinuity and boundary instability, respectively. In order to achieve stable and comparable determination of cross-bottle shape and optical perturbation conditions, two-dimensional features must be input into a pre-trained boundary learning model to calculate the degree of deviation of the current sample from the boundary of the normal region.
[0148] One type of boundary learning model is pre-trained using a normal uniform sample set from the production line. It learns only the closed boundary and typical fluctuation range of normal samples in the two-dimensional feature space formed by the circumferential discontinuous entropy and the boundary swing ratio. The boundary is determined by convex hull encirclement or single-class support vector machine.
[0149] During inference, the two-dimensional feature points composed of the current sample's circumferential discontinuity entropy and the boundary swing ratio are input into the model. The deviation of the feature points relative to the learning boundary is calculated. The deviation inside the boundary is zero, and the deviation outside the boundary is proportional to the distance. Then, normalization is performed to obtain a uniform determination coefficient, which is in the range of 0 to 1. A value of 1 indicates that it is located in the center of the normal region, and a value close to 0 indicates that it is seriously deviated from the boundary.
[0150] In one embodiment, a boundary learning model is constructed using a single-class support vector machine algorithm. This model uses the circumferential discontinuous entropy and the boundary swing ratio as two-dimensional input features, and is trained using only a normal uniform sample set collected from the production line, with a sample size of no less than 100, to ensure coverage of normal fluctuations under different bottle types, light intensities, and production cycles.
[0151] The training process is as follows: First, the two-dimensional features of normal samples are normalized, and the circumferential discontinuous entropy and the boundary swing ratio are mapped to the range of zero to one, respectively. Then, the radial basis function is selected as the kernel function to map the feature space to a high dimension in order to find the maximum margin hypersphere that surrounds the normal data. The model parameters include the nu value (controlling the upper limit of the proportion of outliers, with a value range of 0.01 to 0.1, used to balance the number of support vectors and the compactness of the boundary) and the gamma value (radial basis function coefficient, with a value range that is automatically estimated based on the feature scale or determined by grid search).
[0152] The optimization process is as follows: Leave-one-out cross-validation is used to evaluate the model's reconstruction error on normal samples to minimize the error, while monitoring the proportion of support vectors to be no more than 20%; the combination of nu and gamma values is traversed through grid search to select the parameter combination that minimizes the boundary volume and ensures that all normal samples fall within the boundary.
[0153] During inference, the model calculates the signature distance from the input feature point to the decision boundary. Positive distance indicates a normal area, and negative distance indicates an anomaly. The degree of deviation is obtained by taking the absolute value of the negative distance and normalizing it to the interval between 0 and 1 to obtain a uniform decision coefficient. 1 represents the boundary center, and zero represents severe deviation.
[0154] In this embodiment, the model does not require training with abnormal samples, but relies only on normal uniform samples to achieve boundary learning, ensuring that the judgment stability and comparability are maintained under optical disturbances at the glass bottle labeling site.
[0155] The uniform coefficient of determination provides a quantitative deviation metric that is comparable across samples, supporting subsequent determinations and risk contribution analysis.
[0156] S404: Output uniformity conclusions and risk location results.
[0157] The uniform judgment coefficient has quantified the overall degree of deviation. In order to generate interpretable output, a judgment conclusion must be given based on the coefficient threshold. At the same time, the deviation from the dominant dimension is analyzed and the high anomaly circumferential position in the auxiliary spectrum is mapped to achieve risk type differentiation and landing point location.
[0158] The uniformity determination coefficient is compared with the preset uniformity threshold. If the uniformity determination coefficient is not lower than the uniformity threshold, it is determined to be uniform; otherwise, it is determined to be non-uniform.
[0159] Simultaneously, the deviation contribution is analyzed. The process involves calculating the standardized deviation component of the current two-dimensional feature point relative to the center of the normal region, comparing the circumferential discontinuity entropy deviation component with the boundary swing ratio deviation component. If the circumferential discontinuity entropy deviation component is larger, the risk is mainly dominated by internal discontinuity; otherwise, it is dominated by boundary swing.
[0160] The risk localization process involves reading the circumferential range of high-value discontinuities or fragments in the discontinuous distribution map, reading the circumferential range of high-oscillation positions in the oscillation residual map, mapping the high-anomaly circumferential segments corresponding to the dominant risk to the localization results, and outputting a description of the defect type and specific circumferential interval.
[0161] In one embodiment, in an abnormal sample of a 500ml glass bottle, if multiple hidden gaps dominate internally, the uniformity determination coefficient is low, the conclusion is that it is non-uniform, and the risk positioning suggests that internal discontinuity dominates, with multiple segments of discontinuity in a specific circumferential interval; if one side has severe tailing, the conclusion is that it is non-uniform, and the risk positioning suggests that boundary oscillation dominates, with the corresponding circumferential interval boundary being uneven.
[0162] The output uniformity conclusions are stable and comparable, the risk location results distinguish the dominant type and give the circumferential landing point, and support the rapid on-site tracing of working conditions.
[0163] After step S4 is completed, the following are output: circumferential discontinuity entropy, boundary swing ratio, uniformity judgment coefficient, uniformity conclusion, risk dominance type, discontinuity distribution map, swing residual map, and circumferential risk location results. This provides direct and interpretable information for the subsequent application of the location results back to the bottle geometry benchmark and the generation of reports, ensuring that the uniformity assessment of transparent water-based casein glue is both stable and feasible under complex field conditions.
[0164] While steps S1 to S4 provide clear information on the abnormal circumferential range and dominant type, these results are based on cylindrical unfolded coordinates, making it difficult for on-site personnel to intuitively relate them to the actual curved surface position of the bottle and specific operating conditions. However, step S5, through the reverse mapping of the bottle's geometric reference from step S2, projects the circumferential risk location results back to the original image coordinates or bottle angle position, and integrates all judgment information to generate a structured uniformity assessment report. This transforms abstract quantitative conclusions into visible and actionable on-site guidance information, supporting rapid production line handling and process adjustments.
[0165] S501: Redirect the circumferential risk positioning results back to the position corresponding to the bottle's geometric reference.
[0166] Step S4 has output the circumferential risk location results, including the dominant risk type and the high-anomaly circumferential interval. In order to make the anomaly distribution intuitively correspond to the actual position of the bottle body surface, it is necessary to use the bottle body geometric reference in step S2 to perform reverse coordinate mapping, and convert the circumferential interval into the original image projection and the bottle body angle label.
[0167] The bottle's geometric references include axis parameters, radius, target labeling tape height range, and unfolded coordinate mapping relationships.
[0168] For each risk circumferential interval, calculate the circumferential coordinates of the interval center. The reverse mapping process is to first calculate the circumferential angle by dividing the circumferential coordinates of the interval center by the radius, then calculate the offset by multiplying the radius by the tangent of the circumferential angle and considering the angle quadrant adjustment to ensure continuity, and finally add the abscissa value of the axis at the center of the target labeling strip height to obtain the original image coordinates.
[0169] Perform the same mapping on multiple sampling points within the interval to obtain the projection point set or polygonal contour of the risk area in the original image.
[0170] Simultaneously, the corresponding angle position on the bottle surface is calculated, and the circumferential angle is mapped to an angle label in the range of -180° to 180°, with the front of the bottle as the zero-degree reference.
[0171] The mapping results are overlaid onto the original diffuse white light image or grazing white light image to form a risk-annotated image. Risk areas are marked with color boxes or arrows, with one color used for internal discontinuities and another color used for boundary swings. The angle position and dominant type of text are also marked.
[0172] In one embodiment, in the original diffuse white light image of a 500ml glass bottle, after the circumferential trailing risk area is re-projected, a red bounding box and arrow pointing to the corresponding curved surface of the bottle are displayed, indicating the dominant edge swing and the angle of 120° to 150°; after the internal gap risk is re-projected, a blue internal area is highlighted, indicating the dominant internal discontinuity and the angle of 30° to 60°.
[0173] The risk images and angle location labels after re-injection visually display the distribution of anomalies in their actual locations on the bottle, facilitating direct observation and handling by on-site personnel.
[0174] S502: Generate a uniformity assessment report.
[0175] The risk location results have been fed back to the corresponding position of the bottle's geometric reference. To support on-site process adjustments, all outputs of step S4 must be integrated to generate a structured uniformity assessment report, providing complete information on conclusions, defect descriptions, and operating conditions.
[0176] The report structure includes bottle labeling, uniformity conclusion, uniformity determination coefficient value, risk dominance type, risk area list, and attached figures. Each area in the risk area list is described in terms of angular position, defect morphology, and directional working condition. The attached figures include a risk-annotated image and an auxiliary discontinuous distribution map, as well as an expanded view of the oscillation residual map.
[0177] The defect type description process is as follows: if the dominant risk is internal discontinuity, it is described as fragmented gaps or strip discontinuities inside the adhesive layer; if the dominant risk is boundary oscillation, it is described as jagged tails or irregular oscillations at the boundary of the adhesive layer.
[0178] The working condition information process is based on preset mapping rules. Internal intermittent indicates fluctuations in glue supply pressure or partial blockage of the transfer roller, while boundary oscillation indicates wear of the scraper blade or severe stringing and unstable transfer speed.
[0179] The report is output in PDF or screen display format, with attached figures and text descriptions, ensuring that each risk area corresponds to an independent entry for easy reference.
[0180] In one embodiment, in the evaluation report for a 500ml glass bottle, the first page shows the conclusion that the coefficient for determining uniformity is 0.35. The second page lists Risk 1: internal discontinuity is dominant with an angle of 30° to 60°, multiple hidden gaps inside the adhesive layer, and localized adhesive shortage in the adhesive supply system, with the original image showing highlighted gap areas and an expanded discontinuity distribution diagram. Risk 2: boundary oscillation is dominant with an angle of 120° to 150°, severe tailing on the right boundary, and severe stringing during the transfer process, with corresponding boundary-marked images attached.
[0181] The generated uniformity assessment report integrates quantitative conclusions, location information, and operating condition recommendations, enabling production line personnel to quickly understand the causes of anomalies and implement targeted measures.
[0182] After step S5 is completed, the risk image, the risk list of bottle angle and position, and the complete uniformity assessment report are output. The expanded coordinate quantification results of step S4 are transformed into visual guidance information that can be directly used on site, ensuring that the uniformity assessment of transparent water-based casein glue coating can achieve executable process control under the complex on-site conditions of glass bottle labeling.
[0183] Specifically, the above are merely preferred embodiments of this application and are not intended to limit this application.
[0184] The thresholds or preset parameters can be pre-calibrated through offline simulation testing or set to fixed values according to on-site operating procedures.
[0185] In the description of this specification, references to terms such as "an embodiment," "an example," and "a specific example" indicate that a particular feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0186] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles, characterized in that, Including the following steps: S1: Acquire diffuse white light images and grazing white light images sequentially within the same field of view on the same bottle, and calculate the grayscale mean on the preset uncoated tape to form a pair of illumination normalization parameters as a reference benchmark for the same frame. S2: Extract the bottle body boundary based on the diffuse white light image and fit it to obtain the bottle body geometric reference. After mapping the target label tape to unfolded coordinates, perform the same unfolded transformation on the two images to obtain the aligned glue unfolded image. S3: Normalize the two coating unfolded maps on the same scale using the illumination normalization parameter and generate a coating response map. Then, construct a self-reference background using the local statistical results of the non-coated strip to obtain the effective area of the adhesive layer. This includes: performing gray-level division normalization on the diffuse coating unfolded map and the grazing coating unfolded map respectively using the illumination normalization parameter to obtain a normalized diffuse unfolded map and a normalized grazing unfolded map; performing difference on the normalized grazing unfolded map and the normalized diffuse unfolded map and setting the part of the difference result less than 0 to 0 to generate a coating response map; and performing contrast stretching on the coating response map. In the unfolded coordinate system, the uncoated tape area is marked. Local median statistics are performed on the coating response map to construct a self-referenced background map. The background correction response map is obtained by subtracting the self-referenced background map from the coating response map. Adaptive region growth binarization is performed to generate a binary mask of the effective area of the adhesive layer. S4: Within the effective area of the adhesive layer, generate continuous adhesive structure features and stable adhesive boundary features from the adhesive response map. Input both into a boundary learning model to obtain uniformity determination coefficients. Based on the uniformity determination coefficients, output uniformity conclusions and risk location results, including: The continuous structure characteristics of the adhesive coating include circumferential discontinuous entropy, and the stability characteristics of the adhesive coating boundary include the boundary swing ratio; Scan the effective region of the adhesive layer line by line along the circumference of the binary mask, identify the length sequence of continuous segments and discontinuous segments, normalize to obtain the probability distribution, calculate the line discontinuity complexity and summarize it into the circumferential discontinuity entropy, and record the location range of abnormal segments and write it into the discontinuity distribution map. Extract the upper and lower boundary positions from the binary mask of the effective region of the adhesive layer, normalize the boundary trajectory, obtain the gradually varying baseline by moving average filtering, calculate the swing residual and intensity ratio to form the boundary swing ratio, and retain the high swing position and write it into the swing residual map. S5: The risk location results are fed back to the corresponding position of the bottle body geometric datum and a uniformity assessment report is generated. The report includes a description of the defect type and working condition information.
2. The vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles according to claim 1, characterized in that, Step S1 includes: An industrial camera is fixedly installed at the labeling station. The lighting system is equipped with a diffuse white light source and a grazing white light source. After the bottle is in place, the diffuse white light source is turned on first to acquire a diffuse white light image, and then the grazing white light source is turned on to acquire a grazing white light image. The uncoated tape is preset to be a fixed height ring above or below the labeling area of the bottle. The uncoated tape area is cropped in the diffuse white light image by a pre-calibrated pixel row range. The grayscale mean of the uncoated tape area in the two images is calculated separately and combined to form a lighting normalization parameter pair as a reference benchmark for the same frame.
3. The vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles according to claim 2, characterized in that, Step S2 includes: Edge detection is performed on the diffuse white light image to obtain a binary edge map. The left and right vertical edge point sets with the longest connected component length are selected as the left and right boundary point sets. For each height, the average of the left and right boundary horizontal coordinates is taken to form a center point sequence and fitted to the bottle axis. The median value of the width sequence is calculated to estimate the radius. A fixed proportion height range in the middle of the bottle body is selected as the target labeling tape height range to form the bottle body geometric reference.
4. The vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles according to claim 3, characterized in that, Step S2 also includes: Define the unfolded coordinate system so that the horizontal axis corresponds to the circumferential unfolded length and the vertical axis corresponds to the bottle height. Establish a reverse mapping to calculate the original image coordinates and use bilinear interpolation to resample. Perform the same unfolding transformation on the diffuse white light image and the grazing white light image to obtain pixel-aligned diffuse coating unfolded image and grazing coating unfolded image.
5. The vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles according to claim 4, characterized in that, Step S4 also includes: The circumferential discontinuity entropy and the boundary swing ratio are input into a type of boundary learning model to calculate the degree of deviation and normalize it into a uniform determination coefficient. The uniformity is determined based on the uniform determination coefficient, the dominant deviation dimension is analyzed to distinguish the risk type, and the risk location result is output by combining the discontinuity distribution map and the swing residual map to map the circumferential position.
6. The vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles according to claim 5, characterized in that, Step S5 includes: Using the bottle's geometric reference, reverse coordinate mapping is performed to convert the circumferential risk location results into the original image projection point set and bottle angle position labels. Color boxes and arrows are superimposed on the original diffuse white light image or grazing white light image to mark the risk areas, forming a labeled risk image, while also marking the dominant risk type and angle position.
7. The vision-based method for evaluating the uniformity of water-based casein adhesive coating on glass bottles according to claim 6, characterized in that, Step S5 also includes: integrating the uniformity conclusion, uniformity judgment coefficient, risk-dominant type, risk area list and attached figure to generate a uniformity assessment report. The risk area list describes the angle position, defect type and working condition orientation information. The defect type distinguishes between internal discontinuity or boundary oscillation. The working condition orientation has a preset mapping rule. The report is output in PDF or screen display format.