Detailed description of the invention
Various aspects of the disclosure is described below.It is to be understood that teaching herein specifically can embody with varied form, and any concrete structure disclosed herein, function or both are only representational.Based on teaching herein, those skilled in the art are it is to be understood that one aspect disclosed herein can realize independent of any other side, and the two or more aspects in these aspects can combine in various manners.It is, for example possible to use any number of the aspects set forth herein, it is achieved device or put into practice method.Further, it is possible to use other structure, function or except one or more aspects described herein or be not the 26S Proteasome Structure and Function of one or more aspects described herein, it is achieved 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 illustrates the flow chart of the two-dimensional code identification method of embodiments of the invention, including step:
As shown in Figure 1 S1, from pending webpage, identify each position sensing figure;Concrete,
Pending webpage can be currently displaying webpage, it is also possible to be;Recognition method includes but not limited to that terminal browser obtains the sectional drawing of pending webpage from the backstage buffer memory that page display processes, utilize all position sensing figures on third-party software (as the ZXing software increased income, it is a java class storehouse of increasing income) identifying purpose webpage capture;
After identifying position sensing figure, in step s 2, from each position sensing figure, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic.Wherein, Quick Response Code component characteristic includes: line is vertical and length is equal for two that in three lines formed between the position sensing figure in position sensing figure tlv triple, length is the shortest.Concrete, term " position sensing figure tlv triple " refers to the graphics combine being made up of three position sensing figures.
For being better understood from Quick Response Code component characteristic, it is possible to shown in reference 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, and wherein, d1 and d2 length is equal, and d1 and d2 is vertical;Quick Response Code can also is that and rotates the state obtained as shown in Figures 3 to 5 on Fig. 1 basis, it is also possible to be other states, in the drawings not example one by one.
Concrete, the step searching out the position sensing figure tlv triple meeting Quick Response Code component characteristic can adopt but be not limited in the following manner:
Set up the level right angle coordinate system of display screen place plane;Obtain the X of each position sensing figure, Y-coordinate value;
Based on the X of three position sensing figures found out, Y-coordinate value, coordinate figure according to each position sensing figure, calculate the length of three lines formed between the position sensing figure in position sensing figure tlv triple, and the angle of wherein two lines that length is the shortest;
The angle of length according to three lines and wherein two lines that length is the shortest, from the position sensing figure tlv triple being grouped, searches out the position sensing figure tlv triple meeting Quick Response Code component characteristic.
It is understood that be also based on other reference points, set up the coordinate system differed with the present embodiment.
After searching out the position sensing figure tlv triple meeting Quick Response Code component characteristic from each position sensing figure, in step s3, based on the position sensing figure tlv triple determined, it is determined that two-dimension code area.Wherein it is determined that can adopt during two-dimension code area but be not limited to following manner and determine:
Fig. 6 illustrates the schematic diagram determining two-dimension code area, for purposes of illustration only, with the QR Quick Response Code of standard exemplarily;Wherein, A, B, C are position sensing figure;Determine that the method for two-dimension code area includes step:
1) obtain the center of position sensing figure A and the distance K2 at position sensing figure B center, obtain the center of position sensing figure A and the vertical dimension K1 of position sensing figure A left side edge;Obtain the vertical dimension K3 at position sensing figure B center and position sensing figure B right side edge;
2) and obtain the distance L2 at center and position sensing figure C center of position sensing figure A;Obtain the center of position sensing figure A and the vertical dimension L1 of position sensing figure A top edge;Obtain the vertical dimension L3 at position sensing figure C center and position sensing figure C lower limb;
3) owing to the shape of QR Quick Response Code is square, i.e. a K1+K2+K3=L1+L2+L3, then may determine that the representative region of Quick Response Code according to L1+L2+L3;As shown in the black thick dashed line frame of Fig. 6.
After determining two-dimension code area, in step s 4, it is identified two-dimension code area obtaining the information that Quick Response Code comprises.
The said method that the present invention proposes, identifies all position sensing figures from webpage;Obtain the position sensing figure tlv triple meeting Quick Response Code component characteristic, the representative region of Quick Response Code can be determined according to position sensing figure tlv triple from webpage;It is identified obtaining the information that Quick Response Code comprises to the representative region of the Quick Response Code determined;The two-dimensional code identification method of present invention proposition and device do not need the auxiliary of photographic head, and batch identification can go out the information that multiple Quick Response Code comprises.
What it will be appreciated by those skilled in the art that is, term " includes " and " having " and their any deformation, it is intended to cover non-exclusive comprising, such as, contain series of steps or the process of unit, method, system, product or equipment be not necessarily limited to those steps or the unit clearly listed, but can include clearly not listing or for intrinsic other step of these processes, method, product or equipment or unit.
Wherein, in step s 2, when searching out, from each position sensing figure, the position sensing figure tlv triple meeting Quick Response Code component characteristic, it is possible to adopt but be not limited to following 2 kinds of modes and search out the position sensing figure tlv triple meeting Quick Response Code component characteristic:
Mode one: each position sensing figure is grouped into multiple position sensing figure tlv triple according to every ternary mode;The position sensing figure tlv triple met is searched out according to Quick Response Code component characteristic.
Mode two: utilize scan box, is grouped into multiple position sensing figure tlv triple according to the mode scanned line by line by each position sensing figure;From the position sensing figure tlv triple being grouped, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic.
When the mode two of employing, for ease of understanding, below elaborate;Concrete, it is the schematic diagram utilizing scan box to carry out when tlv triple is grouped referring to Fig. 7 a to Fig. 7 c, this three width figure;The size being configured and dimensioned to Quick Response Code of scan box, wherein, the size of Quick Response Code can obtain based on experience value;It is understood that the size of scan box can be adjusted according to actual needs.Such as Fig. 7 a, there are three position sensing figures in scan box, it is judged that whether its combination meets Quick Response Code component characteristic, if so, then stores, otherwise abandons this combining form, in a progressive way, enter Fig. 7 b;There are three position sensing figures in scan box, it is judged that whether its combination meets Quick Response Code component characteristic, if so, then stores, otherwise abandons this combining form, in a progressive way, enter Fig. 7 c.
It is understandable that, when scan box is larger in size, scan box has multiple by scanning the position sensing figure obtained, as shown in figure 7d, 1,2,3,4,55 position sensing figures altogether it are numbered in scan box, 10 kinds of tlv triple can be formed, it is judged that whether each group tlv triple meets Quick Response Code component characteristic, if, then store, otherwise abandon this combining form, according to the mode scanned line by line, enter Fig. 7 e.In Fig. 7 e, in scan box, there are 5 position sensing figures, it is possible to form 10 kinds of tlv triple, it is possible to form 10 kinds of tlv triple, judge whether each group of tlv triple meets Quick Response Code component characteristic, if so, then store, otherwise abandon this combining form, according to the mode scanned line by line, enter Fig. 7 f.In Fig. 7 f, in scan box, there are 5 position sensing figures, it is possible to form 10 kinds of tlv triple, it is possible to form 10 kinds of tlv triple, judge whether each group of tlv triple meets Quick Response Code component characteristic, if so, then store, otherwise abandon the combining form of this tlv triple, according to the mode scanned line by line, enter Fig. 7 g.By that analogy, until by complete for all position sensing graph scannings.
In one or more above-mentioned embodiment, after searching out the position sensing figure tlv triple meeting Quick Response Code component characteristic, because although some tlv triple meets Quick Response Code component characteristic, but this tlv triple can not form Quick Response Code, as shown in Figure 8, although position sensing figure 1, 4, the tlv triple of 6 compositions meets Quick Response Code component characteristic, but position sensing figure 1, 4, 6 can not form Quick Response Code, if being also carried out this kind of position sensing figure tlv triple identifying, can there is the problem that efficiency is not high enough, in order to improve efficiency, the present embodiment has done following improvement: after searching out the position sensing figure tlv triple meeting Quick Response Code component characteristic, judge whether there is other position sensing figures between two position sensing figures of the arbitrary line in two lines;Judge whether there is other position sensing figures between two position sensing figures of the arbitrary line in two lines that in three lines formed between the position sensing figure in the position sensing figure tlv triple searched out, length is the shortest, when it is present, corresponding position sensing figure tlv triple is deleted;When being absent from, based on the position sensing figure tlv triple searched out, it is determined that two-dimension code area.
In one embodiment, improving based on Fig. 1 embodiment, it is another flow chart of the embodiment of the present invention that the implementing procedure of the two-dimensional code identification method that the present invention proposes is referred to Fig. 9, Fig. 9, including:
As it is shown in figure 9, in step S901, identify each position sensing figure from pending webpage;Then step S902 is carried out.In step S902, from each position sensing figure, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic;Carry out step S903.In step S903, it is judged that whether there is other position sensing figures between two position sensing figures of the arbitrary line in two lines;Judge whether there is other position sensing figures between two position sensing figures of the arbitrary line in two lines that in three lines formed between the position sensing figure in the position sensing figure tlv triple searched out, length is the shortest, when it is present, step S904 is carried out;When being absent from, carry out step S905.
In step S904, delete corresponding position sensing figure tlv triple;
In step S905, based on the position sensing figure tlv triple searched out, it is determined that two-dimension code area;
In step S906, it is identified two-dimension code area obtaining the information that Quick Response Code comprises.
In one or more embodiment of the present invention, the size of scan box manually can be arranged by user, it is also possible to allows system automatically adjust.Scan box, it is also possible to be moved manually, when required, it is possible to change the position of scan box according to manual operation.
Present invention also offers a kind of two-dimension code recognition device, Figure 10 illustrates the block diagram of the two-dimension code recognition device of the present invention, including: position sensing pattern recognition module 101, for identifying each position sensing figure from pending webpage;Search module 102, for searching out the position sensing figure tlv triple meeting Quick Response Code component characteristic from each position sensing figure;Quick Response Code determines module 103, for based on the position sensing figure tlv triple searched out, it is determined that two-dimension code area;Quick Response Code identification module 104, for being identified two-dimension code area obtaining the information that Quick Response Code comprises, wherein, Quick Response Code component characteristic includes: line is vertical and length is equal for two that in three lines formed between the position sensing figure in position sensing figure tlv triple, length is the shortest.
The said method that the present invention proposes, identifies all position sensing figures from webpage;Obtain the position sensing figure tlv triple meeting Quick Response Code component characteristic, the representative region of Quick Response Code can be determined according to position sensing figure tlv triple from webpage;It is identified obtaining the information that Quick Response Code comprises to the representative region of the Quick Response Code determined;The two-dimensional code identification method of present invention proposition and device do not need the auxiliary of photographic head, and batch identification can go out the information that multiple Quick Response Code comprises rapidly.
In one or more embodiment of the present invention, in order to reduce invalid tlv triple, improving Quick Response Code recognition efficiency, invalid tlv triple refers to these tlv triple can not form Quick Response Code;Therefore, having done following improvement, its block diagram refer to Figure 11:
Two-dimension code recognition device also includes in fig. 11: remove module 105;As shown in figure 11, when there are other position sensing figures between two position sensing figures of arbitrary line that removal module 105 is used between the position sensing figure in the position sensing figure tlv triple searched out in two lines that in three lines formed, length is the shortest, remove this position sensing figure tlv triple.
In one or more embodiment of the present invention, when search module 102 searches out, from each position sensing figure, the position sensing figure tlv triple meeting Quick Response Code component characteristic, it is possible to adopt but be not limited to following 2 kinds of modes and search out the position sensing figure tlv triple meeting Quick Response Code component characteristic: each position sensing figure is grouped into multiple position sensing figure tlv triple according to every ternary mode by mode one, search module 102;From the position sensing figure tlv triple being grouped, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic.Mode two, search module 102 utilize scan box that each position sensing figure is grouped into multiple position sensing figure tlv triple;From the position sensing figure tlv triple being grouped, search out the position sensing figure tlv triple meeting Quick Response Code component characteristic.
In one or more embodiment of the present invention, search module 102, from the position sensing figure tlv triple being grouped, when searching out the position sensing figure tlv triple meeting Quick Response Code component characteristic, obtains the X of each position sensing figure, Y-coordinate value;Based on the X of three position sensing figures found out, Y-coordinate value, from the position sensing figure tlv triple being grouped, 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 manually arranged 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 instance has the mobile phone of Bluetooth function, PDA(Personal Digital Assistant).
Additionally, the method according to the invention is also implemented as the computer program performed by the processor (such as CPU) in mobile terminal, and store in a memory in the mobile terminal.It is when executed by this computer program, performs the above-mentioned functions limited in the method for the present invention.
In addition, the method according to the invention is also implemented as a kind of computer program, this computer program includes computer-readable medium, and storage has the computer program of the above-mentioned functions limited in the method for performing the present invention on the computer-readable medium.
Additionally, said method step and system unit can also utilize controller and for storing so that controller realizes the computer readable storage devices realization of the computer program of above-mentioned steps or Elementary Function.
Those skilled in the art will also understand is that, may be implemented as electronic hardware, computer software or both combinations in conjunction with the various illustrative logical blocks described by disclosure herein, module, circuit and algorithm steps.In order to clearly demonstrate this interchangeability of hardware and software, to it, general description is carried out with regard to the function of various exemplary components, square, module, circuit and step.This function is implemented as software and is also implemented as hardware and depends on specifically applying and being applied to the design constraint of whole system.Those skilled in the art can realize described function in every way for every kind of concrete application, but this realization decision is not necessarily to be construed as and causes departing from the scope of the present invention.
Although content disclosed above illustrates the exemplary embodiment of the present invention, it should be noted that under the premise of the scope of the present invention limited without departing substantially from claim, it is possible to it is variously changed and revises.The function of the claim to a method according to inventive embodiments described herein, step and/or action need to not perform with any particular order.Although additionally, the element of the present invention can describe or requirement with individual form, it is also contemplated that multiple, it is odd number unless explicitly limited.
Although being described above with reference to figure each embodiment described according to the present invention, it should be appreciated to those skilled in the art that each embodiment that the invention described above is proposed, it is also possible on without departing from the basis of present invention, make various improvement.Therefore, protection scope of the present invention should be determined by the content of appending claims.