A method and system for detecting color uniformity of thermal paper based on image processing

CN122989610APending Publication Date: 2026-10-27GUANGZHOU BOREN NEW MATERIALS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611157089.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]本发明提供一种基于图像处理的热敏纸颜色均匀性检测方法及系统,以解决现有的问题

Benefits of technology

本发明基于透光图像与多光谱图像的跨时序演变差异,通过形态稳定指数与多光谱稳定指数准确区分张力纹干扰与真实涂布不均,有效避免了张力纹导致的误判;同时结合同批次热响应抽检结果,建立参考像素点的显色偏离指数,并通过涂布特征相似性加权映射到在线待测像素点,最终综合真实涂布指数、区域面积占比及颜色偏离指数的统计特征计算颜色均匀性评估值,实现了对热敏纸颜色均匀性的高精度、高鲁棒性在线检测,显著提升了检测结果的可靠性和生产质量控制水平。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989610A_ABST
    Figure CN122989610A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and particularly relates to a thermal paper color uniformity detection method and system based on image processing. The method comprises the following steps: acquiring a continuous transmission image, a multispectral image and a color developing image of the thermal paper; extracting a suspected uneven coating area, calculating a registration index, and performing cross-frame matching on the suspected uneven coating area in adjacent frames; determining an effective registration index, acquiring a time sequence of the effective registration index, and calculating a morphological stability index; calculating a multispectral stability index; calculating a real coating index of each suspected uneven coating area; calculating a color developing deviation index of each reference pixel point; acquiring a color deviation index of a to-be-detected pixel point; and calculating a color uniformity evaluation value and outputting the value for each suspected uneven coating area on the thermal paper currently detected on a production line. The present application can realize high-precision and high-robustness online detection of the color uniformity of the thermal paper.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and specifically to a method and system for detecting the color uniformity of thermal paper based on image processing. Background Technology

[0002] Color uniformity of thermal paper is one of the core indicators for evaluating its product quality, directly affecting the clarity and consistency of print results and the end-user experience. In applications such as invoice printing, labeling, and medical records, uneven color development of thermal paper can lead to problems such as unreadable barcodes and missing text information, posing potential risks to commercial settlement, logistics traceability, and medical safety management. Therefore, accurate and efficient testing of the color uniformity of thermal paper is necessary.

[0003] Existing methods for detecting the color uniformity of thermal paper are mostly based on sampling at the end of the production line. After the sample develops color through thermal response testing, visual comparison or color difference measurement is performed. Alternatively, the light transmission method is used to evaluate the coating uniformity online, and the physical uniformity of the coating indirectly reflects the color uniformity.

[0004] However, in actual thermal paper production line image inspection processes, factors such as paper tension fluctuations and coating drying stress can cause irregular tension lines to form on the surface of the thermal paper coating. Their grayscale appearance in transmitted images is quite similar to actual coating unevenness, making it difficult for existing intelligent detection and evaluation methods to accurately distinguish between these two types of defects, thus hindering the effective assessment of the color uniformity of thermal paper. Summary of the Invention

[0005] This invention provides a method and system for detecting the color uniformity of thermal paper based on image processing, in order to solve existing problems.

[0006] The present invention provides a method for detecting the color uniformity of thermal paper based on image processing, which adopts the following technical solution: One embodiment of the present invention provides a method for detecting the color uniformity of thermal paper based on image processing, the method comprising the following steps: Acquire continuous light transmission images and multispectral images of thermal paper, as well as color development images collected after thermal response sampling inspection of the same batch of thermal paper; Extract suspected uneven coating regions from the light-transmitting image, calculate the registration index between suspected uneven coating regions in adjacent frames, and perform cross-frame matching of suspected uneven coating regions in adjacent frames based on the registration index. The effective registration index is determined based on the registration index and the distance between feature point pairs. The effective registration index time sequence of each suspected uneven coating region in at least three consecutive frames of matching is obtained. The morphological stability index is calculated based on the amplitude and symmetry of its temporal fluctuation. The multispectral stability index is calculated based on the temporal fluctuation amplitude and directional consistency of the reflectance of each pixel in each multispectral band. The true coating index of each suspected uneven coating area was calculated by combining the morphological stability index and the multispectral stability index. The pixels in the color image corresponding to the suspected uneven coating area are used as reference pixels, and the color deviation index of each reference pixel is calculated. For the pixel to be tested on the thermal paper currently being tested on the production line, reference pixels with similar coating characteristics are selected from the reference pixels. The color deviation index of the selected reference pixels is weighted and averaged to be the color deviation index of the pixel to be tested. For each suspected uneven coating area on the thermal paper currently being inspected on the production line, calculate and output the color uniformity evaluation value based on its true coating index, area, and color deviation index of each pixel.

[0007] Furthermore, suspected uneven coating regions are extracted from the transmitted light image, and the registration index between suspected uneven coating regions in adjacent frames is calculated, specifically including: For any single frame of transmitted image, perform grayscale conversion, edge detection, and morphological closing operation processing, and mark the obtained closed regions as suspected uneven coating regions. Multiply the absolute value of the difference between the mean gray value of the suspected uneven coating area and the mean gray value of the single-frame transparent image, the standard deviation of the gray value of the suspected uneven coating area, and the mean gradient amplitude of the edge pixels of the suspected uneven coating area, and then divide by the mean gradient amplitude of the single-frame transparent image to obtain the coating quality abnormality index of the suspected uneven coating area. For two suspected uneven coating regions in two adjacent frames, the area of ​​the overlapping region of the two suspected uneven coating regions is multiplied by the non-negative value of the cosine similarity between the direction of the line connecting the center points of the two suspected uneven coating regions and the direction of thermal paper transport. Then, the result is divided by the absolute value of the difference in the coating quality anomaly index of the two suspected uneven coating regions to obtain the registration index between the two suspected uneven coating regions.

[0008] Furthermore, cross-frame matching of suspected uneven coating regions in adjacent frames is performed based on the registration index, specifically including: For any suspected uneven coating region in the current frame, calculate its registration index with all suspected uneven coating regions in the previous frame. All registration indices are normalized, and regions whose normalization results are greater than a preset matching threshold are marked as candidate matching regions. Establish a matching relationship between the suspected uneven coating area and the candidate matching area with the largest registration index in the previous frame; For any pair of suspected uneven coating regions that establish a matching relationship in two adjacent frames, extract the points with curvature greater than a preset curvature threshold from the edge pixels of these two suspected uneven coating regions as candidate edge points. Calculate the mean curvature, curvature difference, cosine similarity between the cross-frame movement direction and the movement direction of the center points of the two regions, as well as the number of candidate matching regions and the mean registration index of the two suspected uneven coating regions. Multiply the mean curvature, cosine similarity, and mean registration index, and then divide by the product of the absolute value of curvature difference and the number of candidate matching regions to obtain the matching probability index of the pair of candidate edge points. Normalize the matching probability index of all candidate edge point pairs, mark the candidate edge points whose normalization result is greater than the preset feature point threshold as valid matching point pairs, and take the valid matching point pairs with the highest matching probability index as feature point pairs. The transformation matrix is ​​obtained based on feature point pairs, and then the transformation matrix is ​​used to register adjacent frame images.

[0009] Furthermore, the effective registration index is determined based on the registration index and the distance between feature point pairs, specifically including: For any pair of suspected uneven coating regions that establish a matching relationship in two adjacent frames, obtain the registration index of the pair of suspected uneven coating regions, and obtain the mean of the Euclidean distance between the feature point pairs in the pair of suspected uneven coating regions. Divide the registration index by the mean of the Euclidean distance to obtain the effective registration index for the pair of suspected unevenly coated areas.

[0010] Furthermore, the effective registration index time series of each suspected uneven coating region is obtained in at least three consecutive frames of matching. The morphological stability index is calculated based on the amplitude and symmetry of its temporal fluctuations, specifically including: For each suspected uneven coating region, the effective registration index is obtained in frame order during at least three consecutive frame matching processes, forming a temporal sequence of effective registration indexes. Determine the maximum value in the time series of the effective registration index and obtain the position of the maximum value; Perform a first-order difference operation on the effective registration index time series to obtain the difference series; Calculate the absolute value of each difference value in the difference sequence and use its mean as the fluctuation amplitude. Using the position of the maximum value as the boundary, the effective registration index time series is divided into a left subsequence and a right subsequence. The positive and negative sign distribution of the difference values ​​in the left and right subsequences is statistically analyzed, and the difference in length between the left and right subsequences is calculated. Determine whether the sign of the most frequent difference value in the left subsequence is opposite to the sign of the most frequent difference value in the right subsequence. If they are opposite, set the sign opposite index to 1; otherwise, set it to 0. The intermediate index is obtained by taking the reciprocal of the product of the fluctuation amplitude and the difference in length between the left and right subsequences. Adding the inverse sign index to the intermediate index yields the morphological stability index of the suspected unevenly coated region.

[0011] Furthermore, based on the temporal fluctuation amplitude and directional consistency of the reflectance of each pixel in the multispectral image across each multispectral band, a multispectral stability index is calculated, specifically including: For each pixel in any multispectral image, obtain its reflectance in each multispectral band in two adjacent frames; Calculate the change in reflectance from the previous frame to the current frame for each band, take the absolute value of the change as the fluctuation amplitude of the band, and take the sign of the change as the fluctuation direction of the band. Count the number of bands with the same wave direction in all bands, and take the number of bands corresponding to the direction with the largest number of bands as the number of bands in the same direction; Calculate the mean amplitude of fluctuations across all bands; The multispectral stability index of a pixel is obtained by dividing the number of bands in the same direction by the product of the average fluctuation amplitude and the total number of bands.

[0012] Furthermore, the pixels in the colorimetric image corresponding to the suspected uneven coating area are used as reference pixels, and the color deviation index of each reference pixel is calculated, specifically including: The pixels in the color image that correspond to the locations of each suspected uneven coating area are determined as reference pixels, and the pixels in the color image that do not belong to the suspected uneven coating areas are determined as normal area pixels. Calculate the mean gray value of all pixels in the normal region to obtain the mean gray value of the normal region; For each reference pixel, the absolute value of the difference between the gray value of the reference pixel and the average gray value of the normal area is calculated as the color deviation index of the reference pixel.

[0013] Furthermore, for the pixel to be tested on the thermal paper currently being inspected on the production line, reference pixels with similar coating characteristics are selected from the reference pixels. The color deviation index of the selected reference pixels is weighted and averaged to obtain the color deviation index of the pixel to be tested. Specifically, this includes: Obtain the grayscale value of the pixel to be tested at the corresponding position in each frame of the transmissive image and calculate its mean value, which is used as the transmissive grayscale value of the pixel to be tested. The reflectance of the pixel to be tested in each multispectral band is obtained and arranged in band order to form a multispectral vector; For each reference pixel, obtain the light transmittance gray value and its multispectral vector of that reference pixel; Calculate the absolute value of the difference between the transmitted grayscale value of the pixel to be tested and the reference pixel, and take the reciprocal to obtain the transmitted similarity. Calculate the cosine similarity between the multispectral vectors of the pixel to be tested and the reference pixel; Multiply the light transmission similarity by the cosine similarity to obtain the coating similarity index; All coating similarity indices are normalized, and reference pixels whose normalization results are greater than a preset similarity threshold are marked as reference pixels with similar coating features. Using the normalized coating similarity index as the weight, the color deviation index of the selected reference pixels is weighted and averaged, and the weighted average result is used as the color deviation index of the pixel to be tested.

[0014] Furthermore, for each suspected uneven coating area on the thermal paper currently being inspected on the production line, a color uniformity evaluation value is calculated and output based on its true coating index, area, and color deviation index of each pixel within it. Specifically, this includes: For each suspected uneven coating area, obtain the number of pixels occupied by the suspected uneven coating area, and calculate the proportion of the number of pixels to the total number of pixels in the thermal paper image, which is used as the area proportion of the suspected uneven coating area. Obtain the true coating index of the suspected uneven coating area; Obtain the color deviation index of all test pixels in the suspected uneven coating area, and calculate the mean and standard deviation of these color deviation indices; The initial color uniformity assessment value of the suspected uneven coating area is obtained by multiplying the area ratio of the suspected uneven coating area, the true coating index, the mean of the color deviation index, and the standard deviation of the color deviation index. The initial color uniformity evaluation values ​​of all suspected uneven coating areas are normalized to obtain the final color uniformity evaluation value of each suspected uneven coating area. Based on the final color uniformity evaluation value, the corresponding suspected uneven coating areas are marked with different colors and output.

[0015] This invention proposes a thermal paper color uniformity detection system based on image processing, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the thermal paper color uniformity detection method based on image processing.

[0016] The beneficial effects of the technical solution of the present invention are: This invention, based on the temporal evolution differences between transmitted and multispectral images, accurately distinguishes tension lines from actual coating unevenness using morphological stability and multispectral stability indices, effectively avoiding misjudgments caused by tension lines. Simultaneously, by combining the results of thermal response sampling from the same batch, a color deviation index for reference pixels is established, and this index is weighted and mapped to online test pixels using coating feature similarity. Finally, the color uniformity assessment value is calculated by comprehensively considering the statistical characteristics of the actual coating index, area ratio, and color deviation index. This achieves high-precision and robust online detection of color uniformity in thermal paper, significantly improving the reliability of detection results and the level of production quality control. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a method for detecting the color uniformity of thermal paper based on image processing, as provided in an embodiment of the present invention; Figure 2 This is a structural diagram of a thermal paper color uniformity detection system based on image processing, provided in one embodiment of the present invention. Detailed Implementation

[0019] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a thermal paper color uniformity detection method based on image processing proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0021] The following description, in conjunction with the accompanying drawings, details a specific scheme for a thermal paper color uniformity detection method based on image processing provided by the present invention.

[0022] This invention provides a method and system for detecting the color uniformity of thermal paper based on image processing. Please refer to [link / reference]. Figure 1The diagram illustrates a flowchart of an image processing-based method for detecting the color uniformity of thermal paper according to an embodiment of the present invention. The method includes the following steps: S101. Acquire continuous light transmission images and multispectral images of thermal paper, as well as color development images collected after thermal response sampling inspection of the same batch of thermal paper.

[0023] For example, the process of acquiring a light-transmitting image specifically includes: A light transmittance detection station is set up after the coating and drying process and before the winding process in the thermal paper coating production line. Specifically, a uniform backlight is placed below the thermal paper, and a high-resolution line scan camera is mounted above it to continuously acquire light transmittance images of the thermal paper at a fixed frame rate, forming a time-series image stream. The pulse count of the production line encoder corresponding to each frame image is recorded synchronously as the longitudinal position code of the thermal paper. The acquired data includes: the pixel grayscale matrix of the light transmittance image at each time moment, the frame number, and the corresponding position code.

