CN106778995A - A kind of art up two-dimensional code generation method and device with image co-registration - Google Patents
A kind of art up two-dimensional code generation method and device with image co-registration Download PDFInfo
- Publication number
- CN106778995A CN106778995A CN201611062539.5A CN201611062539A CN106778995A CN 106778995 A CN106778995 A CN 106778995A CN 201611062539 A CN201611062539 A CN 201611062539A CN 106778995 A CN106778995 A CN 106778995A
- Authority
- CN
- China
- Prior art keywords
- quick response
- response code
- module
- image
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06037—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06046—Constructional details
- G06K19/06103—Constructional details the marking being embedded in a human recognizable image, e.g. a company logo with an embedded two-dimensional code
Abstract
The present invention is a kind of and art up two-dimensional code generation method and device of image co-registration.Method is:With reference to image vision conspicuousness and the Gauss Jordan elimination, Quick Response Code code word, the art up Quick Response Code of two-value that generation Quick Response Code is combined with image are adjusted;The scanning error model of Quick Response Code module is set up, expected Quick Response Code module scans error constraints are set, the gray value of local directed complete set Quick Response Code module is merged with the gray processing result of input picture, generates the art up Quick Response Code of gray scale;Brightness of image Adjusted Option is set up, the pixel value of colour original is adjusted, result is consistent with the art up Quick Response Code of gray scale after it is converted into gray-scale map, generate color artistic Quick Response Code.Device includes coding information and image collection module, information coding module, Quick Response Code and image co-registration module and result images output or display module.Quick Response Code is merged the art up effect of acquisition with picture by the present invention, is effectively improved Quick Response Code visual effect, and ensure that the scanning robustness of Quick Response Code.
Description
Technical field
The present invention relates to planar bar code technology field, more particularly to a kind of art up Quick Response Code generation for image co-registration
Method and device.
Background technology
Due to the popularization of smart mobile phone, Quick Response Code is widely used under connecting line being lived with line, and it has information to hold
Amount is big, low cost, it is easy to the advantages of making, but at the same time, its outward appearance for only having black and white block composition makes it lack vision beautiful
Sense, is difficult to merge with other planar design products etc., product brand is propagated etc. and to lack facilitation effect directly perceived, it is difficult to meets user
Individual demand.
The beautification process of Quick Response Code, is devoted to being lifted always the visual effect of Quick Response Code outward appearance, it is become more interesting,
It is more easy to propagate.Manually change Quick Response Code outward appearance, it is often relatively costly and not easy to operate, and adopt and change two in an automated fashion
Dimension code outward appearance, due to its convenience and low cost, is more easy to be accepted by the public.
While core challenge during Quick Response Code beautification is change Quick Response Code outward appearance, it is ensured that Quick Response Code Central Plains includes
Information is unaffected, it is ensured that it remains to be easier to scanned by general scanner.Easily scanned this by generic scanner
Characteristic, referred to as scans robustness.Preferably scan robustness, it is ensured that when Quick Response Code is used in real life scenarios, subtract
It is few due to illumination, noise, block and influence that scan deflection angle etc. is brought to Quick Response Code resolving.
The content of the invention
Obtained with art up two-dimensional code generation method and device of image co-registration, and guarantee it is an object of the invention to provide a kind of
The Quick Response Code for obtaining is respectively provided with preferable performance in visual effect and scanning robustness.
The present invention provides a kind of art up two-dimensional code generation method with image co-registration, realizes that step is:
Step 1, obtains Quick Response Code and input picture binaryzation result, and constructor code collection closes adjustment Quick Response Code code word, raw
Into the art up Quick Response Code of two-value;
Step 2, obtains the gray processing result of input picture, and according to two-dimensional code scanning process, sets up Quick Response Code module
Scanning error model, sets expected Quick Response Code module scans error constraints, under the constraints, local directed complete set Quick Response Code mould
The gray value of block, makes it be merged with the gray processing result of input picture, generates the art up Quick Response Code of gray scale;
Step 3, obtains the colour original and the corresponding multichannel image of the art up Quick Response Code of two-value of input picture, sets up figure
Image brightness Adjusted Option, adjusts the pixel value of colour original, it is converted into result and the art up Quick Response Code of gray scale after gray-scale map
Unanimously, color artistic Quick Response Code is generated.
Based on the method for the invention, a kind of and image co-registration art up Quick Response Code generating means are additionally provided, wherein,
The device is included with lower module:
Coding information and image collection module, for obtaining text message to be encoded and needing the image of fusion;
Information coding module, the text message for obtaining is encoded, and generates corresponding Quick Response Code coded data;
Quick Response Code and image co-registration module, using the described art up two-dimensional code generation method with image co-registration, are carried out
Quick Response Code and image co-registration, generation two-value is art up, gray scale is art up or color artistic Quick Response Code;
Result images are exported or display module, for generate two-value is art up, gray scale is art up or color artistic
Change Quick Response Code to be exported or shown.
Relative to prior art, advantages and positive effects of the present invention are:
1) the inventive method and device can be balanced preferably between Quick Response Code visual effect and two-dimensional code scanning robustness
Relation, it is diplomatic pixel brightness in image to be adjusted to obtain more excellent display effect, Quick Response Code is melted with picture
Close and obtain art up effect, and easily generate the art up image in 2 D code of different-style, be that Quick Response Code increases vision meaning;
2) in the inventive method and device, using the optimisation strategy adjusted based on topography's color, one kind can be generated
Possess the art up Quick Response Code of preferable visual effect and stronger scanning robustness simultaneously.
Brief description of the drawings
Fig. 1 is QR code sign distribution situation schematic diagrames;
Fig. 2 is the overall flow schematic diagram of art up two-dimensional code generation method of the invention;
Fig. 3 is the Quick Response Code code word method of adjustment schematic diagram based on the Gauss Jordan elimination;
Fig. 4 is Quick Response Code sampled probability schematic diagram;
Fig. 5 is the art up QR yards of gray-scale map of example using present invention generation;
Fig. 6 is using different-style QR yards of the generation of local directed complete set module gray value of gray-scale map.
Specific embodiment
Realization principle by analyzing Versatile two-dimension code scanner of the invention, establishes a kind of new error separation,
Two-dimensional code scanning robustness control problem is theoretically analyzed and solved, and proposes art up the two of a kind of and image co-registration according to this
Dimension code generating method and device, while Quick Response Code beautification visual effect is retained as far as possible, it is ensured that and lift two-dimensional code scanning
Robustness.
In present implementation explanation, the common coding standard of one of which in Main Basiss Quick Response Code, is somebody's turn to do by i.e. QR yards
The narration of the content of the invention.But, the present invention cover all Quick Response Codes, for example, Data Matrix, MaxiCode,
Aztec, QR Code, Vericode, PDF417, Ultracode, Code 49, Code 16K etc., i.e., including but not limited to art
Change QR yards of generation.It is used herein as QR yards to be illustrated as sample, it is only for preferably illustrate generation step.Tie below
The present invention is described in further detail to close drawings and Examples.
In order to more understand art of expression QR yards of generating process, QR yards of basic composition has been presented in Fig. 1 first, can
To find out, QR yards it is main by position sensing symbol, correction graph, positioning figure, format information, version information, code word data and
Error correction code word etc. is constituted.
The target of whole artistic QR yards of generating process is divided into three phases by the present invention, and respectively two-value is art up QR yards
Synthesis, the art up QR yards of synthesis of gray scale and color artistic QR yards of synthesis.Wherein, in the synthesis that two-value is art up QR yards
Cheng Dangzhong, the method for mainly being used is adjusted for QR yards of code word, i.e., by using image vision significant characteristics and Gauss Jordan
Elimination etc., in QR yards of coding stage, the code word to QR yards is adjusted, and makes it try one's best to be carried out with the binaryzation result of image
Matching, so as to avoid vision conflict in colored QR yards of final synthesis;And in the middle of the art up QR yards building-up process of gray scale, it is main
It is the scanning process by analyzing general QR yards of scanner to want core, sets up thresholding error and sampling error model, simulates QR
The thresholding and down-sampled process of code module, so that the QR yards of sampling correct probability to each module is estimated, and according to this as anti-
Feedforward information, the gray value to QR yards of module is adjusted, it is ensured that the QR yards of scanning robustness for ultimately generating;And in colored QR yards of life
During, by setting up a kind of new brightness adjustment scheme, according to gray processing QR yards of half-tone information and the colour of artwork
Information, the color value changes of each passage of each pixel are calculated, so as to ensure its gray processing result and the art up QR of gray scale
It is that image increases color in the case that code is consistent.
Fig. 2 illustrates the whole flow process of QR yards of color artistic of generation, according to above-mentioned narration, wherein QbIt is corresponding binaryzation
It is artistic QR yards, QgFor corresponding gray scale is art up QR yards, and QcIt is color artistic QR yards ultimately generated.Separately below to each
Method employed in the individual target phase is illustrated.
Step one, the characteristics of coding according to Quick Response Code, with reference to the adjustment such as the Gauss Jordan elimination and saliency feature
Quick Response Code code word, in the case where ensureing Quick Response Code original comprising Information invariability, makes Quick Response Code outward appearance with image binaryzation result phase
Closely, the art up Quick Response Code of two-value is generated.
Step 1.1, pretreatment.
To make binaryzation QR yards of COLOR COMPOSITION THROUGH DISTRIBUTION situation of art of generation close to artwork color, it is necessary to first be generated to artwork treatment
One binary image.As shown in Fig. 2 obtaining the gray level image I of the original image I of input firstg, then recycle thresholding side
Method is to image IgTreatment, obtains corresponding binary image Ib.Due to gray level image IgThe length of side n length of sides often than QR yards
Number of modules l is much larger, l=4V+17, and V is QR yards of version, so, if only by image IgZoom in and out and binaryzation
Easily cause bad visual effect in QR yards of final synthesis.To avoid above-mentioned phenomenon from occurring, the present invention is first by image
IgIt is multiple foursquare submodules according to QR Module Divisions, the length of side of each submodule isK-th submodule is denoted as
Mk, most module M at lastkBinaryzation result after conversion is:
Wherein,Represent binary image IbIn k-th element, i.e. image IgK-th module binaryzation result, ζ
(b, t) is represented carries out binarization operation using threshold value t to b,Represent image IgThe pixel value of midpoint x, and G (x) is pixel x's
Weighted value, andIn embodiments of the present invention, it is set to Gaussian Profile value:
Wherein x ∈ Mk,Weighted value of the acute pyogenic infection of finger tip on k-th (i, j) position of module, it should be noted that public
In formula, k-th position (i, j) of module, the i.e. position of the pixel x in the overall situation, the coordinate system that only both are used are different,
So expression way is different.Parameter σ1It is the constant for setting, the embodiment of the present invention is by parameter σ1Directly value is
Step 1.2, constructor code collection is closed.
It can be seen from QR yards of scanning process, QR yards in scanning process, module array order only need to guarantee by school
Test, you can received by scanner.And it can be seen from QR yards of bottom coded system, QR yards of data coding mode employs Reed-
Solomon is encoded, and it meets following feature:1) Reed-Solomon codings are a kind of explicit system codes, can be final
It is that, according to true form information, latter half is tolerant code information that original encoding information, i.e. first half are immediately seen in coding;2)
Reed-Solomon coding be it is a kind of can with the coding of XORed operation, will two Reed-Solomon yards carry out XOR,
Its result is still one legal Reed-Solomon yards.
In QR yards of cataloged procedure, QR yards of data are often divided into multiple blocks with error correction code word, and each block is one
Individual independent Reed-Solomon yards, and QR yards of final drafting is only for unit carries out mixing weight by multiple blocks according to code word
Arrange and carry out mask operation using template.Below being illustrated to a treatment for block.
One block is divided into three regions, and respectively input data, filler be according to this and verification data, it is assumed that length is distinguished
Be m, p, c, wherein input data with filling data division it is corresponding QR yard coding code word data, and verification data correspondingly verification
Code word.Then according to QR yards of coding rule, after QR yards of version and error-correction level determine, m+p and c be one be more than 0 it is normal
Amount, and according to the difference of input data amount, the size of m and p can be changed.
It is illustrated using Fig. 3, wherein assume the first behavior original block information, in order that the two-value generated in Fig. 2
Change QR yards of Q of artbWith image binaryzation result IbIt is as far as possible similar, it is necessary to by the block kth position information be adjusted to 0 from 1.The present invention
One special command code of construction, makes the command code input data region and filling data area, and only kth position is 1, other positions
It is 0, and verification data region, then generated according to Reed-Solomon code checks rule.According to encoding characteristics 2, this is operated
Code carries out xor operation with true form block, you can obtain a legal Reed-Solomon code block, it is ensured that it is in error checking
Completely by verification.At the same time, it is apparent from, the block can ensure its input data region with the other positions for filling data area not
Become, and kth position negates, it can be seen from property 1, input data region is unchanged, then the original text information content that it is included does not change yet
Become.
According to foregoing description, it is readily apparent that k needs to meet constraint k > m and k≤m+p, then indeed, it is possible to construct one group
Command code, as shown in set A in Fig. 3, has p command code, and a is denoted as respectively1,a2,…,ap, the m+1, m+ of respective operations code
2 ..., m+p is respectively 1, and input data region is 0 with filling other positions of data area, using this group of command code, you can appoint
Filling data area in meaning control true form block, when true form block kth position information with kth position information is different in target code block when, it is logical
Cross itself and am-kXor operation is carried out, it is changed into designated value.
Step 1.3, adjusts command code set.
Easily find, because k needs to meet constraint k > m and k≤m+p, so, zone of control has been limited in filler
According to region.And in fact, in order to further expand zone of control, the Gauss Jordan elimination can be used, by the behaviour in set A
It is combined as code, using xor operation, and according to image vision conspicuousness distribution situation, preferential construction goes out controllable conspicuousness
The command code of upper zone, is moved to verification data region, so as to obtain new command code by the controllable module of part operation code
Set B, by the constraint expansion of k to k > m and k≤m+p+c, in the effect of spatial dispersion, weakens so as to by uncontrollable module
To the visual impact of entire image.
For how to determine which is the command code of conspicuousness upper zone, and the screening of controllable module how is carried out, this
Invention proposes a kind of priority algorithm.In the present invention, using three kinds of vision significance, Edge check and heuristic constraint because
The mode of plain linear combination together decides on priority orders, the matrix of priority orders is represented with W, then:
W=λ1Edge+λ2Sal+λ3Heu (3)
Wherein, Edge is to input picture I to do Edge check and merge the result obtained after averaging operation, and Sal is
Vision significance extracted region is done to input picture I and the result obtained after averaging operation is merged.The size of Edge, Sal
With the standard two-dimensional code Q of required fittingsSize it is identical.λ1、λ2And λ3It is weight, wherein λ1、λ2、λ3And be 1, and λ3's
Value is often set to less than 0.1.And Heu is then rule of thumb to define heuristic rule, it is served mainly to facilitate on its side
In the case of being more or less the same along detection and vision significance, the point allowed close to picture centre, it is easier to obtain higher weights, the
The heuristic variable result Heu that (x, y) individual module position is obtainedx,yFor:
Wherein, l is the QR yards of number of modules per side, i.e. l=4V+17.
Step 1.4, adjusts the coded data of Quick Response Code.
Using the command code set B got in step 1.3, the coding codeword to controllable module position is adjusted, and leads to
Cross carries out xor operation using element in set B and Quick Response Code coded sequence, changes the value of specified location, makes it in the position institute
Corresponding color-values and image binaryzation result IbThe color of correspondence position is identical, so as to obtain preferable syncretizing effect, obtains
The art up Quick Response Code of two-value.
Step 2, obtains the gray processing result of input picture, and according to two-dimensional code scanning process, sets up Quick Response Code module
Scanning error model, by setting expected Quick Response Code module scans error constraints, under the constraints, local directed complete set two dimension
The gray value of code module, makes it be merged with the gray processing result of input picture, generates the art up Quick Response Code of gray scale.
The scanning error model of Quick Response Code module is set up in explanation below, and sets expected Quick Response Code module scans error
Constraint.
Step 2.1, analog threshold error.
In identical artistic QR yards, same pixel, actually in different environments, the threshold value that may be used is also
Differ, consequently, it is possible to the different binaryzation result for producing.General artistic two-dimensional code generation method, it is often directly false
If its threshold value is the half of constant, i.e. maximum gradation value, and this also turns into one of principal element of its scanning robustness reduction.This
In invention, to simulate true thresholding process, in artistic QR yards, if the expected threshold value of certain point pixel x is the surrounding pixel
Calculate and obtain, be denoted as txo, and true threshold value txThen because the factor influence such as environment, is distributed in the threshold value or so, and meet normal state
Distribution pτ(tx), and tx=txoWhen, function value is maximum.
Wherein, σ2It is scale parameter.
Meanwhile, described according to above-mentioned analysis, make txoFor
Wherein, R (x) is used for pixel set of the expression in the surrounding adjacent regions centered on pixel x, implements in the present invention
In example, R (x) takes a square area, and the length of side is 3a, and wherein a is the length of side of QR modules, i.e., image I in step 1.1gSubmodule
The length of side of block.| R (x) | for ask set in element number.Y in above formulaiIt is the gray value of pixel i in set R (x).When acquisition picture
After the threshold value distribution of plain x, from formula, the original gray value of point is compared with actual threshold, you can obtain its threshold value
Change result.Simultaneously as the limitation of image color scope, so in real process, the distribution of true threshold value for [0,
255], so, then this is respectively by the probability that threshold value turns to 1 and 0
Wherein, YxRepresent the gray value of pixel x, HxIt is expressed as the expected thresholding result of pixel x.
Similarly, since color threshold restriction, so, above-mentioned calculating can cause a little by threshold value turn to 1 and 0 probability and simultaneously
It is not 1, so, it is adjusted by normalization operation.Therefore, it can be deduced that, when point x is located at module MkWhen, i.e. x ∈ Mk, then should
Point is by the probability of proper threshold valueFor:
Wherein,Represent QR yards of Q of binaryzation artbIn k-th value of module.
Step 2.2, analog sampling error.
The more difficult simulation of true samples error, involves different application scene, and generally requires a large amount of statistical experiments, and this hair
It is estimating sampling error, it is assumed that the probability that module midpoint is sampled meets Gaussian Profile, i.e., as shown in figure 4, in module in bright
Interior, nearer with a distance from central point, it is bigger to be sampled probability, module MkInterior point x is used probabilityFor:
(i, j) represents the coordinate of point x, σ3It is scale parameter.
In addition, in whole module, it is 1 to be sampled the summation of probability, i.e.,
Step 2.3, estimation block scanning error.
It can be seen from QR yards of scanning process, thresholding process, in two different stages, and refers to from down-sampled process office
Fixed point is two completely self-contained events by whether the result of thresholding and the point are sampled, so, it is readily apparent that, the point sampling
Used as module samples result, and result is correct probabilityFor:
Step 2.4, sets each module and is expected scanning error constraints.
To ensure QR yards of scanning robustness, it should by the correct probable value control of Quick Response Code module scans in certain limit
It is interior so that its error brought can automatically be repaired by QR yards of itself error correcting capability, by module scans just
The restriction of true probability, it is ensured that the QR yards of robustness of entire scan, is expressed as follows:
WhereinIt is k-th correct probable value of module scans,
ηkFor k-th module is expected the correct probable value least commitment of scanning, it can be first set to Fixed constant herein,
Or, small range change is carried out according to vision significance, for example, being set to:
η=0.75+0.15 (1-W) (14)
Wherein, η is the probable value least commitment matrix for setting, ηkIt is the corresponding value of k-th module position in matrix η.
For example may specify that each module is expected the correct probability of scanning and must be passed through between 75%~100%, afterwards again
The vision significance feature of calculating input image, and according to the weight of conspicuousness, in the interval, trickle adjustment respective modules position
Set expected probability is put, the module corresponding to the relatively low region of conspicuousness is expected scanning correct probability constraint and is suitably adjusted
Height, to ensure QR yards of scanning robustness, reduces error and produces.
Step 2.5, local directed complete set module gray value.
After image size determines with QR yards of version, the probability that each point is sampled in moduleIt is actually fixed value,
So, whenWhen, i.e., the correct probability of module scans is less than desired value, then can only be by hoisting module midpoint by threshold value
Change correct probabilityTo adjustTo meet constraint requirements.
In this regard, the present invention proposes a kind of thresholding probability method of adjustment of pixel in module.First, construct public
Formula:
Wherein, " → " represents imparting, by the value change in variable.The adjustment of thresholding probability in module is carried out, wherein
It is the thresholding probability adjustment amplitude weight of pixel x.It is readily apparent that, when the formula two ends are multiplied byAnd for module MkInterior institute
There is element to add up, you can so thatSo as to update module scans probability, it is larger than
Or equal to ηk。
However, be have ignored in above-mentioned formulaScope limitation, i.e.,And in actual renewal process, the problem
The module scans probability after updating be may result in less than desired value, therefore, the present invention proposes that a kind of simple iteration updates calculating
Method, by each iterative process, for each pixel x ∈ M in modulek, according toSize is dynamically adjustedWhenWhen, orderJuxtapositionBy multiple loop iteration, and constantly using formula (15) renewalUntil meeting
Formula (12) requirement.
By step 2 methods described, desired value can be reached by the correct probability of each module scans in image is ensured
Under the premise of, each pixel in image is allocated by the correct probability of thresholding, obtainWhat each pixel was used
Gray value YxWith the point by the correct probability of thresholdingIn the presence of mapping relations one by one, so, the method by tabling look-up easily is obtained
TakeCorresponding gray value, so as to complete the adjustment to pixel brightness in image.
Step 3, generates color artistic Quick Response Code.
Step 3.1, preparation.By the art up Quick Response Code Q of two-valuebImage scaling and be converted to corresponding multichannel figure
Picture, the picture size and port number after its conversion is equal in magnitude with original input picture.
After completing the art up QR yards generation of gray scale, it is necessary to by its in brightness it is constant in the case of be converted to color artistic
Change QR yards.According to formulaUnderstand, rgb value is many-one with the mapping relations of gray value, so, deposit
In kinds of schemes, gray level image is reduced to coloured image.Wherein,Pixel x institutes are right in referring to RGB image respectively
The value of the red, green, blue triple channel answered, and three constant parameter α, beta, gamma are respectively 0.299,0.587,0.114.In these methods
In, by the brightness adjustment process of color, when as the linear interpolation process between original pixel point and maximum or least bright pixels.
Define Cm(x), for representing the corresponding maximum or minimum brightnesses of multichannel image midpoint x, i.e., as x ∈ MkWhen,
Have:
Wherein,Represent the art up Quick Response Code Q of two-valuebIn k-th value of module.
Step 3.2, color-values adjustment.
Present invention proposition is a kind of based on linear luminance regulating method, quickly and conveniently can directly adjust rgb color and arrive
Given luminance.OrderRepresent Quick Response Code QcThe pixel value of image midpoint x.
Wherein, θ is variable, is mainly used in adjusting chroma-luminance, and its span is [0,1].IxRepresent original image I midpoints
The pixel value of x, herein, by [α, beta, gamma]Tω is designated as, then if necessary to keep QcIn scanning process, corresponding gray-scale map
Picture and QgIt is corresponding, then
Wherein,Represent image in 2 D code QgIn the pixel value of point x.
Formula (17) is carried out into treatment below:
Then, it is known that:
Formula (20) is substituted into formula (17), is finally given:
As can be seen that formula right side is known quantity, according to the rule, easily by QR yards of Q of gray processing artgWith artwork
As I is merged, QR yards of Q of color artistic is generatedc。
Based on art up two-dimensional code generation method of the present invention, the invention provides a kind of and image co-registration art
Change Quick Response Code generating means, including such as lower module:
Coding information and image collection module, for obtaining text message to be encoded and needing the image of fusion;
Information coding module, for being encoded to the text message for obtaining, generates corresponding Quick Response Code coded data, bag
Containing but be not limited to such as Reed-Solomon coding generation module;
Quick Response Code and image co-registration module, using of the present invention and image co-registration art up two-dimensional code generation method,
Carry out Quick Response Code and image co-registration, and generate that two-value is art up, gray scale is art up or color artistic Quick Response Code;
Result images are exported or display module, for generate two-value is art up, gray scale is art up or color artistic
Change Quick Response Code to be exported or shown, including but not limited to such as equipment such as screen, printer.
According to the method and device of Generative Art Quick Response Code of the present invention, it is presented in Fig. 5 being given birth to according to the method and device
Into some QR yards of example, by adjusting the gray value in Quick Response Code module centers region, can obtain a kind of while possessing preferable
Visual effect and stronger scanning robustness Quick Response Code.Fig. 5 is that the gray-scale map of the cromogram for obtaining is illustrated.
It should be noted that during the Quick Response Code outward appearance generated in the present invention is not limited to only to adjust Quick Response Code module
Heart gray value, according to local directed complete set module gray value step, can also make it according to above-mentioned module scans correct probability model
His Adjusted Option, such as Fig. 6 provides several final colored QR yards of gray-scale map results obtained according to common method of adjustment.
In addition, it is necessary to, it is noted that in the art up two-dimensional code generation method and device with image co-registration, statement it is many
Individual step and module can also be come to be realized by hardware or software by a step or module.It is above-mentioned to art up Quick Response Code
The narration of generation method is only that technical scheme is better described, rather than limitation of the present invention.People in the art
Member is it should be understood that the invention is not restricted to the details of above-mentioned one exemplary embodiment, in invention inwardly, any combination Quick Response Code bottom
Coding characteristic, using Gauss Jordan elimination adjustment Quick Response Code code word, generates the art up Quick Response Code of two-value, and utilize local directed complete set
Quick Response Code module gray value, obtains Quick Response Code and image syncretizing effect, the same or analogous realization of Generative Art Quick Response Code
Mode, should be included in the scope of the present invention.
Claims (7)
1. the art up two-dimensional code generation method of a kind of and image co-registration, it is characterised in that realize that step is as follows:
Step 1, obtains the binaryzation result of Quick Response Code and input picture, and constructor code collection closes adjustment Quick Response Code code word, generation
The art up Quick Response Code Q of two-valueb;
Step 2, obtains the gray processing result of input picture, sets up the scanning error model of Quick Response Code module, and set expected
Quick Response Code module scans error constraints, under the constraints, the gray value of local directed complete set Quick Response Code module makes it with input figure
The gray processing result fusion of picture, the art up Quick Response Code Q of generation gray scaleg;
Step 3, obtains the colour original and the corresponding multichannel image of the art up Quick Response Code of two-value of input picture, sets up image bright
Degree Adjusted Option, adjusts the pixel value of colour original, and result is consistent with the art up Quick Response Code of gray scale after it is converted into gray-scale map,
Generation color artistic Quick Response Code Qc。
2. a kind of art up two-dimensional code generation method with image co-registration as claimed in claim 1, it is characterised in that described
Step 1, implementing step is:
Step 1.1, after the original image of input is carried out into gray processing, recycles thresholding method to obtain corresponding bianry image;
Step 1.2, constructor code collection is closed, for adjusting Quick Response Code coded data;
The length and structure for setting command code are identical with the coded data of Quick Response Code, by the input data region of command code and filling
The kth position of data area is set to 1, and other positions are both configured to 0, according to the verification data of two-dimentional code check rule generation command code
Region;
Step 1.3, according to original image vision significance distribution situation, using the XOR between the Gauss Jordan elimination and command code
Operation, is combined to the command code that step 1.2 is obtained, and adjusts command code set, by the controllable module movement of part operation code
To verification data region, preferential construction goes out to control the command code of conspicuousness upper zone;
Step 1.4, using the command code set acquired in step 1.3, adjusts the coded data of Quick Response Code;By command code and two dimension
The coded data of code carries out xor operation, changes the value of specified location, makes Quick Response Code in the color-values corresponding to the position and figure
As binaryzation result IbThe color of correspondence position is identical.
3. a kind of art up two-dimensional code generation method with image co-registration as claimed in claim 2, it is characterised in that described
It is using the process of thresholding method acquisition bianry image in step 1.1:Described Quick Response Code is QR yards;First by gray level image
IgIt is divided into multiple foursquare submodules, the length of side of each submoduleN is the length of side of gray level image, and l is Quick Response Code
Length of side number of modules;Wherein, k-th submodule MkBinaryzation result after conversionFor:
Wherein, ζ (b, t) is represented carries out binarization operation using threshold value t to b,Representation module MkIn pixel x, G (x) is pixel
The weighted value of x, andG (x) is set to Gaussian Profile value:
(i, j) refers to the position coordinates of pixel x, σ1It is the constant for setting.
4. a kind of art up two-dimensional code generation method with image co-registration as claimed in claim 2, it is characterised in that described
In step 1.3, determine which is the command code of conspicuousness upper zone, and when how to carry out the screening of controllable module, using regarding
Feel conspicuousness, three kinds of modes of factor linear combination of Edge check and heuristic constraint to together decide on priority orders, if W
The matrix of priority orders is represented, then:
W=λ1Edge+λ2Sal+λ3Heu
Wherein, λ1、λ2And λ3It is weight, three's and be 1, and λ3Value be set smaller than 0.1;Edge is to do side to input picture
Along detecting and merging the result obtained after averaging operation, Sal is to do vision significance extracted region to input picture I to go forward side by side
Row merges the result obtained after averaging operation, and Heu is heuristic variable result, is used to help in Edge check and vision significance
In the case of being more or less the same, the point allowed close to picture centre, it is easier to obtain higher weights, (x, y) individual module position is obtained
Heuristic variable result Heux,yFor:
Wherein, l is the length of side number of modules of Quick Response Code.
5. a kind of art up two-dimensional code generation method with image co-registration as claimed in claim 1, it is characterised in that described
Step 2, sets up the scanning error model of Quick Response Code module, and sets expected Quick Response Code module scans error constraints, specific real
Now step is:
Step 2.1, analog threshold error;If the expected threshold value t of pixel xxoCalculated by the surrounding pixel of the pixel and obtained, truly
Threshold value txIt is distributed in threshold value txoLeft and right, and meet normal distribution pτ(tx), and variable tx=txoWhen, function value is maximum;By pixel
The gray value Y of xxAcquisition thresholding result is compared with true threshold value;If HxIt is the expected thresholding result of pixel x;
Pixel x is by the probability that threshold value turns to 1
Pixel x is by the probability that threshold value turns to 0
Two probability to obtaining are normalized, if module MkInterior pixel x is by the probability of proper threshold valueFor:
Wherein,Represent the art up Quick Response Code Q of two-valuebIn k-th value of module;
Step 2.2, analog sampling error;
Module MkInterior pixel x is used probabilityFor:Wherein, (i, j) is represented
The coordinate of pixel x, σ3It is scale parameter;
Step 2.3, estimation block scanning error;
Using pixel x samplings as module MkSampled result, and result be correct probabilityFor:
Step 2.4, sets each module and is expected scanning error constraints;
IfIt is module MkCorrect probable value is scanned,Module scans correct probability is limited, is expressed as:ηkFor k-th module is expected the correct probable value least commitment of scanning;
Step 2.5, local directed complete set module gray value;
WhenWhen, adjusting module MkInterior pixel x is by the probability of proper threshold valueIt is updated to:
Wherein,It is the thresholding probability adjustment amplitude weight of pixel x;
In adjustment every time, due to have ignoredScope limitation, it is therefore desirable to dynamic adjustmentTo each picture in module
Plain x ∈ Mk, according toSize is adjustedWhenWhen, orderJuxtaposition
By loop iteration, constantly updateUntil meeting
6. a kind of art up two-dimensional code generation method with image co-registration as claimed in claim 1, it is characterised in that described
In step 3, the brightness of image method of adjustment of foundation is as follows:
First, corresponding multichannel image is obtained according to the art up Quick Response Code of two-value, if the maximum of multichannel image midpoint x or
Minimum brightness is expressed as Cm(x), it is as follows:
Wherein,Represent the art up Quick Response Code Q of two-valuebIn k-th value of module;
Then, if the colour original of input picture is I in the pixel value of point xx, color artistic Quick Response Code QcIn the pixel value of point x
ForThe art up Quick Response Code Q of gray scalegIt is in the pixel value of point xThen obtained according to following formulaFor:
Wherein, ω=[α, beta, gamma]T, rgb value is with the mapping relations of gray valueYxRepresent point x's
Gray value, α, beta, gamma is constant parameter,Refer to the red, green, blue triple channel corresponding to the x of RGB image midpoint respectively
Value.
7. the generation dress of the art up two-dimensional code generation method based on a kind of any described and image co-registration of claim 1~6
Put, it is characterised in that described device includes such as lower module:
Coding information and image collection module, for obtaining text message to be encoded and needing the image of fusion;
Information coding module, for being encoded to the text message for obtaining, generates corresponding Quick Response Code coded data;
Quick Response Code and image co-registration module, using the described art up two-dimensional code generation method with image co-registration, carry out two dimension
Code and image co-registration, generation two-value is art up, gray scale is art up or color artistic Quick Response Code;
Result images are exported or display module, for generate two-value is art up, gray scale is art up or color artisticization two
Dimension code is exported or shown.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611062539.5A CN106778995B (en) | 2016-11-25 | 2016-11-25 | Artistic two-dimensional code generation method and device fused with image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611062539.5A CN106778995B (en) | 2016-11-25 | 2016-11-25 | Artistic two-dimensional code generation method and device fused with image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106778995A true CN106778995A (en) | 2017-05-31 |
CN106778995B CN106778995B (en) | 2020-02-28 |
Family
ID=58901766
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611062539.5A Active CN106778995B (en) | 2016-11-25 | 2016-11-25 | Artistic two-dimensional code generation method and device fused with image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106778995B (en) |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108062781A (en) * | 2018-01-31 | 2018-05-22 | 深圳市裕同包装科技股份有限公司 | A kind of system and method for visual code Mass production |
CN108229234A (en) * | 2017-12-07 | 2018-06-29 | 北京航空航天大学 | A kind of fusion is digitally coded can scan image generation method |
CN108491747A (en) * | 2018-02-06 | 2018-09-04 | 南京风力舰信息技术有限公司 | Beautify the method for QR codes after a kind of blending image |
CN108491913A (en) * | 2018-02-06 | 2018-09-04 | 南京风力舰信息技术有限公司 | A method of containing close beautification QR code authentications |
CN108734250A (en) * | 2018-05-29 | 2018-11-02 | 西安理工大学 | Vision two-dimensional code generation method based on Sobel operators |
CN109325573A (en) * | 2018-09-25 | 2019-02-12 | 北京奇艺世纪科技有限公司 | A kind of two-dimensional code generation method, two dimension code reading method and device |
CN109376830A (en) * | 2018-10-17 | 2019-02-22 | 京东方科技集团股份有限公司 | Two-dimensional code generation method and device |
CN109454997A (en) * | 2017-07-23 | 2019-03-12 | 宁波亿诺维信息技术有限公司 | A kind of two dimensional code printing generation system with electronics texture |
CN110390374A (en) * | 2018-04-17 | 2019-10-29 | 郑州大学 | A kind of generation method and system of QR code image |
CN110633605A (en) * | 2018-06-25 | 2019-12-31 | 视联动力信息技术股份有限公司 | Image processing method and device |
CN110751251A (en) * | 2019-10-16 | 2020-02-04 | 上海掌门科技有限公司 | Method and device for generating and transforming two-dimensional code image matrix |
CN110766117A (en) * | 2018-07-27 | 2020-02-07 | 郑州大学 | Two-dimensional code generation method and system |
CN111507446A (en) * | 2019-01-31 | 2020-08-07 | 北京骑胜科技有限公司 | Two-dimensional code generation and identification method and device |
CN111523629A (en) * | 2020-04-14 | 2020-08-11 | 郑州大学 | Visual optimization method and device for two-dimensional code, electronic equipment and storage medium |
CN111639734A (en) * | 2020-05-21 | 2020-09-08 | 北京矩石科技有限公司 | Novel QR code embedded two-dimensional code coding and anti-counterfeiting application method |
CN112041854A (en) * | 2018-08-17 | 2020-12-04 | 惠普发展公司,有限责任合伙企业 | Combined image and machine-readable graphic code |
CN112926714A (en) * | 2021-03-16 | 2021-06-08 | 北京航空航天大学 | Visual three-dimensional code integrating QR code, bar code and optical character and coding method thereof |
CN113837765A (en) * | 2021-09-27 | 2021-12-24 | 中国联合网络通信集团有限公司 | Payment verification method, device, equipment and storage medium |
CN114091639A (en) * | 2021-11-26 | 2022-02-25 | 北京奇艺世纪科技有限公司 | Interactive expression generation method and device, electronic equipment and storage medium |
CN116822548A (en) * | 2023-08-29 | 2023-09-29 | 宁波邻家网络科技有限公司 | Method for generating high recognition rate AI two-dimensional code and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040206913A1 (en) * | 2003-04-18 | 2004-10-21 | Medispectra, Inc. | Methods and apparatus for characterization of tissue samples |
CN104795898A (en) * | 2015-04-29 | 2015-07-22 | 郑州大学 | Public transformer area electrical equipment information monitoring and alarming system |
CN105976004A (en) * | 2016-04-25 | 2016-09-28 | 华南农业大学 | Color two-dimensional code multi-dimensional information encoding and decoding methods and devices |
-
2016
- 2016-11-25 CN CN201611062539.5A patent/CN106778995B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040206913A1 (en) * | 2003-04-18 | 2004-10-21 | Medispectra, Inc. | Methods and apparatus for characterization of tissue samples |
CN104795898A (en) * | 2015-04-29 | 2015-07-22 | 郑州大学 | Public transformer area electrical equipment information monitoring and alarming system |
CN105976004A (en) * | 2016-04-25 | 2016-09-28 | 华南农业大学 | Color two-dimensional code multi-dimensional information encoding and decoding methods and devices |
Non-Patent Citations (1)
Title |
---|
YONGTAI ZHANG等: "Aesthetic QR Codes Based on Two-Stage Image Blending", 《SPRINGER INTERNATIONAL PUBLISHING SWITZERLAND》 * |
Cited By (37)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109454997B (en) * | 2017-07-23 | 2020-11-24 | 泗县飞虹体育文化发展有限公司 | Two-dimensional code printing generation system with electronic texture |
CN109454997A (en) * | 2017-07-23 | 2019-03-12 | 宁波亿诺维信息技术有限公司 | A kind of two dimensional code printing generation system with electronics texture |
CN109583548A (en) * | 2017-07-23 | 2019-04-05 | 宁波亿诺维信息技术有限公司 | A kind of anti-fake two-dimension code printing generation system |
CN108229234A (en) * | 2017-12-07 | 2018-06-29 | 北京航空航天大学 | A kind of fusion is digitally coded can scan image generation method |
CN108062781B (en) * | 2018-01-31 | 2021-05-11 | 深圳市裕同包装科技股份有限公司 | System and method for batch generation of visual codes |
CN108062781A (en) * | 2018-01-31 | 2018-05-22 | 深圳市裕同包装科技股份有限公司 | A kind of system and method for visual code Mass production |
CN108491747A (en) * | 2018-02-06 | 2018-09-04 | 南京风力舰信息技术有限公司 | Beautify the method for QR codes after a kind of blending image |
CN108491913A (en) * | 2018-02-06 | 2018-09-04 | 南京风力舰信息技术有限公司 | A method of containing close beautification QR code authentications |
CN108491913B (en) * | 2018-02-06 | 2021-07-06 | 绍兴聚量数据技术有限公司 | Method for authenticating QR (quick response) code with secret beautification function |
CN108491747B (en) * | 2018-02-06 | 2021-06-29 | 绍兴聚量数据技术有限公司 | Method for beautifying QR (quick response) code after image fusion |
CN110390374A (en) * | 2018-04-17 | 2019-10-29 | 郑州大学 | A kind of generation method and system of QR code image |
CN110390374B (en) * | 2018-04-17 | 2022-12-13 | 郑州大学 | QR code image generation method and system |
CN108734250B (en) * | 2018-05-29 | 2021-06-15 | 西安理工大学 | Visual two-dimensional code generation method based on Sobel operator |
CN108734250A (en) * | 2018-05-29 | 2018-11-02 | 西安理工大学 | Vision two-dimensional code generation method based on Sobel operators |
CN110633605A (en) * | 2018-06-25 | 2019-12-31 | 视联动力信息技术股份有限公司 | Image processing method and device |
CN110766117A (en) * | 2018-07-27 | 2020-02-07 | 郑州大学 | Two-dimensional code generation method and system |
CN110766117B (en) * | 2018-07-27 | 2022-12-13 | 郑州大学 | Two-dimensional code generation method and system |
CN112041854A (en) * | 2018-08-17 | 2020-12-04 | 惠普发展公司,有限责任合伙企业 | Combined image and machine-readable graphic code |
CN109325573B (en) * | 2018-09-25 | 2021-10-01 | 北京奇艺世纪科技有限公司 | Two-dimensional code generation method, two-dimensional code reading method and two-dimensional code reading device |
CN109325573A (en) * | 2018-09-25 | 2019-02-12 | 北京奇艺世纪科技有限公司 | A kind of two-dimensional code generation method, two dimension code reading method and device |
CN109376830B (en) * | 2018-10-17 | 2022-01-11 | 京东方科技集团股份有限公司 | Two-dimensional code generation method and device |
CN109376830A (en) * | 2018-10-17 | 2019-02-22 | 京东方科技集团股份有限公司 | Two-dimensional code generation method and device |
US11164059B2 (en) | 2018-10-17 | 2021-11-02 | Boe Technology Group Co., Ltd. | Two-dimensional code image generation method and apparatus, storage medium and electronic device |
CN111507446A (en) * | 2019-01-31 | 2020-08-07 | 北京骑胜科技有限公司 | Two-dimensional code generation and identification method and device |
CN111507446B (en) * | 2019-01-31 | 2022-03-04 | 北京骑胜科技有限公司 | Two-dimensional code generation and identification method and device |
CN110751251A (en) * | 2019-10-16 | 2020-02-04 | 上海掌门科技有限公司 | Method and device for generating and transforming two-dimensional code image matrix |
CN110751251B (en) * | 2019-10-16 | 2023-10-24 | 上海掌门科技有限公司 | Method and device for generating and transforming two-dimensional code image matrix |
CN111523629A (en) * | 2020-04-14 | 2020-08-11 | 郑州大学 | Visual optimization method and device for two-dimensional code, electronic equipment and storage medium |
CN111639734A (en) * | 2020-05-21 | 2020-09-08 | 北京矩石科技有限公司 | Novel QR code embedded two-dimensional code coding and anti-counterfeiting application method |
CN111639734B (en) * | 2020-05-21 | 2023-05-16 | 北京矩石科技有限公司 | Novel two-dimensional code encoding and anti-counterfeiting application method embedded with QR code |
CN112926714A (en) * | 2021-03-16 | 2021-06-08 | 北京航空航天大学 | Visual three-dimensional code integrating QR code, bar code and optical character and coding method thereof |
CN112926714B (en) * | 2021-03-16 | 2022-09-16 | 北京航空航天大学 | Visual three-dimensional code integrating QR code, bar code and optical character and coding method thereof |
CN113837765A (en) * | 2021-09-27 | 2021-12-24 | 中国联合网络通信集团有限公司 | Payment verification method, device, equipment and storage medium |
CN113837765B (en) * | 2021-09-27 | 2023-07-18 | 中国联合网络通信集团有限公司 | Payment verification method, device, equipment and storage medium |
CN114091639A (en) * | 2021-11-26 | 2022-02-25 | 北京奇艺世纪科技有限公司 | Interactive expression generation method and device, electronic equipment and storage medium |
CN116822548A (en) * | 2023-08-29 | 2023-09-29 | 宁波邻家网络科技有限公司 | Method for generating high recognition rate AI two-dimensional code and computer readable storage medium |
CN116822548B (en) * | 2023-08-29 | 2023-12-19 | 宁波邻家网络科技有限公司 | Method for generating high recognition rate AI two-dimensional code and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106778995B (en) | 2020-02-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106778995A (en) | A kind of art up two-dimensional code generation method and device with image co-registration | |
CN103914699B (en) | A kind of method of the image enhaucament of the automatic lip gloss based on color space | |
JP6483221B2 (en) | 3D code generation method | |
CN106599965B (en) | A kind of method and apparatus that image is cartoonized and merged with two dimensional code | |
CN1475969B (en) | Method and system for intensify human image pattern | |
CN104899629B (en) | A kind of image in 2 D code generation method based on RBF | |
CN105338214B (en) | Image processing method and image processing apparatus | |
CN109920018A (en) | Black-and-white photograph color recovery method, device and storage medium neural network based | |
CN106446885A (en) | Paper-based Braille recognition method and system | |
CN106355592A (en) | Educational toy suite and its circuit elements and electric wires identifying method thereof | |
CN108460833A (en) | A kind of information platform building traditional architecture digital protection and reparation based on BIM | |
CN109241867A (en) | Using the method and device of intelligent algorithm identification digital cores image | |
CN113436284A (en) | Image processing method and device, computer equipment and storage medium | |
CN109492735B (en) | Two-dimensional code generation method and computer-readable storage medium | |
CN109902751B (en) | Dial digital character recognition method integrating convolution neural network and half-word template matching | |
CN105426847A (en) | Nonlinear enhancing method for low-quality natural light iris images | |
CN116822548B (en) | Method for generating high recognition rate AI two-dimensional code and computer readable storage medium | |
CN105049670A (en) | Method for hiding and extracting false-proof information in halftoning printing images | |
CN109214486B (en) | Three-dimensional code, three-dimensional code generation method and device, and three-dimensional code identification method and device | |
CN108491747A (en) | Beautify the method for QR codes after a kind of blending image | |
Rizani | Image quality improvement using image processing method image brightness contrast and image sharpening | |
CN108921770A (en) | A kind of sub-image boundary improved method based on edge detection error diffusion algorithm | |
CN110533574B (en) | Manufacturing method of visible and invisible grating based on image pixel relation | |
CN107481376B (en) | Three-dimensional code unlocking method based on intelligent application | |
JPH0314077A (en) | Method and device for pattern recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |