Thermal-sensitive paper rolling alignment detection method and system based on image and sensor fusion

Through image processing and sensor data fusion, the actual thickness and width of thermal paper rolling are obtained, and the problem of inaccurate detection results in the prior art is solved, and the judgment of excessive or too small tension is achieved, which improves detection accuracy.

CN120288559AActive Publication Date: 2025-07-11SUZHOU GUANWEI THERMAL PAPER CO LTD

Patent Information

Application Number
CN202510767269.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-07-11
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

In the prior art, the test results of thermal paper incomplete winding are not accurate enough, and the reasons for excessive tension or too small cannot be judged, resulting in insufficient detection results.

Method used

Image processing technology to obtain the actual thickness and width of the thermal paper rolling, combine the speed sensor and angular velocity sensor data to calculate the predicted thickness and width, determine whether the actual thickness and width are abnormal, and then determine whether the tension is too large or too small.

Benefits of technology

It realizes accurate detection of uneven winding of thermal paper, can judge the reasons for excessive or too small tension, improves the accuracy of detection results, eliminates the influence of noise, and improves the accuracy of obtaining actual width and thickness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120288559A_ABST
    Figure CN120288559A_ABST
Patent Text Reader

Abstract

The invention discloses a thermo-sensitive paper rolling alignment detection method and system based on image and sensor fusion, and relates to the technical field of rolling alignment detection, and the method comprises the following steps: carrying out graying and binarization processing on a thermo-sensitive paper rolling image to obtain a rolling binary image; performing contour extraction on the rolled binary image to obtain a rolled contour image; obtaining the thickness and the width of the rolled thermo-sensitive paper based on the rolling profile diagram, and respectively marking the thickness and the width as actual thickness and actual width; based on data of the speed sensor and the angular velocity sensor, calculating to obtain the thickness of the thermal-sensitive paper which is predicted to be rolled, and marking the thickness as predicted thickness; marking the width of the thermo-sensitive paper as a predicted width; judging whether the actual thickness and the actual width are abnormal or not based on the predicted thickness and the predicted width; the method is used for solving the problem that in an existing winding alignment detection technology, only whether winding alignment exists or not is judged, and the alignment reason cannot be judged, so that the detection result is not accurate enough.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of winding alignment detection, and specifically to a method and system for detecting the winding alignment of thermal paper based on the fusion of images and sensors. Background Art

[0002] After the production of thermal paper, it is necessary to wind the thermal paper on a reel. Winding the thermal paper not only saves space but also facilitates transportation. However, during the winding process, the winding may not be aligned, which may cause damage to the thermal paper during transportation. Therefore, it is necessary to detect whether the winding of the thermal paper is aligned; The main reason for the uneven winding of thermal paper is that the control of the tension size is inaccurate. If the motor power of the reel remains unchanged, as the thickness of the wound thermal paper varies, that is, the force arm increases, the tension will change. When the tension is too large, the thermal paper roll will form a large contraction force due to the residual tension of each layer of paper, leaving a transverse indentation on the paper surface, resulting in uneven winding; when the tension is too small, the thermal paper roll will become loose, and there will be gaps between each layer of paper, resulting in the overall non-compactness of the rolled material and uneven winding; therefore, when detecting the uneven winding of thermal paper, it is necessary to determine whether it is caused by too large or too small tension, so as to conveniently and quickly adjust the equipment to align the thermal paper. For example, in the patent application with the application publication number CN114882036A, a method for detecting abnormal winding of a fiber fabric winding device is disclosed. The winding abnormality in this solution may also be caused by uneven tension. In the existing winding alignment detection technology, only whether the winding is aligned is judged, and the reason for the alignment cannot be judged, resulting in inaccurate detection results. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems in the prior art to some extent. By graying, binarizing, and contour extracting the thermal paper winding image to obtain a winding contour image, obtaining the actual thickness and actual width based on the winding contour image, calculating the predicted thickness based on the data of the speed sensor and the angular velocity sensor, marking the width of the thermal paper as the predicted width, and judging whether the actual thickness and actual width are abnormal based on the predicted thickness and the predicted width, so as to solve the problem that in the existing winding alignment detection technology, only whether the winding is aligned is judged, and the reason for the alignment cannot be judged, resulting in inaccurate detection results.

[0004] To achieve the above object, in a first aspect, the present application provides a method for detecting the winding alignment of thermal paper based on the fusion of images and sensors, including the following steps: Obtain the thermal paper image wound on the reel and mark it as the thermal paper winding image; Perform graying and binarization processing on the thermal paper winding image to obtain a winding binarized image; perform contour extraction on the winding binarized image to obtain a winding contour image; Obtain the thickness and width of the thermal paper during winding based on the winding contour diagram, and mark them as the actual thickness and actual width respectively; Calculate the predicted thickness of the thermal paper during winding based on the data from the speed sensor and the angular velocity sensor, and mark it as the predicted thickness; mark the width of the thermal paper as the predicted width; Judge whether the actual thickness and actual width are abnormal based on the predicted thickness and predicted width.

[0005] Furthermore, the steps for graying and binarizing the thermal paper winding diagram to obtain the winding binarized diagram include the following sub-steps: Obtain the RGB value of each pixel in the thermal paper winding diagram, and mark it as the winding RGB value; Convert the winding RGB value to the winding gray value using the gray conversion formula; Replace the winding RGB value of each pixel in the thermal paper winding diagram with the winding gray value to obtain the winding gray diagram.

[0006] Furthermore, the steps for graying and binarizing the thermal paper winding diagram to obtain the winding binarized diagram also include the following sub-steps: Divide the winding gray value from 0 to 255 into h ranges on average, and mark them as interval ranges; Count the frequency of the winding gray value in each interval range respectively, and mark it as the range frequency; Draw a histogram with the winding gray value as the X-axis and the range frequency as the Y-axis, and mark it as the winding gray histogram; Calculate the difference between the range frequencies of adjacent interval ranges, and mark it as the adjacent difference. The calculation formula is: Xc i =F i -F i+1 ; where Xc i is the adjacent difference, F i is the frequency of the i-th detected gray interval, F i+1 is the frequency of the (i + 1)-th detected gray interval, where i is an integer from 1 to h, and the value of i represents the size of the interval range corresponding to the range frequency; If Xc i is less than 0 and Xc i+1 is greater than 0, mark the interval range corresponding to F i in Xc i+1 as the peak range; obtain all the peak ranges; Obtain the minimum value of each peak interval, and mark it as the peak value; Mark the peak range with the smallest peak value as the first peak range; Mark the peak range with the largest peak value as the second peak range; Mark the interval range between the first peak range and the second peak range as the intermediate interval range; Obtain the intermediate interval range with the smallest range frequency, and mark it as the threshold range; Obtain the median value of the threshold range, and mark it as the segmentation threshold; In the winding grayscale image, set all winding grayscale values greater than the segmentation threshold to 0, and set all winding grayscale values smaller than the segmentation threshold to 255 to obtain the winding binary image.

[0007] Furthermore, obtaining the winding contour image by performing contour extraction on the winding binary image further includes the following sub-steps: Obtain the pixel points with a grayscale value of 0 in the winding binary image, and mark them as initial pixel points. Establish a c*c neighborhood centered on the initial pixel points, and mark it as the adjacent neighborhood; Obtain the number of pixel points with a grayscale value of 0 in the adjacent neighborhood, and mark it as the neighborhood number; Set the boundary pixel point threshold according to the size of the adjacent neighborhood; If the neighborhood number is less than the boundary pixel point threshold, set the grayscale value of the initial pixel point to 255; Mark the pixel points with a grayscale value of 0 and adjacent to the pixel points with a grayscale value of 255 as edge pixel points; In the winding binary image, set the grayscale values of all boundary pixel points to 0, and set the grayscale values of the non-boundary pixel points to 255 to obtain the winding contour image.

[0008] Furthermore, obtaining the thermal paper thickness and width of the winding based on the winding contour image, and respectively marking them as the actual thickness and the actual width includes the following sub-steps: Establish a plane rectangular coordinate system, and mark it as the winding coordinate system; Place the winding contour image in the first quadrant of the winding coordinate system, so that the lower left corner point of the winding contour image coincides with the origin of the winding coordinate system, and the wide side and the long side of the winding contour image coincide with the Y-axis and the X-axis of the winding coordinate system respectively; Divide the winding contour image into N regions with equal vertical coordinate intervals by a line parallel to the X-axis, and mark them as horizontal strip regions. Set the length of the horizontal strip region to the length of the winding contour image, and set the width of the horizontal strip region to Kh; Obtain the maximum and minimum values of the abscissa of the edge pixels with 0 in each horizontal strip region, and mark them as the horizontal maximum value and the horizontal minimum value respectively; Calculate the difference between the horizontal maximum value and the horizontal minimum value of all horizontal strip regions, and mark it as the horizontal difference; Use the screening mean method to obtain the actual mean value of all horizontal differences, and mark it as the actual width.

[0009] Furthermore, the screening mean method includes: Obtain the range of the horizontal difference, divide the range of the horizontal difference into d equal ranges, and label them as horizontal segmentation ranges; Count the frequency of each horizontal segmentation range, and label it as the horizontal segmentation frequency; Establish a histogram with the horizontal difference as the X-axis and the horizontal segmentation frequency as the Y-axis, and label it as the horizontal difference histogram; In the horizontal difference histogram, the horizontal segmentation frequencies of the left and right horizontal segmentation ranges are respectively labeled as the left horizontal starting frequency and the right horizontal starting frequency. Starting from the left horizontal starting frequency in the horizontal difference histogram, continuously judge to the right whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold. If it is less, delete the horizontal segmentation frequency in the histogram. If it is greater, stop the judgment; Starting from the right horizontal starting frequency in the horizontal difference histogram, continuously judge to the left whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold. If it is less, delete the horizontal segmentation frequency in the histogram. If it is greater, stop the judgment; Obtain the remaining horizontal differences of the horizontal difference histogram, and label them as the screened horizontal differences; Calculate the mean value of the screened horizontal differences, and label it as the actual mean value.

[0010] Furthermore, obtaining the thickness and width of the thermal paper during winding based on the winding contour diagram, respectively labeled as the actual thickness and the actual width, also includes the following sub-steps: Divide the winding contour diagram into M regions with equal horizontal coordinate intervals by a line parallel to the Y-axis, label them as vertical strip regions, set the length of the vertical strip regions as the width of the winding contour diagram, and set the width of the vertical strip regions as Kc; Obtain the maximum and minimum values of the ordinates where the edge pixels of each vertical strip region are 0, and label them as the vertical maximum value and the vertical minimum value respectively; Calculate the difference between the vertical maximum value and the vertical minimum value of all vertical strip regions, and label it as the vertical difference; Use the screened mean method to obtain the actual mean value of all vertical differences, and label it as the actual thickness.

[0011] Furthermore, calculating the predicted thickness of the thermal paper during winding based on the data of the speed sensor and the angular velocity sensor, labeled as the predicted thickness, includes the following sub-steps: Use the speed sensor to obtain the conveying speed of the thermal paper during winding, and label it as the linear speed; Use the angular velocity sensor to obtain the angular velocity of the reel, and label it as the rotational angular velocity; Obtain the predicted thickness, and the calculation formula is: Dy = Dg + 2 * v / w; Where Dy is the predicted thickness, Dg is the diameter of the reel, v is the linear speed, and w is the rotational angular velocity.

[0012] Furthermore, judging whether the actual thickness and the actual width are abnormal based on the predicted thickness and the predicted width includes the following steps: Calculate the absolute value of the difference between the predicted width and the actual width, and mark it as the actual width difference; Judge whether the actual width difference is greater than the width change threshold. If it is greater than or equal to, the thermal paper winding is not aligned. If it is less than, the thermal paper winding is aligned; Calculate the absolute value of the difference between the predicted thickness and the actual thickness, and mark it as the actual thickness difference; Judge whether the actual thickness difference is greater than the thickness change threshold. If it is greater than or equal to and the actual thickness is greater than the predicted thickness, the tension is too small. If it is greater than and the actual thickness is less than the predicted thickness, the tension is too large. If it is less than, the tension is normal.

[0013] In a second aspect, the present application also provides a thermal paper winding alignment detection system based on the fusion of images and sensors, including: an image acquisition module, an image processing module, an actual data acquisition module, a predicted data acquisition module, and an anomaly judgment module; The image acquisition module is used to acquire the thermal paper image wound on the reel, and mark it as the thermal paper winding image; The image processing module is used to perform grayscale and binarization processing on the thermal paper winding image to obtain a wound binary image; perform contour extraction on the wound binary image to obtain a wound contour image; The actual data acquisition module is used to obtain the thickness and width of the wound thermal paper based on the wound contour image, and mark them as the actual thickness and the actual width respectively; The predicted data acquisition module is used to calculate the predicted thickness of the wound thermal paper based on the data of the speed sensor and the angular velocity sensor, and mark it as the predicted thickness; mark the width of the thermal paper as the predicted width; The anomaly judgment module is used to judge whether the actual thickness and the actual width are abnormal based on the predicted thickness and the predicted width.

[0014] Advantages of the present invention: By performing grayscale, binarization processing, and contour extraction on the thermal paper winding image to obtain a wound contour image, obtaining the actual thickness and the actual width based on the wound contour image, calculating the predicted thickness based on the data of the speed sensor and the angular velocity sensor, marking the width of the thermal paper as the predicted width, and judging whether the actual thickness and the actual width are abnormal based on the predicted thickness and the predicted width, the advantages are that not only can the non-alignment of the winding be detected, but also it can be judged whether the tension is too large or too small. Excessive or too small tension will also cause non-alignment of the winding. Therefore, it can not only judge whether the non-alignment is caused by excessive or too small tension, but also prevent the non-alignment of the winding caused by tension, improving the accuracy of the detection result; The present invention sets a screening mean method, and the advantage is that it can exclude the inaccuracy of the actual width and the actual thickness caused by abnormal noise pixels, improve the accuracy of obtaining the actual width and the actual thickness, and improve the accuracy of the subsequent detection result. Brief Description of the Drawings

[0015] Figure 1 is a schematic block diagram of the system of the present invention; Figure 2 is a schematic diagram of the winding grayscale histogram of the present invention; Figure 3 is a schematic diagram of the horizontal long strip area division of the present invention; Figure 4 is a schematic diagram of the vertical long strip area division of the present invention; Figure 5 is a schematic diagram of the horizontal difference histogram of the present invention; Figure 6 is a flowchart of the steps of the method of the present invention. Detailed Embodiments

[0016] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0017] Embodiment 1, please refer to Figure 1 As shown, the present application provides a thermal paper winding alignment detection system based on image and sensor fusion, including an image acquisition module, an image processing module, an actual data acquisition module, a predicted data acquisition module, and an anomaly judgment module; The image acquisition module is used to acquire the thermal paper image wound on the reel, marked as the thermal paper winding image; the acquired thermal paper winding image is the thermal paper image on the front side wound on the reel; The image processing module is used to perform grayscale and binarization processing on the thermal paper winding image to obtain a wound binarized image; perform contour extraction on the wound binarized image to obtain a wound contour image; The image processing module is configured with a grayscale processing strategy, and the grayscale processing strategy includes: Obtain the RGB value of each pixel point in the thermal paper winding image, marked as the winding RGB value; Convert the winding RGB value into a winding grayscale value by using a grayscale conversion formula; there are various grayscale conversion formulas. Since the thermal paper is white, the weighted average method can be used here to convert the winding RGB value into a winding grayscale value; Replace the winding RGB value of each pixel point in the thermal paper winding image with the winding grayscale value to obtain a winding grayscale image.

[0018] The image processing module is configured with a binarization strategy, and the binarization strategy includes: The rewinding gray value from 0 to 255 is evenly divided into h ranges, marked as interval ranges; here, the size of h is set so that the subsequent rewinding gray histogram can show a bimodal distribution, which is convenient for finding the threshold of the thermal paper gray value; Count the frequency of the rewinding gray value in each interval range respectively, marked as range frequency; Draw a histogram with the rewinding gray value as the X-axis and the range frequency as the Y-axis, marked as the rewinding gray histogram; Calculate the difference between the range frequencies of adjacent interval ranges, marked as adjacent difference, and the calculation formula is: Xc i =F i -F i+1 ; where Xc i is the adjacent difference, F i is the frequency of the i-th detected gray interval, F i+1 is the frequency of the (i + 1)-th detected gray interval, where i is an integer from 1 to h, and the size of i represents the size of the interval range corresponding to the range frequency; If Xc i is less than 0 and Xc i+1 is greater than 0, mark the interval range corresponding to F i in Xc i+1 as the peak range; obtain all peak ranges; Obtain the minimum value of each peak interval, marked as the peak value; Mark the peak range with the smallest peak value as the first peak range; Mark the peak range with the largest peak value as the second peak range; Mark the interval range between the first peak range and the second peak range as the middle interval range; Obtain the middle interval range with the smallest range frequency, marked as the threshold range; Obtain the middle value of the threshold range, marked as the segmentation threshold; In the rewinding gray image, set all rewinding gray values greater than the segmentation threshold to 0, and set all rewinding gray values smaller than the segmentation threshold to 255 to obtain the rewinding binary image; Mark all pixel points with a gray value of 0 in the rewinding binary image as the rewinding contour; In practical applications, please refer to Figure 2As shown, the rewinding gray values from 0 to 255 are evenly divided into 8 interval ranges. The first peak range is (63, 95), and the second peak range is (191, 223). The middle interval range with the smallest range frequency is (127, 159), that is, the threshold range is (127, 159). The middle value of the threshold range is 143, that is, the segmentation threshold is 143. In the rewinding gray-scale image, all rewinding gray values greater than 143 are set to 0, and all rewinding gray values less than or equal to 143 are set to 255 to obtain the rewinding binary image.