[0024] The process of acquiring multispectral images specifically includes: A multispectral camera is set up at an adjacent position to the light transmittance testing station, and with the same trigger frequency as the line scan camera, it acquires reflection images of the same section of thermal paper in multiple characteristic bands. The reflectance data of each band, along with the corresponding trigger timestamp and position code, are recorded. The position code is used to establish a correspondence between the multispectral image and the light transmittance image.

[0025] The process of acquiring colorimetric images after conducting thermal response sampling inspections on the same batch of thermal paper specifically includes: Samples are drawn from the production batch and roll number after the winding process. A standard full-page thermal excitation is applied to the sampled area to induce overall color development. A high-precision scanner is then used to acquire the developed color image and convert it to grayscale to obtain the grayscale value of each pixel. Simultaneously, the corresponding positional encoding interval of the sampled area during online testing is recorded, thus establishing a spatial correspondence with the transmitted light image and multispectral data.

[0026] The transmitted image sequence, multispectral images, and colorimetric images of the sampled specimens were uniformly aligned according to their positional codes. The transmitted images at each time point were converted to grayscale, and missing frames were linearly interpolated using adjacent frames. Each pixel in the transmitted image was indexed and associated with the corresponding pixel in the multispectral image according to its positional code, forming the basic input dataset for subsequent analysis.

[0027] S102. Extract suspected uneven coating regions from the light-transmitting image, calculate the registration index between suspected uneven coating regions in adjacent frames, and perform cross-frame matching of suspected uneven coating regions in adjacent frames based on the registration index.

[0028] In this embodiment, suspected uneven coating regions are extracted from the light-transmitting image, and the registration index between suspected uneven coating regions in adjacent frames is calculated, specifically including: For any single frame of transmitted image, perform grayscale conversion, edge detection, and morphological closing operation processing, and mark the obtained closed regions as suspected uneven coating regions. Multiply the absolute value of the difference between the mean gray value of the suspected uneven coating area and the mean gray value of the single-frame transparent image, the standard deviation of the gray value of the suspected uneven coating area, and the mean gradient amplitude of the edge pixels of the suspected uneven coating area, and then divide by the mean gradient amplitude of the single-frame transparent image to obtain the coating quality abnormality index of the suspected uneven coating area. For two suspected uneven coating regions in two adjacent frames, the area of ​​the overlapping region of the two suspected uneven coating regions is multiplied by the non-negative value of the cosine similarity between the direction of the line connecting the center points of the two suspected uneven coating regions and the direction of thermal paper transport. Then, the result is divided by the absolute value of the difference in the coating quality anomaly index of the two suspected uneven coating regions to obtain the registration index between the two suspected uneven coating regions.

[0029] Based on the registration index, cross-frame matching is performed on suspected uneven coating regions in adjacent frames, specifically including: For any suspected uneven coating region in the current frame, calculate its registration index with all suspected uneven coating regions in the previous frame. All registration indices are normalized, and regions whose normalization results are greater than a preset matching threshold are marked as candidate matching regions. Establish a matching relationship between the suspected uneven coating area and the candidate matching area with the largest registration index in the previous frame; For any pair of suspected uneven coating regions that establish a matching relationship in two adjacent frames, extract the points with curvature greater than a preset curvature threshold from the edge pixels of these two suspected uneven coating regions as candidate edge points. Calculate the mean curvature, curvature difference, cosine similarity between the cross-frame movement direction and the movement direction of the center points of the two regions, as well as the number of candidate matching regions and the mean registration index of the two suspected uneven coating regions. Multiply the mean curvature, cosine similarity, and mean registration index, and then divide by the product of the absolute value of curvature difference and the number of candidate matching regions to obtain the matching probability index of the pair of candidate edge points. Normalize the matching probability index of all candidate edge point pairs, mark the candidate edge points whose normalization result is greater than the preset feature point threshold as valid matching point pairs, and take the valid matching point pairs with the highest matching probability index as feature point pairs. The transformation matrix is ​​obtained based on feature point pairs, and then the transformation matrix is ​​used to register adjacent frame images.

[0030] For example, because the thermal paper moves continuously during the detection process, the same physical region may appear in multiple frames of the image sequence captured by the camera. Furthermore, due to local paper deformation, simple global registration is difficult to accurately match. Therefore, this embodiment first extracts closed regions with grayscale and edge anomalies from a single frame image as the objects to be analyzed. Then, it performs region-level matching based on morphological similarity, consistency of movement direction, and differences in coating quality anomaly index between adjacent frames. Subsequently, stable edge feature point pairs are selected within the region, and an accurate transformation matrix is ​​calculated to achieve pixel-level registration.

[0031] Extraction of suspected uneven coating areas in a single frame of transmissive image specifically includes: Each frame of the transmitted image is converted to grayscale, then edge detection is performed using the Sobel operator. Morphological closing operations (dilation followed by erosion) are then performed on the edge detection results. The resulting closed shapes are marked as suspected uneven coating regions. For any suspected uneven coating region... Its coating quality abnormality index The calculation formula can be:

[0032] in, Indicates areas suspected of uneven coating. The average gray level; Indicates areas suspected of uneven coating. Standard deviation; This represents the average grayscale value of the current frame's translucent image. Indicates areas suspected of uneven coating. The average gradient magnitude of edge pixels reflects the sharpness of the boundary between the region and the surrounding normal region. The edges of unevenly coated regions are usually clearer and have larger gradient magnitudes. This represents the average gradient magnitude of all pixels in the current frame of the translucent image, serving as the normalization benchmark.

[0033] Coating quality abnormality index The physical meaning is: the more prominent the grayscale deviation, internal grayscale fluctuation, and edge contrast intensity of a suspected uneven coating area, the more likely it is to be an uneven coating (whether it is a real defect or tension lines).

[0034] For two adjacent frames (such as the first frame) Frame and the (Frame), it is necessary to establish a correspondence between suspected uneven coating areas in the previous frame and suspected uneven coating areas in the subsequent frame in order to track cross-frame changes of the same physical region.

[0035] For the suspected uneven coating area in the previous frame And the suspected uneven coating area in the next frame The registration index between these two suspected uneven coating areas The calculation formula can be:

[0036] in, Indicates areas of suspected uneven coating in the previous frame. And the suspected uneven coating area in the next frame The area of ​​overlapping regions in an image reflects the degree of spatial overlap. Indicates areas suspected of uneven coating The center point points to the suspected uneven coating area. The cosine similarity between the direction vector of the center point and the direction vector of thermal paper transport is the larger the value, indicating that the relative movement direction of the two regions is more consistent with the direction of paper transport and conforms to the laws of physical motion. This indicates that the non-negative part of the cosine similarity is used to avoid errors in registration caused by opposite directions (negative similarity). This represents the absolute difference in coating quality anomaly indices between two suspected uneven coating areas. The smaller the difference, the more similar the coating anomaly characteristics of the two areas are, and the higher the probability that they belong to the same physical area.

[0037] Registration Index The physical meaning is: the comprehensive score of two suspected uneven coating regions in terms of spatial overlap, consistency of movement direction, and similarity of coating anomaly features. The higher the score, the more likely they should be considered as a matching pair of the same physical region.

[0038] After obtaining the registration indices for all candidate region pairs, Min-Max normalization is used to map their values ​​to... Within a given interval, regions with normalized results greater than a preset matching threshold of 0.5 are marked as candidate matching regions. Then, for each suspected uneven coating region in the next frame... The system selects the candidate matching region with the highest registration index from the previous frame to establish a matching relationship. This preset matching threshold can be set to 0.5 to ensure that only regions with high registration index rankings and high matching confidence are included as candidates. Those skilled in the art can adjust this threshold according to actual detection accuracy requirements and production line speed.

[0039] It should be noted that the 0.01 in the denominator of the above formula is a preset minimum positive number used to avoid division by zero error. The 0.01 in the subsequent embodiments will not be repeated.

[0040] Based on regional matching, stable edge feature points are further searched within the suspected uneven coating regions where matching relationships have been established, in order to calculate the accurate image transformation matrix.

[0041] For pairs of suspected uneven coating regions in adjacent frames that have established a matching relationship (the suspected uneven coating regions in the previous frame) And the suspected uneven coating area in the next frame ), and extract the points with larger curvature (here, "larger" is determined by comparing with a preset curvature threshold) from the edge pixels of the two suspected uneven coating areas as candidate edge points. For a candidate edge point in the previous frame and a candidate edge point in the next frame Calculate the matching probability index The calculation formula is:

[0042] in, Represents a candidate edge point in the previous frame. and a candidate edge point in the next frame The average curvature at the point is used to extract points with larger curvature. Points with larger curvature are usually points with significant geometric features (such as corner points or high curvature edge points), which are suitable as matching features. The preset curvature threshold can be set to the 80th percentile of the curvature values ​​of all candidate edge points to extract points with larger curvature. Those skilled in the art can adjust this percentile according to the image resolution and paper texture features. Indicates candidate edge points Point to candidate edge point The cosine similarity between the movement direction vector of the edge point and the movement direction vector of the center point of the two suspected unevenly coated regions is the largest value. This indicates that the movement direction of the edge point is more consistent with the movement direction of the region as a whole, which conforms to the law of rigid body motion. Indicates areas suspected of uneven coating. The average registration index of all candidate matching regions in this cross-frame matching reflects the overall reliability of region matching; This represents the absolute value of the edge curvature difference between two suspected unevenly coated regions (the difference in the overall curvature characteristics of the regions, i.e., curvature difference). The smaller the difference, the more similar the edge features. Indicates areas suspected of uneven coating. The number of candidate matching regions in this cross-frame matching. The smaller this number, the clearer the matching relationship and the less interference.

[0043] The physical meaning of this matching probability index is: the higher the curvature similarity, motion direction consistency, and reliability of matching between two candidate edge points in the suspected uneven coating region, the greater the probability that they constitute a correct feature point pair.

[0044] After calculating the matching probability index for all candidate edge point pairs, the values ​​are also mapped to using Min-Max normalization. For each interval, point pairs whose normalized result is greater than a preset feature point threshold (e.g., 0.5) are marked as valid matching point pairs, and then used as candidate edge points in the next frame. Select the candidate edge point from the previous frame with the highest probability of matching it. This is considered as a feature point pair. The preset feature point threshold can be set to 0.5, retaining only the top half of the point pairs with the highest matching probability index to ensure the reliability of the feature points. Those skilled in the art can adjust this threshold according to the matching accuracy requirements.

[0045] Finally, based on these feature point pairs, the Random Sample Consensus (RANSAC) algorithm is used to estimate the projection transformation matrix between two adjacent frames. This transformation matrix is ​​then used to register the image of the next frame to the coordinate system of the previous frame, thereby achieving pixel-level precise alignment.

[0046] S103. Determine the effective registration index based on the registration index and the distance between feature point pairs, obtain the time sequence of the effective registration index of each suspected uneven coating region in at least three consecutive frames of matching, and calculate the morphological stability index based on the amplitude and symmetry of its time sequence fluctuation.

[0047] In this embodiment, the effective registration index is determined based on the registration index and the distance between feature point pairs, specifically including: For any pair of suspected uneven coating regions that establish a matching relationship in two adjacent frames, obtain the registration index of the pair of suspected uneven coating regions, and obtain the mean of the Euclidean distance between the feature point pairs in the pair of suspected uneven coating regions. Divide the registration index by the mean of the Euclidean distance to obtain the effective registration index for the pair of suspected unevenly coated areas.

[0048] Obtain the effective registration index time series of each suspected uneven coating region in at least three consecutive frames of matching, and calculate the morphological stability index based on the amplitude and symmetry of its temporal fluctuations, specifically including: For each suspected uneven coating region, the effective registration index is obtained in frame order during at least three consecutive frame matching processes, forming a temporal sequence of effective registration indexes. Determine the maximum value in the time series of the effective registration index and obtain the position of the maximum value; Perform a first-order difference operation on the effective registration index time series to obtain the difference series; Calculate the absolute value of each difference value in the difference sequence and use its mean as the fluctuation amplitude. Using the position of the maximum value as the boundary, the effective registration index time series is divided into a left subsequence and a right subsequence. The positive and negative sign distribution of the difference values ​​in the left and right subsequences is statistically analyzed, and the difference in length between the left and right subsequences is calculated. Determine whether the sign of the most frequent difference value in the left subsequence is opposite to the sign of the most frequent difference value in the right subsequence. If they are opposite, set the sign opposite index to 1; otherwise, set it to 0. The intermediate index is obtained by taking the reciprocal of the product of the fluctuation amplitude and the difference in length between the left and right subsequences. Adding the inverse sign index to the intermediate index yields the morphological stability index of the suspected unevenly coated region.

[0049] For example, after completing the accurate registration of adjacent frame images, for each suspected uneven coating area, it is necessary to further evaluate its morphological stability during the matching process of consecutive multiple frames. The geometric shape of a true uneven coating area remains stable during cross-frame matching due to changes in the chemical properties of the coating; while tension ripple areas are merely surface deformations, and their shape changes irregularly with paper movement and tension fluctuations. Therefore, this embodiment constructs an effective registration index time series and quantifies the morphological stability index through the amplitude and symmetry of its time series fluctuations.

[0050] For two adjacent frames (such as the first frame) Frame and the A pair of suspected uneven coating regions that have been matched in a frame (e.g., suspected uneven coating regions in a later frame) The effective registration index (of the region that matches it in the previous frame). The calculation formula is:

[0051] in, This indicates areas suspected of uneven coating during this cross-frame matching. The registration index of the region it matches; This indicates areas suspected of uneven coating during the matching process. The mean of the Euclidean distances between all feature points within a frame and their matching points in adjacent frames. The smaller this mean, the higher the pixel-level accuracy of the registration.

[0052] The physical meaning of the effective registration index is: the overall registration quality of a suspected unevenly coated region in cross-frame matching. The larger the value, the easier it is to match the region geometrically in a stable and accurate manner.

[0053] As the thermal paper moves continuously on the production line, the same suspected area of ​​uneven coating... It will move from the entrance to the exit of the camera's field of view, and will be captured by multiple frames during this period. Arranging each frame (from the first appearance of the region to the last frame) with the effective registration index calculated from the previous frame in chronological order constitutes the temporal sequence of the effective registration index of the region.

[0054] The following analysis is performed on this time series: First, find the maximum value in the sequence. And record the position where the maximum value appears (i.e., the corresponding frame number).

[0055] Then, a first-order difference operation is performed on the time series of the effective registration index to obtain the difference series. The first-order difference reflects the rate of change of the effective registration index over time.

[0056] Morphological stability index This is used to quantify the morphological stability of the suspected uneven coating region during cross-frame matching. The calculation formula is as follows:

