CN110222797B - Printing control method and device based on scanning gun, scanning gun and medium - Google Patents
Printing control method and device based on scanning gun, scanning gun and medium Download PDFInfo
- Publication number
- CN110222797B CN110222797B CN201910522012.3A CN201910522012A CN110222797B CN 110222797 B CN110222797 B CN 110222797B CN 201910522012 A CN201910522012 A CN 201910522012A CN 110222797 B CN110222797 B CN 110222797B
- Authority
- CN
- China
- Prior art keywords
- printing
- information
- image data
- bar code
- definition
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000007639 printing Methods 0.000 title claims abstract description 217
- 238000000034 method Methods 0.000 title claims abstract description 40
- 230000005540 biological transmission Effects 0.000 claims description 11
- 238000004458 analytical method Methods 0.000 claims description 8
- 230000006870 function Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K15/00—Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers
- G06K15/02—Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers using printers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Facsimiles In General (AREA)
- Record Information Processing For Printing (AREA)
- Printers Characterized By Their Purpose (AREA)
Abstract
The invention discloses a printing control method and device based on a scanning gun, the scanning gun and a medium, and relates to the technical field of scanning equipment. The printing control method based on the scanning gun comprises the following steps: acquiring bar code image data scanned by a scanning gun; generating printing adjustment information according to the definition information of the bar code image data; and determining printing parameter information according to the printing adjustment information, and sending the printing parameter information to a printer, wherein the printer is used for printing according to the printing parameter information. The invention can avoid the problem that the bar code printing is not clear because the printer prints according to the fixedly set printing parameters, and solves the problem of fuzzy bar code printing in the prior art when printing is carried out based on the bar code information scanned by the scanning gun.
Description
Technical Field
The embodiment of the invention relates to the technology of scanning equipment, in particular to a printing control method and device based on a scanning gun, the scanning gun and a medium.
Background
With the development of scanning technology, bar codes, two-dimensional codes and the like are more and more widely used by people.
In practical applications, information on a bar code or a two-dimensional code is usually scanned by a scanning gun and is input to an intelligent terminal such as a computer, so as to realize identification and management of the bar code information. For example, when information on a barcode needs to be printed, a user can scan the information on the barcode by using a scanning gun, so that the scanning gun can transmit the scanned barcode information to a computer connected with the scanning gun, and the barcode information is sent to a printer for printing through the computer. Specifically, the existing scanning gun usually uses the scanned bar code image photo as the bar code information, and directly sends the bar code image photo to the computer for printing. If the scanning gun scans the bar code image photo more vaguely and the computer directly sends the bar code image photo to the printer for printing, the printed bar code information will be more vague, i.e. the problem of blurred bar code printing exists.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for controlling printing based on a scanning gun, a scanning gun and a medium, so as to solve the problem in the prior art that the barcode printing is blurred when printing is performed based on barcode information scanned by the scanning gun.
In a first aspect, an embodiment of the present invention provides a printing control method based on a scanning gun, including:
acquiring bar code image data scanned by a scanning gun;
generating printing adjustment information according to the definition information of the bar code image data;
and determining printing parameter information according to the printing adjustment information, and sending the printing parameter information to a printer, wherein the printer is used for printing according to the printing parameter information.
Optionally, before acquiring the barcode image data scanned by the scanning gun, the method further includes: an image sensor of the scanning gun is driven. Wherein, the bar code image data that the acquisition scanning rifle scanned includes: and acquiring scanning data generated by the image sensor to serve as the barcode image data.
Optionally, generating printing adjustment information according to the definition information of the barcode image data, including:
determining definition information of the bar code image data;
comparing the definition information of the bar code image data with preset reference definition information to obtain definition difference information;
analyzing and processing the information based on the definition difference to generate restored image data corresponding to the barcode image data;
and generating printing adjustment information according to the restored image data and preset printing parameter information.
Optionally, determining print parameter information according to the print adjustment information includes:
acquiring printing setting information of a printer;
and when the printing adjustment information is not matched with the printing setting information, adjusting the printing setting information by adopting the printing adjustment information, and taking the printing setting information generated after adjustment as the printing parameter information, wherein the printing parameter information comprises transverse resolution information and longitudinal resolution information.
Optionally, sending the printing parameter information to a printer includes:
determining a connection between the scanning gun and the printer, the connection including at least one of: a network connection mode, a Bluetooth connection mode and a universal serial bus connection mode;
and sending the printing parameter information to a printer according to a transmission protocol corresponding to the connection mode.
In a second aspect, an embodiment of the present invention further provides a print control apparatus based on a scan gun, including:
the bar code image data acquisition module is used for acquiring bar code image data scanned by the scanning gun;
the printing adjustment information generation module is used for generating printing adjustment information according to the definition information of the bar code image data;
and the printing parameter information sending module is used for determining printing parameter information according to the printing adjustment information and sending the printing parameter information to a printer, wherein the printer is used for printing according to the printing parameter information.
Optionally, the print control apparatus based on the scan gun further includes: a drive module;
the driving module is used for driving an image sensor of the scanning gun;
the barcode image data acquisition module is specifically configured to acquire scan data generated by the image sensor to serve as the barcode image data.
Optionally, the printing adjustment information generating module includes:
the definition information determining submodule is used for determining the definition information of the bar code image data;
the definition information comparison submodule is used for comparing the definition information of the bar code image data with preset reference definition information to obtain definition difference information;
the analysis processing sub-module is used for carrying out analysis processing based on the definition difference information to generate restored image data corresponding to the barcode image data;
and the printing adjustment information generation submodule is used for generating printing adjustment information according to the restored image data and preset printing parameter information.
Optionally, the printing parameter information sending module includes the following sub-modules:
a print setting information acquisition sub-module for acquiring print setting information of the printer;
and the printing setting information adjusting submodule is used for adjusting the printing setting information by adopting the printing adjusting information when the printing adjusting information is not matched with the printing setting information, and taking the printing setting information generated after adjustment as the printing parameter information, wherein the printing parameter information comprises transverse resolution information and longitudinal resolution information.
Optionally, the printing parameter information sending module further includes the following sub-modules:
a connection mode determination submodule configured to determine a connection mode between the scan gun and the printer, where the connection mode includes at least one of: a network connection mode, a Bluetooth connection mode and a universal serial bus connection mode;
and the sending submodule is used for sending the printing parameter information to a printer according to the transmission protocol corresponding to the connection mode.
In a third aspect, an embodiment of the present invention further provides a scanning gun, including: a processor and a memory; the memory has stored therein at least one instruction that, when executed by the processor, causes the scan gun to perform a scan gun based print control method as described in the first aspect.
In a fourth aspect, embodiments of the present invention further provide a computer-readable storage medium, where instructions, when executed by a processor of a scan gun, enable the scan gun to perform the scan gun-based print control method according to the first aspect.
According to the invention, after the bar code image data scanned by the scanning gun is obtained, the printing adjustment information is generated through the definition information of the bar code image data, the printing parameter information is determined according to the printing adjustment information, and then the printing parameter information can be sent to the printer, so that the printer can print the bar code image data scanned by the scanning gun according to the printing parameter information, and thus the problem that the bar code printing is not clear due to the fact that the printer prints according to the fixedly set printing parameters can be avoided, namely the problem that the bar code printing is fuzzy when the bar code image data scanned by the scanning gun is printed in the prior art is solved.
Drawings
FIG. 1 is a flowchart of a printing control method based on a scan gun according to an embodiment of the present invention;
FIG. 2 is a flowchart of the steps of a scan gun based print control method in an alternative embodiment of the present invention;
fig. 3 is a schematic block diagram of a print control apparatus based on a scan gun according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a printing control method based on a scanning gun according to an embodiment of the present invention, where this embodiment is applicable to a situation of performing printing control based on a scanning gun, and specifically includes the following steps:
and step 110, acquiring the bar code image data scanned by the scanning gun.
In this embodiment, the barcode image data may be used to characterize a barcode image generated by the scanning gun based on the scanned barcode information, for example, may be a barcode image photo generated by the scanning gun based on the scanned information.
And 120, generating printing adjustment information according to the definition information of the bar code image data.
Specifically, after the barcode image data is acquired, the barcode image data may be processed through a preset algorithm to determine the definition information of the barcode image data. The definition information can be used for representing the definition of the barcode image, such as the definition value of the barcode image. Subsequently, the definition information can be compared with reference definition information preset in the scanning gun, and result information obtained by comparison can be used as definition difference information so as to perform analysis processing by adopting the definition difference information and generate corresponding printing adjustment information. The reference definition information may include various parameter thresholds for definition determination, such as a grayscale parameter threshold, a brightness parameter threshold, and the like, which are set in the scanning gun in advance according to the barcode printing definition requirement, and the embodiment of the present invention is not particularly limited to this; the definition difference information can represent the difference degree between the definition of the barcode image obtained by the current scanning of the scanning gun and the definition threshold of the preset barcode image, and can be specifically used for processing the barcode image data obtained by the current scanning so as to generate the restored image data corresponding to the barcode image data.
In an optional implementation manner, the generating of the printing adjustment information according to the definition information of the barcode image data in this embodiment may specifically include: determining definition information of the bar code image data; comparing the definition information of the bar code image data with preset reference definition information to obtain definition difference information; analyzing and processing the information based on the definition difference to generate restored image data corresponding to the bar code image data; and generating printing adjustment information according to the restored image data and preset printing parameter information. It should be noted that the preset printing parameter information may include various printing parameters set in the scanning gun in advance, such as a horizontal resolution, a vertical resolution, a coverage rate, and the like set for the preset reference definition information, which is not limited in this embodiment in particular. The coverage ratio can be used to control the percentage of the area covered by the printing ink relative to the whole printing paper area during printing, such as the coverage ratio of a printer.
And step 130, determining printing parameter information according to the printing adjustment information, and sending the printing parameter information to a printer, wherein the printer is used for printing according to the printing parameter information.
In the embodiment of the invention, whether the printing parameters of the printer connected with the scanning gun currently need to be adjusted or not can be determined based on the generated printing adjustment information. If the printing parameters of the printer need to be adjusted, the printing parameters currently set by the printer can be adjusted according to the printing adjustment information, so that the information generated after adjustment is used as the printing parameter information and is sent to the printer, the printer is triggered to print the barcode image data scanned by the scanning gun according to the printing parameter information, and the printer can be ensured to print clear barcode information.
To sum up, after acquiring the barcode image data scanned by the scanning gun, the embodiment of the present invention may generate the printing adjustment information according to the definition information of the barcode image data, so as to determine the printing parameter information according to the printing adjustment information, and then may send the printing parameter information to the printer, so that the printer may print the barcode image data scanned by the scanning gun according to the printing parameter information, thereby avoiding the problem that the barcode printing is not clear due to the printer printing according to the fixedly set printing parameters, i.e., solving the problem of blurred barcode printing in the prior art when the barcode image data is printed based on the barcode information scanned by the scanning gun.
In a particular implementation, the scanning gun is typically provided with an image sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) sensor, to scan barcode information through the image sensor to generate corresponding barcode image data. Therefore, in an optional embodiment of the present invention, the scan-based print control method implemented by the present invention may further include, before acquiring the barcode image data scanned by the scanning gun: and driving an image sensor of the scanning gun. Wherein, the above-mentioned bar code image data who obtains scanning rifle and scan can include: and acquiring scanning data generated by the image sensor to serve as the barcode image data.
Referring to fig. 2, a flowchart illustrating steps of a scan gun based printing control method according to an alternative embodiment of the present invention is shown, where the scan gun based printing control method may specifically include the following steps:
In specific implementation, when information on a barcode such as a barcode and a two-dimensional code needs to be printed, an image sensor of a scanning gun may be driven by sending an instruction or a signal, so as to trigger the image sensor to scan and generate corresponding scanning data, thereby implementing a scanning function of the scanning gun.
Specifically, the scan data generated by the image sensor may be used to generate an image photograph corresponding to a barcode scanned by the scanning gun. Therefore, in the embodiment of the invention, after the image sensor generates the scanning data, the scanning data can be acquired, and the acquired scanning data can be determined as the barcode image data, so as to generate the corresponding barcode image photo according to the barcode image data.
In this embodiment, operators of a preset algorithm, such as Sobel (Sobel) operator and Laplacian (Laplacian) operator, may be set in the scan gun in advance, so as to determine the definition of the barcode photo represented by the barcode image data through the operators of the preset algorithm.
Specifically, after the barcode image data is obtained, the barcode image information data may be calculated by using an operator of a preset algorithm, and a result obtained by the calculation may be determined as the definition information of the barcode image data. The sharpness information may be used to characterize the sharpness of the barcode image represented by the barcode image data, e.g., may be a sharpness value.
As an example of the present invention, the scan gun may determine the sharpness value of the currently acquired barcode image data through preset Sobel and Laplacian operators, and then perform step 240.
And 240, comparing the definition information of the barcode image data with preset reference definition information to obtain definition difference information.
In this embodiment, the parameter threshold included in the reference sharpness information may be used as a sharpness reference value, and may be specifically used to determine whether a barcode image represented by barcode image data currently scanned by the scanning gun needs to be restored, so as to restore the barcode image currently scanned by the scanning gun.
Specifically, the embodiment of the present invention may compare the definition information of the currently determined barcode image data with the preset reference definition information in the scanning gun, so as to determine the difference between the definition value of the barcode image currently scanned by the scanning gun and the preset definition reference value, and generate the corresponding definition difference information. The definition difference information may be used to represent a difference degree between the definition of the barcode image represented by the currently acquired barcode image data and the definition of the preset barcode image in the scanning gun, and specifically may include: sharpness difference value, standard deviation, variance, etc. The definition difference value may be a difference value between the definition of the barcode image represented by the barcode image data and the definition of the preset barcode image.
For example, the sharpness value of the barcode image represented by the code image data may be compared with a sharpness reference value set by the scanning gun to obtain a sharpness difference value, a standard deviation and a variance of the sharpness value of the barcode image and the sharpness reference value set by the scanning gun may be calculated, and then the sharpness difference value, the standard deviation and the variance may be determined as sharpness difference information, so as to perform step 250 according to the sharpness difference value, the standard deviation and the variance.
And 250, analyzing and processing based on the definition difference information to generate restored image data corresponding to the barcode image data.
Specifically, after the definition difference information is determined, the embodiment of the present invention may analyze and process the acquired barcode image data by using the definition difference information to restore a barcode image corresponding to the barcode image data, and generate corresponding restored image data. The restored image data may be used to characterize the restored barcode image.
For example, based on the definition difference value, the standard deviation, and the variance in the definition difference information, the scanning gun may apply a gaussian algorithm and a Log (Logarithms, Log) algorithm, analyze, calculate, and process the barcode image data using laplace convolution to restore the barcode image scanned by the scanning gun, and may generate restored image data corresponding to the barcode image data for the restored barcode image.
In this embodiment, the print parameter information may be set in the scan gun in advance, for example, print parameters such as the horizontal resolution, the vertical resolution, and the coverage rate may be set according to the reference sharpness information of the barcode image, so as to be used as standard print parameters during printing, thereby determining that a clear barcode is printed.
Specifically, after the scanning gun generates the restored image data, the scanning gun can search for a printing parameter matched with the definition of the barcode image in preset printing parameter information based on the definition of the barcode image represented by the restored image data, and then can use the searched matched printing parameter as printing adjustment information, so that the printing parameter information which is required to be set currently by the printer can be determined according to the printing adjustment information.
Specifically, after generating the print adjustment information corresponding to the currently acquired barcode image data, the embodiment of the present invention may compare the print adjustment information with the print setting information of the printer currently connected to the scanning gun, so as to determine whether the print parameters of the printer need to be adjusted. Therefore, in an optional embodiment, determining the printing parameter information according to the printing adjustment information may specifically include: acquiring printing setting information of a printer; and when the printing adjustment information is not matched with the printing setting information, adjusting the printing setting information by adopting the printing adjustment information, and taking the printing setting information generated after adjustment as the printing parameter information, wherein the printing parameter information comprises transverse resolution information and longitudinal resolution information. If the currently generated printing adjustment information matches the printing setting information, the current printing setting information of the printer may be directly used as the printing parameter information, and a printing instruction may be sent to the printer or step 280 may be executed to trigger the printer to print according to the currently set printing parameter information.
In the actual processing, the code scanning gun may be connected to the printer through a Universal Serial Bus (USB), a network, bluetooth, or other connection methods, and may communicate with the printer according to a transmission protocol corresponding to the connection method, such as transmitting data and instructions.
In an optional embodiment of the present invention, sending the printing parameter information to a printer may specifically include: determining a connection between the scanning gun and the printer, the connection including at least one of: a network connection mode, a Bluetooth connection mode and a universal serial bus connection mode; and sending the printing parameter information to a printer according to a transmission protocol corresponding to the connection mode.
For example, when the scan gun is connected to the printer via a bluetooth connection, the print parameter information may be sent to the printer according to a transmission protocol, namely a bluetooth communication protocol, corresponding to the bluetooth connection, so as to trigger the printer to print according to the print parameter information, thereby ensuring the definition of the barcode information printed by the printer.
For another example, when the scanning gun is connected to the printer via a network, that is, when the connection mode between the scanning gun and the printer is a network connection mode, the printing parameter information determined by the scanning gun may be sent to the printer according to a transmission protocol corresponding to the network connection mode, that is, a network transmission protocol, to trigger the printer to print the restored image data analyzed and processed by the scanning gun according to various printing parameters in the printing parameter information, thereby solving the problem of unclear printing when the printer prints the barcode information scanned by the scanning gun in the prior art, and improving the printing definition of the printer.
Similarly, when the scanning gun is connected with the printer through the USB, the printing parameter information can be sent to the printer according to a transmission protocol, namely a USB communication protocol, corresponding to the USB connection mode, so that the printer is triggered to print according to the printing parameter information, and the definition of the bar code information printed by the printer can be ensured.
Therefore, the embodiment of the invention obtains the bar code image data by driving the image sensor of the scanning gun, the definition information of the bar code image information can be compared with preset reference definition information to obtain definition difference information, then analysis processing can be carried out based on the definition difference information to generate restored image data corresponding to the bar code image data, generating printing adjustment information according to preset printing parameter information of the restored picture data, determining final printing parameter information based on the printing adjustment information, and sending the printing parameter information to a printer according to a transmission protocol corresponding to the connection mode between the scanning gun and the printer so that the printer can print according to the printing parameter information, and then the definition of the bar code information scanned by the printer in the process of printing the scanning gun can be ensured.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention.
Referring to fig. 3, a schematic block diagram of a print control apparatus based on a scan gun according to an embodiment of the present invention is shown. As shown in fig. 3, the printing control device based on the scanning gun may specifically include the following modules:
a barcode image data obtaining module 310, configured to obtain barcode image data scanned by a scanning gun;
a printing adjustment information generating module 320, configured to generate printing adjustment information according to the definition information of the barcode image data;
a printing parameter information sending module 330, configured to determine printing parameter information according to the printing adjustment information, and send the printing parameter information to a printer, where the printer is configured to print according to the printing parameter information.
On the basis of the above embodiment, the scan gun-based print control apparatus further includes: and a driving module. The driving module is used for driving an image sensor of the scanning gun. The barcode image data acquiring module 310 is specifically configured to acquire scanning data generated by the image sensor as the barcode image data.
In an alternative embodiment of the present invention, the printing adjustment information generation module 320 may include the following sub-modules:
the definition information determining submodule is used for determining the definition information of the bar code image data;
the definition information comparison submodule is used for comparing the definition information of the bar code image data with preset reference definition information to obtain definition difference information;
the analysis processing submodule is used for carrying out analysis processing based on the definition difference information and generating restored image data corresponding to the barcode image data;
and the printing adjustment information generation submodule is used for generating printing adjustment information according to the restored image data and preset printing parameter information.
In an alternative embodiment of the present invention, the printing parameter information transmitting module 330 may include the following sub-modules:
a print setting information acquisition sub-module for acquiring print setting information of the printer;
and the printing setting information adjusting submodule is used for adjusting the printing setting information by adopting the printing adjusting information when the printing adjusting information is not matched with the printing setting information, and taking the printing setting information generated after adjustment as the printing parameter information, wherein the printing parameter information comprises transverse resolution information and longitudinal resolution information.
In this embodiment of the present invention, optionally, the printing parameter information sending module 330 may further include the following sub-modules:
a connection mode determination submodule configured to determine a connection mode between the scan gun and the printer, where the connection mode includes at least one of: a network connection mode, a Bluetooth connection mode and a universal serial bus connection mode;
and the sending submodule is used for sending the printing parameter information to a printer according to the transmission protocol corresponding to the connection mode.
It should be noted that the printing control device based on the scanning gun provided by the above can execute the printing control method based on the scanning gun provided by any embodiment of the present invention, and has the corresponding functions and advantages of the execution method.
In a specific implementation, the printing control device based on the scanning gun can be formed by two or more physical entities or can be formed by one physical entity, and can be integrated in the scanning gun.
Further, an embodiment of the present invention further provides a scanning gun, including: a processor and a memory. At least one instruction is stored in the memory and executed by the processor to cause the scan gun to perform a scan gun based print control method as described in the method embodiments above.
Embodiments of the present invention further provide a computer-readable storage medium, where instructions, when executed by a processor of a scan gun, enable the scan gun to perform a scan gun-based print control method as described in the above method embodiments. Illustratively, the scan gun-based print control method includes: acquiring bar code image data scanned by a scanning gun; generating printing adjustment information according to the definition information of the bar code image data; and determining printing parameter information according to the printing adjustment information, and sending the printing parameter information to a printer, wherein the printer is used for printing according to the printing parameter information.
It should be noted that, as for the embodiments of the apparatus, the scan gun and the storage medium, since they are basically similar to the embodiments of the method, the description is simple, and the relevant points can be referred to the partial description of the embodiments of the method.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, and the computer software product may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a scanning device (which may be a scanning gun or the like) to execute the scan gun based print control method according to any embodiment of the present invention.
It should be noted that, in the above print control device based on the scan gun, the units and modules included in the device are merely divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by suitable instruction execution devices. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in more detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the claims.
Claims (8)
1. A printing control method based on a scanning gun is characterized by comprising the following steps:
acquiring bar code image data scanned by a scanning gun;
generating printing adjustment information according to the definition information of the bar code image data;
determining printing parameter information according to the printing adjustment information, and sending the printing parameter information to a printer, wherein the printer is used for printing according to the printing parameter information;
generating printing adjustment information according to the definition information of the bar code image data, comprising:
determining definition information of the bar code image data;
comparing the definition information of the bar code image data with preset reference definition information to obtain definition difference information;
analyzing and processing the information based on the definition difference to generate restored image data corresponding to the bar code image data;
and generating printing adjustment information according to the restored image data and preset printing parameter information.
2. The scan gun based print control method of claim 1, further comprising, before acquiring barcode image data scanned by the scan gun:
an image sensor driving the scanning gun;
wherein, the bar code image data that the acquisition scanning rifle scanned includes: and acquiring scanning data generated by the image sensor to serve as the barcode image data.
3. The scan gun based print control method of claim 1, wherein determining print parameter information from the print adjustment information comprises:
acquiring printing setting information of a printer;
and when the printing adjustment information is not matched with the printing setting information, adjusting the printing setting information by adopting the printing adjustment information, and taking the printing setting information generated after adjustment as the printing parameter information, wherein the printing parameter information comprises transverse resolution information and longitudinal resolution information.
4. The scan gun based print control method of claim 3, wherein sending the print parameter information to a printer comprises:
determining a connection between the scanning gun and the printer, the connection including at least one of: a network connection mode, a Bluetooth connection mode and a universal serial bus connection mode;
and sending the printing parameter information to a printer according to a transmission protocol corresponding to the connection mode.
5. A print control apparatus based on a scanning gun, comprising:
the bar code image data acquisition module is used for acquiring bar code image data scanned by the scanning gun;
the printing adjustment information generating module is used for generating printing adjustment information according to the definition information of the bar code image data;
the printing parameter information sending module is used for determining printing parameter information according to the printing adjustment information and sending the printing parameter information to a printer, wherein the printer is used for printing according to the printing parameter information;
the printing adjustment information generation module includes:
the definition information determining submodule is used for determining the definition information of the bar code image data;
the definition information comparison submodule is used for comparing the definition information of the bar code image data with preset reference definition information to obtain definition difference information;
the analysis processing submodule is used for carrying out analysis processing based on the definition difference information and generating restored image data corresponding to the barcode image data;
and the printing adjustment information generation submodule is used for generating printing adjustment information according to the restored image data and preset printing parameter information.
6. The scan gun based print control apparatus of claim 5, further comprising: a drive module;
the driving module is used for driving an image sensor of the scanning gun;
the barcode image data acquisition module is specifically configured to acquire scan data generated by the image sensor to serve as the barcode image data.
7. A scanning gun, comprising: a processor and a memory;
the memory has stored therein at least one instruction that, when executed by the processor, causes the scan gun to perform the scan gun based print control method of any of claims 1 to 4.
8. A computer readable storage medium having instructions stored thereon which, when executed by a processor of a scan gun, enable the scan gun to perform a scan gun based print control method as claimed in any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910522012.3A CN110222797B (en) | 2019-06-17 | 2019-06-17 | Printing control method and device based on scanning gun, scanning gun and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910522012.3A CN110222797B (en) | 2019-06-17 | 2019-06-17 | Printing control method and device based on scanning gun, scanning gun and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110222797A CN110222797A (en) | 2019-09-10 |
CN110222797B true CN110222797B (en) | 2022-05-20 |
Family
ID=67817433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910522012.3A Active CN110222797B (en) | 2019-06-17 | 2019-06-17 | Printing control method and device based on scanning gun, scanning gun and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110222797B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111552444B (en) * | 2020-04-20 | 2023-04-07 | 厦门汉印电子技术有限公司 | Print file processing method, device, equipment and computer readable storage medium |
CN113696647B (en) * | 2021-09-13 | 2022-12-30 | 武汉先同科技有限公司 | Image data compression method and system applied to ink-jet printer |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10105963B2 (en) * | 2017-03-03 | 2018-10-23 | Datamax-O'neil Corporation | Region-of-interest based print quality optimization |
CN109388996B (en) * | 2017-08-02 | 2023-06-09 | 格科微电子(上海)有限公司 | Method for improving performance of bar code recognition system |
CN109421277B (en) * | 2017-09-04 | 2024-04-02 | 珠海赛纳三维科技有限公司 | 3D printer and printing method thereof |
CN207851827U (en) * | 2017-12-30 | 2018-09-11 | 迅镭智能(广州)科技有限公司 | A kind of scanning device |
CN108462744A (en) * | 2018-03-14 | 2018-08-28 | 北京爱云动科技有限公司 | The photo method for pushing and client, server end realized based on Quick Response Code |
-
2019
- 2019-06-17 CN CN201910522012.3A patent/CN110222797B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110222797A (en) | 2019-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE602005004693T2 (en) | RADIOMETRIC CALIBRATION OF A SINGLE PICTURE | |
CN111899243B (en) | Image clarity evaluation method, device and computer-readable storage medium | |
CN110222797B (en) | Printing control method and device based on scanning gun, scanning gun and medium | |
CN112686131B (en) | Image processing method, device, equipment and storage medium | |
JP2016143157A (en) | Image processing device, image processing method and image processing system | |
CN114511583B (en) | Image clarity detection method, device, electronic device and storage medium | |
CN112488177B (en) | Image matching method and related equipment | |
CN110955891B (en) | File detection method, device and system and data processing method | |
CN101299239B (en) | Method and device for acquiring character area image and character recognition system | |
EP2889833A1 (en) | Method and apparatus for image quality assessment | |
CN105761256B (en) | The sub-pixel edge straight line acquisition methods and device of image | |
CN116400873A (en) | Printing quality testing method and system based on cloud | |
US20170278257A1 (en) | Data processing apparatus, color identification method, non-transitory computer readable medium, and color chart | |
CN113051978A (en) | Face recognition method, electronic device and readable medium | |
JP2018124441A (en) | System, information processing apparatus, information processing method, and program | |
EP1457927A2 (en) | Device and method for detecting blurring of image | |
CN116596903A (en) | Defect identification method, device, electronic equipment and readable storage medium | |
US10373329B2 (en) | Information processing apparatus, information processing method and storage medium for determining an image to be subjected to a character recognition processing | |
CN114564310A (en) | Data processing method and device, electronic equipment and readable storage medium | |
Liu et al. | A new quality assessment and improvement system for print media | |
CN113838003A (en) | Speckle detection method, device, medium, and computer program product for image | |
JP6892625B2 (en) | Data processing equipment and computer programs | |
JP2003303346A (en) | Target tracking method, target tracking device, target tracking program, and recording medium recording this program | |
US11896408B2 (en) | Automated patient modeling and positioning | |
CN111353359A (en) | Face recognition method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |