Black label detection method and system of thermal printer
By positioning the laser emitter in the thermal printer, analyzing the laser signal, dividing the detection area and using image recognition technology, the problem of black mark detection accuracy during the printing process is solved, and accurate detection of the black mark position and adaptive control of printing parameters are achieved. .
Patent Information
- Application Number
- CN202411241540.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-09-05
AI Technical Summary
Existing thermal printers cannot perform manual detection during the printing process, which affects the detection accuracy of the black mark position.
By positioning the laser emitter of the thermal printer, it outputs a laser beam and collects the laser signal that penetrates the printing medium, analyzes the laser parameters, divides the target parameter area and sub-target area, and combines image recognition technology to construct a key detection area for targeted detection. Determine the position of the black mark and adjust the printing parameters based on the feedback laser parameters.
It achieves multiple determinations and detection accuracy of the black mark position, ensures spontaneous regulation of printing parameters, and improves printing quality.
Smart Images

Figure CN118752912A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of thermal printers, and in particular to a black mark detection method and system for thermal printers. Background Art
[0002] With the development of science and technology, thermal printers are gradually used in life, and print on the printing medium through the laser print head. The printing medium is the corresponding printing paper. In the prior art, the printing medium is marked with the corresponding black mark position. In the detection of the black mark position, manual positioning is generally adopted, and the black mark position is marked based on the corresponding positioning coordinates. However, the printing medium cannot be manually detected during the printing process, which affects the detection accuracy of the black mark position. 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 black mark detection method and system for a thermal printer, which locates the laser emitter of the thermal printer and triggers the laser emitter to output a laser beam to a printing medium; collects a laser signal of the laser beam penetrating the printing medium, and determines multiple laser parameters based on signal analysis of the laser signal; defines a target parameter area based on multiple laser parameters and reaction parameters of the printing medium, and divides multiple sub-target areas according to the target parameter area, introduces a target parameter area, and controls multiple dimensions from multiple laser parameters and reaction parameters of the printing medium, thereby ensuring the accuracy of the target parameter area, and further ensuring the accuracy of multiple sub-target areas.
[0004] At the same time, the positions of multiple sub-target areas are marked, and corresponding camera ranges are defined according to the positions of the multiple sub-target areas to collect corresponding multiple images; a first position predicted by the black mark position is defined according to image recognition of the multiple images, and at the same time, a second position predicted by the black mark position is defined according to multiple laser parameters in the target parameter area; a key detection area is constructed based on the second position and the first position; the key detection area is frozen, and a detection method is defined based on the key detection area and the corresponding laser parameters, and the key detection area is targeted for detection along the detection method, so that the black mark position is determined based on the targeted detection definition of the key detection area, which ensures multiple determinations of the black mark position and the detection accuracy of the black mark position, so that the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, and the printing parameters are realized. Spontaneous regulation of the laser printer by the printing parameters.
[0005] The embodiment of the present invention provides a black mark detection method for a thermal printer, which is applied to a black mark detection scenario of a thermal printer; The black mark detection method of the thermal printer comprises: Positioning a laser emitter of a thermal printer and triggering the laser emitter to output a laser beam toward a print medium; Collecting a laser signal of a laser beam penetrating a printing medium, and determining a plurality of laser parameters according to a signal analysis of the laser signal; Defining a target parameter area based on a plurality of laser parameters and a reaction parameter of a printing medium, and dividing the target parameter area into a plurality of sub-target areas; Marking the positions of the plurality of sub-target areas, and defining corresponding camera ranges according to the positions of the plurality of sub-target areas, so as to collect the corresponding plurality of images; Defining a first position predicted by a black mark position according to image recognition of a plurality of images, and defining a second position predicted by a black mark position according to a plurality of laser parameters in a target parameter area; constructing a key detection area based on the second position and the first position; Freeze the key detection area, and define the detection method based on the key detection area and the corresponding laser parameters. Perform targeted detection on the key detection area along the detection method to determine the black mark position, and match the corresponding printing parameters according to the laser parameters fed back by the black mark position.
[0006] Optionally, the positioning of a laser emitter of a thermal printer and triggering the laser emitter to output a laser beam to a printing medium includes: Locate thermal printer; positioning a laser emitter based on traversal of a thermal printer; Collect the location of the laser transmitter and the printing area of the thermal printer; Defining the location of the print medium based on scanning of the print area of the thermal printer; The position of the laser emitter and the position of the printing medium are associated, and a laser path is defined according to the position of the laser emitter and the position of the printing medium. Based on the laser path, the laser emitter is triggered to output a laser beam to the printing medium until the laser irradiation of the printing medium is completed.
[0007] Optionally, the collecting of laser signals of the laser beam penetrating the printing medium and determining a plurality of laser parameters according to signal analysis of the laser signals include: The laser beam is irradiated onto the printing medium; The laser beam penetrates the printing medium and forms a laser signal; defining a first parsing parameter based on the laser signal and the type of the printing medium; Defining a second parsing parameter according to the model of the laser transmitter and the type of the printing medium; defining a parsing method based on the second parsing parameter, the first parsing parameter and the print medium; Freeze the analysis method and the laser signal; Associating the analysis method with the laser signal; The laser signal is analyzed based on the analysis method, and a plurality of corresponding laser parameters are determined.
[0008] Optionally, defining a target parameter area based on a plurality of laser parameters and a reaction parameter of a printing medium, and dividing the target parameter area into a plurality of sub-target areas, includes: Freeze multiple laser parameters; collecting reaction parameters of the printing medium based on the irradiation of the laser beam on the printing medium; Defining the position corresponding to the reaction parameters of the printing medium, and at the same time, defining the positions corresponding to a plurality of laser parameters; In the same position, correlating the reaction parameters of the printing medium and the corresponding laser parameters; Defining a plurality of parameter combinations based on a plurality of laser parameters and a reaction parameter of a printing medium, defining a region boundary line according to a comparison of the plurality of parameter combinations, and constructing a target parameter region along the region boundary line; A plurality of sub-target regions are divided according to the target parameter region and the corresponding region division method.
[0009] Optionally, marking the positions of the plurality of sub-target areas and defining corresponding camera ranges according to the positions of the plurality of sub-target areas to collect the corresponding plurality of images includes: Freeze multiple sub-target areas and collect positions corresponding to the multiple sub-target areas; Mark the locations of multiple sub-target areas; Constructing a camera area according to the positions of the multiple sub-target areas, and fixing the center position of the camera area; Defining a moving trajectory of the camera center based on the center position of the camera area and the outer contour of the camera area; Define the corresponding camera range according to the moving trajectory of the camera center; The corresponding camera is triggered according to the camera range, and the corresponding multiple images are collected.
[0010] Optionally, defining a first position predicted by a black mark position according to image recognition of a plurality of images, and defining a second position predicted by a black mark position according to a plurality of laser parameters in a target parameter area; and constructing a key detection area based on the second position and the first position, comprises: Freeze multiple images; Define corresponding image types based on multiple images; Defining a recognition method according to a plurality of images and corresponding image types; Based on the recognition method, online recognition of multiple images is triggered, and a first position predicted by the black mark position is defined.
[0011] Optionally, the method further comprises: defining a first position predicted by a black mark position according to image recognition of a plurality of images, and defining a second position predicted by a black mark position according to a plurality of laser parameters in a target parameter area; and constructing a key detection area based on the second position and the first position, further comprising: Freeze the target parameter area, and match multiple corresponding laser parameters according to the target parameter area; Defining a target parameter range based on screening of multiple laser parameters; Defining a second position predicted by the black mark position according to the target parameter range; The second position and the first position are associated, and a key detection area is constructed based on the second position and the first position.
[0012] Optionally, the key detection area is fixed, and a detection method is defined based on the key detection area and the corresponding laser parameters, and the key detection area is targeted for detection along the detection method to determine the black mark position, and the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, including: Determine the key inspection area; Associate key detection areas and corresponding laser parameters; The detection method is defined based on the key detection area, the corresponding laser parameters and the detection method comparison table.
[0013] Optionally, the key detection area is frozen, and a detection method is defined based on the key detection area and the corresponding laser parameters, and the key detection area is targeted for detection along the detection method to determine the black mark position, and the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, and further includes: Freeze the detection mode; perform targeted detection on key detection areas along the detection mode, and output multiple detection targets; Match corresponding laser parameters and reaction parameters according to multiple detection targets, and construct a detection parameter combination according to the laser parameters and reaction parameters; Defining a parameter difference amount according to a comparison between a detection parameter combination and a preset detection parameter combination; Determine the black mark position based on the comparison between the parameter difference and the preset parameter difference threshold; Locate the black mark position and match the corresponding printing parameters according to the laser parameters fed back by the black mark position.
[0014] In addition, an embodiment of the present invention further provides a black mark detection system for a thermal printer, the black mark detection system for a thermal printer comprising: A laser emission module, used for locating the laser emitter of the thermal printer and triggering the laser emitter to output a laser beam to the printing medium; A laser parameter module, used to collect a laser signal of a laser beam penetrating a printing medium, and determine a plurality of laser parameters according to a signal analysis of the laser signal; A sub-target area module, used to define a target parameter area based on a plurality of laser parameters and a reaction parameter of a printing medium, and divide the target parameter area into a plurality of sub-target areas; An image module, used for marking the positions of the plurality of sub-target areas, and defining corresponding camera ranges according to the positions of the plurality of sub-target areas, so as to collect the corresponding plurality of images; A key detection area module, used to define a first position predicted by a black mark position according to image recognition of a plurality of images, and at the same time, define a second position predicted by a black mark position according to a plurality of laser parameters in a target parameter area; and construct a key detection area based on the second position and the first position; The black mark detection module is used to freeze the key detection area, and define the detection method based on the key detection area and the corresponding laser parameters, and perform targeted detection on the key detection area along the detection method to determine the black mark position, and match the corresponding printing parameters according to the laser parameters fed back by the black mark position.
[0015] In an embodiment of the present invention, through the method in the embodiment of the present invention, the laser emitter of the thermal printer is positioned, and the laser emitter is triggered to output a laser beam to the printing medium; the laser signal of the laser beam penetrating the printing medium is collected, and a plurality of laser parameters are determined based on the signal analysis of the laser signal; a target parameter area is defined based on the plurality of laser parameters and the reaction parameters of the printing medium, and a plurality of sub-target areas are divided according to the target parameter area, a target parameter area is introduced, and multiple dimensions are controlled from the plurality of laser parameters and the reaction parameters of the printing medium, thereby ensuring the accuracy of the target parameter area, and further ensuring the accuracy of the plurality of sub-target areas.
[0016] At the same time, the positions of multiple sub-target areas are marked, and corresponding camera ranges are defined according to the positions of the multiple sub-target areas to collect corresponding multiple images; a first position predicted by the black mark position is defined according to image recognition of the multiple images, and at the same time, a second position predicted by the black mark position is defined according to multiple laser parameters in the target parameter area; a key detection area is constructed based on the second position and the first position; the key detection area is frozen, and a detection method is defined based on the key detection area and the corresponding laser parameters, and the key detection area is targeted for detection along the detection method, so that the black mark position is determined based on the targeted detection definition of the key detection area, which ensures multiple determinations of the black mark position and the detection accuracy of the black mark position, so that the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, and the printing parameters are realized. Spontaneous regulation of the laser printer by the printing parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] 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.
[0018] Figure 1 is a schematic flow chart of a black mark detection method for a thermal printer in an embodiment of the present invention; Figure 2 is a flow chart of S11 in the black mark detection method of a thermal printer in an embodiment of the present invention; Figure 3 is a flow chart of S12 in the black mark detection method of a thermal printer in an embodiment of the present invention; Figure 4 is a schematic flow chart of S13 in the black mark detection method of a thermal printer in an embodiment of the present invention; Figure 5 is a flow chart of S14 in the black mark detection method of a thermal printer in an embodiment of the present invention; Figure 6 is a flow chart of S15 in the black mark detection method of a thermal printer in an embodiment of the present invention; Figure 7 is a schematic flow chart of S16 in the black mark detection method of a thermal printer in an embodiment of the present invention; Figure 8 Schematic diagram of the structure of the black mark detection system of the thermal printer in the embodiment of the present invention; Fig. 9 The figure is a hardware diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0019] 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.
[0020] See also Figures 1 to 9 A black mark detection method for a thermal printer is applied to a black mark detection scenario of a thermal printer; the black mark detection method for a thermal printer includes: Step S11: positioning the laser emitter of the thermal printer and triggering the laser emitter to output a laser beam to the printing medium; Step S12: collecting a laser signal of the laser beam penetrating the printing medium, and determining a plurality of laser parameters according to signal analysis of the laser signal; Step S13: defining a target parameter area based on a plurality of laser parameters and a reaction parameter of the printing medium, and dividing the target parameter area into a plurality of sub-target areas; Step S14: marking the positions of the plurality of sub-target areas, and defining corresponding camera ranges according to the positions of the plurality of sub-target areas to collect the corresponding plurality of images; Step S15: defining a first position predicted by the black mark position according to image recognition of a plurality of images, and defining a second position predicted by the black mark position according to a plurality of laser parameters in the target parameter area; and constructing a key detection area based on the second position and the first position; Step S16: freeze the key detection area, and define the detection method based on the key detection area and the corresponding laser parameters, and perform targeted detection on the key detection area along the detection method to determine the black mark position, and match the corresponding printing parameters according to the laser parameters fed back by the black mark position.
[0021] In an embodiment of the present invention, through the method in the embodiment of the present invention, the laser emitter of the thermal printer is positioned, and the laser emitter is triggered to output a laser beam to the printing medium; the laser signal of the laser beam penetrating the printing medium is collected, and a plurality of laser parameters are determined based on the signal analysis of the laser signal; a target parameter area is defined based on the plurality of laser parameters and the reaction parameters of the printing medium, and a plurality of sub-target areas are divided according to the target parameter area, a target parameter area is introduced, and multiple dimensions are controlled from the plurality of laser parameters and the reaction parameters of the printing medium, thereby ensuring the accuracy of the target parameter area, and further ensuring the accuracy of the plurality of sub-target areas.
[0022] At the same time, the positions of multiple sub-target areas are marked, and corresponding camera ranges are defined according to the positions of the multiple sub-target areas to collect corresponding multiple images; a first position predicted by the black mark position is defined according to image recognition of the multiple images, and at the same time, a second position predicted by the black mark position is defined according to multiple laser parameters in the target parameter area; a key detection area is constructed based on the second position and the first position; the key detection area is frozen, and a detection method is defined based on the key detection area and the corresponding laser parameters, and the key detection area is targeted for detection along the detection method, so that the black mark position is determined based on the targeted detection definition of the key detection area, which ensures multiple determinations of the black mark position and the detection accuracy of the black mark position, so that the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, and the printing parameters are realized. Spontaneous regulation of the laser printer by the printing parameters.
[0023] refer to Figure 2, in step S11, positioning the laser emitter of the thermal printer, and triggering the laser emitter to output a laser beam to the printing medium; In the specific implementation process of the present invention, the specific steps may be: S111: Positioning thermal printer; S112: Positioning a laser emitter based on the traversal of the thermal printer; S113: collecting the location of the laser transmitter and the printing area of the thermal printer; S114: defining the location of the printing medium according to scanning of the printing area of the thermal printer; S115: Associating the position of the laser emitter and the position of the printing medium, and defining a laser path according to the position of the laser emitter and the position of the printing medium, triggering the laser emitter to output a laser beam to the printing medium based on the laser path until the laser irradiation of the printing medium is completed.
[0024] In an embodiment of the present application, a thermal printer is located, and a traversal is performed on the thermal printer. Based on the traversal of the thermal printer, a laser emitter is located, thereby introducing the laser emitter and knowing the position of the laser emitter.
[0025] At this time, the position of the laser emitter and the printing area of the thermal printer are collected. At the same time, the position of the printing medium is defined based on the scanning of the printing area of the thermal printer, and the position of the printing medium is introduced, so as to further process the position of the printing medium and the position of the laser emitter, thereby realizing the interaction between the position of the printing medium and the position of the laser emitter.
[0026] Therefore, the position of the laser emitter and the position of the printing medium are associated, and the laser path is defined according to the position of the laser emitter and the position of the printing medium, so that the laser path is clarified by the position of the laser emitter and the position of the printing medium, and the processing of the laser path is introduced, so that the laser emitter is triggered to output a laser beam to the printing medium based on the laser path until the laser irradiation of the printing medium is completed, thereby ensuring full coverage of the printing medium and performing a complete scan on the printing medium.
[0027] refer to Figure 3 , in step S12, a laser signal of the laser beam penetrating the printing medium is collected, and a plurality of laser parameters are determined according to a signal analysis of the laser signal; In the specific implementation process of the present invention, the specific steps may be: S121: irradiating the laser beam to the printing medium; S122: The laser beam penetrates the printing medium and forms a laser signal; S123: defining a first analysis parameter based on the laser signal and the type of the printing medium; S124: defining a second analysis parameter according to the model of the laser transmitter and the type of the printing medium; S125: defining a parsing method based on the second parsing parameter, the first parsing parameter and the print medium; S126: freeze the analysis method and the laser signal; S127: Associating the analysis method with the laser signal; S128: Perform signal analysis on the laser signal based on the analysis method, and determine corresponding multiple laser parameters.
[0028] In an embodiment of the present application, a laser beam is irradiated onto a printing medium, and laser processing is performed on the printing medium. At this time, the laser beam penetrates the printing medium and forms a laser signal, which is introduced and further processed.
[0029] At this time, the first analytical parameter is defined based on the laser signal and the type of printing medium, thereby fixing the first analytical parameter. At the same time, the second analytical parameter is defined according to the model of the laser transmitter and the type of printing medium, and the second analytical parameter and the first analytical parameter are introduced, and then the second analytical parameter and the first analytical parameter are interacted.
[0030] Therefore, a parsing method is defined based on the second parsing parameter, the first parsing parameter and the printing medium, and multi-dimensional control is performed according to the second parsing parameter, the first parsing parameter and the printing medium, thereby ensuring the accuracy of the parsing method. At the same time, the parsing method and the laser signal are frozen; the parsing method and the laser signal are associated; the laser signal is analyzed based on the parsing method, and the corresponding multiple laser parameters are determined, multiple laser parameters are introduced, and the analysis of the laser signal is completed.
[0031] refer to Figure 4 In step S13, a target parameter area is defined based on a plurality of laser parameters and a reaction parameter of the printing medium, and a plurality of sub-target areas are divided according to the target parameter area; In the specific implementation process of the present invention, the specific steps may be: S131: freeze multiple laser parameters; S132: collecting reaction parameters of the printing medium based on the irradiation of the laser beam on the printing medium; S133: defining the position corresponding to the reaction parameter of the printing medium, and at the same time, defining the positions corresponding to a plurality of laser parameters; S134: in the same position, associating the reaction parameters of the printing medium and the corresponding laser parameters; S135: defining a plurality of parameter combinations based on a plurality of laser parameters and a reaction parameter of the printing medium, defining a region boundary line according to a comparison of the plurality of parameter combinations, and constructing a target parameter region along the region boundary line; S136: Divide the target parameter region into a plurality of sub-target regions according to the target parameter region and the corresponding region division method.
[0032] In an embodiment of the present application, multiple laser parameters are frozen and controlled. At the same time, reaction parameters of the printing medium are collected based on the irradiation of the laser beam of the printing medium, and the reaction parameters of the printing medium are collected and further controlled.
[0033] At this time, the position corresponding to the reaction parameters of the printing medium is defined, and at the same time, the positions corresponding to multiple laser parameters are defined. The positions corresponding to the reaction parameters and the positions corresponding to the laser parameters are introduced, so as to perform position comparison on the positions corresponding to the reaction parameters and the positions corresponding to the laser parameters.
[0034] Therefore, in the same position, the reaction parameters of the printing medium and the corresponding laser parameters are associated, the reaction parameters of the printing medium and the corresponding laser parameters are interacted, multiple parameter combinations are defined based on multiple laser parameters and the reaction parameters of the printing medium, and the region boundary line is defined according to the comparison of the multiple parameter combinations, and the target parameter region is constructed along the region boundary line, so that the corresponding target parameter region is clarified based on the reaction parameters of the printing medium and the corresponding laser parameters, and further processing of the target parameter region is achieved, and multiple sub-target regions are divided according to the target parameter region and the corresponding region division method, thereby ensuring the management and control of multiple sub-target regions, so as to grasp the precise management and control of the target parameter region based on the management and control of multiple sub-target regions.
[0035] refer to Figure 5 , S14: marking the positions of the plurality of sub-target areas, and defining corresponding camera ranges according to the positions of the plurality of sub-target areas to collect the corresponding plurality of images; In the specific implementation process of the present invention, the specific steps may be: S141: freeze multiple sub-target areas, and collect positions corresponding to the multiple sub-target areas; S142: Mark the positions of multiple sub-target areas; S143: constructing a camera area according to the positions of the multiple sub-target areas, and fixing the center position of the camera area; S144: defining a moving trajectory of the imaging center based on the central position of the imaging area and the outer contour of the imaging area; S145: defining a corresponding imaging range according to the moving trajectory of the imaging center; S146: triggering a corresponding camera according to the camera range, and collecting a corresponding plurality of images.
[0036] In an embodiment of the present application, multiple sub-target areas are frozen, and the positions corresponding to the multiple sub-target areas are collected, and the positions corresponding to the multiple sub-target areas are controlled. At this time, the positions of the multiple sub-target areas are marked, and a camera area is constructed according to the positions of the multiple sub-target areas, so as to clarify the camera area, and further freeze the center position of the camera area, thereby ensuring the accuracy of the camera area and the center position of the camera area.
[0037] At this time, the moving trajectory of the camera center is defined based on the central position of the camera area and the outer contour of the camera area, the interaction of the central position of the camera area and the outer contour of the camera area is introduced, and multi-dimensional control is performed according to the central position of the camera area and the outer contour of the camera area to facilitate the definition of the moving trajectory of the camera center, thereby realizing the determination of the moving trajectory of the camera center.
[0038] At the same time, the corresponding camera range is defined according to the moving trajectory of the camera center, and the camera range is clarified, so that the corresponding camera is triggered according to the camera range, and the corresponding multiple images are collected, thereby realizing the control of multiple images.
[0039] refer to Figure 6 , S15: defining a first position predicted by a black mark position according to image recognition of a plurality of images, and defining a second position predicted by a black mark position according to a plurality of laser parameters in a target parameter area; constructing a key detection area based on the second position and the first position; In the specific implementation process of the present invention, the specific steps may be: S151: freeze multiple images; S152: defining corresponding image types based on multiple images; S153: defining a recognition method according to the plurality of images and corresponding image types; S154: triggering online recognition of multiple images based on the recognition method, and defining a first position predicted by the black mark position; S155: freeze the target parameter area, and match corresponding multiple laser parameters according to the target parameter area; S156: defining a target parameter range according to screening of a plurality of laser parameters; defining a second position predicted by the black mark position according to the target parameter range; S157: Associating the second position with the first position, and constructing a key detection area based on the second position and the first position.
[0040] In an embodiment of the present application, a plurality of images are frozen, and control is performed on the plurality of images, and corresponding image types are defined based on the plurality of images, thereby clarifying the image types to facilitate further processing of the plurality of images and the corresponding image types.
[0041] At this time, the recognition method is defined according to multiple images and corresponding image types, and multi-dimensional control is performed based on the multiple images and corresponding image types, thereby realizing the multi-dimensional definition of the recognition method and ensuring the accuracy of the recognition method.
[0042] At the same time, online recognition of multiple images is triggered based on the recognition method, and synchronous recognition is performed on multiple images, and targeted recognition is performed along the recognition method, and the first position predicted by the black mark position is defined, thereby introducing the first position predicted by the black mark position.
[0043] At the same time, the target parameter area is fixed, and the corresponding multiple laser parameters are matched according to the target parameter area, and the target parameter area is controlled, and multiple laser parameters in the target parameter area are introduced, so as to facilitate further processing using the multiple laser parameters in the target parameter area. Further, the target parameter range is defined according to the screening of multiple laser parameters; the second position predicted by the black mark position is defined according to the target parameter range, and the second position predicted by the black mark position is introduced, so as to associate the second position with the first position, and construct a key detection area based on the second position and the first position, and the key detection area is controlled through the interaction of the second position and the first position, so as to ensure the accuracy of the key detection area.
[0044] refer to Figure 7 , S16: freeze the key detection area, and define the detection method based on the key detection area and the corresponding laser parameters, and perform targeted detection on the key detection area along the detection method to determine the black mark position, and match the corresponding printing parameters according to the laser parameters fed back by the black mark position; In the specific implementation process of the present invention, the specific steps may be: S161: freeze the key detection area; S162: Associating key detection areas and corresponding laser parameters; S163: defining a detection method based on the key detection area, the corresponding laser parameters and the detection method comparison table; S164: freeze the detection mode; perform targeted detection on the key detection area along the detection mode, and output multiple detection targets; S165: matching corresponding laser parameters and reaction parameters according to multiple detection targets, and constructing a detection parameter combination according to the laser parameters and reaction parameters; S166: defining a parameter difference amount according to a comparison between the detection parameter combination and a preset detection parameter combination; determining a black mark position based on a comparison between the parameter difference amount and a preset parameter difference amount threshold; S167: Locate the black mark position, and match corresponding printing parameters according to the laser parameters fed back by the black mark position.
[0045] In the specific implementation process of the present invention, the positions of multiple sub-target areas are marked, and corresponding camera ranges are defined according to the positions of the multiple sub-target areas to collect corresponding multiple images; a first position predicted by the black mark position is defined according to image recognition of the multiple images, and at the same time, a second position predicted by the black mark position is defined according to multiple laser parameters in the target parameter area; a key detection area is constructed based on the second position and the first position; the key detection area is frozen, and a detection method is defined based on the key detection area and the corresponding laser parameters, and the key detection area is targeted for detection along the detection method, so that the black mark position is determined based on the targeted detection definition of the key detection area, which ensures multiple determinations of the black mark position and the detection accuracy of the black mark position, so that the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, and the printing parameters are realized. Self-regulation of the laser printer.
[0046] In an embodiment of the present application, a key detection area is frozen and processed. At this time, the key detection area and the corresponding laser parameters are associated, and the laser parameters in the key detection area are controlled, and the key detection area is further processed.
[0047] At this time, the detection method is defined based on the key detection area, the corresponding laser parameters and the detection method comparison table, and interaction is performed based on the key detection area, the corresponding laser parameters and the detection method comparison table, thereby ensuring the accuracy of the detection method.
[0048] Therefore, the detection method is fixed; targeted detection is carried out on the key detection area along the detection method, and multiple detection targets are output, and corresponding multiple detection targets are output based on the key detection area, and interaction is carried out with respect to the multiple detection targets, so as to match corresponding laser parameters and reaction parameters according to the multiple detection targets, and construct a detection parameter combination according to the laser parameters and reaction parameters, introduce a detection parameter combination, and control the detection parameter combination in the laser parameters and reaction parameters.
[0049] The parameter difference is defined based on the comparison between the detection parameter combination and the preset detection parameter combination; the black mark position is determined based on the comparison between the parameter difference and the preset parameter difference threshold, the black mark position is clarified, and the precise positioning of the black mark position is achieved, so that the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, thereby achieving spontaneous regulation of the laser printer by the printing parameters.
[0050] In an embodiment of the present invention, through the method in the embodiment of the present invention, the laser emitter of the thermal printer is positioned, and the laser emitter is triggered to output a laser beam to the printing medium; the laser signal of the laser beam penetrating the printing medium is collected, and a plurality of laser parameters are determined based on the signal analysis of the laser signal; a target parameter area is defined based on the plurality of laser parameters and the reaction parameters of the printing medium, and a plurality of sub-target areas are divided according to the target parameter area, a target parameter area is introduced, and multiple dimensions are controlled from the plurality of laser parameters and the reaction parameters of the printing medium, thereby ensuring the accuracy of the target parameter area, and further ensuring the accuracy of the plurality of sub-target areas.
[0051] At the same time, the positions of multiple sub-target areas are marked, and corresponding camera ranges are defined according to the positions of the multiple sub-target areas to collect corresponding multiple images; a first position predicted by the black mark position is defined according to image recognition of the multiple images, and at the same time, a second position predicted by the black mark position is defined according to multiple laser parameters in the target parameter area; a key detection area is constructed based on the second position and the first position; the key detection area is frozen, and a detection method is defined based on the key detection area and the corresponding laser parameters, and the key detection area is targeted for detection along the detection method, so that the black mark position is determined based on the targeted detection definition of the key detection area, which ensures multiple determinations of the black mark position and the detection accuracy of the black mark position, so that the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, and the printing parameters are realized. Spontaneous regulation of the laser printer by the printing parameters.
[0052] See also Figure 8 , Figure 8 It is a schematic diagram of the structure of the black mark detection system of the thermal printer in an embodiment of the present invention.
[0053] like Figure 8 As shown, a black mark detection system for a thermal printer, the black mark detection system for a thermal printer comprises: The laser emitting module 21 is used to locate the laser emitter of the thermal printer and trigger the laser emitter to output a laser beam to the printing medium; The laser parameter module 22 is used to collect the laser signal of the laser beam penetrating the printing medium, and determine a plurality of laser parameters according to the signal analysis of the laser signal; A sub-target area module 23, used to define a target parameter area based on a plurality of laser parameters and a reaction parameter of a printing medium, and divide the target parameter area into a plurality of sub-target areas; An image module 24, used to mark the positions of the plurality of sub-target areas, and define corresponding camera ranges according to the positions of the plurality of sub-target areas, so as to collect the corresponding plurality of images; The key detection area module 25 is used to define a first position predicted by the black mark position according to the image recognition of multiple images, and at the same time, define a second position predicted by the black mark position according to multiple laser parameters in the target parameter area; and construct a key detection area based on the second position and the first position; The black mark detection module 26 is used to freeze the key detection area, and define the detection method based on the key detection area and the corresponding laser parameters, and perform targeted detection on the key detection area along the detection method to determine the black mark position, and match the corresponding printing parameters according to the laser parameters fed back by the black mark position.
[0054] See also Fig. 9 , refer to the following Fig. 9 The electronic device 40 according to this embodiment of the present invention will be described. Fig. 9 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.
[0055] like Fig. 9 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).
[0056] 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.
[0057] 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 .
[0058] The storage unit 42 may also include a program / utility 424 having a set of (at least one) black mark detection modules 425, such black mark detection modules 425 including but not limited to: an operating system, one or more application programs, other black mark detection modules, and program data, each of which or some combination may include the implementation of a network environment.
[0059] 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.
[0060] 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. Fig. 9 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 Fig. 9 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.
[0061] 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.
[0062] 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.
[0063] In addition, the black mark detection method and system of the thermal printer provided in the embodiment of the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode 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 idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for detecting a black mark of a thermal printer, characterized in that: Applied to black mark detection scenarios of thermal printers; The black mark detection method of the thermal printer comprises: Positioning a laser emitter of a thermal printer and triggering the laser emitter to output a laser beam toward a print medium; Collecting a laser signal of a laser beam penetrating a printing medium, and determining a plurality of laser parameters according to a signal analysis of the laser signal; Defining a target parameter area based on a plurality of laser parameters and a reaction parameter of a printing medium, and dividing the target parameter area into a plurality of sub-target areas; Marking the positions of the plurality of sub-target areas, and defining corresponding camera ranges according to the positions of the plurality of sub-target areas, so as to collect the corresponding plurality of images; Defining a first position predicted by a black mark position according to image recognition of a plurality of images, and defining a second position predicted by a black mark position according to a plurality of laser parameters in a target parameter area; constructing a key detection area based on the second position and the first position; Freeze the key detection area, and define the detection method based on the key detection area and the corresponding laser parameters. Perform targeted detection on the key detection area along the detection method to determine the black mark position, and match the corresponding printing parameters according to the laser parameters fed back by the black mark position.
2. The black mark detection method of a thermal printer according to claim 1, characterized in that: The method of positioning a laser emitter of a thermal printer and triggering the laser emitter to output a laser beam to a printing medium includes: Locate thermal printer; positioning a laser emitter based on traversal of a thermal printer; Collect the location of the laser transmitter and the printing area of the thermal printer; Defining the location of the print medium based on scanning of the print area of the thermal printer; The position of the laser emitter and the position of the printing medium are associated, and a laser path is defined according to the position of the laser emitter and the position of the printing medium. Based on the laser path, the laser emitter is triggered to output a laser beam to the printing medium until the laser irradiation of the printing medium is completed.
3. The black mark detection method of a thermal printer according to claim 2, characterized in that: The collecting of the laser signal of the laser beam penetrating the printing medium and determining a plurality of laser parameters according to the signal analysis of the laser signal include: The laser beam is irradiated onto the printing medium; The laser beam penetrates the printing medium and forms a laser signal; defining a first parsing parameter based on the laser signal and the type of the printing medium; Defining a second parsing parameter according to the model of the laser transmitter and the type of the printing medium; defining a parsing method based on the second parsing parameter, the first parsing parameter and the print medium; Freeze the analysis method and the laser signal; Associating the analysis method with the laser signal; The laser signal is analyzed based on the analysis method, and a plurality of corresponding laser parameters are determined.
4. The black mark detection method of a thermal printer according to claim 3, characterized in that: The target parameter area is defined based on a plurality of laser parameters and a reaction parameter of the printing medium, and a plurality of sub-target areas are divided according to the target parameter area, including: Freeze multiple laser parameters; collecting reaction parameters of the printing medium based on the irradiation of the laser beam on the printing medium; Defining the position corresponding to the reaction parameters of the printing medium, and at the same time, defining the positions corresponding to a plurality of laser parameters; In the same position, correlating the reaction parameters of the printing medium and the corresponding laser parameters; Defining a plurality of parameter combinations based on a plurality of laser parameters and a reaction parameter of a printing medium, defining a region boundary line according to a comparison of the plurality of parameter combinations, and constructing a target parameter region along the region boundary line; A plurality of sub-target regions are divided according to the target parameter region and the corresponding region division method.
5. The black mark detection method of a thermal printer according to claim 4, characterized in that: The marking of the positions of the plurality of sub-target areas and defining corresponding camera ranges according to the positions of the plurality of sub-target areas to collect the corresponding plurality of images includes: Freeze multiple sub-target areas and collect positions corresponding to the multiple sub-target areas; Mark the locations of multiple sub-target areas; Constructing a camera area according to the positions of the multiple sub-target areas, and fixing the center position of the camera area; Defining a moving trajectory of the camera center based on the center position of the camera area and the outer contour of the camera area; Define the corresponding camera range according to the moving trajectory of the camera center; The corresponding camera is triggered according to the camera range, and the corresponding multiple images are collected.
6. The black mark detection method of a thermal printer according to claim 5, characterized in that: The first position predicted by the black mark position is defined according to the image recognition of the plurality of images, and at the same time, the second position predicted by the black mark position is defined according to the plurality of laser parameters in the target parameter area; A key detection area is constructed based on the second position and the first position, including: Freeze multiple images; Define corresponding image types based on multiple images; Defining a recognition method according to a plurality of images and corresponding image types; Based on the recognition method, online recognition of multiple images is triggered, and a first position predicted by the black mark position is defined.
7. The black mark detection method of a thermal printer according to claim 6, characterized in that: The first position predicted by the black mark position is defined according to the image recognition of the plurality of images, and at the same time, the second position predicted by the black mark position is defined according to the plurality of laser parameters in the target parameter area; Constructing a key detection area based on the second position and the first position also includes: Freeze the target parameter area, and match multiple corresponding laser parameters according to the target parameter area; Defining a target parameter range according to screening of a plurality of laser parameters; defining a second position predicted by a black mark position according to the target parameter range; The second position and the first position are associated, and a key detection area is constructed based on the second position and the first position.
8. The black mark detection method of a thermal printer according to claim 7, characterized in that: The key detection area is fixed, and a detection method is defined based on the key detection area and the corresponding laser parameters, and the key detection area is detected in a targeted manner along the detection method to determine the black mark position, and the corresponding printing parameters are matched according to the laser parameters fed back by the black mark position, including: Determine the key inspection area; Associate key detection areas and corresponding laser parameters; The detection method is defined based on the key detection area, the corresponding laser parameters and the detection method comparison table.
9. The black mark detection method of a thermal printer according to claim 8, characterized in that: The method of freezing the key detection area, defining a detection method based on the key detection area and the corresponding laser parameters, and performing targeted detection on the key detection area along the detection method to determine the black mark position, and matching the corresponding printing parameters according to the laser parameters fed back by the black mark position, further includes: Freeze the detection mode; perform targeted detection on key detection areas along the detection mode, and output multiple detection targets; Match corresponding laser parameters and reaction parameters according to multiple detection targets, and construct a detection parameter combination according to the laser parameters and reaction parameters; Defining a parameter difference amount based on a comparison between a detection parameter combination and a preset detection parameter combination; determining a black mark position based on a comparison between the parameter difference amount and a preset parameter difference amount threshold; Locate the black mark position and match the corresponding printing parameters according to the laser parameters fed back by the black mark position.
10. A black mark detection system for a thermal printer, characterized in that: The black mark detection system of the thermal printer is applied to the black mark detection method of the thermal printer as claimed in any one of claims 1 to 9, and the black mark detection system of the thermal printer comprises: A laser emission module, used for locating the laser emitter of the thermal printer and triggering the laser emitter to output a laser beam to the printing medium; A laser parameter module, used to collect a laser signal of a laser beam penetrating a printing medium, and determine a plurality of laser parameters according to a signal analysis of the laser signal; A sub-target area module, used to define a target parameter area based on a plurality of laser parameters and a reaction parameter of a printing medium, and divide the target parameter area into a plurality of sub-target areas; An image module, used for marking the positions of the plurality of sub-target areas, and defining corresponding camera ranges according to the positions of the plurality of sub-target areas, so as to collect the corresponding plurality of images; A key detection area module, used to define a first position predicted by a black mark position according to image recognition of a plurality of images, and at the same time, define a second position predicted by a black mark position according to a plurality of laser parameters in a target parameter area; and construct a key detection area based on the second position and the first position; The black mark detection module is used to freeze the key detection area, and define the detection method based on the key detection area and the corresponding laser parameters, and perform targeted detection on the key detection area along the detection method to determine the black mark position, and match the corresponding printing parameters according to the laser parameters fed back by the black mark position.
Citation Information
Patent Citations
Printing mark detection method and system of thermal printer
CN114327311A
Black label paper printing method based on multi-path sensor and printer
CN115302959A
Adjusting method of wrist strap printer, wrist strap printer and storage medium
CN116512768A
Printer built-in camera
JP1992200179A
Printing control method for label printer
KR101321566B1