[0057] in, This indicates an index with opposite signs. The specific calculation method is as follows: Calculate the maximum effective registration index value separately. Given the first-order difference values ​​in the left and right subsequences, identify the most frequent difference value sign in both subsequences (positive or negative). If the most frequent signs on the left and right subsequences are opposite, then... If they are the same, then This indicator reflects the symmetry of the registration accuracy fluctuation trend: when the actual uneven coating area enters and leaves the detection field of view, its registration accuracy change trend is often first increased and then decreased (symmetrical), so the difference signs on the left and right sides are opposite; while the fluctuation of the tension ripple area may be asymmetrical, and the signs on the left and right sides may be the same.

[0058] This represents the mean of the absolute values ​​of all difference values ​​in the difference sequence, i.e., the fluctuation amplitude. The smaller this value, the more smoothly the effective registration index changes over time, and the more stable its shape.

[0059] This represents the difference in the number of elements in the subsequences on either side of the maximum value (i.e., the difference in the length of the subsequences on both sides, expressed as an absolute value). The smaller this difference, the more evenly the number of frames observed in the region as it enters and leaves the field of view, and it also indirectly reflects the stability of the region's morphology.

[0060] Morphological stability index The physical meaning is: if the temporal fluctuation of the registration accuracy of a suspected uneven coating region is small and the fluctuation trend is symmetrical (first rising and then falling) during cross-frame matching, and the number of observation frames on the left and right sides is similar, then the larger its morphological stability index is, the more likely it is to be a real uneven coating region; conversely, if the fluctuation is violent and asymmetrical, it may be tension ripple interference.

[0061] S104. Calculate the multispectral stability index based on the temporal fluctuation amplitude and directional consistency of the reflectance of each pixel in each multispectral band.

[0062] In this embodiment, the multispectral stability index is calculated based on the temporal fluctuation amplitude and directional consistency of the reflectance of each pixel in each multispectral band in the multispectral image. Specifically, this includes: For each pixel in any multispectral image, obtain its reflectance in each multispectral band in two adjacent frames; Calculate the change in reflectance from the previous frame to the current frame for each band, take the absolute value of the change as the fluctuation amplitude of the band, and take the sign of the change as the fluctuation direction of the band. Count the number of bands with the same wave direction in all bands, and take the number of bands corresponding to the direction with the largest number of bands as the number of bands in the same direction; Calculate the mean amplitude of fluctuations across all bands; The multispectral stability index of a pixel is obtained by dividing the number of bands in the same direction by the product of the average fluctuation amplitude and the total number of bands.

[0063] For example, after completing the cross-frame registration and morphological stability index calculation of the transmissive image, this embodiment further utilizes information from the multispectral image. Since the real coating unevenness region represents a change in the chemical properties of the coating, its reflectance characteristics in different spectral bands remain stable over time; while the tension ripple region only exhibits surface deformation, and its light scattering effect produces irregular reflectance fluctuations with paper movement and changes in the detection angle. Therefore, by analyzing the consistency of the fluctuation amplitude and direction of the reflectance of each pixel in each band between adjacent frames, a multispectral stability index can be constructed to help distinguish between real coating unevenness and tension ripple interference.

[0064] For any pixel in a multispectral image (e.g., located in a suspected area of ​​uneven coating), Internal pixels ), which is in two adjacent frames (such as the first) Frame and the Multispectral stability index between frames The calculation process is as follows: Assume the multispectral camera collects data. Each band has a characteristic band (e.g., 4 to 10 bands). The reflectance of the pixel in the previous frame and the reflectance in the current frame are obtained. The change in reflectance is calculated, where the change in reflectance is the absolute value of the difference between the reflectance in the previous frame and the reflectance in the current frame.

[0065] The amplitude of the wave band is the change, and the direction of the wave band is the same as the sign (positive, negative, or zero) of the change.

[0066] Classify the signs of the wave direction across all bands: bands with positive wave direction are grouped into one subset, and bands with negative wave direction are grouped into another subset (bands with zero wave direction can be ignored or grouped into the smaller subset). Compare the number of elements in the two subsets and take the larger value as the number of bands in the same direction. Bands in the same direction reflect the overall consistency of the reflectance change of the pixel across different bands. A larger number of bands in the same direction indicates that the reflectance of most bands changes in the same direction (increasing or decreasing together), which is usually a stable characteristic of unevenly coated regions; while in tension texture regions, due to the randomness of surface scattering, the wave direction of each band may be chaotic, resulting in a smaller number of bands in the same direction.

[0067] Calculate the average of the fluctuation amplitudes across all bands. This average reflects the overall drastic change in the multispectral reflectance of the pixel. The smaller the average fluctuation amplitude, the more stable the reflectance is over time.

[0068] Based on the above parameters, pixel points Multispectral stability index The calculation formula is:

[0069] in, This indicates the number of wavebands in the same direction, reflecting the consistency of the wave direction. This represents the average amplitude of fluctuations, reflecting the severity of the fluctuations. This represents the total number of bands and is used for normalization.

