CN107391056A - A kind of preparation method and system for printing interruption bar code - Google Patents
A kind of preparation method and system for printing interruption bar code Download PDFInfo
- Publication number
- CN107391056A CN107391056A CN201710537067.2A CN201710537067A CN107391056A CN 107391056 A CN107391056 A CN 107391056A CN 201710537067 A CN201710537067 A CN 201710537067A CN 107391056 A CN107391056 A CN 107391056A
- Authority
- CN
- China
- Prior art keywords
- bar code
- interruption
- printing
- code symbol
- action
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1211—Improving printing performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1253—Configuration of print job parameters, e.g. using UI at the client
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1278—Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
- G06F3/128—Direct printing, e.g. sending document file, using memory stick, printing from a camera
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Printers Characterized By Their Purpose (AREA)
Abstract
The present invention discloses a kind of preparation method and manufacturing system for printing interruption bar code, including:Bar code image is obtained, bar code image is pre-processed, positions bar code image and source bar code symbol;So that bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;Calculate the bar code module size of the source bar code symbol;Setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio and calculate interruption width;According to the printing interruption parameter, the source bar code symbol is from left to right subjected to n deciles in the horizontal direction, for each horizontal bisector, a printing discontiguous area is all generated, all pixels on the printing discontiguous area are arranged to white and generate printing interruption bar code symbol;The printing interruption bar code symbol is exported to the rectangle loading plate.Using methods described can quantification produce different parameters printing be interrupted bar code;The repeatable printing for producing any number of same size interruption bar code.
Description
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of preparation method and system for printing interruption bar code.
Background technology
In the industries such as automatic identification, one-dimension code or Quick Response Code typically are used as information transmission media.Use hand-held
Scanner, bar code reading engine, the data acquisition unit for possessing bar code reading function, fixed barcode scanner or industrial bar codes are swept
Retouch the equipment such as device and carry out one-dimension code or two dimension code reading.Tested before bar code recognizing apparatus research and development, production test, buying is carried out
Cheng Zhongxu is by repeatedly test, debugging.In order to carry out error correcting capability test, it is necessary to be carried out using the low-quality bar code of printing interruption
Test.
It is mainly to make echelon type using image processing softwares such as PS traditionally to obtain printing to be interrupted low-quality bar code
Low-quality bar code.The low-quality bar code that printing interruption type is collected using which is primarily present following defect:(1) PS systems are passed through
It is relatively difficult to make printing interruption bar code;(2) PS methods obtain printing interruption bar code exist parameter can not quantify, consume after can not
The problem of duplication, the result of test is caused to exist without standard measure or the problem of compare.
The content of the invention
It is an object of the present invention to a kind of method and system of making printing interruption bar code that can be convenient, flexible are proposed,
Solve existing low-quality bar code and can not quantify, consume after can not replicate, cause the result of test to exist without standard measure or compare
Problem.
To achieve these goals, the technical solution adopted in the present invention is:
A kind of preparation method for printing interruption bar code, comprises the following steps:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value
And the source bar code symbol parameter value on bar code image, the bar code image parameter value include that bar code image is wide, bar code image is high, institute
Stating source bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is remembered one by one
Record in list, minimum value is searched in the list, the minimum value is the bar code module size of the source bar code symbol
Unit, the bar code module size unit are the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio
Example r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be horizontal direction, it is interrupted quantity n according to described, the wide w of the bar code symbol,
The high h of bar code symbol, the source bar code symbol is from left to right subjected to n deciles in the horizontal direction, forms the horizontal decile of n bars
Line, each horizontal bisector both ends point coordinates are { (0, h/n*k), (w, h/n*k) }, k=1 ... .n;For described every
One horizontal bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x values
Scope { 0 ... w }, y spans { h/n*k ... h/n*k+wide }, k=1 ... .n;By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
Wherein, binary conversion treatment is performed after the action one, the binary conversion treatment includes will be each on bar code image
For the gray value of pixel compared with 128, pixel of the gray value more than 128 switchs to white, and gray value is less than 128 pixel
Point switchs to black.
Wherein, in addition to action eight, the rectangle loading plate of printing interruption bar code symbol, the displaying are carried described in displaying
Shown including printing, screen shows.
Invention additionally discloses a kind of preparation method for printing interruption bar code, comprise the following steps:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value
And the source bar code symbol parameter value on bar code image, the bar code image parameter value include that bar code image is wide, bar code image is high, institute
Stating source bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is remembered one by one
Record in list, minimum value is searched in the list, the minimum value is the bar code module size of the source bar code symbol
Unit, the bar code module size unit are the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio
Example r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be vertical direction, it is interrupted quantity n according to described, the wide w of the bar code symbol,
The high h of bar code symbol, the source bar code symbol is vertically subjected to n deciles from top to bottom, forms n bar perpendicular bisecteds
Line, each perpendicular bisector both ends point coordinates are { (w/n*k, 0), (w/n*k, h) }, k=1 ... .n;For described every
One perpendicular bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x values
Scope { w/n*k ... w/n*k+wide }, y spans { 0 ... h }, k=1 ... .n;By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
Wherein, binary conversion treatment is performed after the action one, the binary conversion treatment includes will be each on bar code image
For the gray value of pixel compared with 128, pixel of the gray value more than 128 switchs to white, and gray value is less than 128 pixel
Point switchs to black.
Wherein, in addition to action eight, the rectangle loading plate of printing interruption bar code symbol, the displaying are carried described in displaying
Shown including printing, screen shows.
Invention additionally discloses a kind of manufacturing system for printing interruption bar code, including:
Processor, it is adapted for carrying out each instruction;And
Storage device, it is described to instruct for being loaded and being performed by processor suitable for storing a plurality of instruction:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value
And the source bar code symbol parameter value on bar code image, the bar code image parameter value include that bar code image is wide, bar code image is high, institute
Stating source bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is remembered one by one
Record in list, minimum value is searched in the list, the minimum value is the bar code module size of the source bar code symbol
Unit, the bar code module size unit are the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio
Example r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be horizontal direction, it is interrupted quantity n according to described, the wide w of the bar code symbol,
The high h of bar code symbol, the source bar code symbol is from left to right subjected to n deciles in the horizontal direction, forms the horizontal decile of n bars
Line, each horizontal bisector both ends point coordinates are { (0, h/n*k), (w, h/n*k) }, k=1 ... .n;For described every
One horizontal bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x values
Scope { 0 ... w }, y spans { h/n*k ... h/n*k+wide }, k=1 ... .n;By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
Wherein, binary conversion treatment is performed after the action one, the binary conversion treatment includes will be each on bar code image
For the gray value of pixel compared with 128, pixel of the gray value more than 128 switchs to white, and gray value is less than 128 pixel
Point switchs to black.
Invention additionally discloses a kind of manufacturing system for printing interruption bar code, including processor, each instruction is adapted for carrying out;And
Storage device, it is described to instruct for being loaded and being performed by processor suitable for storing a plurality of instruction:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value
And the source bar code symbol parameter value on bar code image, the bar code image parameter value include that bar code image is wide, bar code image is high, institute
Stating source bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is remembered one by one
Record in list, minimum value is searched in the list, the minimum value is the bar code module size of the source bar code symbol
Unit, the bar code module size unit are the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio
Example r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be vertical direction, it is interrupted quantity n according to described, the wide w of the bar code symbol,
The high h of bar code symbol, the source bar code symbol is vertically subjected to n deciles from top to bottom, forms n bar perpendicular bisecteds
Line, each perpendicular bisector both ends point coordinates are { (w/n*k, 0), (w/n*k, h) }, k=1 ... .n;For described every
One perpendicular bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x values
Scope { w/n*k ... w/n*k+wide }, y spans { 0 ... h }, k=1 ... .n;By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
Wherein, binary conversion treatment is performed after the action one, the binary conversion treatment includes will be each on bar code image
For the gray value of pixel compared with 128, pixel of the gray value more than 128 switchs to white, and gray value is less than 128 pixel
Point switchs to black.
Beneficial effects of the present invention are:
First, by methods described can quantification produce different parameters printing be interrupted bar code;
2nd, the printing for producing any number of same size repeated by methods described is interrupted bar code;
3rd, the printing made by methods described is interrupted bar code, can be presented on different bar code media, forms papery
Bar code and screen bar code, for different test occasions;
4th, the preparation method flexibility is high, can make the printing interruption bar code of different resolution.
Brief description of the drawings
Fig. 1 is the flow chart for the preparation method that present invention printing is interrupted bar code;
Fig. 2 is the schematic diagram of source bar code symbol of the present invention;
Fig. 3 is the schematic diagram that present invention printing is interrupted bar code symbol.
Embodiment
Below with reference to embodiment shown in the drawings, the present invention will be described in detail.But these embodiments are simultaneously
The present invention is not limited, structure that one of ordinary skill in the art is made according to these embodiments, method or functionally
Conversion is all contained in protection scope of the present invention.
Refering to shown in Fig. 1 to Fig. 3, a kind of printing disclosed in one embodiment of the present invention is interrupted the preparation method of bar code,
Methods described is applied to automatic identification bar code reading industry, and uses bar code or two-dimensional bar code as information transmission media
Other industry.Using methods described make printing interruption bar code can be used for bar code recognizing apparatus test, including it is one-dimensional or
Two-dimentional hand-scanner, fixed generic scanner, industrial bar codes scanner, reading engine, possesses bar code identification function
Terminal device etc., as shown in fig.1, methods described comprises the following steps:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value
And the source bar code symbol parameter value on bar code image, the bar code image parameter value include that bar code image is wide, bar code image is high, institute
Stating source bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Acquired bar code image can extract from existing barcode database and carry bar code or two-dimensional bar code
Picture, or bar code image is obtained by scan mode, or standard bar code image is obtained by shooting style, or give birth to by bar code
Into the bar code image required for Software Create, the bar code or two-dimensional bar code that are carried on the bar code image are source bar code symbol
Number, acquired bar code image is stored in storage medium, conveniently recycled.Described carries bar code or two dimension
The bar code image of bar code is using bmp forms or extended formatting etc..Wherein bar code can include Code39, Code93,
Code128, Codabar, EAN-13, EAN-8, UPC-A, ISBN-13, GS1-128, ITF-14 etc., two-dimensional bar code can include
PDF417, QR, Data Matrix, Grid Matrix and Chinese letter co etc..
Binary conversion treatment can be performed to the bar code image after obtaining bar code image, the binary conversion treatment is included bar
For the gray value of each pixel compared with 128, pixel of the gray value more than 128 switchs to white, gray value on code image
Pixel less than 128 switchs to black.Specifically, scanning barcode image full figure, utilizes gray scale formula:Gray=0.2126*r+
0.7152*g+0.0722*b calculates the gray value of each pixel on each bar code image, and compared with gray value 128,
Pixel of the gray value more than 128 is entered as 255, and pixel of the gray value less than 128 is entered as 0.
It is more regular by the bar code image acquired in the above method, and irrelevant information has been eliminated, it can use simple
Method to source bar code symbol position the parameter value of acquisition source bar code symbol.Specifically, scanning full figure, judges the every of appearance
Individual black pixel point, it is lower boundary during its ordinate minimum, is coboundary when maximum, is left margin during abscissa minimum, it is maximum
When be right margin.The boundary coordinate of source bar code symbol is so marked, the boundary coordinate includes the lower left corner of source bar code symbol
Point (bcleff, bcbottom), bottom right angle point (bcright, bcbottom), upper left angle point (bcleft, bctop), the upper right corner
Point (bcright, bctop).The wide w of source bar code symbol, the high h of source bar code symbol are obtained according to boundary coordinate.Obtain bar code figure simultaneously
Image width and bar code image are high.
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
In this step, the rectangle loading plate formed is used to carry printing interruption bar code symbol, it is necessary to according to the bar
Code image is wide, a height of parameter of bar code image generates a rectangle loading plate, so that rectangle loading plate can carry the printing
It is interrupted bar code symbol.The rectangle loading plate uses bmp image of the background for white, and the rectangle loading plate can also be according to making
Demand uses other background colors.
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is remembered one by one
Record in list, minimum value is searched in the list, the minimum value is the bar code module size of the source bar code symbol
Unit, the bar code module size unit are the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio
Example r;
In this step, the interruption direction is two dimensional surface direction of the intermittent line in the source bar code symbol, described
It can be horizontal direction or vertical direction to be interrupted direction.
In this step, the interruption quantity n is the quantity of intermittent line, and the interruption quantity can (must be with value 1-10
Integer) between, such as 2,3,5, the printing interruption degree that different interruption quantity is formed is different.For example, interruption quantity is 3
When, represent 3 printing intermittent lines in the source bar code symbol be present.
In this step, the interruption ratio r is to be interrupted line width and the percentage of bar code module size, the percentage
Can between value 10-90%, such as 30%, 40%, 50%, 46%, 78%, 80%, 90%, 48.9%, 52.3%, it is different
The printing interruption degree that is formed of percentage it is different.For example, when percentage is 30%, it is 100 to represent bar code module size
During pixel, there is the printing intermittent line that 30 points are arranged to white.
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be horizontal direction, it is interrupted quantity n according to described, the wide w of the bar code symbol,
The high h of bar code symbol, the source bar code symbol is from left to right subjected to n deciles in the horizontal direction, forms the horizontal decile of n bars
Line, each horizontal bisector both ends point coordinates are { (0, h/n*k), (w, h/n*k) }, k=1 ... .n;For described every
One horizontal bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x values
Scope { 0 ... w }, y spans { h/n*k ... h/n*k+wide }, k=1 ... .n.By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
In yet another embodiment, in action six, when the interruption direction is vertical direction, according to the interruption quantity
N, the wide w of the bar code symbol, the high h of the bar code symbol, the source bar code symbol is vertically subjected to n etc. from top to bottom
Point, n bar perpendicular bisectors are formed, each perpendicular bisector both ends point coordinates is { (w/n*k, 0), (w/n*k, h) }, k
=1 ... .n;For each perpendicular bisector, a printing discontiguous area a is all generated, for the printing discontiguous area
Point (x, y) on a, x spans { w/n*k ... w/n*k+wide }, y spans { 0 ... h }, k=1 ... .n;By the printing
All pixels are arranged to white and generate printing interruption bar code symbol on discontiguous area.
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
The printing is interrupted into bar code symbol to export to rectangle loading plate formation printing interruption bar code image, can be by the printing broken strip
Code image is stored, convenient follow-up use.
Can by the printing formed be interrupted bar code image print in different medium, medium can be different types of papery,
Metal, plastics or PVC material etc..The printing formed can be interrupted bar code image and show that screen dielectric layer can on screen dielectric layer
To be the screen and e-inks screen of the equipment such as computer, mobile phone, PDA, the screen of different resolution can be used, can also be adjusted
Screen is in different brightness, increases the diversity of picture and comprehensive with this.The printing of printing interruption bar code image or display
When, can it is single printing interruption bar code image show or it is multiple printing be interrupted bar code image sets shown into multiple lines and multiple rows matrix.
Binary conversion treatment is performed after the action one, the binary conversion treatment is included each pixel on bar code image
Gray value compared with 128, pixel of the gray value more than 128 switchs to white, and pixel of the gray value less than 128 switchs to
Black.
It can show that the displaying includes printing by various modes as the printing interruption bar code image acquired in aforesaid way
Displaying, screen shows.The printing formed can be interrupted into bar code image to print in different medium, medium can be different types of
Papery, metal, plastics or PVC material etc..The printing formed can be interrupted into bar code image to show on screen dielectric layer, screen is situated between
Matter can be the screen and e-inks screen of the equipment such as computer, mobile phone, PDA, can use the screen of different resolution, can also
Regulation screen is in different brightness, increases the diversity of picture and comprehensive with this.It is described printing interruption bar code image printing or
During display, can it is single printing interruption bar code image show or it is multiple printing be interrupted bar code image sets shown into multiple lines and multiple rows matrix
Show.
A kind of manufacturing system for printing interruption bar code, the printing interruption bar code are also disclosed in one embodiment of the present invention
Manufacturing system based on it is described printing interruption bar code preparation method all methods and step.
Specifically, the system includes:
Processor, it is adapted for carrying out each instruction;And
Storage device, it is described to instruct for being loaded and being performed by processor suitable for storing a plurality of instruction:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value
And the source bar code symbol parameter value on bar code image, the bar code image parameter value include that bar code image is wide, bar code image is high, institute
Stating source bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is remembered one by one
Record in list, minimum value is searched in the list, the minimum value is the bar code module size of the source bar code symbol
Unit, the bar code module size unit are the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio
Example r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be horizontal direction, it is interrupted quantity n according to described, the wide w of the bar code symbol,
The high h of bar code symbol, the source bar code symbol is from left to right subjected to n deciles in the horizontal direction, forms the horizontal decile of n bars
Line, each horizontal bisector both ends point coordinates are { (0, h/n*k), (w, h/n*k) }, k=1 ... .n;For described every
One horizontal bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x values
Scope { 0 ... w }, y spans { h/n*k ... h/n*k+wide }, k=1 ... .n.By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
In yet another embodiment, in action six, when the interruption direction is vertical direction, according to the interruption quantity
N, the wide w of the bar code symbol, the high h of the bar code symbol, the source bar code symbol is vertically subjected to n etc. from top to bottom
Point, n bar perpendicular bisectors are formed, each perpendicular bisector both ends point coordinates is { (w/n*k, 0), (w/n*k, h) }, k
=1 ... .n;For each perpendicular bisector, a printing discontiguous area a is all generated, for the printing discontiguous area
Point (x, y) on a, x spans { w/n*k ... w/n*k+wide }, y spans { 0 ... h }, k=1 ... .n;By the printing
All pixels are arranged to white and generate printing interruption bar code symbol on discontiguous area.
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
All methods and step of the preparation method of the system for quoting printing interruption bar code, using methods described and it is
System, can quantification produce different parameters printing interruption bar code;It is repeatable to produce any number of same size
Printing interruption bar code;The making printing interruption bar code, can be presented on different bar code media, formed papery bar code and
Screen bar code, for different test occasions;Printing interruption bar code flexibility height is made using the system and method, can be made
The printing interruption bar code of different resolution.
It should be appreciated that although the present specification is described in terms of embodiments, not each embodiment only includes one
Individual independent technical scheme, this narrating mode of specification is only that those skilled in the art will should say for clarity
For bright book as an entirety, the technical scheme in each embodiment may also be suitably combined to form those skilled in the art can
With the other embodiment of understanding.
Those listed above is a series of to be described in detail only for feasibility embodiment of the invention specifically
Bright, they simultaneously are not used to limit the scope of the invention, all equivalent implementations made without departing from skill spirit of the present invention
Or change should be included in the scope of the protection.
Claims (10)
1. a kind of preparation method for printing interruption bar code, it is characterised in that comprise the following steps:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value and bar
Source bar code symbol parameter value on code image, the bar code image parameter value include that bar code image is wide, bar code image is high, the source
Bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is recorded in one by one
In list, minimum value is searched in the list, the minimum value is the bar code module size unit of the source bar code symbol,
The bar code module size unit is the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be horizontal direction, it is interrupted quantity n according to described, it is the wide w of the bar code symbol, described
The high h of bar code symbol, the source bar code symbol is from left to right subjected to n deciles in the horizontal direction, forms the horizontal bisector of n bars, institute
It is { (0, h/n*k), (w, h/n*k) } to state each horizontal bisector both ends point coordinates, k=1....n;For described each
Horizontal bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x spans
{ 0...w }, y spans { h/n*k...h/n*k+wide }, k=1....n;By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
2. the preparation method of printing interruption bar code according to claim 1, it is characterised in that:
Binary conversion treatment is performed after the action one, the binary conversion treatment is included the ash of each pixel on bar code image
For angle value compared with 128, pixel of the gray value more than 128 switchs to white, and pixel of the gray value less than 128 switchs to black
Color.
3. the preparation method of printing interruption bar code according to claim 1, it is characterised in that:
Also include action eight, the rectangle loading plate of printing interruption bar code symbol is carried described in displaying, the displaying includes printing
Displaying, screen shows.
4. a kind of preparation method for printing interruption bar code, it is characterised in that comprise the following steps:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value and bar
Source bar code symbol parameter value on code image, the bar code image parameter value include that bar code image is wide, bar code image is high, the source
Bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is recorded in one by one
In list, minimum value is searched in the list, the minimum value is the bar code module size unit of the source bar code symbol,
The bar code module size unit is the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be vertical direction, it is interrupted quantity n according to described, it is the wide w of the bar code symbol, described
The high h of bar code symbol, the source bar code symbol is vertically subjected to n deciles from top to bottom, forms n bar perpendicular bisectors, institute
It is { (w/n*k, 0), (w/n*k, h) } to state each perpendicular bisector both ends point coordinates, k=1....n;For described each
Perpendicular bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x spans
{ w/n*k...w/n*k+wide }, y spans { 0...h }, k=1....n;By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
5. the preparation method of printing interruption bar code according to claim 4, it is characterised in that:Performed after the action one
Binary conversion treatment, the binary conversion treatment are included by the gray value of each pixel on bar code image compared with 128, gray scale
Pixel of the value more than 128 switchs to white, and pixel of the gray value less than 128 switchs to black.
6. the preparation method of printing interruption bar code according to claim 4, it is characterised in that:Also include action eight, displaying
The rectangle loading plate for carrying printing interruption bar code symbol, the displaying include printing displaying, screen shows.
A kind of 7. manufacturing system for printing interruption bar code, it is characterised in that including:
Processor, it is adapted for carrying out each instruction;And
Storage device, it is described to instruct for being loaded and being performed by processor suitable for storing a plurality of instruction:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value and bar
Source bar code symbol parameter value on code image, the bar code image parameter value include that bar code image is wide, bar code image is high, the source
Bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is recorded in one by one
In list, minimum value is searched in the list, the minimum value is the bar code module size unit of the source bar code symbol,
The bar code module size unit is the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be horizontal direction, it is interrupted quantity n according to described, it is the wide w of the bar code symbol, described
The high h of bar code symbol, the source bar code symbol is from left to right subjected to n deciles in the horizontal direction, forms the horizontal bisector of n bars, institute
It is { (0, h/n*k), (w, h/n*k) } to state each horizontal bisector both ends point coordinates, k=1....n;For described each
Horizontal bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x spans
{ 0...w }, y spans { h/n*k...h/n*k+wide }, k=1....n;By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
A kind of 8. manufacturing system for printing interruption bar code according to claim 7, it is characterised in that:After the action one
Binary conversion treatment is performed, the binary conversion treatment is included by the gray value of each pixel on bar code image compared with 128,
Pixel of the gray value more than 128 switchs to white, and pixel of the gray value less than 128 switchs to black.
A kind of 9. manufacturing system for printing interruption bar code, it is characterised in that:Processor, it is adapted for carrying out each instruction;And
Storage device, it is described to instruct for being loaded and being performed by processor suitable for storing a plurality of instruction:
Action one, bar code image is obtained, source bar code symbol is carried on the bar code image;And obtain bar code image parameter value and bar
Source bar code symbol parameter value on code image, the bar code image parameter value include that bar code image is wide, bar code image is high, the source
Bar code symbol parameter value includes border point coordinates, the wide w of bar code symbol, the high h of bar code symbol;
Action two, so that the bar code image is wide, a height of threshold value of bar code image generates a rectangle loading plate;
Action three, travels through all pixels point of the source bar code symbol, and the length of continuous black pixel point is recorded in one by one
In list, minimum value is searched in the list, the minimum value is the bar code module size unit of the source bar code symbol,
The bar code module size unit is the base unit of composition bar code;
Action four, setting printing interruption parameter, the printing interruption parameter include interruption direction, interruption quantity n, interruption ratio r;
Action five, according to the bar code module size unit, interruption ratio r, calculate interruption width wide=unit*r;
Action six, when the interruption direction be vertical direction, it is interrupted quantity n according to described, it is the wide w of the bar code symbol, described
The high h of bar code symbol, the source bar code symbol is vertically subjected to n deciles from top to bottom, forms n bar perpendicular bisectors, institute
It is { (w/n*k, 0), (w/n*k, h) } to state each perpendicular bisector both ends point coordinates, k=1....n;For described each
Perpendicular bisector, a printing discontiguous area a is all generated, for the point (x, y) on the printing discontiguous area a, x spans
{ w/n*k...w/n*k+wide }, y spans { 0...h }, k=1....n;By all pixels on the printing discontiguous area
It is arranged to white and generates printing interruption bar code symbol;
Action seven, export the printing interruption bar code symbol to the rectangle loading plate and form printing interruption bar code image.
10. the manufacturing system of printing interruption bar code according to claim 9, it is characterised in that:Held after the action one
Row binary conversion treatment, the binary conversion treatment are included by the gray value of each pixel on bar code image compared with 128, ash
Pixel of the angle value more than 128 switchs to white, and pixel of the gray value less than 128 switchs to black.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710537067.2A CN107391056B (en) | 2017-07-04 | 2017-07-04 | Manufacturing method and system for printing discontinuous bar code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710537067.2A CN107391056B (en) | 2017-07-04 | 2017-07-04 | Manufacturing method and system for printing discontinuous bar code |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107391056A true CN107391056A (en) | 2017-11-24 |
CN107391056B CN107391056B (en) | 2020-05-05 |
Family
ID=60335176
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710537067.2A Active CN107391056B (en) | 2017-07-04 | 2017-07-04 | Manufacturing method and system for printing discontinuous bar code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391056B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102096795A (en) * | 2010-11-25 | 2011-06-15 | 西北工业大学 | Method for recognizing worn two-dimensional barcode image |
JP2013089004A (en) * | 2011-10-18 | 2013-05-13 | Riso Kagaku Corp | Image processing apparatus |
CN105160339A (en) * | 2015-08-06 | 2015-12-16 | 四川大学 | Two-dimension code printing quality online assessment method |
CN105678692A (en) * | 2016-01-07 | 2016-06-15 | 北京印刷学院 | Two-dimensional code pre-deformation design method on conical surface |
CN105787897A (en) * | 2016-02-29 | 2016-07-20 | 宇龙计算机通信科技(深圳)有限公司 | Processing method and device of fuzzy two-dimensional code image |
-
2017
- 2017-07-04 CN CN201710537067.2A patent/CN107391056B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102096795A (en) * | 2010-11-25 | 2011-06-15 | 西北工业大学 | Method for recognizing worn two-dimensional barcode image |
JP2013089004A (en) * | 2011-10-18 | 2013-05-13 | Riso Kagaku Corp | Image processing apparatus |
CN105160339A (en) * | 2015-08-06 | 2015-12-16 | 四川大学 | Two-dimension code printing quality online assessment method |
CN105678692A (en) * | 2016-01-07 | 2016-06-15 | 北京印刷学院 | Two-dimensional code pre-deformation design method on conical surface |
CN105787897A (en) * | 2016-02-29 | 2016-07-20 | 宇龙计算机通信科技(深圳)有限公司 | Processing method and device of fuzzy two-dimensional code image |
Also Published As
Publication number | Publication date |
---|---|
CN107391056B (en) | 2020-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106778996B (en) | It is embedded with the generation system and method for the two dimensional code of visual pattern and reads system | |
US9501680B2 (en) | Method and device for batch scanning 2D barcodes | |
CN102521558B (en) | Bar code identifying method and device | |
CN106295454B (en) | For handling the data processing equipment and method of 2D color bar code | |
KR101293703B1 (en) | A system for decoding skewed data matrix barcode, and the method therefor | |
CN110610199B (en) | Automatic optical detection method for printed circuit board resistance element welding spot based on svm and xgboost | |
IL184106A (en) | Information input/output method using dot pattern | |
CN107392283B (en) | Method and system for generating cylindrical surface deformed bar code | |
CN101609508B (en) | Sign structure for identifying object identity and calculating orientation information and identification method thereof | |
CN108960000A (en) | A kind of strip small two-dimension code recognition methods | |
US20160379029A1 (en) | High capacity 2d color barcode design and processing method for camera based applications | |
TWI438699B (en) | Processing method of barcode and related apparatus thereof | |
CN114463438A (en) | Calibration plate, calibration plate identification method, calibration plate identification device and computer readable medium | |
CN102915429B (en) | A kind of scanned picture matching process and device | |
KR20110105369A (en) | A 2d barcode image extracting/decoding device, and the method therefor | |
CN107391056A (en) | A kind of preparation method and system for printing interruption bar code | |
CN113506276A (en) | Marker and method for measuring structure displacement | |
CN107403218B (en) | Method for changing bar code ink | |
CN107392284A (en) | A kind of preparation method and system of mirror image bar code | |
CN107392282A (en) | A kind of preparation method and system for wearing bar code | |
CN107392285B (en) | Method and system for manufacturing deformed bar code | |
CN110263597B (en) | Quick and accurate QR (quick response) code correction method and system | |
CN109492450A (en) | A kind of bar code localization method based on printed page analysis | |
CA2376765A1 (en) | Method and device for synchronisation in the encoding and decoding of data that are printed in data tapes | |
CN112800798B (en) | Aztec code positioning method |
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 | ||
CB02 | Change of applicant information |
Address after: 350015 New Continental Science Park No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province Applicant after: New Continent Digital Technology Co., Ltd. Address before: 350015 New Continental Science Park No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province Applicant before: Fujian Newland Computer Co., Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |