Specific embodiment
Various aspects of the disclosure is described below.It is to be understood that teaching herein can be had with varied form
Body embodies, and any concrete structure disclosed herein, function or both are only representational.Religion based on this paper
Lead, those skilled in the art it is to be understood that one aspect disclosed herein can be realized independent of any other aspect,
And the two or more aspects in these aspects can combine in various manners.It is, for example possible to use it is described in this paper
Any number of aspect, realizes device or puts into practice method.Further, it is possible to use other structures, function or except described here
One or more aspects outside or be not one or more aspects described herein 26S Proteasome Structure and Function, realize this device
Or put into practice this method.Additionally, any aspect described herein can include at least one element of claim.
Each embodiment of the present invention is described below with reference to accompanying drawings.
The present invention proposes a kind of two-dimensional code identification method, and Fig. 1 shows the two-dimensional code identification method of embodiments of the invention
Flow chart, including step:
S1, identify each position sensing figure from acquired picture;Specifically, it is possible to use third-party software
All position sensing figures on (the zxing software such as increased income, it is a java class libraries of increasing income) identifying purpose webpage capture;
In an example of the present invention, described picture can be the photo of photographic head shooting or cutting of webpage
Figure, or the picture in other sources.
After identifying each position sensing figure, proceed to step s2.
S2, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic from each position sensing figure;
Wherein, Quick Response Code component characteristic includes: three lines being formed between the position sensing figure in position sensing figure tlv triple
Two the shortest lines of middle length are vertical and equal length.Specifically, term " position sensing figure tlv triple " refers to by three
The position sensing graphics combine of position sensing figure composition.
For being better understood from Quick Response Code component characteristic, may be referred to shown in accompanying drawing 2, position sensing figure a, b, c;Wherein,
The line of position sensing figure a, b is d1;The line of position sensing figure a, c is d2;The line of position sensing figure c, b is
d3;D1 and d2 is the shortest in three lines 2, wherein, d1 and d2 equal length, and and d1 is vertical with d2;Quick Response Code is acceptable
It is to carry out rotating the state obtaining as shown in Figures 3 to 5 on the basis of Fig. 2, can also be other states, do not show one by one in figure
Example.
Specifically, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic step can using but not
It is limited in the following manner:
Set up the level right angle coordinate system of display screen place plane;Obtain x, the y-coordinate value of each position sensing figure;
X based on the three position sensing figures found out, y-coordinate value, according to the coordinate figure of each position sensing figure,
It is calculated the length of three lines formed between the position sensing figure in position sensing figure tlv triple, and wherein long
Spend the angle of two the shortest lines;
The angle of two the shortest lines of the length according to three lines and wherein length, from the position sensing being grouped
In figure tlv triple, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic.
It is understood that being also based on other reference points, set up the coordinate system differing with the present embodiment.
Proceed to step s3 after searching out the position sensing figure tlv triple meeting Quick Response Code component characteristic.
S3, based on the position sensing figure tlv triple determined, determine two-dimension code area;Wherein it is determined that Quick Response Code area
Can adopt during domain but be not limited to following manner and determine:
Fig. 6 shows the schematic diagram determining two-dimension code area, for purposes of illustration only, with the qr Quick Response Code of standard as an example;
Wherein, a, b, c are position sensing figure;Determine that the method for two-dimension code area includes step:
1) center of acquisition position sensing figure a and position sensing figure b center, apart from k2, obtain position sensing figure
The center of a and vertical dimension k1 of position sensing figure a left side edge;Obtain position sensing figure b center and position sensing figure
Vertical dimension k3 of shape b right side edge;
2) and obtain position sensing figure a center and position sensing figure c center apart from l2;Obtain position sensing
The center of figure a and vertical dimension l1 of position sensing figure a top edge;Obtain position sensing figure c center and position sensing
Vertical dimension l3 of figure c lower limb;
3) because the shape of qr Quick Response Code is a square, i.e. k1+k2+k3=l1+l2+l3, then according to l1+l2+l3
Can determine the representative region of Quick Response Code;As shown in the black thick dashed line frame of Fig. 6.
After determining two-dimension code area, proceed to step s4.
S4, in pending two-dimension code area choose a two-dimension code area.By the position sensing figure determined
Shape tlv triple may have multiple, then the two-dimension code area determined there is also multiple, during selection, can according to certain order according to
Secondary selection, for example from left to right, from top to bottom.
Next, proceeding to step s5.
S5, to judge whether that the position sensing figure tlv triple being based on comprises identical with selected two-dimension code area
Position sensing figure two-dimension code area.For example, the position sensing figure tlv triple that selected two-dimension code area q is based on
Comprise position sensing figure a, b, c, another two-dimension code area q1 comprises position sensing figure c, d, e then it represents that there is institute's base
In position sensing figure tlv triple comprise the Quick Response Code area with selected two-dimension code area q identical position sensing figure c
Domain q1.If it is judged that being yes, then enter step s6;If it is judged that being no, then enter step s7.
S6, judge whether to parse 2 D code information from one of two-dimension code area.Specifically judging whether
There is the two dimension of identical position sensing figure from the position sensing figure tlv triple being based on and selected two-dimension code area
Code region parses 2 D code information.If it is, entering step s8;Otherwise enter step s7.
S7, from selected two-dimension code area, parse 2 D code information;Proceed to step s9.
S8, the parsing abandoning to selected two-dimension code area;Proceed to step s9.
S9, judge whether also untreated two-dimension code area.If it is, proceeding to step s4;If it is not, then flow process knot
Bundle.
Said method proposed by the present invention, identifies all position sensing figures from picture;Obtain and meet two-dimentional code character
Become the position sensing figure tlv triple of characteristic, the generation of Quick Response Code can be determined according to position sensing figure tlv triple from picture
Table section;The representative region of the Quick Response Code determining is carried out parsing the information obtaining that Quick Response Code comprises;Two dimension proposed by the present invention
Code recognition methodss and device do not need the auxiliary of photographic head, and rapidly batch identification can go out what multiple Quick Response Codes were comprised
Information.
It will be appreciated by those skilled in the art that, term " comprising " and " having " and their any deformation, meaning
Figure is to cover non-exclusive comprising, and for example, contains process, method, system, product or the equipment of series of steps or unit
Be not necessarily limited to those steps or the unit clearly listed, but may include clearly not listing or for these processes,
Method, product or the intrinsic other steps of equipment or unit.
Wherein, in step s2, search out the position spy meeting Quick Response Code component characteristic from each position sensing figure
During mapping shape tlv triple, can with using but be not limited to following 2 kinds of modes and search out the position sensing meeting Quick Response Code component characteristic
Figure tlv triple:
Mode one: each position sensing figure is grouped into multiple position sensing figures three according to often ternary mode
Tuple;Search out the position sensing figure tlv triple meeting according to Quick Response Code component characteristic.
Mode two: utilize scan box, according to the mode scanning line by line, each position sensing figure is grouped into multiple
Position sensing figure tlv triple;From the position sensing figure tlv triple being grouped, search out and meet Quick Response Code component characteristic
Position sensing figure tlv triple.
When employing mode two, for ease of understanding, below elaborate;Specifically, referring to Fig. 7 a to Fig. 7 c, this three width
Figure is the schematic diagram being carried out using scan box during tlv triple packet;The size being configured and dimensioned to Quick Response Code of scan box, wherein,
The size of Quick Response Code can rule of thumb be worth to;It is understood that the size of scan box can be carried out according to actual needs
Adjustment.As Fig. 7 a, scanning inframe has three position sensing figures, judges whether a combination thereof meets Quick Response Code component characteristic, if so,
Then store, otherwise abandon this combining form, in a progressive way, enter Fig. 7 b;Scanning inframe has three position sensings
Figure, judges whether a combination thereof meets Quick Response Code component characteristic, if so, then stores, and otherwise abandons this combining form, according to line by line
The mode of scanning, enters Fig. 7 c.
It is understood that when scan box size is larger, scan box pass through the position sensing figure that obtains of scanning have multiple,
As shown in figure 7d, to have numbering is 1 to scanning inframe, 2,3,4,55 position sensing figures altogether, can form 10 kinds of tlv triple, sentence
Whether disconnected each group tlv triple meets Quick Response Code component characteristic, if so, then stores, and otherwise abandons this combining form, according to line by line by
The mode of column scan, enters Fig. 7 e.In Fig. 7 e, scanning inframe has 5 position sensing figures, can form 10 kinds of tlv triple, can
To form 10 kinds of tlv triple, judge whether each group tlv triple meets Quick Response Code component characteristic, if so, then store, otherwise abandoning should
Combining form, according to the mode scanning line by line, enters Fig. 7 f.In Fig. 7 f, scanning inframe has 5 position sensing figures, can
To form 10 kinds of tlv triple, 10 kinds of tlv triple can be formed, judge whether each group tlv triple meets Quick Response Code component characteristic, if
It is then to store, otherwise abandons the combining form of this tlv triple, according to the mode scanning line by line, enter Fig. 7 g.With such
Push away, until all position sensing graph scannings are finished.
In one or more above-mentioned embodiment, searching out the position sensing figure meeting Quick Response Code component characteristic
After tlv triple, although because some tlv triple meet Quick Response Code component characteristic, this tlv triple can not possibly form Quick Response Code,
As shown in Figure 8 although the tlv triple of position sensing figure 1,4,6 composition meets Quick Response Code component characteristic, but position sensing
Figure 1,4,6 can not possibly form Quick Response Code, if be also carried out parsing to this kind of position sensing figure tlv triple can exist
The not high enough problem of efficiency, in order to improve efficiency, the present embodiment has done following improvement: meets Quick Response Code component characteristic searching out
Position sensing figure tlv triple after, whether deposit between two position sensing figures judging the arbitrary line in two lines
Detect figure in other positions;Judge formation between the position sensing figure in searched out position sensing figure tlv triple
Article three, between the two position sensing figures of arbitrary line in two the shortest lines of length in line, whether there is other positions
Put detection figure, when it is present, delete corresponding position sensing figure tlv triple;When not existing, based on the position being searched out
Put detection figure tlv triple, determine two-dimension code area.
In one embodiment, improved based on Fig. 1 embodiment, the reality of two-dimensional code identification method proposed by the present invention
Apply flow process and refer to Fig. 9, Fig. 9 is another flow chart of the embodiment of the present invention, comprising:
As shown in figure 9, in s901, identifying each position sensing figure from acquired picture;Then walked
Rapid s902.
In s902, search out the position sensing figure three meeting Quick Response Code component characteristic from each position sensing figure
Tuple;Carry out step s903.
In s903, judge to whether there is other positions between two position sensing figures of the arbitrary line in two lines
Put detection figure;Judge three lines being formed between the position sensing figure in searched out position sensing figure tlv triple
Whether there is other positions between two position sensing figures of arbitrary line in two the shortest lines of middle length and detect figure
Shape, when it is present, carries out step s904;When not existing, carry out step s905.
In s904, delete corresponding position sensing figure tlv triple;
In s905, based on the position sensing figure tlv triple being searched out, determine two-dimension code area;
In s906, two-dimension code area is carried out parsing the information obtaining that Quick Response Code comprises.
In an example of the present invention, the size of scan box can be arranged it is also possible to make system automatic manually by user
Adjustment.Scan box, can also be moved manually, and when required, can change the position of scan box according to manual operation.
Present invention also offers a kind of two-dimension code recognition device, Figure 10 shows the two-dimension code recognition device 100 of the present invention
Block diagram.
As illustrated, described two-dimension code recognition device 100 includes: position sensing pattern recognition module 101, for from being obtained
Each position sensing figure is identified in the picture taking;Search module 102, for searching out symbol from each position sensing figure
Close the position sensing figure tlv triple of Quick Response Code component characteristic;Wherein, Quick Response Code component characteristic includes: position sensing figure ternary
In three lines being formed between position sensing figure in group, two the shortest lines of length are vertical and equal length;Quick Response Code
Determining module 103, for based on the position sensing figure tlv triple determined, determining two-dimension code area;Quick Response Code parses mould
Block 104, for parsing 2 D code information from the two-dimension code area determined;Judge module 105, for judge really
Have in the two-dimension code area made whether multiple position sensing figure tlv triple being based on comprise same position detection figure
Two-dimension code area and parse 2 D code information from one of two-dimension code area;When judged result is to be, described two dimension
Code parsing module does not parse to the untreated two-dimension code area in the plurality of two-dimension code area.
Said method proposed by the present invention, identifies all position sensing figures from acquired picture;Obtain and meet
The position sensing figure tlv triple of Quick Response Code component characteristic, can determine two according to position sensing figure tlv triple from picture
The representative region of dimension code;The representative region of the Quick Response Code determining is carried out parsing the information obtaining that Quick Response Code comprises;The present invention carries
The two-dimensional code identification method going out and device do not need the auxiliary of photographic head, and rapidly batch identification can go out multiple Quick Response Codes
The information being comprised.
In one or more embodiment of the present invention, in order to reduce invalid tlv triple, improve Quick Response Code parsing effect
Rate, invalid tlv triple refers to these tlv triple and can not possibly form Quick Response Code;Therefore, done following improvement, its block diagram
Refer to Figure 11:
As shown in figure 11, two-dimension code recognition device 100 also includes removing module 106.Described removal module 106 is used in institute
Two that in three lines being formed between position sensing figure in the position sensing figure tlv triple searching out, length is the shortest
When there is other positions detection figure between two position sensing figures of the arbitrary line in line, remove this position sensing figure
Shape tlv triple.
In one or more embodiment of the present invention, search module 102 is searched for from each position sensing figure
Go out to meet Quick Response Code component characteristic position sensing figure tlv triple when, can with using but be not limited to following 2 kinds of modes and search out
Meet the position sensing figure tlv triple of Quick Response Code component characteristic:
Each position sensing figure is grouped into multiple positions according to often ternary mode and visits by mode one, search module
Mapping shape tlv triple;From the position sensing figure tlv triple being grouped, search out the position spy meeting Quick Response Code component characteristic
Mapping shape tlv triple.
Each position sensing figure is grouped into multiple position sensing figure ternarys using scan box by mode two, search module
Group;
From the position sensing figure tlv triple being grouped, search out the position sensing figure meeting Quick Response Code component characteristic
Tlv triple.
In one or more embodiment of the present invention, search module 102 is from the position sensing figure three being grouped
In tuple, when searching out the position sensing figure tlv triple meeting Quick Response Code component characteristic, obtain each position sensing figure
X, y-coordinate value;
X based on the three position sensing figures found out, y-coordinate value, from the position sensing figure tlv triple being grouped
In, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic.
In one or more embodiment of the present invention, the size of scan box is arranged manually by user.
In one or more embodiment of the present invention, the size of scan box is selected according to Quick Response Code size.
Additionally, typically, the mobile terminal of the present invention can be the various hand-held terminal devices with Bluetooth function, for example, have
There are mobile phone, the personal digital assistant (pda) of Bluetooth function.
Additionally, the method according to the invention is also implemented as by processor (such as cpu) execution in mobile terminal
Computer program, and store in a memory in the mobile terminal.It is when executed by this computer program, execute basis
The above-mentioned functions limiting in the method for invention.
Additionally, the method according to the invention is also implemented as a kind of computer program, this computer program
Including computer-readable medium, it is stored with the computer-readable medium for executing limit in the method for the present invention above-mentioned
The computer program of function.
Additionally, said method step and system unit can also utilize controller and make controller real for storage
The computer readable storage devices of the computer program of existing above-mentioned steps or Elementary Function are realized.
Those skilled in the art will also understand is that, in conjunction with the various illustrative logical blocks described by disclosure herein, mould
Block, circuit and algorithm steps may be implemented as electronic hardware, computer software or a combination of both.Hard in order to clearly demonstrate
Part and this interchangeability of software, the function with regard to various exemplary components, square, module, circuit and step it is entered
Go general description.This function is implemented as software and is also implemented as hardware depending on concrete application and applying
Design constraint to whole system.Those skilled in the art can realize described in every way for every kind of concrete application
Function, but this realize decision and should not be interpreted as causing a departure from the scope of the present.
Although content disclosed above shows the exemplary embodiment of the present invention, it should be noted that without departing substantially from power
On the premise of profit requires the scope of the present invention limiting, may be many modifications and change.Real according to invention described herein
Function, step and/or the action of applying the claim to a method of example are not required to execute with any particular order.Although additionally, the present invention
Element with the description of individual form or can require, it is also contemplated that multiple, unless explicitly limited for odd number.
Although describing to be described according to each embodiment of the present invention above with reference to figure, people in the art
Member should be appreciated that each embodiment that the invention described above is proposed, and can also do on the basis of without departing from present invention
Go out various improvement.Therefore, protection scope of the present invention should be determined by the content of appending claims.