[0070] Multispectral stability index The physical meaning is that if the reflectivity of a pixel changes little over time in each wavelength band ( Small), and the direction of fluctuation in most bands is consistent ( If the value is large, then its multispectral stability index is large. A larger value indicates that the spectral characteristics at that point are stable, which is more consistent with the characteristics of actual coating unevenness. Conversely, if the fluctuation amplitude is large or the direction is chaotic, the multispectral stability index is small, which may be due to tension ripple interference.

[0071] For each suspected area of ​​uneven coating It can calculate the mean of the multispectral stability index of all pixels within it. This serves as a characterization of the spectral stability of the region and is used for subsequent calculation of the true coating index.

[0072] S105. Combining the morphological stability index and the multispectral stability index, calculate the true coating index of each suspected uneven coating area.

[0073] In this embodiment, the morphological stability index and the multispectral stability index are combined to calculate the true coating index of each suspected uneven coating area, specifically including: Obtain the morphological stability index of each suspected uneven coating region, and the mean of the multispectral stability index of all pixels in that region; The number of times the multispectral envelope peak and valley values ​​of the suspected uneven coating region are inconsistent with each other in the adjacent frame matching process is obtained. Multiply the morphological stability index by the mean of the multispectral stability index, and then divide by the number of inconsistencies to obtain the initial true coating index of the suspected uneven coating region. The initial true coating index of all suspected uneven coating areas is normalized, and the normalization result is used as the true coating index of each suspected uneven coating area.

[0074] For example, in obtaining each suspected uneven coating area morphological stability index and the average multispectral stability index of pixels within the region Next, the stability of the peak and valley values ​​of the multispectral envelope in this region over time needs to be considered. The multispectral envelope (the curve formed by connecting the reflectance of each band) of the real uneven coating region should maintain consistent peak and valley positions between different frames; while the tension ripple region may show peak and valley shifts or deformations.

[0075] remember This is the suspected area of ​​uneven coating. During the matching process between adjacent frames, the number of times the peak and valley values ​​of the multispectral envelope correspond to inconsistent bands (i.e., the number of times the reflectance of a certain band in the previous frame is a local maximum or minimum, but the same band is no longer an extreme point in the next frame). The smaller this number is, the more stable the spectral morphology is.

[0076] True Coating Index The calculation formula is:

[0077] in, It represents the morphological stability index, reflecting the cross-frame stability of the region's geometry. Indicates areas suspected of uneven coating. The mean value of the multispectral stability index of the inner pixel reflects the temporal stability of spectral reflectance.

[0078] Obtain the initial true coating index for all suspected uneven coating areas. Then, Min-Max normalization is used to map it to... The range is used to obtain the final true coating index. . The larger the area, the more likely it is to be a true coating unevenness; The smaller the area, the more likely it is to be affected by tension lines.

[0079] S106. Take the pixels in the color image that correspond to the suspected uneven coating area as reference pixels and calculate the color deviation index of each reference pixel.

[0080] In this embodiment, the pixels in the colorimetric image corresponding to the suspected uneven coating area are used as reference pixels, and the color deviation index of each reference pixel is calculated, specifically including: The pixels in the color image that correspond to the locations of each suspected uneven coating area are determined as reference pixels, and the pixels in the color image that do not belong to the suspected uneven coating areas are determined as normal area pixels. Calculate the mean gray value of all pixels in the normal region to obtain the mean gray value of the normal region; For each reference pixel, the absolute value of the difference between the gray value of the reference pixel and the average gray value of the normal area is calculated as the color deviation index of the reference pixel.

[0081] For example, in order to correlate the coating anomalies detected online with the actual color development capability, this embodiment performs thermal response sampling inspection on the same batch of thermal paper. Specifically, samples are extracted after the winding process, and standard full-page thermal excitation is applied to the samples to make them develop color overall. Then, a high-precision scanner is used to acquire the color development image and convert it to grayscale. In this color development image, the grayscale value of each pixel represents the actual color development depth of that location under standard thermal excitation.

[0082] Pixels in the colorimetric image corresponding to the locations of suspected uneven coating areas are defined as reference pixels (i.e., those areas on the sampled specimens that were marked as suspected defects during online inspection). Pixels in the colorimetric image that do not belong to any suspected uneven coating areas are defined as normal region pixels.

[0083] First, calculate the average grayscale value of all pixels in the normal area. This average value represents the standard color development level of this batch of thermal paper under normal coating conditions.

[0084] For any reference pixel Its color deviation index It is defined as the absolute value of the difference between the gray value of this point and the average gray value of the normal area.

[0085] The color deviation index directly reflects the degree of deviation between the actual color of the reference pixel after thermal excitation and the normal color. The greater the deviation, the more serious the coating defect at that location, and the greater the negative impact on color uniformity.

[0086] S107. For the pixel to be tested on the thermal paper currently being tested on the production line, select reference pixels with similar coating characteristics from the reference pixels, and take the weighted average of the color deviation index of the selected reference pixels as the color deviation index of the pixel to be tested.

[0087] In this embodiment, for the pixel to be tested on the thermal paper currently being inspected on the production line, reference pixels with similar coating characteristics are selected from the reference pixels. The color deviation index of the selected reference pixels is weighted and averaged to obtain the color deviation index of the pixel to be tested. Specifically, this includes: Obtain the grayscale value of the pixel to be tested at the corresponding position in each frame of the transmissive image and calculate its mean value, which is used as the transmissive grayscale value of the pixel to be tested. The reflectance of the pixel to be tested in each multispectral band is obtained and arranged in band order to form a multispectral vector; For each reference pixel, obtain the light transmittance gray value and its multispectral vector of that reference pixel; Calculate the absolute value of the difference between the transmitted grayscale value of the pixel to be tested and the reference pixel, and take the reciprocal to obtain the transmitted similarity. Calculate the cosine similarity between the multispectral vectors of the pixel to be tested and the reference pixel; Multiply the light transmission similarity by the cosine similarity to obtain the coating similarity index; All coating similarity indices are normalized, and reference pixels whose normalization results are greater than a preset similarity threshold are marked as reference pixels with similar coating features. Using the normalized coating similarity index as the weight, the color deviation index of the selected reference pixels is weighted and averaged, and the weighted average result is used as the color deviation index of the pixel to be tested.

[0088] For example, for the thermal paper currently being inspected on the production line (i.e., online thermal paper that has not undergone thermal response testing), the color deviation knowledge obtained from the sampling inspection needs to be mapped to each pixel to be tested. Since the coating characteristics are different at different locations, the color deviation index of the reference pixel cannot be directly assigned to all online pixels. Instead, a weighted matching based on the similarity of coating characteristics is required.

[0089] For any pixel to be tested on the production line This point will be continuously captured in multiple frames of transmissive images (from entering the field of view to leaving the field of view). The grayscale values ​​of this point at the corresponding positions in each frame of transmissive images are taken, and their average is calculated as the transmissive grayscale value of the pixel being tested. Simultaneously, the reflectance of the pixel in each multispectral band is obtained and arranged into a vector according to the band order, called the multispectral vector. .

[0090] For each reference pixel (The data is obtained from points in the sampled colorimetric images corresponding to the suspected uneven coating areas), and their transmittance grayscale values ​​are also obtained. and its multispectral vector Pixels to be measured With reference pixel Coating similarity index between It can be calculated as follows:

[0091] in, This represents the cosine similarity between two multispectral vectors, taking the non-negative part. It represents the absolute value of the difference in grayscale between two pixels. Indicates the similarity of light transmission.

[0092] After calculating the coating similarity index for all reference pixels, Min-Max normalization is used to map it to... Within an interval, reference pixels whose normalized results are greater than a preset similarity threshold (e.g., 0.5) are marked as being similar to the pixel to be tested. Reference pixels with similar coating characteristics. The preset similarity threshold can be set to 0.5, selecting only reference points with a coating similarity index higher than the median for weighted averaging, thus avoiding interference from low-similarity noise. Those skilled in the art can adjust this threshold based on the number of samples tested and the distribution of color development deviations.

[0093] With the pixel to be measured With each selected reference pixel Using the normalized coating similarity index as the weight, the color deviation index of these reference pixels is weighted and averaged to obtain the pixel to be tested. Color deviation index .

[0094] S108. For each suspected uneven coating area on the thermal paper currently being inspected on the production line, calculate and output the color uniformity evaluation value based on its true coating index, area, and color deviation index of each pixel.

[0095] In this embodiment, for each suspected uneven coating area on the thermal paper currently being inspected on the production line, a color uniformity evaluation value is calculated and output based on its true coating index, area, and color deviation index of each pixel, specifically including: For each suspected uneven coating area, obtain the number of pixels occupied by the suspected uneven coating area, and calculate the proportion of the number of pixels to the total number of pixels in the thermal paper image, which is used as the area proportion of the suspected uneven coating area. Obtain the true coating index of the suspected uneven coating area; Obtain the color deviation index of all test pixels in the suspected uneven coating area, and calculate the mean and standard deviation of these color deviation indices; The initial color uniformity assessment value of the suspected uneven coating area is obtained by multiplying the area ratio of the suspected uneven coating area, the true coating index, the mean of the color deviation index, and the standard deviation of the color deviation index. The initial color uniformity evaluation values ​​of all suspected uneven coating areas are normalized to obtain the final color uniformity evaluation value of each suspected uneven coating area. Based on the final color uniformity evaluation value, the corresponding suspected uneven coating areas are marked with different colors and output.

[0096] For example, for each suspected area of ​​uneven coating It is necessary to comprehensively consider its true coating index, area ratio, and color deviation index distribution of all test pixels within the area to calculate its color uniformity evaluation value.

[0097] Define areas suspected of uneven coating The number of pixels is The total number of pixels in the entire thermal paper image is (That is, the total number of pixels corresponding to the area of ​​thermal paper that the camera can cover in a single image), then the area ratio is The true coating index for this area is (Normalized to Min-Max) The larger the value in the range, the more likely the area is to be a true coating unevenness rather than tension ripple interference.

[0098] Obtain all pixels to be tested within this area. Color deviation index Calculate its arithmetic mean and standard deviation The mean reflects the overall color deviation of the region, while the standard deviation reflects the unevenness of the color deviation within the region. The more uneven the deviation distribution, the worse the color uniformity.

[0099] The color uniformity evaluation value of this area The calculation formula is:

[0100] in, This indicates the area percentage; the larger the area, the greater the impact on the overall color uniformity. This represents the true coating index. The higher the value, the more it indicates that the area is indeed unevenly coated rather than tension lines, and should be given a higher weight. This represents the mean of the color deviation index within the region, reflecting the average severity of color deviation. It represents the standard deviation of the color deviation index within a region, reflecting the degree of fluctuation of color deviation within the region. The greater the fluctuation, the more drastic the color change within the region and the worse the uniformity.

[0101] All four factors are non-negative, and their product... The larger the value, the more severe the negative impact of the suspected uneven coating area on the overall color uniformity of the thermal paper.

[0102] The calculation results for all suspected uneven coating areas are normalized using Min-Max to obtain the final color uniformity evaluation value. (Value range 0 to 1): according to The size of the area is used to color-code different regions, and their coordinates and corresponding thermal paper numbers are recorded: when When this occurs, the suspected uneven coating area is marked in red, indicating that the color uniformity is seriously substandard and needs to be closely monitored or removed.

[0103] when If the area is marked orange, it indicates that the color uniformity has a moderate deviation, and a re-inspection or downgrade is recommended.

[0104] when When this occurs, the area is marked in yellow, indicating a slight deviation in color uniformity or mainly tension line interference, which can be considered acceptable or simply recorded.

[0105] The output results can be overlaid on the inspection image on the thermal paper, and the coordinates, area, evaluation value and color grade of each defect area can be recorded in the form of a table or log for reference by the production line quality management personnel.

[0106] In summary, in this embodiment of the invention, by constructing an effective registration index time series and analyzing its fluctuation amplitude and symmetry, the morphological stability index of suspected uneven coating areas is quantitatively evaluated. Simultaneously, a multispectral stability index is calculated based on the temporal fluctuation amplitude and directional consistency of multispectral reflectance. The combination of these two methods effectively distinguishes tension ripple interference from actual coating unevenness, avoiding false detections caused by tension ripples. Furthermore, a color deviation index for reference pixels is established using the thermal response sampling results of the same batch, and weighted and mapped to online test pixels through the similarity of transmittance grayscale and multispectral vectors. This achieves accurate correlation between sampling data and online detection. Finally, by comprehensively considering the mean and standard deviation of the actual coating index, area ratio, and color deviation index, a highly reliable color uniformity assessment value is obtained. This method significantly improves the accuracy and robustness of thermal paper color uniformity detection, enables online evaluation of real-time images of the production line, effectively reduces false alarm and false negative rates, and provides a reliable technical means for quality control in thermal paper production.

[0107] This invention also proposes a thermal paper color uniformity detection system based on image processing; please refer to [link / reference]. Figure 2 The diagram shows a structural diagram of a thermal paper color uniformity detection system based on image processing according to an embodiment of the present invention. The system includes: a data acquisition module 101, a data processing module 102, and a uniformity evaluation module 103.

[0108] The data acquisition module 101 is used to acquire continuous light transmission images and multispectral images of thermal paper, as well as color development images collected after thermal response sampling inspection of the same batch of thermal paper. The data processing module 102 is used to extract suspected uneven coating regions from the light-transmitting image, calculate the registration index between suspected uneven coating regions in adjacent frames, and perform cross-frame matching of suspected uneven coating regions in adjacent frames based on the registration index. The effective registration index is determined based on the registration index and the distance between feature point pairs. The effective registration index time sequence of each suspected uneven coating region in at least three consecutive frames of matching is obtained. The morphological stability index is calculated based on the amplitude and symmetry of its temporal fluctuation. The multispectral stability index is calculated based on the temporal fluctuation amplitude and directional consistency of the reflectance of each pixel in each multispectral band. The true coating index of each suspected uneven coating area was calculated by combining the morphological stability index and the multispectral stability index. The pixels in the color image corresponding to the suspected uneven coating area are used as reference pixels, and the color deviation index of each reference pixel is calculated. For the pixel to be tested on the thermal paper currently being tested on the production line, reference pixels with similar coating characteristics are selected from the reference pixels. The color deviation index of the selected reference pixels is weighted and averaged to be the color deviation index of the pixel to be tested. The uniformity evaluation module 103 is used to calculate and output the color uniformity evaluation value for each suspected uneven coating area on the thermal paper currently being inspected on the production line, based on its true coating index, area, and color deviation index of each pixel.

[0109] It should be noted that the system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the thermal paper color uniformity detection system based on image processing and the thermal paper color uniformity detection method based on image processing provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0110] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0111] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting the color uniformity of thermal paper based on image processing, characterized in that, include: Acquire continuous light transmission images and multispectral images of thermal paper, as well as color development images collected after thermal response sampling inspection of the same batch of thermal paper; Extract suspected uneven coating regions from the light-transmitting image, calculate the registration index between suspected uneven coating regions in adjacent frames, and perform cross-frame matching of suspected uneven coating regions in adjacent frames based on the registration index. The effective registration index is determined based on the registration index and the distance between feature point pairs. The effective registration index time sequence of each suspected uneven coating region in at least three consecutive frames of matching is obtained. The morphological stability index is calculated based on the amplitude and symmetry of its temporal fluctuation. The multispectral stability index is calculated based on the temporal fluctuation amplitude and directional consistency of the reflectance of each pixel in each multispectral band. The true coating index of each suspected uneven coating area was calculated by combining the morphological stability index and the multispectral stability index. The pixels in the color image corresponding to the suspected uneven coating area are used as reference pixels, and the color deviation index of each reference pixel is calculated. For the pixel to be tested on the thermal paper currently being tested on the production line, reference pixels with similar coating characteristics are selected from the reference pixels. The color deviation index of the selected reference pixels is weighted and averaged to be the color deviation index of the pixel to be tested. For each suspected uneven coating area on the thermal paper currently being inspected on the production line, calculate and output the color uniformity evaluation value based on its true coating index, area, and color deviation index of each pixel.

