Summary of the invention
Fundamental purpose of the present invention is to provide the miniature coding of a kind of two dimension and disposal route and device, to solve that the Quick Response Code code capacity of prior art is little, fault-tolerant ability is poor and the problem such as usable range is narrower.
To achieve these goals, according to an aspect of the present invention, provide a kind of two dimension miniature coding.
Code-point module according to the code element of the miniature coding of two dimension of the present invention by a plurality of positive squares rearranges, and code element can comprise: positioning mark district, and for identifying the position of code element, positioning mark district comprises fold-type location mark and auxiliary positioning mark; Data field, for identifying the code value of code element, code element comprises a plurality of data fields, fold-type location mark and/or auxiliary positioning mark characterize the position weights of different data fields; Code element type identification district, for identifying type and the sequence number of code element, the type of code element comprises: solid size and group code.
Further, code element is the N * N dot matrix by code-point module composition, and wherein, the fold-type in positioning mark district location mark, in the first vertex position of code element, is isosceles perpendicular type and distributes; Code element type identification district is positioned at the second vertex position of code element, is isosceles perpendicular type and distributes, and the first vertex position is relative with the second vertex position symmetrical; Auxiliary positioning mark is between the first vertex position and the second vertex position, and each the code-point module on it is determined the position weights of the Ji Gai data field, position of a data field in a plurality of data fields, each data field adjacent distributions.
Further, code element comprises four data fields by 7 * 7 dot matrixs of code-point module composition, the first code-point module that fold-type location mark and auxiliary positioning are put on characterizes first weights of the first data field, the second code point module that auxiliary positioning is put on characterizes the second weights of the second data field, the third yard point module that auxiliary positioning is put on characterizes the 3rd weights of the 3rd data field, and the first code-point module that auxiliary positioning is put on characterizes the 4th weights of the 4th data field.
Further, code element can also comprise: status indicator, be positioned on data field, and different status indicators characterizes the sign numerical value of the data field corresponding with it, and the code value of this data field is the long-pending of sign numerical value and position weights.
Further, each data field is by 3 * 3 code-point module composition, and auxiliary positioning mark is in the summit of data field, and the initial position of status indicator is auxiliary positioning target diagonal position on data field.
Further, status indicator, on the basis of initial position, arranges according to clockwise or counterclockwise direction the sign numerical value increasing progressively in 3 * 3 code-point module.
To achieve these goals, according to an aspect of the present invention, provide the disposal route of the miniature coding of a kind of two dimension.
According to the disposal route of the miniature coding of two dimension of the present invention, comprise: after gathering image, image is decoded to pre-service to obtain code element, code element comprises positioning mark district, data field, code element type identification district and status indicator; Code element is decoded and obtained the decoded data of image; Output decoded data.
Further, to image, the pre-service of decoding comprises to obtain the step of code element: delimit the central area of image, the positioning mark district of the code element in region, Help Center; According to the fold-type location mark correcting image in the positioning mark district of code element; Extract the symbol data of the image after correcting.
Further, before delimiting the central area of image, method also comprise by image background measure and pattern binary conversion treatment image in order to extract polytype pattern, pattern comprises the pattern of erect image or negative-appearing image.
Further, the code element decoded data that obtains image of decoding is comprised: the type of determining code element according to the data in code element type identification district, obtain the decoded data of dissimilar code element, wherein, when code element is in the situation of solid size, by the cumulative decoded data that obtains code element of the code value of each data field; When code element is in the situation of group code, according to the decoded data of each solid size in the cumulative group code of the sequence number of group code to obtain the decoded data of group code.
Further, when code element is in the situation of solid size, the cumulative decoded data that obtains code element of the code value of each data field is comprised: the position weights that obtain each data field according to the fold-type location mark in positioning mark district and/or auxiliary positioning mark; According to the status indicator of data field, obtain the sign numerical value of each data field; The position weights sign numerical value corresponding with it of data field amass the code value for data field; Each code value is added to the decoded data that obtains solid size.
Further, when code element is in the situation of group code, according to the decoded data of a plurality of solid sizes in the cumulative group code of the sequence number of group code, to obtain the step of the decoded data of group code, comprise: decompose the solid size that group code obtains forming group code; According to the data in code element type identification district, determine the sequence number of each solid size in group code; According to the method for the code value in cumulative data district, obtain the decoded data of each solid size in group code; In group code character list, inquire about the corresponding character of decoded data of each solid size; According to sequence number, character sequence is obtained to the decoded data of group code.
Further, verification decoded data after output decoded data, can comprise: in solid size decoding, obtain after decoded data, solid size is carried out to secondary decoding and obtain the first decoded data, decoded data is with the first decoded data when identical, solid size successfully decoded.
Further, verification decoded data after output decoded data, can comprise: in group code decoding, obtain after decoded data, group code is carried out to secondary decoding and obtain the second decoded data, and when the second decoded data is identical with decoded data, group code successfully decoded.
Further, verification decoded data after output decoded data, can comprise: in group code decoding, obtain after decoded data, the solid size of predetermined quantity in group code is carried out to secondary decoding and obtain the 3rd decoded data, when decoded data comprises the part identical with the 3rd decoded data, group code successfully decoded.
To achieve these goals, according to a further aspect in the invention, provide the treating apparatus of the miniature coding of a kind of two dimension.
According to the treating apparatus of the miniature coding of two dimension of the present invention, comprise: pretreatment module, after gathering image, image is decoded to pre-service to obtain code element, code element comprises positioning mark district, data field, code element type identification district and status indicator; Decoder module, obtains the decoded data of image for code element is decoded; Transport module, for exporting decoded data.
Further, locating module, for delimiting the central area of image, the positioning mark district of the code element in region, Help Center; Rectification module, marks correcting image for the fold-type location according to the positioning mark district of code element; Generation module, for extracting the symbol data of the image after rectification.
Further, decoder module can comprise: confirm module, for determine the type of code element according to the data in code element type identification district, obtain the decoded data of dissimilar code element; Solid size decoder module, for being in the situation of solid size when code element, by the cumulative decoded data that obtains code element of the code value of each data field; Group code decoder module, for being in the situation of group code when code element, according to the decoded data of a plurality of solid sizes in the cumulative group code of the sequence number of group code to obtain the decoded data of group code.
Further, this device can also comprise: correction verification module, and for verification decoded data after output decoded data.
By the present invention, adopt code element to comprise: positioning mark district, for identifying the position of code element, positioning mark district comprises fold-type location mark and auxiliary positioning mark; Data field, for identifying the code value of code element, code element comprises a plurality of data fields, fold-type location mark and/or auxiliary positioning mark characterize the position weights of different data fields; Code element type identification district, for identifying type and the sequence number of code element, the type of code element comprises: solid size and group code, the Quick Response Code that has solved prior art has that code capacity is little, fault-tolerant ability is poor and the problem of the defect such as usable range is narrower, and then reached increase Quick Response Code capacity, improve the effect of Quick Response Code application.And low, the easy making of the miniature coding cost of this two dimension, durable.
Embodiment
It should be noted that, in the situation that not conflicting, embodiment and the feature in embodiment in the application can combine mutually.Describe below with reference to the accompanying drawings and in conjunction with the embodiments the present invention in detail.
According to embodiments of the invention, provide a kind of two dimension miniature coding.Fig. 1 is according to the structural representation of the miniature coding of two dimension of the embodiment of the present invention.As shown in Figure 1, the code element of the miniature coding of this two dimension is rearranged by a plurality of foursquare code-point modules, and code element comprises: positioning mark district A, and for identifying the position of code element, positioning mark district A comprises folding shape location mark A1 and auxiliary positioning mark A2; Data field B, for identifying the code value of code element.Code element comprises a plurality of data fields, and folding shape location mark A1 and/or auxiliary positioning mark A2 characterize the position weights of different data fields; Code element type identification district C, for identifying the type of code element, the type of code element comprises: solid size and group code.
The miniature coding of two dimension of the embodiment of the present invention, is adjusted code element and is located by positioning mark district A, has improved the recognition effect of code element; Because code element can comprise the data field B that a plurality of data fields with coordination weights not form, thereby the data capacity of code element is larger; It is solid size or group code that code element type identification district C can distinguish this code element, thereby can represent integer numeral or represent one section of character string by coded combination, is used for representing the information such as network address, URL link.Two miniature codings with above-mentioned feature are large compared with Quick Response Code capacity in the past, applied range and performance stronger.Wherein, all units effective coverage of solid size shows as one and same coding, there is no coded sequence, is usually used in representing an integer numerical value; Group code is by a plurality of unit associations, to form a sequential coding region in a region, can represent that a plurality of characters form character string.
Code element of the present invention can be by the dot matrix of code-point module composition N * N, and preferred N is 7.Wherein, the fold-type of positioning mark district A location mark A1 is positioned at the first vertex position of code element, is isosceles square and distributes; Code element type identification district C is positioned at the second vertex position of code element, is isosceles square and distributes, and the first vertex position is relative with the second vertex position symmetrical; Auxiliary positioning mark A2 is between the first vertex position and the second vertex position, and each the code-point module on it is located a data field, each data field adjacent distributions.In the embodiment of the present invention, auxiliary positioning mark A2 is by three code-point module compositions, and one of them code-point module is positioned at the geometric center position of code element.
In the embodiment of the present invention, fold-type location mark A1 is the code element upper left corner in Fig. 1
type identifier, can obtain the code value of the data field of the residing position of this code element and representative by it.
type identifier and auxiliary positioning mark A2 are two identifier combination, form the view finding sign of microcode,
type identifier is each four continuous stains of a length of side,
seek mark and square or the circular pattern of type identifier are sought mark and are compared not only simplyr, and can identify the direction of image, convenient to the image processing of rectifying a deviation.In addition,
type identifier is sought mark sign breach direction, the oblique line that exists continuous three points to form, and auxiliary positioning mark A2 can realize aid identification sign.The combination of oblique line itself can identify attribute (code value) and the state (being mainly the detection of the complement code/blank code for filling) of code element.
In the embodiment of the present invention, code element type identification district C has one to fall in microcode
type region, in region, identified the group code information information relevant to element position attribute, algorithm can be according to the code element information in the region gathering in screen, directly draw it is the microcode that belongs to that combination, and can be according to encoding of graphs rule search to adjacent patterns, algorithm is the position in combinational code according to code element, and the figure in automatic decision retrieval which region of periphery is decoded.While avoiding not having group code and element position attribute information, need a large amount of repetition view finding decodings to find the start position information (can waste system calculation resources) of figure.
Preferably, code element in the embodiment of the present invention can comprise four data fields, the first code-point module on fold-type location mark A1 and auxiliary positioning mark A2 characterizes first weights of the first data field B1, second code point module on auxiliary positioning mark A2 characterizes the second weights of the second data field B2, third yard point module on auxiliary positioning mark A2 characterizes the 3rd weights of the 3rd data field B3, and the first code-point module on auxiliary positioning mark A2 characterizes the 4th weights of the 4th data field B4.For example, first weights is 1, and second weights are that 10, the three weights are that 100, the four weights are 1000, so this code element can represent the numerical range of 0-9999.
In the embodiment of the present invention, the group code sequence of microcode system standard code element can be supported five kinds of states, i.e. single element, 2x1 (2 groups) code element, 2x2 (4 groups) code element, 3x3 (9 groups) code element, 4x4 (16 groups) code element.Below respectively referred to as solid size, A group code, B group code, C group code, D group code.Although be combinational code, can be from group code any one code element just can judge the type (be that group code is single group, or the sequence number of A group code, B group code, C group code or D group code and this yard) of group code.
Code element in above-described embodiment dimension code system resolves one group of required minimum combination of data, the code element of the embodiment of the present invention can consist of 7x7 group code point module, and wherein having the Г type location mark that takies seven code-point modules of a 4x4 and one group is the auxiliary positioning mark of three code-point modules.Code element has four 3bit data fields, 4bit positioning mark district A and a 3bit-1 (seven states) code element type identification district C.A code element theory can storing information be that (2^ (12+4) * (* 2^3-1)) is individual, but in fact 12bit, namely maximum 4096 numbers are just used in data field.The pixel of the required identification of code element is (3x7) ^2=21^2=441 pixel, and area is approximately 0.55*0.55mm to the area of 0.6*0.6mm on paper.
Each data field can be by 3 * 3 code-point module composition, and auxiliary positioning mark A2 is positioned at the summit of data field, and the initial position of status indicator is positioned at the diagonal angle of auxiliary positioning mark A2 on data field.Code element can also comprise: status indicator, be positioned on data field, and different status indicators characterizes the sign numerical value of the data field corresponding with it, and sign numerical value is the code value of this data field with position the long-pending of weights.Status indicator is on the basis of initial position, the sign numerical value increasing progressively is set in 3 * 3 code-point module according to clockwise or counterclockwise direction, wherein clockwise or counterclockwise expression dextrosinistral order from left to right or from top to bottom from top to bottom respectively.Code value in the embodiment of the present invention can adopt scale-of-eight numerical value.For example, when upper first weights of the first data field B1 are 1, the code value of status indicator first data field B1 when initial position is 0, if according to order from left to right sequence from top to bottom, when status indicator is positioned in second code-point module, the code value of this first data field B1 is 1, the code value scope that obtains successively the first data field is 0-7, the code value scope that in like manner can obtain the second data field B2 is 0-70, the code value scope of the 3rd data field B3 is 0-700, the code value scope of the 4th data field B4 is 0-7000, thereby data field by the decoding scope of the code element of 3 * 3 code-point modules that form between 0-7777.Wherein the initial position of status indicator and clooating sequence can preferably obtain according to actual algorithm.
The miniature coding of two dimension of the present invention is a kind ofly by less symbol diagram, to look like to form (combinational code feature, conventional point reading code does not have correlation function), is called again microcode.1, 2, 4, 9 or 16 symbol diagram pictures all can form microcode, a code element is comprised of to the black-white point matrix that is all 7 points Horizontal vertical, in order to realize the function that naked eyes cannot be directly visual, during design, the dimension of object of the miniature coding of two dimension strictly limits, conventional two-dimensional code is that volume is larger, area is generally 10 millimeters of square area more than-30 mm side lengths, and only there is a code element in the square of the 0.5-0.8mm length of side in microcode volume, a code-point is only the size (1200-2400dpi resolution printing and printing) below 0.005-0.01mm, be difficult to be discovered by naked eyes.The symbol diagram picture of preferred 7x7 dot matrix as shown in Figure 1, each black-white point can not continuous arrangement, continuous arrangement easily forms the closeer shade (gray scale figure) of a continuous fine rule or similar a slice when code is arranged in batches, or under coloured background, seeming, (pattern of light color adds the shade of black to the darker color of picture, equal color burn), easily by user, discovered on the contrary.Therefore between any two points, also need by the fixing blank gap of doubly value insertion, guarantee that naked eyes cannot effectively discover, or from visually being cheated.In actual design, microcode has complement code simultaneously, complement code is a kind of regular arrangement " blank " pattern, for the clear area of filling pattern relates to, there is the effect that relaxes visual perception's difference, be mainly used in the soft transitions between light background and coding pattern district, and for the edge complement code of irregular pattern.Such as the arrangement of code figure does not often match with prospect pattern magnitude, during output, easily at area of the pattern, occur that the obvious depth has different separatrix around.In order to make up vision difference, need complement code design (complement code is calculated as according to prospect pattern, automatically interpolation complement code point).
The miniature coding of two dimension of the present invention is for fast decoding occasion, and coding is simple and have relatively strong storage capacity, can on the platform of the not high hardware of the strong computational complexity of arithmetic capability, move the decoding capability real-time when guaranteeing to distinguish.The miniature coding of two dimension self has checking data position, but encode, self there is no Redundancy Design, if it is stained that code suffers, cannot directly recover data, the redundancy of microcode is by the same area, and same code value coding pattern repeats in a large number, and evading the problems referred to above (is that some codes cannot normally be read verification, only need to read near the coding of this image-region, the pattern that redundancy is deposited).
In sum, microcode maximum symbol of the present invention be combined as 16, it is 4x4 combination, the length of side is the area of 2-3mm, before the recognition optical aperture of diameter 12-15mm, whenever can guarantee have the pattern of 6-9 group max model group code to drop among recognition acquisition zone, such design is the defect that there is no redundancy encoding design in Microcode Design for making up.
The design of microcode is can be based on traditional visible ray, infrared and ultraviolet light, particularly when infrared and the effect of ultraviolet light wave band, guaranteeing under the prerequisite of discrimination, can realize microcode better stealth visually, harvester due to our design, compatible many imagings aperture and multiwave optical imagery collection, on this basis, completely can be in a viewing area, the three layers of coded data that superpose are identified, and do not interfere with each other, realize maximum space availability ratio, as the combination identification of standard Quick Response Code and microcode, and the combination of digital watermarking image and microcode identification, realize more application, if a kind of code is long-term fixed indices code, a kind of code is the service code that disposable use cancels.
Microcode is because volume is small, and wavelength band is larger, is difficult for being scanned by conventional sweep instrument, or is identified by naked eyes.So also can reach the false proof anti-effect copying of part.
Fig. 2 is according to the schematic diagram of the treating apparatus of the miniature coding of two dimension of an embodiment of the present invention.As shown in Figure 2, this device comprises: pretreatment module 22, after gathering image, image is decoded to pre-service to obtain code element, and code element can comprise positioning mark district, data field, code element type identification district and status indicator; Decoder module 24, obtains the decoded data of image for code element is decoded; Transport module 26, for exporting decoded data.The embodiment of the present invention is decoded to the miniature coding of the two dimension shown in Fig. 1, and this decode procedure adopts first proofreaies and correct the flow process of obtaining again decoded data, the most effectively decoded result output.Because the miniature coding of this two dimension is uncomplicated, thereby decoding efficiency is high, and storage capacity is larger, because coding self does not have Redundancy Design, thereby there will not be the situation of repeat decoding.Large from the miniature code capacity of this two dimension of interpretation of result of decoding, not only can decode and obtain integer but also can obtain character string.Because this microcode volume is small, wavelength band is larger simultaneously, thereby is difficult for being scanned or being identified by naked eyes by conventional sweep instrument, has reached the false proof anti-effect copying of part.
Preferably, pretreatment module 22 can comprise: locating module 221, and for delimiting the central area of image, the positioning mark district of the code element in region, Help Center; Rectification module 223, marks correcting image for the fold-type location according to the positioning mark district of code element; Generation module 225, for extracting the symbol data of the image after rectification.In the embodiment of the present invention, before formal decoding, carry out location and the correction of microcode, improved accuracy and the efficiency of decoding.
Preferably, decoder module 24 can comprise: confirm module 241, for determine the type of code element according to the data in code element type identification district, obtain the decoded data of dissimilar code element; Solid size decoder module 243, for being in the situation of solid size when code element, by the cumulative decoded data that obtains code element of the code value of each data field; Group code decoder module 245, for being in the situation of group code when code element, according to the decoded data of a plurality of solid sizes in the cumulative group code of the sequence number of group code to obtain the decoded data of group code.The present invention decodes to solid size and group code respectively, and solid size decoding obtains integer, and group code decoding obtains character string result.
Preferably, the treating apparatus of the miniature coding of this two dimension also comprises: correction verification module 28, and for verification decoded data after output decoded data.After decoding completes by decoded result is carried out to the accuracy that verification improves decoding.
Fig. 3 is according to the process flow diagram of the disposal route of the miniature coding of two dimension of an embodiment of the present invention.As shown in Figure 3, the method comprises that following step S302 is to step S306:
Step S302, decodes pre-service to obtain code element to image after the pretreatment module 22 in Fig. 2 gathers image, and code element can comprise positioning mark district, data field, code element type identification district and status indicator, and wherein the code element in image as shown in Figure 1; Step S304, the 24 pairs of code elements of decoder module in Fig. 2 are decoded and are obtained the decoded data of image; Step S306, the correction verification module 28 output decoded datas in Fig. 2.Wherein, code element comprises positioning mark district, data field, code element type identification district and status indicator.
Symbol data on embodiment of the present invention recognition image is decoded and is obtained the round values of data field and the type of this code element image, to confirm to obtain round values or the character string of this image representation, owing to there is no redundancy numerical value, this decode procedure is simple and efficiency is high, has the false proof anti-effect copying simultaneously.
Fig. 4 is the process flow diagram of the disposal route of the miniature coding of two dimension of another kind of embodiment according to the present invention.The method comprises the steps: as shown in Figure 4
Step S401, original image collection.
Step S402, recognition system is carried out single frames separation to the image collecting, to obtain the minimum unit of decoding.
Step S403, after obtaining image to carrying out preprocessing process by 22 pairs of images of pretreatment module, comprise that image is corrected and
location retrieval enters step S404 after proofreading and correct successfully, otherwise enter step S409 this image that finishes to decode, waits for new correct image.
Step S404, the 24 pairs of images of decoder module in Fig. 2 find the single element of decoding central area.
Step S405, by judging that to the decoding of this central area solid size code element this code element is solid size or group code.If single element obtains the data of this code element, if being as the criterion to extend with this code element central area, group code starts decoding.
Step S406, carries out solid size data verification after solid size successfully decoded.Adopt and repeat a decoding process testing result.
Step S407, carries out group code data verification after group code successfully decoded, adopt complicated group code data check, after verification completes, enters step S408, if group code data simply, adopts step S406 to carry out checking treatment according to the method for calibration of solid size.
Step S408, exports decoded data after obtaining complete decoded result completing this image data decoding.
To image, the pre-service of decoding comprises to obtain the step of symbol data: delimit the central area of image, the positioning mark district of the code element in region, Help Center; According to the fold-type location mark correcting image in the positioning mark district of code element; Extract the symbol data of the image after correcting.
Fig. 5 is the process flow diagram of the preprocess method of the miniature coding of the two dimension of the embodiment shown in Fig. 3 according to the present invention.As shown in Figure 5, this preprocess method comprises the steps:
Step S501, starts to import into image data.In this step, by the pretreatment module 22 in Fig. 2, receive this image data.
Step S502, before the pretreatment module of this step in Fig. 2 22 delimited the central area of images, by image background measure and pattern binary conversion treatment image in order to extract polytype pattern, pattern comprises the pattern of erect image or negative-appearing image.In the embodiment of the present invention, image background mensuration and figure binary conversion treatment are beneficial to image recognition, peel off background interference information, and the method, in order to adapt to different backgrounds, ensures and from the surface of unlike material, picks up polytype patterns such as erect image or negative-appearing image.
Step S503, the pretreatment module 22 in Fig. 2 delimited central area and started to find code element sign.This step delimited processing region pixel according to the theoretical size times value of focusing of single element.
Step S504, pretreatment module 22 is carried out figure rotation correction, correcting image distortion after finding code element sign.
Step S505 again from central area view finding extraction central area symbol pattern data, and carries out positioning mark and is identified as subsequent decoding process and prepares after the image of having proofreaied and correct distortion.
Step S506, the step that finishes to proofread and correct enters subsequent decoding flow process.
The embodiment of the present invention comprises the symbol data decoded data that obtains image of decoding: the type of determining code element according to the data in code element type identification district, obtain the decoded data of dissimilar code element, wherein, when code element is in the situation of solid size, by the cumulative decoded data that obtains code element of the code value of each data field; When code element is in the situation of group code, according to the decoded data of each solid size in the cumulative group code of the sequence number of group code to obtain the decoded data of group code.
Wherein, when code element is in the situation of solid size, the cumulative decoded data that obtains code element of the code value of each data field is comprised: the position weights that obtain each data field according to the fold-type location mark in positioning mark district and/or auxiliary positioning mark; According to the status indicator of data field, obtain the sign numerical value of each data field; The position weights sign numerical value corresponding with it of data field amass the code value for data field; Each code value is added to the decoded data that obtains solid size.
Fig. 6 is the schematic flow sheet of the solid size decoding of the embodiment shown in Fig. 3 according to the present invention.As shown in Figure 6, this solid size decoding process comprises the steps:
Step S601, starts to obtain a symbol data.The binary image data piece that the symbol data that this step is received is the symbol region that completes the correction after correction revised.
Step S602 found legal symbol before decoding.It is legal at positioning mark district A, to look for
type sign, is searching
type identifies the auxiliary positioning mark A2 of zone position in corresponding code element, and "/" type sign, if do not find legal discernible sign, finishes to search process, and this code element is for empty or search and make mistakes, if find legal
enter step S603 with the combination identification marking of "/".
Step S603, find legal complete
decoding data to normal data district B after sign and "/" sign.Wherein as shown in the code element of Fig. 1,
data field between sign and "/" sign is B1 data field, by B1 data field rule, is decrypted (3bit);
the data field of indicating on sign downside and "/" sign lower left corner extended line is B2 data field, by B2 data field rule, is decrypted (3bit);
the data field of indicating on sign right side and "/" sign upper right corner extended line is B3 data field, by B3 data field rule, is decrypted (3bit); The data field of "/" sign lower right side is B4 data field, by B4 data field rule, is decrypted (3bit).
In above-mentioned steps, the deciphering rule of each data field refers to the method for obtaining this data field code value, code value be the determined position of the code-point module in "/" type sign weights with this data field on the amassing of sign numerical value of the determined code-point module of status indicator.Each data field code value and be the decoded result of this code element.
Step S604, find legal complete
sign and "/" sign are decoded to code element type identification district C afterwards, to instead
decode in group code cog region.As shown in the code element of Fig. 1,
sign is anti-with "/" sign extended line symmetry
region, they respectively on the relative summit of code element, anti-to this code element
the decoding data in region (being greater than 4bit, 20 kinds of states).According to decoding step, enter step S606, judge that this code element is solid size or group code, if solid size enters step S607, otherwise enter step S609.
If in this step S604 instead
in group code cog region, can preferably select four code-point modules to read process, if these four code-point modules are null value, this code element is solid size, the decoded result of obtaining step S603, and this decode procedure finishes to enter end step S608; If these four code-point modules are not for null value, this code element is group code, can obtain the string length of this group code according to the value of code-point module, and the sequence number of current code element in group code and enter the decoding rule of group code, finishes current solid size decoding process.Wherein, four code-point modules preferably can be set to respectively 8,4,2 and 1 with clockwise or counterclockwise direction, according to the scope of the string length of this group code of permutation and combination rule, can be 1-15 totally 16 word lengths.
The operation steps of above-mentioned steps S603 and step S604 can be exchanged.
Step S605 can obtain the 4x3Bit data of 12Bit altogether after step S603 completes.And proceed to step S608.
Step S607, determines solid size type, and the embodiment of the present invention can comprise seven kinds of above types.
Step S608, finishes decode and export the step that enters solid size verification rule.
Step S609, finishing to decode and exporting enters group code decoding rule.
Solid size decode procedure in above-mentioned steps is after image is intercepted, first to correct (contrast adjustment, image rotation correction), then positions sign identification, then adds up and obtain final numerical value according to each volume position, region weights.
In the embodiment of the present invention, when code element is in the situation of group code, according to the decoded data of a plurality of solid sizes in the cumulative group code of the sequence number of group code, to obtain the step of the decoded data of group code, comprise: decompose the solid size that group code obtains forming group code; According to the data in code element type identification district, determine the sequence number of each solid size in group code; According to the method for the code value in cumulative data district, obtain the decoded data of each solid size in group code; In group code character list, inquire about the character corresponding to decoded data of solid size; According to sequence number, character sequence is obtained to the decoded data of group code.
Fig. 7 is the schematic flow sheet of the group code decoding of the embodiment shown in Fig. 3 according to the present invention.As shown in Figure 7, the method comprises the steps:
Step S701, starts to receive the group code symbol decoding data of importing in Fig. 6.
Step S702, the symbol data that decoder module 24 extractions are imported into and the group code value of this yard.
Step S703, decoder module 24 is according to group code value judgement group code type and length.If group code is 1x2 group code in the present embodiment, enter step S704, if 2x2/3x3/4x4 group code enters step S707.
Step S704, to be standard extracted from this code element periphery code character the 1 group code unit area image continuing to system in the central area of this code element in order.
Step S705, to group code unit area image data a decoding of adjacency, this decode procedure is identical with the solid size decoding process shown in Fig. 6, carries out a single element decoding.
Step S706, carries out simple data merging to this simple group code and obtains decoded data, enters step S714.
Step S707, obtains code character sign at code element type identification district C, according to group code sign, calculates contiguous image regional location.In this step instead
in group code cog region, complete the process that reads of the data of four code-point modules, wherein, four code-point modules preferably can be set to respectively 8,4,2 and 1 with clockwise or counterclockwise direction, scope according to the string length of this group code of permutation and combination rule can be 1-15 totally 16 word lengths, if now the value of code-point module is 0401, changing the position of code element in character string is 4+1 position, it face the data that map interlinking image position is the 3rd and the 5th.
Step S708, obtains by this code element type identification district C the sequence number that code character identifies, and extracts 3 groups, 8 groups, 15 group codes unit area images that continue according to the order of this sequence number from this code element periphery code character.
Step S709, to each self-demarking code of above-mentioned zone view data, carries out repeatedly single element decoding, and detailed solid size decode procedure is referring to the decode procedure of Fig. 6.
Step S710, the rear system of having decoded judges that this decoded result is simple code or global function code, if if simple code is that group code is the group code of 2x2, enter step S706, if 3x3/4x4 group code enters step S711.
Step S711, merges splicing to front 8 groups or front 15 groups of data in 3x3/4x4 group code and forms 96bit or 180bit data.Do not carry out a cyclic check, saved space and improved operation efficiency.
Step S712, carries out a cyclic check to last group 12bit data in 3x3/4x4 group code.
Step S713, adopt the data compression of look-up table solution, be reduced into the ASCII character data of 16-30 byte, according to the sequence number obtaining and the data code value of data field, in the group code character list shown in Fig. 8, find character corresponding to this data code value to obtain actual character string.Fig. 8 is the group code character list according to root inventive embodiments, and in this table, data code value and corresponding character thereof can be modified according to research staff or client's needs, to meet the demand of different user, improves user and experiences.
Step S714, exports the string data that searches acquisition and the decoding process that finishes group code obtains 32/48bit or 64bit numeral.The data area of character string is the character string of 16-30 byte.In this step, host computer completes hybrid code and simple code differentiation.
After in the decoding embodiment of above-mentioned group code, image is intercepted, first correct (contrast adjustment, image rotation correction), then position sign identification, according to group code sequence number, determine each coding unit sequence again, each volume position, region weights add up and obtain numerical value afterwards, and numerical value is obtained to the corresponding character of each sequence according to group code character list; Character is added and obtains final character string.
The embodiment of the present invention can verification decoded data after solid size decoding obtains decoded data, solid size is carried out to secondary decoding and obtain the first decoded data, and decoded data is with the first decoded data when identical, solid size successfully decoded.
Verification decoded data after after group code decoding obtains decoded data, carries out secondary decoding to group code and obtains the second decoded data, when the second decoded data is identical with decoded data, and group code successfully decoded.Also can obtain after decoded data in group code decoding, the solid size of predetermined quantity in group code be carried out to secondary decoding and obtain the 3rd decoded data, when decoded data comprises the part identical with the 3rd decoded data, group code successfully decoded.
In the present embodiment, after group code decoding, carry out secondary decoding, twice decoding compares according to the cumulative sum of the definite sequence bit of sequence number, equal character string is correct, on the contrary decoding error.In cumulative process, can optionally carry out secondary decoding contrast according to the complexity of group code, improve decoding efficiency.
The present invention simultaneously adopts the mode of coding redundancy, and constantly repeated encoding code element, is a fault-tolerant feature of microcode; Microcode naked eyes can not be differentiated, and repeat to fill code symbols in certain area, and when being distinguished by device, disposable meeting gathers a large amount of same symbol, can effectively prevent that the coding causing because of phenomenons such as the breakage of code carrier part, pollutions can not identification problem.
The processing procedure of the embodiment of the present invention distinguishes the process of data area in the miniature coding of this two dimension in sum, and the recognition head of talking pen only has the round air-borne imagery of 3 millimeter diameters at recognition area.In core graphic recognition district, can see the code figure about 9-12 group (3x3,3x4) of same arrangement, to wherein one forming picture.The recognition head of microcode, on same optical device, need to realize the recognition to standard Quick Response Code and microcode, recognition area reaches the round region of diameter 12-15mm, when microcode detects, because recognition district becomes large relatively, and microcode volume is little, the whole image-region decoding of complete detection can consume a large amount of system resource, therefore need to from central area, start by pretreatment module 22 to detect and retrieve to the image-region reconnaissance of four jiaos.In practical application, need to keep especially the coding rule can not be aggressive, and in coded message except program index information, also should comprise the unique sign of card, so more than actual amount of data need at least remain on 48bit.In addition, as interactive TV access guide means, also should possess the effect of abbreviation URL, guiding user better uses.The other benefit of long data is exactly the cipher application that can be used for doing rechargeable card.
From above description, can find out, the present invention has realized following technique effect: the present invention is larger than traditional microcode capacity, increased the function that group code represents character string, effective coverage is broader, can be applicable to point reader, formula order dishes system, the inconvenient restricted occasion of input, as surfing Internet with cell phone, TV, the application of Set Top Box online class prompt operation.
It should be noted that, in the step shown in the process flow diagram of accompanying drawing, can in the computer system such as one group of computer executable instructions, carry out, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or a plurality of modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.