Embodiment
Various aspects of the present disclosure are described below.Should be understood that, instruction herein can be with varied form imbody, and disclosed any concrete structure, function or both are only representational in this article.Instruction based on herein, those skilled in the art should be understood that, an aspect disclosed herein can be independent of any other side and realize, and the two or more aspects in these aspects can combine according to variety of way.For example, can use the aspect of any number described in this paper, implement device or hands-on approach.In addition, can use other structure, function or except one or more aspects described in this paper or be not the 26S Proteasome Structure and Function of one or more aspects described in this paper, realize this device or put into practice this method.In addition, any aspect described herein can comprise 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 Quick Response Code recognition methods, and Fig. 1 shows the process flow diagram of the Quick Response Code recognition methods of embodiments of the invention, comprising step:
S1, from obtained picture, identify each position sensing figure; Particularly, can utilize all position sensing figures on third-party software (as the ZXing software of increasing income, it is the java class storehouse of increasing income) identifying purpose webpage capture;
In an example of the present invention, described picture can be the photo that camera is taken, and can be also the sectional drawing of webpage, or the picture in other sources.
After identifying each position sensing figure, proceed to step S2.
S2, from each position sensing figure, search out the position sensing figure tlv triple that meets Quick Response Code component characteristic; Wherein, Quick Response Code component characteristic comprises: in three lines that form between the position sensing figure in position sensing figure tlv triple, the shortest two lines of length are vertical and equal in length.Concrete, term " position sensing figure tlv triple " refers to that the position sensing figure being comprised of three position sensing figures combines.
For better understanding Quick Response Code component characteristic, can be with reference 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 are 2 the shortest in three lines, and wherein, d1 and d2 are equal in length, and d1 is vertical with d2; Quick Response Code can also be the state obtaining as shown in Figures 3 to 5 that is rotated on Fig. 1 basis, can also be other states, in the drawings example one by one not.
Concrete, the step that searches out the position sensing figure tlv triple that meets Quick Response Code component characteristic can adopt but be not limited to following mode:
Set up the horizontal rectangular coordinate system of display screen place plane; Obtain X, the Y coordinate figure of each position sensing figure;
The X of three position sensing figures based on found out, Y coordinate figure, according to the coordinate figure of each position sensing figure, calculate the length of three lines that form between the position sensing figure in position sensing figure tlv triple, and the angle of the shortest two lines of length wherein;
According to the length of three lines and the angle of the shortest two lines of length wherein, from divided into groups position sensing figure tlv triple, search out the position sensing figure tlv triple that meets Quick Response Code component characteristic.
Be understandable that, can also, based on other reference point, set up the coordinate system not identical with the present embodiment.
After searching out the position sensing figure tlv triple that meets Quick Response Code component characteristic, proceed to step S3.
S3, the position sensing figure tlv triple based on determined, determine Quick Response Code region; While wherein, determining Quick Response Code region, can adopt but be not limited to following mode and determine:
Fig. 6 shows the schematic diagram of determining Quick Response Code region, for ease of explanation, usings the QR Quick Response Code of standard as example; Wherein, A, B, C are position sensing figure; The method of determining Quick Response Code region comprises step:
1) obtain the distance K2 at center and the position sensing figure B center of position sensing figure A, obtain the center of position sensing figure A and the vertical range K1 of position sensing figure A left side edge; Obtain the vertical range K3 of position sensing figure B center and position sensing figure B right side edge;
2) and the distance L 2 of obtaining center and the position sensing figure C center of position sensing figure A; Obtain the center of position sensing figure A and the vertical range L1 of position sensing figure A coboundary; Obtain the vertical range L3 of position sensing figure C center and position sensing figure C lower limb;
3) shape due to QR Quick Response Code is a square, i.e. K1+K2+K3=L1+L2+L3 can determine the region that represents of Quick Response Code according to L1+L2+L3; As shown in the black thick dashed line frame of Fig. 6.
After determining Quick Response Code region, proceed to step S4.
S4, in pending Quick Response Code region, choose a Quick Response Code region.Because determined position sensing figure tlv triple may have a plurality ofly, the Quick Response Code region determined also exists a plurality of, while choosing, can choose successively according to a definite sequence, for example from left to right, from top to bottom.
Next, proceed to step S5.
S5, judge whether to exist based on the position sensing figure tlv triple Quick Response Code region that comprises the position sensing figure identical with selected Quick Response Code region.For example, selected Quick Response Code region Q based on position sensing figure tlv triple comprise position sensing figure a, b, c, another Quick Response Code region Q1 comprises position sensing figure c, d, e, represent to exist based on the position sensing figure tlv triple Quick Response Code region Q1 that comprises the position sensing figure c identical with selected Quick Response Code region Q.If judgment result is that to be, enter step S6; If the determination result is NO, enter step S7.
S6, judge whether to parse 2 D code information from one of them Quick Response Code region.Particularly, be judge whether from based on position sensing figure tlv triple parse 2 D code information with the Quick Response Code region that selected Quick Response Code region has identical position sensing figure.If so, enter step S8; Otherwise enter step S7.
S7, from selected Quick Response Code region, parse 2 D code information; Proceed to step S9.
S8, abandon the parsing to selected Quick Response Code region; Proceed to step S9.
S9, judge whether to also have untreated Quick Response Code region.If so, proceed to step S4; If not, flow process finishes.
The said method that the present invention proposes identifies all position sensing figures from picture; Obtain the position sensing figure tlv triple that meets Quick Response Code component characteristic, according to position sensing figure tlv triple, can from picture, determine the region that represents of Quick Response Code; The information that Quick Response Code comprises that obtains is resolved in the region that represents to definite Quick Response Code; The Quick Response Code recognition methods that the present invention proposes and device do not need the auxiliary of camera, and batch identification goes out the information that a plurality of Quick Response Codes comprise rapidly.
What it will be appreciated by those skilled in the art that is, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, for example, those steps or unit that the process that has comprised series of steps or unit, method, system, product or equipment are not necessarily limited to clearly list, but can comprise clearly do not list or for these processes, method, product or equipment intrinsic other step or unit.
Wherein, in step S2, while searching out the position sensing figure tlv triple that meets Quick Response Code component characteristic from each position sensing figure, can adopt but be not limited to following 2 kinds of modes to search out the position sensing figure tlv triple that meets Quick Response Code component characteristic:
Mode one: each position sensing figure is grouped into a plurality of position sensing figure tlv triple according to every ternary mode; According to Quick Response Code component characteristic, search out the position sensing figure tlv triple meeting.
Mode two: utilize scan box, according to the mode of scanning line by line, each position sensing figure is grouped into a plurality of position sensing figure tlv triple; From divided into groups position sensing figure tlv triple, search out the position sensing figure tlv triple that meets Quick Response Code component characteristic.
When employing mode two, for ease of understanding, below elaborate; Concrete, referring to Fig. 7 a to Fig. 7 c, this three width figure is the schematic diagram while utilizing scan box to carry out tlv triple grouping; The size of scan box is configured to the size of Quick Response Code, and wherein, the size of Quick Response Code can obtain based on experience value; Be understandable that, the size of scan box can be adjusted according to actual needs.As Fig. 7 a, in scan box, there are three position sensing figures, judge whether its combination meets Quick Response Code component characteristic, if so, storage, otherwise abandon this array configuration, according to the mode of lining by line scan, enter Fig. 7 b; In scan box, there are three position sensing figures, judge whether its combination meets Quick Response Code component characteristic, if so, storage, otherwise abandon this array configuration, according to the mode of lining by line scan, enter Fig. 7 c.
Be understandable that, when scan box size is larger, the position sensing figure that scan box obtains by scanning has a plurality of, as shown in Fig. 7 d, in scan box, be numbered 1,2,3,4,55 position sensing figures altogether, can form 10 kinds of tlv triple, judgement is respectively organized tlv triple and whether is met Quick Response Code component characteristic, if, storage, otherwise abandon this array configuration, the mode according to scanning line by line, enters Fig. 7 e.In Fig. 7 e, in scan box, there are 5 position sensing figures, can form 10 kinds of tlv triple, can form 10 kinds of tlv triple, judgement is respectively organized tlv triple and whether is met Quick Response Code component characteristic, if so, storage, otherwise abandon this array configuration, the mode according to scanning line by line, enters Fig. 7 f.In Fig. 7 f, in scan box, there are 5 position sensing figures, can form 10 kinds of tlv triple, can form 10 kinds of tlv triple, judgement is respectively organized tlv triple and whether is met Quick Response Code component characteristic, if, storage, otherwise abandon the array configuration of this tlv triple, the mode according to scanning line by line, enters Fig. 7 g.By that analogy, until all position sensing graph scannings are complete.
In one or more above-mentioned embodiment, after searching out the position sensing figure tlv triple that meets 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, 6 tlv triple that form meet Quick Response Code component characteristic, but position sensing figure 1, 4, the 6th, impossible composition Quick Response Code, if also being carried out to parsing, the position sensing figure tlv triple of this class can there is the not high enough problem of efficiency, in order to raise the efficiency, the present embodiment has been done following improvement: after searching out the position sensing figure tlv triple that meets Quick Response Code component characteristic, judge between two position sensing figures of two arbitrary lines in line and whether have other position sensing figures, between two position sensing figures of the arbitrary line in three lines that form between the position sensing figure in the position sensing figure tlv triple that searches out of judgement in the shortest two lines of length, whether there is other position sensing figures, when existing, delete corresponding position sensing figure tlv triple, when not existing, the position sensing figure tlv triple based on searched out, determines Quick Response Code region.
In one embodiment, based on Fig. 1 embodiment, improve, the implementing procedure of the Quick Response Code recognition methods that the present invention proposes can be with reference to figure 9, and Fig. 9 is another process flow diagram of the embodiment of the present invention, comprising:
As shown in Figure 9, in S901, from obtained picture, identify each position sensing figure; Then carry out step S902.
In S902, from each position sensing figure, search out the position sensing figure tlv triple that meets Quick Response Code component characteristic; Carry out step S903.
In S903, judge between two position sensing figures of two arbitrary lines in line whether have other position sensing figures; Between two position sensing figures of the arbitrary line in three lines that form between the position sensing figure in the position sensing figure tlv triple that searches out of judgement in the shortest two lines of length, whether there is other position sensing figures, when existing, carry out step S904; When not existing, carry out step S905.
In S904, delete corresponding position sensing figure tlv triple;
In S905, the position sensing figure tlv triple based on searched out, determines Quick Response Code region;
In S906, the information that Quick Response Code comprises that obtains is resolved in Quick Response Code region.
In an example of the present invention, the size of scan box can manually be arranged by user, also can allow system automatically adjust.Scan box, can also manually be moved, and when whenever necessary, can change according to manual operation the position of scan box.
The present invention also provides a kind of two-dimension code recognition device, and Figure 10 shows the block diagram of two-dimension code recognition device 100 of the present invention.
As shown in the figure, described two-dimension code recognition device 100 comprises: position sensing figure identification module 101, identifies each position sensing figure for the picture from obtained; Search module 102, for searching out the position sensing figure tlv triple that meets Quick Response Code component characteristic from each position sensing figure; Wherein, Quick Response Code component characteristic comprises: in three lines that form between the position sensing figure in position sensing figure tlv triple, the shortest two lines of length are vertical and equal in length; Quick Response Code determination module 103, for the position sensing figure tlv triple based on determined, determines Quick Response Code region; Quick Response Code parsing module 104, parses 2 D code information for the Quick Response Code region from determined; Judge module 105, for judge in determined Quick Response Code region, exist a plurality of based on position sensing figure tlv triple whether comprise same position and survey the Quick Response Code region of figure and parse 2 D code information from one of them Quick Response Code region; When judgment result is that while being, described Quick Response Code parsing module is not resolved the untreated Quick Response Code region in the plurality of Quick Response Code region.
The said method that the present invention proposes identifies all position sensing figures from obtained picture; Obtain the position sensing figure tlv triple that meets Quick Response Code component characteristic, according to position sensing figure tlv triple, can from picture, determine the region that represents of Quick Response Code; The information that Quick Response Code comprises that obtains is resolved in the region that represents to definite Quick Response Code; The Quick Response Code recognition methods that the present invention proposes and device do not need the auxiliary of camera, and batch identification goes out the information that a plurality of Quick Response Codes comprise rapidly.
In one or more embodiment of the present invention, in order to reduce invalid tlv triple, improve Quick Response Code analyzing efficiency, invalid tlv triple refers to these tlv triple can not form Quick Response Code; Therefore, done following improvement, its block diagram please refer to Figure 11:
As shown in figure 11, two-dimension code recognition device 100 also comprises removal module 106.While there are other position sensing figures between two position sensing figures of the arbitrary line in three lines that form between the position sensing figure of described removal module 106 for the position sensing figure tlv triple searched out in the shortest two lines of length, remove this position sensing figure tlv triple.
In one or more embodiment of the present invention, when search module 102 searches out the position sensing figure tlv triple that meets Quick Response Code component characteristic from each position sensing figure, can adopt but be not limited to following 2 kinds of modes to search out the position sensing figure tlv triple that meets Quick Response Code component characteristic:
Mode one, search module are grouped into a plurality of position sensing figure tlv triple by each position sensing figure according to every ternary mode; From divided into groups position sensing figure tlv triple, search out the position sensing figure tlv triple that meets Quick Response Code component characteristic.
Mode two, search module utilize scan box that each position sensing figure is grouped into a plurality of position sensing figure tlv triple;
From divided into groups position sensing figure tlv triple, search out the position sensing figure tlv triple that meets Quick Response Code component characteristic.
In one or more embodiment of the present invention, search module 102, from divided into groups position sensing figure tlv triple, while searching out the position sensing figure tlv triple that meets Quick Response Code component characteristic, obtains X, the Y coordinate figure of each position sensing figure;
The X of three position sensing figures based on found out, Y coordinate figure, from divided into groups position sensing figure tlv triple, search out the position sensing figure tlv triple that meets 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.
In addition, typically, mobile terminal of the present invention can be the various hand-held terminal devices with Bluetooth function, for example, have mobile phone, the PDA(Personal Digital Assistant) of Bluetooth function.
In addition, the method according to this invention can also be implemented as the computer program that the processor (such as CPU) in mobile terminal is carried out, and is stored in the storer of mobile terminal.When this computer program is executed by processor, carry out the above-mentioned functions limiting in method of the present invention.
In addition, the method according to this invention can also be embodied as a kind of computer program, this computer program comprises computer-readable medium, stores for carrying out the computer program of the above-mentioned functions that method of the present invention limits on this computer-readable medium.
In addition, said method step and system unit also can utilize controller and realize for storing the computer readable storage devices of the computer program that makes controller realize above-mentioned steps or Elementary Function.
Those skilled in the art will also understand is that, in conjunction with the described various illustrative logical blocks of disclosure herein, module, circuit and algorithm steps, may be implemented as electronic hardware, computer software or both combinations.For this interchangeability of hardware and software is clearly described, with regard to the function of various exemplary components, square, module, circuit and step, it has been carried out to general description.This function is implemented as software or is implemented as hardware and depends on concrete application and the design constraint that imposes on whole system.Those skilled in the art can realize described function in every way for every kind of concrete application, but this realization determines should not be interpreted as causing departing from the scope of the present invention.
Although disclosed content shows exemplary embodiment of the present invention above, it should be noted that under the prerequisite of scope of the present invention that does not deviate from claim restriction, can carry out multiple change and modification.According to the function of the claim to a method of inventive embodiments described herein, step and/or action, need not carry out with any particular order.In addition, although element of the present invention can be with individual formal description or requirement, also it is contemplated that a plurality of, unless be clearly restricted to odd number.
Although described each embodiment according to the present invention above with reference to figure, be described, it will be appreciated by those skilled in the art that each embodiment that the invention described above is proposed, can also on the basis that does not depart from content of the present invention, make various improvement.Therefore, protection scope of the present invention should be determined by the content of appending claims.