Label gap recognition method and system
By combining the correlation of multiple peak intervals, light influence coefficients and type parameters in label gap identification, the gap nodes and detection positions are defined, which solves the problem of insufficient gap identification accuracy in the existing technology and achieves high-precision identification and detection of label gaps. Dynamic identification.
Patent Information
- Application Number
- CN202410901139.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-07-05
Smart Images

Figure CN118424129B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of label gap recognition systems, and in particular to a label gap recognition method and system. Background Art
[0002] With the development of technology, scanners process labels. At this time, the label roll enters the scanner and is scanned in the scanner. In the label roll, there is a gap between two adjacent labels, and the two adjacent labels are separated by the gap. In the prior art, due to the different light reflection sensitivities of the paper surface and the gap position, the data is collected mainly by the peak detection method. By collecting the voltage of the photoresistor, it is determined whether there is a gap if it is higher than the preset threshold. However, the gap is controlled based on a single dimension, and the accuracy of the gap recognition cannot be guaranteed. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art. The present invention provides a method and system for identifying the gap of a label. The gap node of the label is defined based on the association between multiple peak intervals, the light impact coefficient of the label and the type parameter of the label, so as to control the waveform detection diagram of the detection data, and is compatible with the association between multiple peak intervals, the light impact coefficient of the label and the type parameter of the label, so as to facilitate overall control in multiple dimensions, and then define the gap node in the waveform detection diagram of the detection data, and further define the gap traversal range of the label based on the gap node of the label and the interval range of the corresponding peak interval, and traverse the gap traversal range of the label to identify the gap of the label, so as to perform targeted identification of the gap of the label, and ensure the accuracy of the identification of the gap. At the same time, in the process of identifying the gap of the label, the detection position of the gap of the label is defined based on the outer contour of the gap of the label, the size of two labels adjacent to the gap, and the model of the printer; according to the detection position of the gap of the label and the outer contour of the gap of the label, the corresponding detection mode is matched, the detection mode is embedded in the current program of the printer, and the label is targetedly detected according to the detection mode to improve the printer of the label, so as to facilitate dynamic identification of the gap.
[0004] In order to solve the above technical problems, an embodiment of the present invention provides a tag gap recognition method, which is applied to a tag recognition scenario;
[0005] The label gap recognition method comprises:
[0006] Acquire detection data of the tag, and perform abnormal data processing on the detection data of the tag to optimize the detection data of the tag;
[0007] Decompose the detection data of the optimized label according to the time axis and construct a waveform detection diagram of the detection data;
[0008] Traversing the waveform detection graph of the detection data, collecting multiple peak intervals, and defining the gap nodes of the labels based on the correlation between the multiple peak intervals, the light influence coefficient of the labels, and the type parameters of the labels;
[0009] Based on the gap nodes of the labels and the interval range of the corresponding peak intervals, a gap traversal range of the labels is defined, and the gap traversal range of the labels is traversed to identify the gaps of the labels;
[0010] In the process of identifying the gap between the labels, the detection position of the gap between the labels is defined based on the outer contour of the gap between the labels, the size of two labels adjacent to the gap, and the model of the printer;
[0011] According to the detection position of the gap between the labels and the outer contour of the gap between the labels, the corresponding detection pattern is matched, the detection pattern is embedded into the current program of the printer, and the label is targeted for detection according to the detection pattern to improve the printer's printing of labels.
[0012] Optionally, the acquiring the detection data of the tag and performing abnormal data processing on the detection data of the tag to optimize the detection data of the tag includes:
[0013] The labels are scanned in a circular manner based on the scanning model of the printer, and at least three labels in the label are scanned;
[0014] Acquire detection data of the label according to scanning of the scanning model of the printer;
[0015] Freeze the detection data of the label, and sequentially sort the multiple sub-data in the detection data along the scanning direction of the scanning model;
[0016] Construct a sub-data set for the sorted multiple sub-data, and perform abnormal data screening based on the sub-data set. At this time, collect the abnormal model of the label, and trigger the screening of abnormal data based on the abnormal model of the label and the sub-data set. Match the sub-data set based on the abnormal events in the abnormal model of the label, and locate the abnormal data in the sub-data set;
[0017] Freeze the abnormal data, perform corresponding abnormal processing according to the abnormal type of the abnormal data, and form an optimized sub-data set;
[0018] The optimized detection data of the label is matched according to the optimized sub-data set, and the optimization of the detection data of the label is completed.
[0019] Optionally, the detection data of the optimized label is decomposed according to the time axis, and a waveform detection diagram of the detection data is constructed, including:
[0020] Freeze the detection data of the optimized label;
[0021] Associating the detection data of the optimized label with the time axis of the scan, and performing data decomposition on the detection data of the optimized label along the time axis of the scan;
[0022] Determine each decomposed data based on the data decomposition of the detection data of the optimized tag;
[0023] Mark each decomposed data on the corresponding coordinate graph and construct a waveform detection graph of the detection data.
[0024] Optionally, the traversing the waveform detection graph of the detection data and collecting a plurality of peak intervals, and defining the gap node of the label based on the association between the plurality of peak intervals, the light impact coefficient of the label and the type parameter of the label, includes:
[0025] Waveform detection diagram of freeze-frame detection data;
[0026] Define the detection diagram type based on the waveform detection diagram of the detection data;
[0027] Define a traversal mode according to the detection image type and the printer model, the traversal mode includes full traversal, preset range traversal, and multi-node traversal;
[0028] Triggering the traversal of the waveform detection graph of the detection data according to the traversal mode;
[0029] After traversing the waveform detection graph of the detection data, multiple peak intervals are marked based on the peak shape, thereby collecting multiple peak intervals;
[0030] Correlate multiple peak intervals and output correlation coefficients between the multiple peak intervals;
[0031] Collect the light impact coefficient of the tag and the type parameters of the tag;
[0032] The gap nodes of the labels are defined based on the correlation coefficients between the multiple peak intervals, the light influence coefficients of the labels and the type parameters of the labels.
[0033] Optionally, defining a gap traversal range of the label based on the gap nodes of the label and the interval range of the corresponding peak interval, and traversing the gap traversal range of the label to identify the gap of the label includes:
[0034] Freeze the gap nodes of the labels and collect the number of gap nodes of the labels;
[0035] The label-based gap node traverses the surrounding peak intervals and collects the interval range of the peak interval;
[0036] The number of gap nodes associated with the label and the range of the peak interval;
[0037] Define the gap traversal range of the label based on the number of gap nodes of the label and the interval range of the peak interval;
[0038] The gap traversal range of the fixed frame label;
[0039] An all-round traversal is performed on the gap traversal range of the label, and during the traversal process, the outer contour of the gap of the label is defined, and the gap of the label is identified.
[0040] Optionally, in the process of identifying the gap between the labels, defining the detection position of the gap between the labels based on the outer contour of the gap between the labels, the size of two labels adjacent to the gap, and the model of the printer includes:
[0041] In the process of identifying the gap between the labels, the outer contour of the gap between the labels is collected;
[0042] A contour image is defined based on the outer contour of the gap between the labels;
[0043] Define the type of gap between labels based on the contour image;
[0044] Two labels adjacent to the gap are defined based on the left-right traversal of the gap of the label;
[0045] The sizes of the two tags are defined based on the detection of the two tags.
[0046] Optionally, in the process of identifying the gap between the labels, the detection position of the gap between the labels is defined based on the outer contour of the gap between the labels, the size of two labels adjacent to the gap, and the model of the printer, and further includes:
[0047] Defining the difference between the two labels based on the comparison of the sizes of the two labels;
[0048] If the difference between the two labels is less than the preset difference, it is determined that the sizes of the two labels are consistent;
[0049] The outer contour of the gap of the associated labels, the size of the two labels adjacent to the gap, and the model of the printer;
[0050] The detection position table is matched according to the outer contour of the gap between the labels, the sizes of two labels adjacent to the gap, and the model of the printer, and the detection position of the gap between the labels is defined.
[0051] Optionally, the detection position of the gap between the labels and the outer contour of the gap between the labels are matched with a corresponding detection mode, the detection mode is embedded into the current program of the printer, and the label is targeted for detection according to the detection mode to improve the printer's printing of the label, including:
[0052] Collect the detection position of the gap between the labels;
[0053] A coordinate system is constructed based on the gap of the tag, and a spatial coordinate of a detection position of the gap is defined according to a detection position of the gap of the tag;
[0054] Compare the spatial coordinates of the gap detection position and the center coordinates of the gap of the label, and determine the relative position of the gap detection position and the center of the gap of the label;
[0055] The relative position of the gap detection position and the center of the gap of the label and the outer contour of the gap of the label are matched to the detection mode table, and the corresponding detection mode is matched.
[0056] Optionally, the detection position of the gap between the labels and the outer contour of the gap between the labels are matched with a corresponding detection mode, the detection mode is embedded into the current program of the printer, and the label is targeted for detection according to the detection mode to improve the printer's printing of the label, and further includes:
[0057] In the detection mode, a corresponding detection procedure is determined based on the detection mode;
[0058] Acquire the program space of the printer and locate the current program of the printer in the program space;
[0059] Associating the detection program with the current program of the printer and embedding the detection mode into the current program of the printer;
[0060] The detection pattern is based on which targeted detection of the gap of the label is triggered, and the printer is assisted in printing the label to improve the printer's printing of the label.
[0061] In addition, an embodiment of the present invention further provides a label gap recognition system, the label gap recognition system comprising:
[0062] An optimization module, used for acquiring detection data of the tag and performing abnormal data processing on the detection data of the tag to optimize the detection data of the tag;
[0063] The waveform detection graph module is used to decompose the detection data of the optimized label according to the time axis and construct a waveform detection graph of the detection data;
[0064] A gap node module is used to traverse the waveform detection diagram of the detection data, collect multiple peak intervals, and define the gap node of the label based on the association between the multiple peak intervals, the light influence coefficient of the label, and the type parameter of the label;
[0065] An identification module, used to define a gap traversal range of the label based on the gap nodes of the label and the interval range of the corresponding peak interval, and traverse the gap traversal range of the label to identify the gap of the label;
[0066] A detection module, used to define a detection position of the gap between labels based on an outer contour of the gap between labels, sizes of two labels adjacent to the gap, and a model of the printer during the identification process of the gap between labels;
[0067] The printer module is used to match the corresponding detection pattern according to the detection position of the gap of the label and the outer contour of the gap of the label, embed the detection pattern into the current program of the printer, and perform targeted detection on the label according to the detection pattern to improve the printer's printing of the label.
[0068] In an embodiment of the present invention, through the method in the embodiment of the present invention, the detection data of the label is obtained, and the detection data of the label is processed for abnormal data to optimize the detection data of the label; the detection data of the optimized label is decomposed according to the time axis, and a waveform detection graph of the detection data is constructed; the waveform detection graph of the detection data is traversed, and multiple peak intervals are collected, and the gap nodes of the label are defined based on the association between the multiple peak intervals, the light impact coefficient of the label, and the type parameters of the label, so as to control the waveform detection graph of the detection data, and be compatible with the association between the multiple peak intervals, the light impact coefficient of the label, and the type parameters of the label, so as to facilitate overall control in multiple dimensions, and then define the gap nodes in the waveform detection graph of the detection data. point, further define the label gap traversal range based on the label gap node and the corresponding peak interval range, and traverse the label gap traversal range to identify the label gap, so as to facilitate targeted identification of the label gap, thereby ensuring the accuracy of gap identification. At the same time, in the process of identifying the label gap, the detection position of the label gap is defined based on the outer contour of the label gap, the size of two labels adjacent to the gap, and the model of the printer; the corresponding detection mode is matched according to the detection position of the label gap and the outer contour of the label gap, the detection mode is embedded into the current program of the printer, and the label is targeted for detection according to the detection mode, so as to improve the printer's printing of labels, so as to facilitate dynamic identification of the gap. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 is a schematic flow chart of a method for identifying a gap between tags in an embodiment of the present invention;
[0071] Figure 2 is a schematic flow chart of S11 in the method for identifying a gap between tags in an embodiment of the present invention;
[0072] Figure 3 is a schematic flow chart of S12 in the method for identifying a gap between tags in an embodiment of the present invention;
[0073] Figure 4 is a schematic flow chart of S13 in the method for identifying a gap between tags in an embodiment of the present invention;
[0074] Figure 5 is a schematic flow chart of S14 in the method for identifying a gap between tags in an embodiment of the present invention;
[0075] Figure 6 is a schematic flow chart of S15 in the method for identifying a gap between tags in an embodiment of the present invention;
[0076] Figure 7 Schematic diagram of the structure of the gap recognition system of the label in the embodiment of the present invention;
[0077] Figure 8 The figure is a hardware diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Embodiment 1
[0079] See also Figures 1 to 8 , a tag gap recognition method is applied to a tag recognition scenario; the tag gap recognition method includes:
[0080] Step S11: acquiring detection data of the tag, and performing abnormal data processing on the detection data of the tag to optimize the detection data of the tag;
[0081] Step S12: Decomposing the detection data of the optimized label according to the time axis, and constructing a waveform detection diagram of the detection data;
[0082] Step S13: traverse the waveform detection graph of the detection data, collect multiple peak intervals, and define the gap node of the label based on the correlation between the multiple peak intervals, the light impact coefficient of the label, and the type parameter of the label;
[0083] Step S14: defining a gap traversal range of the label based on the gap nodes of the label and the interval range of the corresponding peak interval, and traversing the gap traversal range of the label to identify the gap of the label;
[0084] Step S15: in the process of identifying the gap between the labels, the detection position of the gap between the labels is defined based on the outer contour of the gap between the labels, the size of two labels adjacent to the gap, and the model of the printer;
[0085] Step S16: Match the corresponding detection pattern according to the detection position of the gap between the labels and the outer contour of the gap between the labels, embed the detection pattern into the current program of the printer, and perform targeted detection on the label according to the detection pattern to improve the printer's printing of labels.
[0086] In an embodiment of the present invention, through the method in the embodiment of the present invention, the gap node of the label is defined based on the association between multiple peak intervals, the light impact coefficient of the label and the type parameter of the label, so as to control the waveform detection diagram of the detection data, and is compatible with the association between multiple peak intervals, the light impact coefficient of the label and the type parameter of the label, so as to facilitate overall control in multiple dimensions, and then define the gap node in the waveform detection diagram of the detection data, and further define the gap traversal range of the label based on the gap node of the label and the interval range of the corresponding peak interval, and traverse the gap traversal range of the label to identify the gap of the label, so as to facilitate targeted identification of the gap of the label, thereby ensuring the accuracy of gap identification. At the same time, in the process of identifying the gap of the label, the detection position of the gap of the label is defined based on the outer contour of the gap of the label, the size of two labels adjacent to the gap, and the model of the printer; the corresponding detection mode is matched according to the detection position of the gap of the label and the outer contour of the gap of the label, and the detection mode is embedded in the current program of the printer, and the label is targetedly detected according to the detection mode to improve the printer's printing of the label, so as to facilitate dynamic identification of the gap.
[0087] refer to Figure 2, in step S11, the detection data of the tag is obtained, and the detection data of the tag is processed for abnormal data to optimize the detection data of the tag;
[0088] In the specific implementation process of the present invention, the specific steps may be:
[0089] S111: Scan the labels in a circular manner based on the scanning model of the printer, and at least three labels in the label are scanned;
[0090] S112: Acquire detection data of the label according to scanning of the scanning model of the printer;
[0091] S113: Freeze the detection data of the label, and sequentially sort the multiple sub-data in the detection data along the scanning direction of the scanning model;
[0092] S114: constructing a sub-data set for the sorted multiple sub-data, and performing abnormal data screening based on the sub-data set. At this time, the abnormal model of the label is collected, and the screening of abnormal data is triggered according to the abnormal model of the label and the sub-data set. The sub-data set is matched based on the abnormal events in the abnormal model of the label, and the abnormal data in the sub-data set is located;
[0093] S115: freeze the abnormal data, perform corresponding abnormal processing according to the abnormal type of the abnormal data, and form an optimized sub-data set;
[0094] S116: Matching the optimized detection data of the tag according to the optimized sub-data set, and completing the optimization of the detection data of the tag.
[0095] In an embodiment of the present application, the label is scanned in a circular annular direction based on the scanning model of the printer. At this time, at least 3 labels are scanned so as to scan the range of the 3 labels, thereby covering the gaps between the labels. At the same time, the detection data of the label is obtained according to the scanning of the scanning model of the printer, so as to clarify the detection data of the label, and then further process the detection data of the label.
[0096] At this time, the detection data of the label is frozen, and the multiple sub-data in the detection data are sorted in turn along the scanning direction of the scanning model, so as to facilitate sorting of the multiple sub-data, thereby organizing the multiple sub-data. At the same time, a sub-data set is constructed for the sorted multiple sub-data, and abnormal data is checked based on the sub-data set. At this time, the abnormal model of the label is collected, and the abnormal data is checked based on the abnormal model of the label and the sub-data set. The sub-data set is matched based on the abnormal events in the abnormal model of the label, and the abnormal data in the sub-data set is located, so that the abnormal data is further processed to ensure the accuracy of the sub-data set.
[0097] Furthermore, the abnormal data is frozen, and corresponding abnormal processing is performed for the abnormal type of the abnormal data to form an optimized sub-data set; the detection data of the optimized label is matched according to the optimized sub-data set, and the optimization of the detection data of the label is completed, so as to further process the detection data of the optimized label and ensure the accuracy of subsequent results.
[0098] refer to Figure 3 In step S12, the detection data of the optimized label is decomposed according to the time axis, and a waveform detection diagram of the detection data is constructed;
[0099] In the specific implementation process of the present invention, the specific steps may be:
[0100] S121: freeze the detection data of the optimized label;
[0101] S122: Associating the detection data of the optimized tag with the scanning time axis, and performing data decomposition on the detection data of the optimized tag along the scanning time axis;
[0102] S123: Determine each decomposed data based on the data decomposition of the detection data of the optimized tag;
[0103] S124: Mark the corresponding coordinate graph according to each decomposed data, and construct a waveform detection graph of the detection data.
[0104] In an embodiment of the present application, the detection data of the optimized label is frozen, and data processing is performed on the detection data of the optimized label. At this time, the detection data of the optimized label and the time axis of the scan are associated, and the detection data of the optimized label is decomposed along the time axis of the scan, so that the corresponding coordinate graph is marked according to each decomposed data, and a waveform detection graph of the detection data is constructed to form a waveform detection graph of the detection data, and then the waveform detection graph of the detection data is processed. At this time, the waveform detection graph of the data is formed based on the optimized detection data, which ensures the accuracy of the waveform detection graph of the data. At the same time, abnormal processing is performed on the abnormal part to reduce the impact of noise.
[0105] refer to Figure 4 , in step S13, traverse the waveform detection graph of the detection data, collect multiple peak intervals, and define the gap node of the label based on the association between the multiple peak intervals, the light impact coefficient of the label, and the type parameter of the label;
[0106] In the specific implementation process of the present invention, the specific steps may be:
[0107] S131: freeze the waveform detection diagram of the detection data;
[0108] S132: defining a detection graph type based on a waveform detection graph of the detection data;
[0109] S133: defining a traversal mode according to the detection image type and the printer model, the traversal mode including full traversal, preset range traversal, and multi-node traversal;
[0110] S134: triggering the traversal of the waveform detection graph of the detection data according to the traversal mode;
[0111] S135: After traversing the waveform detection graph of the detection data, marking a plurality of peak intervals based on the peak shape, thereby collecting a plurality of peak intervals;
[0112] S136: Associating multiple peak intervals, and outputting correlation coefficients between the multiple peak intervals;
[0113] S137: Collecting the light impact coefficient of the tag and the type parameters of the tag;
[0114] S138: defining gap nodes of the labels based on correlation coefficients between multiple peak intervals, light impact coefficients of the labels, and type parameters of the labels.
[0115] In an embodiment of the present application, a waveform detection graph of detection data is frozen; a detection graph type is defined based on the waveform detection graph of detection data, thereby introducing a detection graph type to facilitate image management and control of the detection graph type, thereby defining a traversal mode according to the detection graph type and the printer model, the traversal mode including a comprehensive traversal, a preset range traversal, and a multi-node traversal; the traversal of the waveform detection graph of detection data is triggered according to the traversal mode to adapt to the traversal of the waveform detection graph of detection data, thereby performing an efficient traversal on the waveform detection graph of detection data, thereby improving the processing efficiency of the waveform detection graph.
[0116] Furthermore, after traversing the waveform detection graph of the detection data, multiple peak intervals are marked based on the peak shape, so as to collect multiple peak intervals, so as to facilitate positioning of the multiple peak intervals, thereby controlling the multiple peak intervals, and at the same time, associate the multiple peak intervals, and output the correlation coefficient between the multiple peak intervals; collect the light influence coefficient of the label and the type parameters of the label; define the gap nodes of the label based on the correlation coefficient between the multiple peak intervals, the light influence coefficient of the label and the type parameters of the label, thereby clarifying the gap nodes of the label.
[0117] At this time, the correlation coefficients between multiple peak intervals, the light impact coefficients of labels, and the type parameters of labels are compatible, so as to consider multiple dimensions of labels. At this time, the correlation coefficients between multiple peak intervals, the light impact coefficients of labels, and the type parameters of labels are all considered as factors of different dimensions, and matched against the gap node matching table, so as to make full use of the mapping relationship in the gap node matching table, thereby ensuring the accuracy of the gap nodes.
[0118] refer to Figure 5 , S14: defining a gap traversal range of the label based on the gap node of the label and the interval range of the corresponding peak interval, and traversing the gap traversal range of the label to identify the gap of the label;
[0119] In the specific implementation process of the present invention, the specific steps may be:
[0120] S141: freeze the gap nodes of the label and collect the number of the gap nodes of the label;
[0121] S142: traversing the surrounding peak intervals based on the gap node of the label, and collecting the interval range of the peak interval;
[0122] S143: the number of gap nodes associated with the label and the range of the peak interval;
[0123] S144: defining a gap traversal range of the label based on the number of gap nodes of the label and the interval range of the peak interval;
[0124] S145: fix the gap traversal range of the label;
[0125] S146: Perform an all-round traversal of the gap traversal range of the label, define the outer contour of the gap of the label during the traversal process, and identify the gap of the label.
[0126] In an embodiment of the present application, the gap nodes of the label are fixed, and the number of the gap nodes of the label is collected, and the consideration of the number of the gap nodes of the label is introduced. At the same time, the surrounding peak intervals are traversed based on the gap nodes of the label, and the interval range of the peak interval is collected to facilitate the definition of the interval range of the peak interval.
[0127] Then, the number of gap nodes of the associated label and the range of the peak interval are controlled, so as to define the gap traversal range of the label based on the number of gap nodes of the label and the range of the peak interval, so as to traverse the gap along the gap traversal range, thereby realizing targeted scanning of the gap.
[0128] At this time, the gap traversal range of the label is fixed; the gap traversal range of the label is traversed in all directions, and the outer contour of the label gap is defined during the traversal process, and the gap of the label is identified, thereby clarifying the gap of the label, and then identifying the gap of the label, so as to ensure the recognition accuracy of the gap of the label.
[0129] refer to Figure 6 , S15: in the process of identifying the gap between the labels, defining the detection position of the gap between the labels based on the outer contour of the gap between the labels, the size of two labels adjacent to the gap, and the model of the printer;
[0130] In the specific implementation process of the present invention, the specific steps may be:
[0131] S151: In the process of identifying the gap between the labels, collecting the outer contour of the gap between the labels;
[0132] S152: defining a contour image based on the outer contour of the gap between the tags;
[0133] S153: defining the type of the gap of the label according to the contour image;
[0134] S154: defining two labels adjacent to the gap based on traversing the gap in the left and right directions of the label;
[0135] S155: defining the sizes of the two tags according to the detection of the two tags;
[0136] S156: defining a difference between the two labels based on a comparison of the sizes of the two labels;
[0137] S157: If the difference between the two labels is less than the preset difference, it is determined that the sizes of the two labels are consistent;
[0138] S158: Associating the outer contour of the gap between the labels, the sizes of the two labels adjacent to the gap, and the model of the printer;
[0139] S159: matching the detection position table according to the outer contour of the gap between the labels, the sizes of two labels adjacent to the gap, and the model of the printer, and defining the detection position of the gap between the labels.
[0140] In an embodiment of the present application, during the identification process of the gap between labels, the outer contour of the gap between labels is collected; a contour image is defined based on the outer contour of the gap between labels so as to freeze the contour image, thereby performing image recognition on the contour image, so as to define the type of the gap between labels based on the contour image, thereby clarifying the type of the gap between labels, so as to perform targeted control along the type of the gap between labels.
[0141] At this time, two labels adjacent to the gap are defined based on the left-right traversal of the gap of the label, so as to compare the sizes of the two labels, and thus the sizes of the two labels are defined according to the detection of the two labels, so as to compare the sizes of the two labels. At this time, the difference between the two labels is defined based on the comparison of the sizes of the two labels; if the difference between the two labels is less than the preset difference, it is determined that the sizes of the two labels are consistent; if the difference between the two labels is greater than the preset difference, it is determined that the sizes of the two labels are inconsistent.
[0142] Defining the difference between the two labels based on the comparison of the sizes of the two labels;
[0143] Furthermore, if the difference between the two labels is less than a preset difference, it is determined that the sizes of the two labels are consistent; the outer contour of the gap between the associated labels, the size of the two labels adjacent to the gap, and the model of the printer are matched; the detection position table is matched according to the outer contour of the gap between the labels, the size of the two labels adjacent to the gap, and the model of the printer, and the detection position of the gap between the labels is defined, thereby clarifying the detection position of the gap between the labels.
[0144] S16: matching a corresponding detection mode according to the detection position of the gap between the labels and the outer contour of the gap between the labels, embedding the detection mode into the current program of the printer, and performing targeted detection on the label according to the detection mode to improve the printer's printing of the label;
[0145] At this time, the detection position of the gap of the label is collected; a coordinate system is constructed based on the gap of the label, and the spatial coordinates of the detection position of the gap are defined according to the detection position of the gap of the label; the spatial coordinates of the detection position of the gap and the center coordinates of the gap of the label are compared, and the relative position of the detection position of the gap and the center of the gap of the label is determined; the relative position of the detection position of the gap and the center of the gap of the label and the outer contour of the gap of the label are matched with the detection mode table, and the corresponding detection mode is matched.
[0146] In this detection mode, the corresponding detection program is determined based on the detection mode; the program space of the printer is collected, and the current program of the printer is located in the program space; the detection program and the current program of the printer are associated, and the detection mode is embedded into the current program of the printer; based on the detection mode, targeted detection of the gap of the label is triggered, and the printer is assisted in printing the label to improve the printer's printing of the label.
[0147] At this time, the detection data of the label is obtained, and the detection data of the label is processed for abnormal data to optimize the detection data of the label; the detection data of the optimized label is decomposed according to the time axis, and a waveform detection diagram of the detection data is constructed; the waveform detection diagram of the detection data is traversed, and multiple peak intervals are collected, and the gap nodes of the label are defined based on the correlation between the multiple peak intervals, the light influence coefficient of the label, and the type parameters of the label, so as to control the waveform detection diagram of the detection data, and be compatible with the correlation between the multiple peak intervals, the light influence coefficient of the label, and the type parameters of the label, so as to facilitate overall control in multiple dimensions, and then define the gap nodes in the waveform detection diagram of the detection data, and further based on the label The gap nodes and the corresponding peak interval range define the gap traversal range of the label, and traverse the gap traversal range of the label to identify the gap of the label, so as to carry out targeted identification of the gap of the label, thereby ensuring the accuracy of the gap identification. At the same time, in the process of identifying the gap of the label, the detection position of the gap of the label is defined based on the outer contour of the gap of the label, the size of two labels adjacent to the gap, and the model of the printer; the corresponding detection mode is matched according to the detection position of the gap of the label and the outer contour of the gap of the label, the detection mode is embedded in the current program of the printer, and the label is targeted for detection according to the detection mode to improve the printer's printing of the label, so as to facilitate dynamic identification of the gap. Embodiment 2
[0148] See also Figure 7 , Figure 7 It is a schematic diagram of the structural composition of the gap recognition system of the label in the embodiment of the present invention.
[0149] like Figure 7 As shown, a gap recognition system for a label, the gap recognition system for a label comprises:
[0150] The optimization module 21 is used to obtain the detection data of the tag and perform abnormal data processing on the detection data of the tag to optimize the detection data of the tag;
[0151] The waveform detection diagram module 22 is used to decompose the detection data of the optimized label according to the time axis and construct a waveform detection diagram of the detection data;
[0152] The gap node module 23 is used to traverse the waveform detection diagram of the detection data, collect multiple peak intervals, and define the gap node of the label based on the association between the multiple peak intervals, the light impact coefficient of the label and the type parameter of the label;
[0153] The waveform detection diagram module 24 is used to define the gap traversal range of the label based on the gap nodes of the label and the interval range of the corresponding peak interval, and traverse the gap traversal range of the label to identify the gap of the label;
[0154] A detection module 25, used to define a detection position of the gap between labels based on an outer contour of the gap between labels, sizes of two labels adjacent to the gap, and a model of the printer during the identification process of the gap between labels;
[0155] The printer module 26 is used to match the corresponding detection pattern according to the detection position of the gap between the labels and the outer contour of the gap between the labels, embed the detection pattern into the current program of the printer, and perform targeted detection on the label according to the detection pattern to improve the printer's printing of the label. Embodiment 3
[0156] See also Figure 8 , refer to the following Figure 8 The electronic device 40 according to this embodiment of the present invention will be described. Figure 8 The electronic device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0157] like Figure 8 As shown, the electronic device 40 is in the form of a general computing device. The components of the electronic device 40 may include but are not limited to: at least one processing unit 41, at least one storage unit 42, and a bus 43 connecting different system components (including the storage unit 42 and the processing unit 41).
[0158] The storage unit stores program codes, which can be executed by the processing unit 41, so that the processing unit 41 executes the steps according to various exemplary embodiments of the present invention described in the above “Embodiment Method” section of this specification.
[0159] The storage unit 42 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422 , and may further include a read-only memory unit (ROM) 423 .
[0160] The storage unit 42 may also include a program / utility 424 having a set of (at least one) printer modules 425, such printer modules 425 including but not limited to: an operating system, one or more application programs, other printer modules, and program data, each of which or some combination may include the implementation of a network environment.
[0161] Bus 43 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0162] The electronic device 40 may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 40, and / or any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 44. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 45. Figure 8 As shown, the network adapter 45 communicates with other modules of the electronic device 40 via the bus 43. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup planning systems.
[0163] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0164] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. In addition, it stores computer program instructions, and when the computer program instructions are executed by a computer, the computer executes the above method.
[0165] In addition, the above is a detailed introduction to the label gap recognition method and system provided in the embodiments of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for identifying gaps in labels, It is characterized in that Applied to tag recognition scenarios; The label gap recognition method comprises: Acquire the detection data of the label, and perform abnormal data processing on the detection data of the label to optimize the detection data of the label; perform annular scanning on the label based on the scanning model of the printer, at this time, at least 3 labels in the label are scanned; acquire the detection data of the label according to the scanning of the scanning model of the printer; freeze the detection data of the label, and sort the multiple sub-data in the detection data in sequence along the scanning direction of the scanning model; construct a sub-data set for the sorted multiple sub-data, and check the abnormal data according to the sub-data set, at this time, collect the abnormal model of the label, and trigger the check of abnormal data according to the abnormal model of the label and the sub-data set, match the sub-data set based on the abnormal events in the abnormal model of the label, and locate the abnormal data in the sub-data set; freeze the abnormal data, and perform corresponding abnormal processing according to the abnormal type of the abnormal data, and form an optimized sub-data set; match the detection data of the optimized label according to the optimized sub-data set, and complete the optimization of the detection data of the label; Decompose the detection data of the optimized label according to the time axis and construct a waveform detection diagram of the detection data; Traverse the waveform detection graph of the detection data, and collect multiple peak intervals, define the gap nodes of the label based on the correlation between the multiple peak intervals, the light impact coefficient of the label and the type parameters of the label; freeze the waveform detection graph of the detection data; define the detection graph type based on the waveform detection graph of the detection data; define the traversal mode according to the detection graph type and the printer model, and the traversal mode includes full traversal, preset range traversal, and multi-node traversal; trigger the traversal of the waveform detection graph of the detection data according to the traversal mode; after traversing the waveform detection graph of the detection data, mark multiple peak intervals based on the peak shape, so as to collect multiple peak intervals; associate multiple peak intervals, and output the correlation coefficient between the multiple peak intervals; collect the light impact coefficient of the label and the type parameters of the label; define the gap nodes of the label based on the correlation coefficient between the multiple peak intervals, the light impact coefficient of the label and the type parameters of the label; Define the gap traversal range of the label based on the gap node of the label and the interval range of the corresponding peak interval, and traverse the gap traversal range of the label to identify the gap of the label; freeze the gap node of the label and collect the number of gap nodes of the label; traverse the surrounding peak intervals based on the gap node of the label and collect the interval range of the peak interval; associate the number of gap nodes of the label and the interval range of the peak interval; define the gap traversal range of the label based on the number of gap nodes of the label and the interval range of the peak interval; freeze the gap traversal range of the label; perform an all-round traversal of the gap traversal range of the label, define the outer contour of the gap of the label during the traversal process, and identify the gap of the label; In the process of identifying the gap between the labels, the detection position of the gap between the labels is defined based on the outer contour of the gap between the labels, the size of two labels adjacent to the gap, and the model of the printer; According to the detection position of the gap between the labels and the outer contour of the gap between the labels, the corresponding detection pattern is matched, the detection pattern is embedded into the current program of the printer, and the label is targeted for detection according to the detection pattern to improve the printer's printing of labels.
2. The method for identifying a gap between labels according to claim 1, It is characterized in that The optimized tag detection data is decomposed according to the time axis and a waveform detection diagram of the detection data is constructed, including: Freeze the detection data of the optimized label; Associating the detection data of the optimized label with the time axis of the scan, and performing data decomposition on the detection data of the optimized label along the time axis of the scan; Determine each decomposed data based on the data decomposition of the detection data of the optimized tag; Mark each decomposed data on the corresponding coordinate graph and construct a waveform detection graph of the detection data.
3. The label gap recognition method according to claim 1, It is characterized in that In the process of identifying the gap between the labels, the detection position of the gap between the labels is defined based on the outer contour of the gap between the labels, the size of two labels adjacent to the gap, and the model of the printer, including: In the process of identifying the gap between the labels, the outer contour of the gap between the labels is collected; A contour image is defined based on the outer contour of the gap between the labels; Define the type of gap between labels based on the contour image; Two labels adjacent to the gap are defined based on the left-right traversal of the gap of the label; The sizes of the two tags are defined based on the detection of the two tags.
4. The method for identifying a gap between labels according to claim 3, It is characterized in that In the process of identifying the gap between the labels, the detection position of the gap between the labels is defined based on the outer contour of the gap between the labels, the size of two labels adjacent to the gap, and the model of the printer, and further includes: Defining the difference between the two labels based on the comparison of the sizes of the two labels; If the difference between the two labels is less than the preset difference, it is determined that the sizes of the two labels are consistent; The outer contour of the gap of the associated labels, the size of the two labels adjacent to the gap, and the model of the printer; The detection position table is matched according to the outer contour of the gap between the labels, the sizes of two labels adjacent to the gap, and the model of the printer, and the detection position of the gap between the labels is defined.
5. The method for identifying a gap of a label according to claim 4, It is characterized in that The detection position of the gap between the labels and the outer contour of the gap between the labels are matched with a corresponding detection mode, the detection mode is embedded into the current program of the printer, and the label is targeted for detection according to the detection mode to improve the printer's printing of the label, including: Collect the detection position of the gap between the labels; A coordinate system is constructed based on the gap of the tag, and a spatial coordinate of a detection position of the gap is defined according to a detection position of the gap of the tag; Compare the spatial coordinates of the gap detection position and the center coordinates of the gap of the label, and determine the relative position of the gap detection position and the center of the gap of the label; The relative position of the gap detection position and the center of the gap of the label and the outer contour of the gap of the label are matched to the detection mode table, and the corresponding detection mode is matched.
6. The method for identifying a gap of a label according to claim 5, It is characterized in that The method further includes: matching a corresponding detection mode according to the detection position of the gap between the labels and the outer contour of the gap between the labels, embedding the detection mode into the current program of the printer, and performing targeted detection on the label according to the detection mode to improve the printer's printing of the label, and further includes: In the detection mode, a corresponding detection procedure is determined based on the detection mode; Acquire the program space of the printer and locate the current program of the printer in the program space; Associating the detection program with the current program of the printer and embedding the detection mode into the current program of the printer; The detection pattern is based on which targeted detection of the gap of the label is triggered, and the printer is assisted in printing the label to improve the printer's printing of the label.
7. A label gap recognition system, It is characterized in that The label gap recognition system is applied to the label gap recognition method according to any one of claims 1 to 6, and the label gap recognition system comprises: The optimization module is used to obtain the detection data of the label and perform abnormal data processing on the detection data of the label to optimize the detection data of the label; perform annular scanning on the label based on the scanning model of the printer, at this time, at least 3 labels in the label are scanned; obtain the detection data of the label according to the scanning of the scanning model of the printer; freeze the detection data of the label, and sort the multiple sub-data in the detection data in sequence along the scanning direction of the scanning model; construct a sub-data set for the sorted multiple sub-data, and check the abnormal data according to the sub-data set, at this time, collect the abnormal model of the label, and trigger the checking of abnormal data according to the abnormal model of the label and the sub-data set, match the sub-data set based on the abnormal events in the abnormal model of the label, and locate the abnormal data in the sub-data set; freeze the abnormal data, and perform corresponding abnormal processing according to the abnormal type of the abnormal data, and form an optimized sub-data set; match the detection data of the optimized label according to the optimized sub-data set, and complete the optimization of the detection data of the label; The waveform detection graph module is used to decompose the detection data of the optimized label according to the time axis and construct a waveform detection graph of the detection data; A gap node module is used to traverse the waveform detection graph of the detection data, collect multiple peak intervals, and define the gap nodes of the label based on the association between the multiple peak intervals, the light impact coefficient of the label, and the type parameters of the label; freeze the waveform detection graph of the detection data; define the detection graph type based on the waveform detection graph of the detection data; define the traversal mode according to the detection graph type and the printer model, and the traversal mode includes full traversal, preset range traversal, and multi-node traversal; trigger the traversal of the waveform detection graph of the detection data according to the traversal mode; after traversing the waveform detection graph of the detection data, mark multiple peak intervals based on the peak shape, so as to collect multiple peak intervals; associate multiple peak intervals, and output the association coefficient between the multiple peak intervals; collect the light impact coefficient of the label and the type parameters of the label; define the gap node of the label based on the association coefficient between the multiple peak intervals, the light impact coefficient of the label, and the type parameters of the label; An identification module is used to define a gap traversal range of a label based on a gap node of the label and an interval range of a corresponding peak interval, and traverse the gap traversal range of the label to identify the gap of the label; freeze the gap node of the label and collect the number of gap nodes of the label; traverse the surrounding peak intervals based on the gap node of the label and collect the interval range of the peak interval; associate the number of gap nodes of the label and the interval range of the peak interval; define the gap traversal range of the label based on the number of gap nodes of the label and the interval range of the peak interval; freeze the gap traversal range of the label; perform an all-round traversal of the gap traversal range of the label, define the outer contour of the gap of the label during the traversal process, and identify the gap of the label; A detection module, used to define a detection position of the gap between labels based on an outer contour of the gap between labels, sizes of two labels adjacent to the gap, and a model of the printer during the identification process of the gap between labels; The printer module is used to match the corresponding detection pattern according to the detection position of the gap of the label and the outer contour of the gap of the label, embed the detection pattern into the current program of the printer, and perform targeted detection on the label according to the detection pattern to improve the printer's printing of the label.