[0019] The actual data acquisition module is used to obtain the thickness and width of the thermal paper of the rewinding based on the rewinding contour map, which are respectively marked as the actual thickness and the actual width. The actual data acquisition module is configured with an actual width acquisition strategy, and the actual width acquisition strategy includes: Establish a plane rectangular coordinate system, marked as the rewinding coordinate system. Place the rewinding contour map in the first quadrant of the rewinding coordinate system, so that the lower left corner point of the rewinding contour map coincides with the origin of the rewinding coordinate system, and the wide side and the long side of the rewinding contour map coincide with the Y-axis and the X-axis of the rewinding coordinate system respectively. Since the rewinding contour map and the image obtained by the original camera have the same size, and most of the pixel points in the image are set to 255, the lower left corner and the sides of the rewinding contour map can be used as reference points. Divide the rewinding contour map into N regions with equal vertical intervals by a line parallel to the X-axis, marked as horizontal strip regions. Set the length of the horizontal strip region to the length of the rewinding contour map, and set the width of the horizontal strip region to Kh. Dividing the horizontal strip regions is for better analysis of the width of the thermal paper rewinding. If there is a deviation in the rewinding, due to the rotation during rewinding, the uneven contour range is larger and more obvious. For the sake of saving calculation and comparison, the horizontal strip regions can be divided. Obtain the maximum and minimum values of the abscissa of the edge pixels with 0 in each horizontal strip region, which are respectively marked as the horizontal maximum value and the horizontal minimum value. Calculate the difference between the horizontal maximum value and the horizontal minimum value of all horizontal strip regions, marked as the horizontal difference. Use the screening mean method to obtain the actual mean value of all horizontal differences, marked as the actual width. In practical applications, please refer to Figure 3 As shown, divide the rewinding contour map into 10 horizontal strip regions by a line parallel to the X-axis. Set the length of the horizontal strip region to the length of the rewinding contour map, and set the width of the horizontal strip region to 2 cm. Calculate the horizontal difference. Taking one horizontal strip region as an example, the horizontal maximum value and the horizontal minimum value are 65 cm and 15 cm respectively, then the horizontal difference is 50 cm. Use the screening mean method to obtain the actual width of 50.2 cm.

[0020] The screening mean method includes: Obtain the range of the horizontal difference, divide the range of the horizontal difference into d equal ranges, and label them as horizontal segmentation ranges; Count the frequency of each horizontal segmentation range, and label it as the horizontal segmentation frequency; Establish a histogram with the horizontal difference as the X-axis and the horizontal segmentation frequency as the Y-axis, and label it as the horizontal difference histogram; In the horizontal difference histogram, the horizontal segmentation frequencies of the left and right horizontal segmentation ranges are respectively labeled as the left horizontal starting frequency and the right horizontal starting frequency. Starting from the left horizontal starting frequency in the horizontal difference histogram, continuously judge whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold towards the right. If it is less, delete the horizontal segmentation frequency in the histogram; if it is greater, stop the judgment. The horizontal segmentation frequency threshold is set according to the size of N. For example, when N = 10, the horizontal segmentation frequency threshold can be set to 2; Starting from the right horizontal starting frequency in the horizontal difference histogram, continuously judge whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold towards the left. If it is less, delete the horizontal segmentation frequency in the histogram; if it is greater, stop the judgment. Mark the deleted horizontal segmentation frequency in the histogram as the smaller horizontal segmentation frequency. Due to the influence of noise in the extraction of the winding profile, there may be individual data that affect the results. It is necessary to delete these abnormal data that are too large or too small. Here, the data is judged as having a smaller frequency and being data; Obtain the remaining horizontal differences in the horizontal difference histogram, and label them as the filtered horizontal differences; Calculate the mean value of the filtered horizontal differences, and label it as the actual mean value; In practical applications, please refer to Figure 5 As shown, obtain the range of the horizontal difference, divide the range of the horizontal difference into 4 horizontal segmentation ranges, the left horizontal starting frequency is 1. Judge that the left horizontal starting frequency of 1 is less than the horizontal segmentation frequency threshold of 2, then delete the horizontal segmentation frequency in the histogram. Obtain the next horizontal segmentation frequency of 2 towards the right, and judge that the horizontal segmentation frequency of 2 is not less than the horizontal segmentation frequency threshold of 2, then stop the judgment; obtain the right horizontal starting frequency of 2, and judge that the horizontal segmentation frequency of 2 is not less than the horizontal segmentation frequency threshold of 2, then stop the judgment; obtain the remaining filtered horizontal differences in the horizontal difference histogram, such as 50.2 cm and 50.21 cm, etc. Calculate the mean value of the filtered horizontal differences to be 50.2 cm, then the actual mean value is 50.2 cm; Count the frequency of each horizontal segmentation range, and label it as the horizontal segmentation frequency; Establish a histogram with the horizontal difference as the X-axis and the horizontal segmentation frequency as the Y-axis, and label it as the horizontal difference histogram; In the horizontal difference histogram, the horizontal segmentation frequencies of the left and right horizontal segmentation ranges are respectively labeled as the left horizontal starting frequency and the right horizontal starting frequency. Starting from the left horizontal starting frequency in the horizontal difference histogram, continuously judge whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold towards the right. If it is less, delete the horizontal segmentation frequency in the histogram; if it is greater, stop the judgment; The actual data acquisition module is configured with an actual thickness acquisition strategy, and the actual thickness acquisition strategy includes: Divide the winding contour diagram into M regions with equal abscissa intervals by a line parallel to the Y-axis, marked as vertical strip regions. Set the length of the vertical strip region as the width of the winding contour diagram, and set the width of the vertical strip region as Kc. For the sake of saving calculation and comparison, the vertical strip regions can be divided. Obtain the maximum and minimum values of the ordinate where the edge pixels of each vertical strip region are 0, and mark them as the vertical maximum value and the vertical minimum value respectively. Calculate the difference between the vertical maximum value and the vertical minimum value of all vertical strip regions, and mark it as the vertical difference. Use the screening mean method to obtain the actual mean value of all vertical differences, and mark it as the actual thickness.