2. The method for detecting the color uniformity of thermal paper based on image processing according to claim 1, characterized in that, The step of extracting suspected uneven coating regions from the translucent image and calculating the registration index between suspected uneven coating regions in adjacent frames specifically includes: For any single frame of transmitted image, perform grayscale conversion, edge detection, and morphological closing operation processing, and mark the obtained closed regions as suspected uneven coating regions. Multiply the absolute value of the difference between the mean gray value of the suspected uneven coating area and the mean gray value of the single-frame transparent image, the standard deviation of the gray value of the suspected uneven coating area, and the mean gradient amplitude of the edge pixels of the suspected uneven coating area, and then divide by the mean gradient amplitude of the single-frame transparent image to obtain the coating quality abnormality index of the suspected uneven coating area. For two suspected uneven coating regions in two adjacent frames, the area of ​​the overlapping region of the two suspected uneven coating regions is multiplied by the non-negative value of the cosine similarity between the direction of the line connecting the center points of the two suspected uneven coating regions and the direction of thermal paper transport. Then, the result is divided by the absolute value of the difference in the coating quality anomaly index of the two suspected uneven coating regions to obtain the registration index between the two suspected uneven coating regions.

3. The method for detecting the color uniformity of thermal paper based on image processing according to claim 1, characterized in that, The cross-frame matching of suspected uneven coating regions in adjacent frames based on the registration index specifically includes: For any suspected uneven coating region in the current frame, calculate its registration index with all suspected uneven coating regions in the previous frame. All registration indices are normalized, and regions whose normalization results are greater than a preset matching threshold are marked as candidate matching regions. Establish a matching relationship between the suspected uneven coating area and the candidate matching area with the largest registration index in the previous frame; For any pair of suspected uneven coating regions that establish a matching relationship in two adjacent frames, extract the points with curvature greater than a preset curvature threshold from the edge pixels of these two suspected uneven coating regions as candidate edge points. Calculate the mean curvature, curvature difference, cosine similarity between the cross-frame movement direction and the movement direction of the center points of the two regions, as well as the number of candidate matching regions and the mean registration index of the two suspected uneven coating regions. Multiply the mean curvature, cosine similarity, and mean registration index, and then divide by the product of the absolute value of curvature difference and the number of candidate matching regions to obtain the matching probability index of the pair of candidate edge points. Normalize the matching probability index of all candidate edge point pairs, mark the candidate edge points whose normalization result is greater than the preset feature point threshold as valid matching point pairs, and take the valid matching point pairs with the highest matching probability index as feature point pairs. The transformation matrix is ​​obtained based on feature point pairs, and then the transformation matrix is ​​used to register adjacent frame images.

4. The method for detecting the color uniformity of thermal paper based on image processing according to claim 1, characterized in that, The determination of the effective registration index based on the registration index and the distance between feature point pairs specifically includes: For any pair of suspected uneven coating regions that establish a matching relationship in two adjacent frames, obtain the registration index of the pair of suspected uneven coating regions, and obtain the mean of the Euclidean distance between the feature point pairs in the pair of suspected uneven coating regions. Divide the registration index by the mean of the Euclidean distance to obtain the effective registration index for the pair of suspected unevenly coated areas.

5. The method for detecting the color uniformity of thermal paper based on image processing according to claim 1, characterized in that, The step of obtaining the effective registration index time sequence of each suspected uneven coating region in at least three consecutive frames of matching, and calculating the morphological stability index based on the amplitude and symmetry of its temporal fluctuations, specifically includes: For each suspected uneven coating region, the effective registration index is obtained in frame order during at least three consecutive frame matching processes, forming a temporal sequence of effective registration indexes. Determine the maximum value in the time series of the effective registration index and obtain the position of the maximum value; Perform a first-order difference operation on the effective registration index time series to obtain the difference series; Calculate the absolute value of each difference value in the difference sequence and use its mean as the fluctuation amplitude. Using the position of the maximum value as the boundary, the effective registration index time series is divided into a left subsequence and a right subsequence. The positive and negative sign distribution of the difference values ​​in the left and right subsequences is statistically analyzed, and the difference in length between the left and right subsequences is calculated. Determine whether the sign of the most frequent difference value in the left subsequence is opposite to the sign of the most frequent difference value in the right subsequence. If they are opposite, set the sign opposite index to 1; otherwise, set it to 0. The intermediate index is obtained by taking the reciprocal of the product of the fluctuation amplitude and the difference in length between the left and right subsequences. Adding the inverse sign index to the intermediate index yields the morphological stability index of the suspected unevenly coated region.

6. The method for detecting the color uniformity of thermal paper based on image processing according to claim 1, characterized in that, The calculation of the multispectral stability index based on the temporal fluctuation amplitude and directional consistency of the reflectance of each pixel in each multispectral band in the multispectral image specifically includes: For each pixel in any multispectral image, obtain its reflectance in each multispectral band in two adjacent frames; Calculate the change in reflectance from the previous frame to the current frame for each band, take the absolute value of the change as the fluctuation amplitude of the band, and take the sign of the change as the fluctuation direction of the band. Count the number of bands with the same wave direction in all bands, and take the number of bands corresponding to the direction with the largest number of bands as the number of bands in the same direction; Calculate the mean amplitude of fluctuations across all bands; The multispectral stability index of a pixel is obtained by dividing the number of bands in the same direction by the product of the average fluctuation amplitude and the total number of bands.

7. The method for detecting the color uniformity of thermal paper based on image processing according to claim 1, characterized in that, The step of using the pixels in the colorimetric image corresponding to the suspected uneven coating area as reference pixels and calculating the color deviation index of each reference pixel specifically includes: The pixels in the color image that correspond to the locations of each suspected uneven coating area are determined as reference pixels, and the pixels in the color image that do not belong to the suspected uneven coating areas are determined as normal area pixels. Calculate the mean gray value of all pixels in the normal region to obtain the mean gray value of the normal region; For each reference pixel, the absolute value of the difference between the gray value of the reference pixel and the average gray value of the normal area is calculated as the color deviation index of the reference pixel.

8. The method for detecting the color uniformity of thermal paper based on image processing according to claim 1, characterized in that, For the pixel to be tested on the thermal paper currently being inspected on the production line, reference pixels with similar coating characteristics are selected from the reference pixels. The color deviation index of the selected reference pixels is weighted and averaged to obtain the color deviation index of the pixel to be tested. Specifically, this includes: Obtain the grayscale value of the pixel to be tested at the corresponding position in each frame of the transmissive image and calculate its mean value, which is used as the transmissive grayscale value of the pixel to be tested. The reflectance of the pixel to be tested in each multispectral band is obtained and arranged in band order to form a multispectral vector; For each reference pixel, obtain the light transmittance gray value and its multispectral vector of that reference pixel; Calculate the absolute value of the difference between the transmitted grayscale value of the pixel to be tested and the reference pixel, and take the reciprocal to obtain the transmitted similarity. Calculate the cosine similarity between the multispectral vectors of the pixel to be tested and the reference pixel; Multiply the light transmission similarity by the cosine similarity to obtain the coating similarity index; All coating similarity indices are normalized, and reference pixels whose normalization results are greater than a preset similarity threshold are marked as reference pixels with similar coating features. Using the normalized coating similarity index as the weight, the color deviation index of the selected reference pixels is weighted and averaged, and the weighted average result is used as the color deviation index of the pixel to be tested.

9. The method for detecting the color uniformity of thermal paper based on image processing according to claim 1, characterized in that, For each suspected uneven coating area on the thermal paper currently being inspected on the production line, a color uniformity evaluation value is calculated and output based on its true coating index, area, and color deviation index of each pixel within it. Specifically, this includes: For each suspected uneven coating area, obtain the number of pixels occupied by the suspected uneven coating area, and calculate the proportion of the number of pixels to the total number of pixels in the thermal paper image, which is used as the area proportion of the suspected uneven coating area. Obtain the true coating index of the suspected uneven coating area; Obtain the color deviation index of all test pixels in the suspected uneven coating area, and calculate the mean and standard deviation of these color deviation indices; The initial color uniformity assessment value of the suspected uneven coating area is obtained by multiplying the area ratio of the suspected uneven coating area, the true coating index, the mean of the color deviation index, and the standard deviation of the color deviation index. The initial color uniformity evaluation values ​​of all suspected uneven coating areas are normalized to obtain the final color uniformity evaluation value of each suspected uneven coating area. Based on the final color uniformity evaluation value, the corresponding suspected uneven coating areas are marked with different colors and output.

10. A thermal paper color uniformity detection system based on image processing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the image processing-based thermal paper color uniformity detection method as described in any one of claims 1-9.