[0021] The predicted data acquisition module is used to calculate and obtain the predicted thickness of the thermal paper for winding based on the data of the speed sensor and the angular velocity sensor, marked as the predicted thickness; mark the width of the thermal paper as the predicted width. In practical applications, please refer to Figure 4 As shown, divide the winding contour diagram into 26 vertical strip regions by a line parallel to the Y-axis. Set the length of the vertical strip region as the width of the winding contour diagram, and set the width of the vertical strip region as 2 cm. Calculate the vertical difference. Taking one vertical strip region as an example, the vertical maximum value and the vertical minimum value are 36 cm and 16 cm respectively, then the vertical difference is 20 cm. Using the same method as obtaining the actual width, use the screening mean method to obtain the actual thickness of 22 cm. The predicted data acquisition module is configured with a predicted thickness acquisition strategy, and the predicted thickness acquisition strategy includes: Use the speed sensor to obtain the conveying speed when the thermal paper is wound, marked as the linear speed. Use the angular velocity sensor to obtain the angular velocity of the reel, marked as the rotational angular velocity. Obtain the predicted thickness, and the calculation formula is: Dy = Dg + 2 * v / w; Where Dy is the predicted thickness, Dg is the diameter of the reel, v is the linear speed, and w is the rotational angular velocity. The abnormality judgment module is used to judge whether the actual thickness and the actual width are abnormal based on the predicted thickness and the predicted width. In practical applications, obtain the data Dg as 10 cm, v as 18 cm / s, and w as 1 rad / s; then the predicted thickness is: Dy = Dg + 2 * v / w = 10 + 2 * 18 / 1 = 46 cm. The abnormality judgment module is configured with an abnormality judgment strategy, and the abnormality judgment strategy includes: Calculate the absolute value of the difference between the predicted width and the actual width, and mark it as the actual width difference. Determine whether the actual width difference is greater than the width change threshold. If it is greater than or equal to, the thermal paper winding is not aligned. If it is less than, the thermal paper winding is aligned. For example, if the width change threshold is 2 cm, it means whether the actual width difference is greater than 2 cm, that is, the winding is not aligned. Calculate the absolute value of the difference between the predicted thickness and the actual thickness, and mark it as the actual thickness difference. Determine whether the actual thickness difference is greater than the thickness change threshold. If it is greater than or equal to and the actual thickness is greater than the predicted thickness, the tension is too small. If it is greater than and the actual thickness is less than the predicted thickness, the tension is too large. If it is less than, the tension is normal. For example, if the thickness change threshold is 2 cm, it means whether the actual thickness difference is greater than 2 cm, that is, whether the tension is normal or not. Calculate the absolute value of the difference between 46 cm of the predicted width and 50.2 cm of the actual width, which is 4.2 cm. Then the actual width difference is 4.2 cm. Since the actual width difference of 4.2 cm is greater than the width change threshold of 2 cm, the thermal paper winding is not aligned. The predicted width is the width of the thermal paper, which is 20 cm. Calculate the absolute value of the difference between 20 cm of the predicted width and 22 cm of the actual width, which is 2 cm. The actual width difference is 2 cm. Determine that the actual width difference of 2 cm is equal to the thickness change threshold of 2 cm, and the actual width of 22 cm is greater than the predicted width of 20 cm, then the tension is too small.

[0022] Example 2, please refer to Figure 6 As shown, the present application provides a method for detecting the alignment of thermal paper winding based on the fusion of images and sensors, including the following steps: Step S1, obtain the image of the thermal paper wound on the reel, and mark it as the thermal paper winding image. Step S2, perform grayscale and binarization processing on the thermal paper winding image to obtain the binarized winding image; perform contour extraction on the binarized winding image to obtain the winding contour image. Step S2 includes the following sub-steps: Step S201, obtain the RGB value of each pixel point in the thermal paper winding image, and mark it as the winding RGB value. Step S202, use the grayscale conversion formula to convert the winding RGB value into the winding grayscale value. Step S203, replace the winding RGB value of each pixel point in the thermal paper winding image with the winding grayscale value to obtain the winding grayscale image. Step S204, evenly divide the winding grayscale value from 0 to 255 into h ranges, and mark it as the interval range. Step S205, respectively count the frequency of the winding grayscale value in each interval range, and mark it as the range frequency. Step S206, draw a histogram with the winding grayscale value as the X-axis and the range frequency as the Y-axis, and mark it as the winding grayscale histogram. Step S207: Calculate the difference in range frequencies between adjacent interval ranges, denoted as the adjacent difference. The calculation formula is: Xc i =F i -F i+1 ; where Xc i is the adjacent difference, F i is the frequency of the i-th detected gray level interval, and F i+1 is the frequency of the (i + 1)-th detected gray level interval. Here, i is an integer from 1 to h, and the value of i represents the size of the interval range corresponding to the range frequency; Step S208: If Xc i is less than 0 and Xc i+1 is greater than 0, mark the interval range corresponding to F i in Xc i+1 as the peak range; Obtain all peak ranges; Step S209: Obtain the minimum value of each peak interval, denoted as the peak value; Step S210: Mark the peak range with the smallest peak value as the first peak range; Mark the peak range with the largest peak value as the second peak range; Step S211: Mark the interval range between the first peak range and the second peak range as the intermediate interval range; Step S212: Obtain the intermediate interval range with the smallest range frequency, denoted as the threshold range; Obtain the intermediate value of the threshold range, denoted as the segmentation threshold; Step S213: In the rewinding grayscale image, set all rewinding gray values greater than the segmentation threshold to 0, and set all rewinding gray values less than the segmentation threshold to 255 to obtain the rewinding binary image; Step S214: Obtain the pixel points with a gray value of 0 in the rewinding binary image, denoted as the initial pixel points. Establish a c*c neighborhood centered on the initial pixel points, denoted as the adjacent neighborhood; Step S215: Obtain the number of pixel points with a gray value of 0 in the adjacent neighborhood, denoted as the neighborhood number; Step S216: Set the boundary pixel point threshold according to the size of the adjacent neighborhood; Step S217: If the neighborhood number is less than the boundary pixel point threshold, set the gray value of the initial pixel point to 255; Step S218: Mark the pixel points with a gray value of 0 and adjacent to the pixel points with a gray value of 255 as the edge pixel points; Step S219: In the rewinding binary image, set the gray values of all boundary pixel points to 0, and set the gray values of the non-boundary pixel points to 255 to obtain the rewinding contour image.

[0023] Step S3: Obtain the thickness and width of the thermal paper being wound based on the winding contour diagram, and mark them as the actual thickness and actual width respectively. Step S3 includes the following sub-steps: Step S301: Establish a rectangular coordinate system, marked as the winding coordinate system. Place the winding contour diagram in the first quadrant of the winding coordinate system, making the lower left corner point of the winding contour diagram coincide with the origin of the winding coordinate system, and the wide side and long side of the winding contour diagram coincide with the Y-axis and X-axis of the winding coordinate system respectively. Step S302: Divide the winding contour diagram into N regions with equal vertical coordinate intervals by a line parallel to the X-axis, marked as horizontal strip regions. Set the length of the horizontal strip region as the length of the winding contour diagram, and set the width of the horizontal strip region as Kh. Step S303: Obtain the maximum and minimum values of the abscissa where the edge pixels of each horizontal strip region are 0, and mark them as the horizontal maximum value and horizontal minimum value respectively. Step S304: Calculate the difference between the horizontal maximum value and horizontal minimum value of all horizontal strip regions, and mark it as the horizontal difference. Step S305: Use the screening mean method to obtain the actual mean of all horizontal differences, and mark it as the actual width. Step S305 includes the following sub-steps: Step S30501: Obtain the range of the horizontal differences, and divide the range of the horizontal differences into d equal ranges, marked as horizontal segmentation ranges. Step S30502: Count the frequency of each horizontal segmentation range, and mark it as the horizontal segmentation frequency. Step S30503: Establish a histogram with the horizontal difference as the X-axis and the horizontal segmentation frequency as the Y-axis, marked as the horizontal difference histogram. Step S30504: Mark the horizontal segmentation frequencies of the left and right horizontal segmentation ranges in the horizontal difference histogram as the left horizontal starting frequency and the right horizontal starting frequency respectively. In the horizontal difference histogram, starting from the left horizontal starting frequency, continuously judge to the right whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold. If it is less, delete the horizontal segmentation frequency in the histogram. If it is greater, stop the judgment. Step S30505: Starting from the right horizontal starting frequency in the horizontal difference histogram, continuously judge to the left whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold. If it is less, delete the horizontal segmentation frequency in the histogram. If it is greater, stop the judgment. Step S30506: Obtain the remaining horizontal differences in the horizontal difference histogram, and mark them as the screened horizontal differences. Step S30507: Calculate the mean of the screened horizontal differences, and mark it as the actual mean.

[0024] Step S306: Divide the winding contour diagram into M regions with equal horizontal coordinate intervals by a line parallel to the Y-axis, marked as vertical strip regions. Set the length of the vertical strip region as the width of the winding contour diagram, and set the width of the vertical strip region as Kc. Step S307: Obtain the maximum and minimum values of the ordinates where the edge pixels of each vertical strip region are 0, and mark them as the vertical maximum value and the vertical minimum value respectively; Step S308: Calculate the difference between the vertical maximum value and the vertical minimum value of all vertical strip regions, and mark it as the vertical difference; Step S309: Use the screening mean method to obtain the actual mean value of all vertical differences, and mark it as the actual thickness.

[0025] Step S4: Calculate and obtain the predicted thickness of the thermal paper for predicted winding based on the data of the speed sensor and the angular velocity sensor, and mark it as the predicted thickness; mark the width of the thermal paper as the predicted width; Step S4 includes the following sub-steps: Step S401: Use the speed sensor to obtain the conveying speed when the thermal paper is wound, and mark it as the linear speed; Step S402: Use the angular velocity sensor to obtain the angular velocity of the reel, and mark it as the rotational angular velocity; Step S403: Obtain the predicted thickness, and the calculation formula is: Dy = Dg + 2 * v / w; where Dy is the predicted thickness, Dg is the diameter of the reel, v is the linear speed, and w is the rotational angular velocity Step S5: Judge whether the actual thickness and the actual width are abnormal based on the predicted thickness and the predicted width; Step S5 includes the following sub-steps: Step S501: Calculate the absolute value of the difference between the predicted width and the actual width, and mark it as the actual width difference; Step S502: Judge whether the actual width difference is greater than the width change threshold. If it is greater than or equal to, the winding of the thermal paper is not aligned. If it is less than, the winding of the thermal paper is aligned; Step S503: Calculate the absolute value of the difference between the predicted thickness and the actual thickness, and mark it as the actual thickness difference; Step S504: Judge whether the actual thickness difference is greater than the thickness change threshold. If it is greater than or equal to and the actual thickness is greater than the predicted thickness, the tension is too small. If it is greater than and the actual thickness is less than the predicted thickness, the tension is too large. If it is less than, the tension is normal.

[0026] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, and the instruction device implements the process Figure 1 one process or multiple processes and / or blocks Figure 1 the functions specified in one block or multiple blocks.

[0027] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of the devices or units can be in an electrical, mechanical, or other form.

Claims

1. A method for detecting the winding alignment of thermal paper based on image and sensor fusion, characterized in that, It includes the following steps: Obtain the thermal paper image wound on the reel and mark it as the thermal paper winding image; Perform grayscale and binarization processing on the thermal paper winding image to obtain a binarized winding image; perform contour extraction on the binarized winding image to obtain a winding contour image; Based on the winding contour image, obtain the thickness and width of the wound thermal paper, and mark them as the actual thickness and actual width respectively; Calculate the predicted thickness of the wound thermal paper based on the data of the speed sensor and the angular velocity sensor, and mark it as the predicted thickness; mark the width of the thermal paper as the predicted width; Judge whether the actual thickness and actual width are abnormal based on the predicted thickness and predicted width.

2. The method for detecting the winding alignment of thermal paper based on image and sensor fusion according to claim 1, wherein The steps of performing grayscale and binarization processing on the thermal paper winding image to obtain a binarized winding image include the following sub-steps: Obtain the RGB value of each pixel point in the thermal paper winding image and mark it as the winding RGB value; Convert the winding RGB value to the winding grayscale value using the grayscale conversion formula; Replace the winding RGB value of each pixel point in the thermal paper winding image with the winding grayscale value to obtain a winding grayscale image.

3. The method for detecting the winding alignment of thermal paper based on image and sensor fusion according to claim 2, wherein The steps of performing grayscale and binarization processing on the thermal paper winding image to obtain a binarized winding image further include the following sub-steps: Divide the winding grayscale values from 0 to 255 into h ranges on average and mark them as interval ranges; Count the frequency of the winding grayscale values in each interval range respectively and mark it as the range frequency; Draw a histogram with the winding grayscale value as the X-axis and the range frequency as the Y-axis, and mark it as the winding grayscale histogram; Calculate the difference in the range frequency between adjacent interval ranges, denoted as the adjacent difference, and the calculation formula is: Xc i =F i -F i+1 ; where Xc i is the adjacent difference, F i is the frequency of the i-th detected gray level interval, F i+1 is the frequency of the (i + 1)-th detected gray level interval, where i is an integer from 1 to h, and the magnitude of i represents the magnitude of the interval range corresponding to the range frequency; If Xc i is less than 0 and Xc i+1 is greater than 0, mark the interval range of F in Xc i as the peak range; obtain all the peak ranges; i+1 ​ Obtain the minimum value of each peak interval and mark it as the peak value; Mark the peak range with the smallest peak value as the first peak range; Mark the peak range with the largest peak value as the second peak range; Mark the interval range between the first peak range and the second peak range as the middle interval range; Obtain the middle interval range with the smallest range frequency and mark it as the threshold range; Obtain the middle value of the threshold range and mark it as the segmentation threshold; In the winding grayscale image, set all winding grayscale values greater than the segmentation threshold to 0, and set all winding grayscale values smaller than the segmentation threshold to 255 to obtain a binarized winding image.

4. The method for detecting the winding alignment of thermal paper based on image and sensor fusion according to claim 3, wherein The steps of performing contour extraction on the binarized winding image to obtain a winding contour image further include the following sub-steps: Obtain the pixel points with a grayscale value of 0 in the binarized winding, and mark them as initial pixel points. Establish a c*c neighborhood with the initial pixel points as the central pixel points and mark it as the adjacent neighborhood; Obtain the number of pixel points with a grayscale value of 0 in the adjacent neighborhood and mark it as the neighborhood number; Set the boundary pixel point threshold according to the size of the adjacent neighborhood; If the neighborhood number is less than the boundary pixel point threshold, set the grayscale value of the initial pixel point to 255; Mark the pixel points with a grayscale value of 0 and adjacent to the pixel points with a grayscale value of 255 as edge pixel points; In the binarized winding image, set the grayscale value of all boundary pixel points to 0, and set the grayscale value of the non-boundary pixel points to 255 to obtain a winding contour image.

5. The method for detecting the winding alignment of thermal paper based on image and sensor fusion according to claim 4, wherein The steps of obtaining the thickness and width of the wound thermal paper based on the winding contour image and marking them as the actual thickness and actual width respectively include the following sub-steps: Establish a plane rectangular coordinate system, marked as the rewinding coordinate system; place the rewinding contour diagram in the first quadrant of the rewinding coordinate system, making the lower left corner point of the rewinding contour diagram coincide with the origin of the rewinding coordinate system, and the wide side and long side of the rewinding contour diagram coincide with the Y-axis and X-axis of the rewinding coordinate system respectively; Divide the rewinding contour diagram into N regions with equal vertical coordinate intervals by a line parallel to the X-axis, marked as horizontal strip regions. Set the length of the horizontal strip region as the length of the roll contour diagram, and set the width of the horizontal strip region as Kh; Obtain the maximum and minimum values of the abscissa where the edge pixels of each horizontal strip region are 0, and mark them as the horizontal maximum value and the horizontal minimum value respectively; Calculate the difference between the horizontal maximum value and the horizontal minimum value of all horizontal strip regions, and mark it as the horizontal difference; Use the screening mean method to obtain the actual mean value of all horizontal differences, and mark it as the actual width.

6. The method for detecting the winding alignment of thermal paper based on image and sensor fusion according to claim 5, wherein The screening mean method includes: Obtain the range of the horizontal difference, divide the range of the horizontal difference into d equal ranges, and mark them as horizontal segmentation ranges; Count the frequency of each horizontal segmentation range, and mark it as the horizontal segmentation frequency; Establish a histogram with the horizontal difference as the X-axis and the horizontal segmentation frequency as the Y-axis, and mark it as the horizontal difference histogram; In the horizontal difference histogram, mark the horizontal segmentation frequencies of the left and right horizontal segmentation ranges as the left horizontal starting frequency and the right horizontal starting frequency respectively. Starting from the left horizontal starting frequency in the horizontal difference histogram, continuously judge to the right whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold. If it is less, delete the horizontal segmentation frequency in the histogram. If it is greater, stop the judgment; Starting from the right horizontal starting frequency in the horizontal difference histogram, continuously judge to the left whether the horizontal segmentation frequency is less than the horizontal segmentation frequency threshold. If it is less, delete the horizontal segmentation frequency in the histogram. If it is greater, stop the judgment; Obtain the remaining horizontal differences in the horizontal difference histogram, and mark them as the screened horizontal differences; Calculate the mean value of the screened horizontal differences, and mark it as the actual mean value.

7. The method for detecting the alignment of the thermal paper winding based on the fusion of the image and the sensor according to claim 6, wherein Based on the rewinding contour diagram, obtaining the thickness and width of the rewinding thermal paper, marked as the actual thickness and the actual width respectively, also includes the following sub-steps: Divide the rewinding contour diagram into M regions with equal horizontal coordinate intervals by a line parallel to the Y-axis, marked as vertical strip regions. Set the length of the vertical strip region as the width of the roll contour diagram, and set the width of the vertical strip region as Kc; Obtain the maximum and minimum values of the ordinate where the edge pixels of each vertical strip region are 0, and mark them as the vertical maximum value and the vertical minimum value respectively; Calculate the difference between the vertical maximum value and the vertical minimum value of all vertical strip regions, and mark it as the vertical difference; Use the screening mean method to obtain the actual mean value of all vertical differences, and mark it as the actual thickness.

8. The method for detecting the winding alignment of thermal paper based on image and sensor fusion according to claim 7, wherein Calculating the predicted thickness of the rewinding thermal paper based on the data of the speed sensor and the angular velocity sensor, marked as the predicted thickness, includes the following sub-steps: Use the speed sensor to obtain the conveying speed when the thermal paper is rewound, and mark it as the linear speed; Use the angular velocity sensor to obtain the angular velocity of the reel, and mark it as the rotational angular velocity; Obtain the predicted thickness, and the calculation formula is: Dy = Dg + 2 * v / w; Where Dy is the predicted thickness, Dg is the reel diameter, v is the linear speed, and w is the rotational angular velocity.

9. The method for detecting the winding alignment of thermal paper based on image and sensor fusion according to claim 8, wherein Judging whether the actual thickness and the actual width are abnormal based on the predicted thickness and the predicted width includes the following steps: Calculate the absolute value of the difference between the predicted width and the actual width, and mark it as the actual width difference; Judge whether the actual width difference is greater than the width change threshold. If it is greater than or equal to, the thermal paper winding is not aligned. If it is less than, the thermal paper winding is aligned; Calculate the absolute value of the difference between the predicted thickness and the actual thickness, and mark it as the actual thickness difference; Judge whether the actual thickness difference is greater than the thickness change threshold. If it is greater than or equal to and the actual thickness is greater than the predicted thickness, the tension is too small. If it is greater than and the actual thickness is less than the predicted thickness, the tension is too large. If it is less than, the tension is normal.

10. A thermal paper winding alignment detection system based on image and sensor fusion, which is used to implement the thermal paper winding alignment detection method based on image and sensor fusion according to any one of claims 1-9, and is characterized in that, It includes an image acquisition module, an image processing module, an actual data acquisition module, a predicted data acquisition module, and an abnormality judgment module; The image acquisition module is used to acquire the thermal paper image wound on the reel, and mark it as the thermal paper winding image; The image processing module is used to perform grayscale and binary processing on the thermal paper winding image to obtain a binary winding image; extract the contour of the binary winding image to obtain a winding contour image; The actual data acquisition module is used to obtain the thickness and width of the wound thermal paper based on the winding contour image, and mark them as the actual thickness and the actual width respectively; The predicted data acquisition module is used to calculate the predicted thickness of the wound thermal paper based on the data of the speed sensor and the angular velocity sensor, and mark it as the predicted thickness; mark the width of the thermal paper as the predicted width; The abnormality judgment module is used to judge whether the actual thickness and the actual width are abnormal based on the predicted thickness and the predicted width.

Citation Information

Patent Citations

  • BOPP film thickness control method based on image processing

    CN107310133A

  • Base material processing apparatus and detection method

    CN108621589A

  • Film roll bump monitoring method and system and storage medium

    CN118429873A

  • Membrane material flatness detection method

    CN118442970A

  • Web cutting apparatus and method

    EP1044915A2

Cited By

  • AOI detection system and detection method after hot pressing of light guide plate

    CN120807519A

  • Artificial intelligence-driven intelligent identification method for thermal paper production waste

    CN120913185A