Movatterモバイル変換


[0]ホーム

URL:


CN107742145A - Data embedding method, method for reading data, device and readable storage medium storing program for executing - Google Patents

Data embedding method, method for reading data, device and readable storage medium storing program for executing
Download PDF

Info

Publication number
CN107742145A
CN107742145ACN201710856102.7ACN201710856102ACN107742145ACN 107742145 ACN107742145 ACN 107742145ACN 201710856102 ACN201710856102 ACN 201710856102ACN 107742145 ACN107742145 ACN 107742145A
Authority
CN
China
Prior art keywords
data
band
fill color
default
bit
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.)
Pending
Application number
CN201710856102.7A
Other languages
Chinese (zh)
Inventor
李政放
常治国
吕迎丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen MPR Technology Co Ltd
Original Assignee
Shenzhen MPR Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen MPR Technology Co LtdfiledCriticalShenzhen MPR Technology Co Ltd
Priority to CN201710856102.7ApriorityCriticalpatent/CN107742145A/en
Publication of CN107742145ApublicationCriticalpatent/CN107742145A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of data embedding method, including:Based on given figure, the mark figure of structure at least one, to generate the data band for being used for data insertion;The data band generated is split according to predetermined manner, forms several data slots;According to data and the default mapping relations of fill color color value, the filling fill color corresponding with needing embedded data on each data slot, to generate data insertion figure.The invention also discloses a kind of method for reading data, device and computer-readable recording medium.Data are embedded in figure by the embodiment of the present invention in a manner of human eye is not easy to perceive, ensure data can by it is reliable it is machine-readable in the case of do not destroy the visual appearance of figure, solves the problems, such as that data insertion is difficult to coordination with carrier pattern outward appearance.

Description

Data embedding method, method for reading data, device and readable storage medium storing program for executing
Technical field
The present invention relates to data encoding and image steganalysis field, more particularly to data embedding method, digital independent sideMethod, device and readable storage medium storing program for executing.
Background technology
Existing various matrix two-dimensional codes are using dark and light color two kinds of rectangular block splicing compositions, one band specific identificationThe big rectangular patterns of pattern, its major design first purpose are matched with the digital imaging technology of early stage, and support to calculate energyThe weaker terminal device of power carries out Real time identification to it.The main not foot point of one of such Quick Response Code is that needs are only in carrier surfaceOne piece of region is accounted for, is difficult to keep format and visual appearance with graph-text content when they are applied to printed publication or advertisement is presentedOn it is consistent, it is also difficult to other Graphics Fusion typesettings.Therefore it is difficult to, it is necessary to solve data insertion figure with carrier pattern outward appearanceThe problem of coordination.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skillArt.
The content of the invention
It is a primary object of the present invention to provide a kind of data embedding method, method for reading data, device and readable storageMedium, it is intended to solve the problems, such as that data insertion is difficult to coordinate with carrier pattern outward appearance.
To achieve the above object, the present invention provides a kind of data embedding method, and the data embedding method includes following stepSuddenly:
Based on given figure, the mark figure of structure at least one, to generate the data band for being used for data insertion;
The data band generated is split according to predetermined manner, forms several data slots;
According to data and the default mapping relations of fill color color value, filled on each data slot and need to be embedded inData corresponding to fill color, with generate data insertion figure.
Preferably, it is described according to data and the default mapping relations of fill color color value, filled out on each data slotFill color corresponding with needing embedded data is filled, is included with generating the step of data insertion figure:
According to data and the default mapping relations of fill color color value, on the data slot of the data band predeterminated positionDefault fill color is filled, forms the sync bit that figure positions during for digital independent.
Preferably, it is described according to data and the default mapping relations of fill color color value, filled out on each data slotFill color corresponding with needing embedded data is filled, is included with generating the step of data insertion figure:
According to data and the default mapping relations of fill color color value, on the data slot of the data band predeterminated positionDefault fill color is filled, forms the data bit for being embedded in target data.
Preferably, the data bit is used to storing target data and being obtained according to default Correction-Coding Algorithm with the meshMark error correction data corresponding to data.
In addition, to achieve the above object, the present invention also provides a kind of method for reading data, and the method for reading data includesFollowing steps:
Obtain the target digital image containing data insertion figure;
According to the target digital image, the data band in the data insertion figure is identified;
Sampled on the data band, obtain the fill color color value of each sampled point;
According to the fill color color value and default reading rule, original embedding data is generated.
Preferably, it is described according to the target digital image, the step of identifying the data band in the data insertion figureIncluding:
Determine corresponding region of the data insertion figure in the target digital image;Wherein, the corresponding regionContain complete data band;
The data that the corresponding region is matched with default recognizer are embedded in figure;
According to matching result and desired guiding trajectory track algorithm, each track of data band in the data insertion figure is identifiedPoint;
Obtain the coordinate value of each tracing point of the data band, data band center line analytic equation corresponding to fitting generation.
Preferably, after corresponding to the fitting generation the step of data band center line analytic equation, in addition to:
According to the data band center line analytic equation, up-sampled in data band center line, read the data band centerThe Fill Color value of sampled point is corresponded on line;
According to gray value corresponding to the Fill Color value, Wave data is obtained, and generates corresponding waveform.
Preferably, it is described according to the fill color color value and it is default read rule, the step of generating original embedding dataIncluding:
Rule is read according to default, reads and is correspondingly adopted on the waveform of the generation of the fill color color value based on each sampled pointThe bit stream of sampling point;
The bit stream is assembled by preset order during coding, generate original embedding data.
In addition, to achieve the above object, the present invention also provides a kind of data processing equipment, the data processing equipment bagInclude:The data insertion program sum that memory, processor and being stored in can be run on the memory and on the processorAccording to reading program, the data realize the step of data embedding method as described above when being embedded in program by the computing deviceSuddenly, the step of realizing method for reading data as described above when the data read procedure is by the computing device.
In addition, to achieve the above object, the present invention also provides a kind of computer-readable recording medium, described computer-readableData insertion program and data read procedure are stored with storage medium, the data insertion program is realized when being executed by processorThe step of data embedding method as described above, the data read procedure realize data as described above when being executed by processorThe step of read method.
A kind of insertion of data and method for reading data that the embodiment of the present invention proposes, are used by being built based on given figureIn the data band of data insertion, and data point is split to form several data slots, the corresponding filling on each data slotWith the fill color of embedding data corresponding color value.After the target image containing data band is obtained, data band is identified, and in numberThe original embedding data of sampling generation is carried out according to taking, so as to complete digital independent.Data are not easy by the embodiment of the present invention with human eyeThe mode of perception is embedded in figure, ensure data can by it is reliable it is machine-readable in the case of do not destroy the visual appearance of figure, solve numberAccording to embedded the problem of being difficult to coordinate with carrier pattern outward appearance so that traditional trade mark, commercial mark symbol, standard identifier, which possess, to be carriedThe ability of machine-readable data, without introducing extra two-dimensional code symbol, there is higher commercial value.
Brief description of the drawings
Fig. 1 is the data processing equipment structural representation that scheme of the embodiment of the present invention is related to;
Fig. 2 is a kind of schematic flow sheet of data embedding method first embodiment of the present invention;
Fig. 3 is a kind of schematic flow sheet of data embedding method second embodiment of the present invention;
Fig. 4 is a kind of schematic flow sheet of data embedding method 3rd embodiment of the present invention;
Fig. 5 is a kind of schematic flow sheet of method for reading data fourth embodiment of the present invention;
Fig. 6 is a kind of schematic flow sheet of the embodiment of method for reading data the 5th of the present invention;
Fig. 7 is a kind of schematic flow sheet of method for reading data sixth embodiment of the present invention;
Fig. 8-26 is various embodiments of the present invention example schematic.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:Based on given figure, the mark figure of structure at least one, with generationData band for data insertion;The data band generated is split according to predetermined manner, forms several data slots;According to data and the default mapping relations of fill color color value, filling is with needing embedded data pair on each data slotThe fill color answered, to generate data insertion figure.
It is difficult to coordinate with carrier pattern outward appearance because prior art data are embedded in, the present invention provides a solution, willData are embedded in figure in a manner of human eye is not easy to perceive, ensure data can by it is reliable it is machine-readable in the case of do not destroy regarding for figureFeel attractive in appearance, solve the problems, such as that data insertion is difficult to coordinate with carrier pattern outward appearance.
As shown in figure 1, the data processing equipment structural representation that Fig. 1, which is scheme of the embodiment of the present invention, to be related to.
The data processing equipment can be PC or smart mobile phone, tablet personal computer, E-book reader, MP3(Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio aspect 3)Player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard soundFrequency aspect 3) player, pocket computer etc. have the packaged type terminal device of display function.
The data processing equipment that scheme of the embodiment of the present invention is related to can include:Processor 1001, such as CPU, network connectMouth 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is used to realize these componentsBetween connection communication.User interface 1003 can include display screen (Display), input block such as keyboard(Keyboard), optional user interface 1003 can also include wireline interface, the wave point of standard.Network interface 1004 is optionalWireline interface, the wave point (such as WI-FI interfaces) that can include standard.Memory 1005 can be high-speed RAM memory,Can also be stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally may be used alsoTo be independently of the storage device of aforementioned processor 1001.
It will be understood by those skilled in the art that the restriction of the apparatus structure shown in Fig. 1 not structure twin installation, can be wrappedInclude than illustrating more or less parts, either combine some parts or different parts arrangement.
As shown in figure 1, it can lead to as in a kind of memory 1005 of computer-readable storage medium including operating system, networkBelieve module, Subscriber Interface Module SIM and data insertion application program, digital independent application program.
In the terminal shown in Fig. 1, network interface 1004 is mainly used in connecting background server, is carried out with background serverData communicate;User interface 1003 is mainly used in connecting client (user terminal), enters row data communication with client;And processor1001 can be used for calling the data insertion application program application program stored in memory 1005, and perform following operate:
Based on given figure, the mark figure of structure at least one, to generate the data band for being used for data insertion;
The data band generated is split according to predetermined manner, forms several data slots;
According to data and the default mapping relations of fill color color value, filled on each data slot and need to be embedded inData corresponding to fill color, with generate data insertion figure.
Further, processor 1001 can call the data stored in memory 1005 to be embedded in application program, also performOperate below:
According to data and the default mapping relations of fill color color value, on the data slot of the data band predeterminated positionDefault fill color is filled, forms the sync bit that figure positions during for digital independent.
Further, processor 1001 can call the data stored in memory 1005 to be embedded in application program, also performOperate below:
According to data and the default mapping relations of fill color color value, on the data slot of the data band predeterminated positionDefault fill color is filled, forms the data bit for being embedded in target data.
Processor 1001 can call the digital independent application program stored in memory 1005, also perform following operate:
Obtain the target digital image containing data insertion figure;
According to the target digital image, the data band in the data insertion figure is identified;
Sampled on the data band, obtain the fill color color value of each sampled point;
According to the fill color color value and default reading rule, original embedding data is generated.
Further, processor 1001 can call the digital independent application program stored in memory 1005, also performOperate below:
Determine corresponding region of the data insertion figure in the target digital image;Wherein, the corresponding regionContain complete data band;
The data that the corresponding region is matched with default recognizer are embedded in figure;
According to matching result and desired guiding trajectory track algorithm, each track of data band in the data insertion figure is identifiedPoint;
Obtain the coordinate value of each tracing point of the data band, data band center line analytic equation corresponding to fitting generation.
Further, processor 1001 can call the digital independent application program stored in memory 1005, also performOperate below:
According to the data band center line analytic equation, up-sampled in data band center line, read the data band centerThe Fill Color value of sampled point is corresponded on line;
According to gray value corresponding to the Fill Color value, Wave data is obtained, and generates corresponding waveform.
Further, processor 1001 can call the digital independent application program stored in memory 1005, also performOperate below:
Rule is read according to default, reads and is correspondingly adopted on the waveform of the generation of the fill color color value based on each sampled pointThe bit stream of sampling point;
The bit stream is assembled by preset order during coding, generate original embedding data.
Reference picture 2, first embodiment of the invention provide a kind of data embedding method, and the data embedding method includes:
Step S10, based on given figure, the mark figure of structure at least one, to generate the data band for being used for data insertion;
In specific implementation, given figure can include but is not limited to:Commercial brand mark, design icon, standard drawingMark, commercial mark symbol.Based on given figure, the mark figure of structure at least one, specifically one can be selected in given figureSection or multistage smooth curve, the smooth curve are to identify figure;If given figure does not include suitable smooth curve,In the given graphics peripheral one or more snippets smooth curve, one section of smooth curve of the selection can be added by default modeOr one section of smooth curve of the addition is a data band, for embedding data., can be with addition, except smooth curveAddition straight line, dotted line, pattern or other figures and other composite figures, the structure of the concrete shape of figure identified above existWithin the protection domain of the embodiment of the present invention.For example, Fig. 8 is the mark that books and publications have used Chinese ISLI national standardsWill, its peripheral wire frame 102 are made up of 4 smooth Beziers, as it was previously stated, this 4 smooth Beziers can quiltAs the data band.As shown in figure 9,201 be the schematic diagram of a certain trade mark, it does not include sufficiently long smooth curve, and 202 areIn a peripheral increased occluded ellipse curve for trade mark 201, elliptic curve 202 does not change the visual performance of trade mark 201, andIt can be used as the data band.
Step S20, the data band generated is split according to predetermined manner, form several data slots;
Each data band is divided into approximate several isometric data slots.It should be noted that each data slotIn a corresponding embedded numeral.
Step S30, according to the default mapping relations of data and fill color color value, on each data slot filling withFill color corresponding to embedded data is needed, to generate data insertion figure.
Wherein, the preset data is preferably binary digit " 0 " and " 1 ".In particular it is required that embedded data can wrapIncluding but be not limited to binary data, the data of other systems can be converted to binary data in advance before Embedded step is implemented, thisIn repeat no more.And binary digit " 0 " and " 1 " can be corresponding respectively with two kinds of color values, mapping relations are formed.For example, choosing2 kinds of color value C1 and C2, C1 is taken to represent binary digit " 0 ", C2 represents binary digit " 1 ".Especially, in order to as far as possible notAllow human eye to perceive the mosaic visual effect in the data band, can be selected according to the integral color service condition of given figureSelect optimal C1 color values and C2 color values so that the data band matches with the given figure on overall visual perception.ThisSample, fill corresponding fill color in each data slot of a data band, you can the number of a string of binary numbers is represented with generationAccording to band;Each data band has effigurate figure according to setting, generation is actually needed, i.e., data insertion is schemed corresponding to generationShape.
In the present embodiment, by based on given figure, building smooth curve, generating the data for data insertionBand;And data band is split and to form several data slots, filling is with needing embedded binary number in each data slotAccording to corresponding fill color.Thus, data are embedded in figure in a manner of human eye is not easy to perceive, are ensureing that data can be by reliable machine-readableIn the case of do not destroy the visual appearance of figure, without introducing extra two-dimensional code symbol, solve data insertion figureThe problem of being difficult to coordinate with carrier pattern outward appearance.
Further, reference picture 3, second embodiment of the invention provides a kind of data embedding method, based on shown in above-mentioned Fig. 2Embodiment, the default mapping relations according to preset data and fill color color value, filled on each data slotFill color corresponding with needing embedding data, included with generating the step of data insertion figure:
Step S31, according to data and the default mapping relations of fill color color value, in the number of the data band predeterminated positionAccording to default fill color is filled in fragment, the sync bit that figure positions during for digital independent is formed;
For convenience of the data in the data band are read from the digital picture that obtains of taking pictures, in the predeterminated position of data bandData slot on fill color corresponding to filling, the sync bit that figure positions when being used for digital independent to be formed, sync bit can be withIt is one or more;Each sync bit is by 1 or continuous multiple data slots form, every number in each sync bitFilled according to fragment by default color value, the default color value is C1 or C2;
Step S32, according to data and the default mapping relations of fill color color value, in the number of the data band predeterminated positionAccording to default fill color is filled in fragment, the data bit for being embedded in target data is formed.
Wherein, the data bit is used to storing target data and being obtained according to default Correction-Coding Algorithm with the targetError correction data corresponding to data.When data slot in one data band is used as data bit, the corresponding coding one of each data bitBinary number, a portion data bit are used to store initial data, and remaining data position is used to store error correction data;Wherein, instituteIt is pre- by being pressed to initial data with forward error correction (Forward Error Correction) encryption algorithm to state error correction dataIf parameter coding obtain;Initial data is corresponded into fill color and error correction data corresponds to fill color and is filled into one by one in data bit,It is finally completed data embedding procedure.It should be noted that step S31, S32 can be regarded as the arranged side by side or suitable relation held.
It is further illustrated:Define color value C1 be 100% it is black, define color value C2 be 85% it is black, according to toolParameter, the C2 such as printing/display of body, digital camera sensitivity can also be defined as other values not equal to C1, such as 90%It is black, 80% it is black etc..C1 represents binary digit " 0 ", and C2 represents binary digit " 1 ".As shown in figure 8,102 be 4 sectionsEnd to end smooth curve, using every smooth curve as a data band.As shown in Figure 10, the data band is divided intoMultiple data slots, 301 be a data slot, and 302,303,304,305 4 data slots are the connection of two data bandsRegion, data are not carried, filled with color C1.To each data slot according to numbering clockwise, 306 numbering is 0,307 volumeNumber it is 151, totally 152 data slots.
Sync bit is set:As shown in figure 11, the data slot of numbering 0,20,21,41,42,96,97,151 is filled with C2Color is filled, and the data slot of numbering 1,19,22,40,43,95,98,150 is filled with C1 fill colors, numbering be (9,10,11),(30,31,32), (55,56,67), (68,69,70), (81,82,83), (110,111,112), (123,124,125), (136,137,138) data slot combination constitutes institute with the color combination filling of (C1, C2, C1), above-mentioned 40 data slots respectivelyState sync bit.Figure 12 is Fill Color, sets the figure after sync bit.Wherein, the light data slot on 4 data bands is not alsoEmbedding data.
Data bit is set:152 data slots remove 40 data slots as sync bit, remaining 112 data slicesSection, is defined as data bit;Each bit data of data-bit encoding 1, i.e., represent binary digit " 0 " with the filling of C1 fill colors;WithThe filling of C2 fill colors represents binary digit " 1 ", therefore the 4 data band shares the memory capacity of 112 bits.112 bitsIt is divided into the bit error correction position of 63 bit target data position+49, for example, the two of a decimal number " 1234567890123456789 "System is expressed as " 1 0,001 0,010 0,010 0,001 0,000 1,111 0,100 0,111 1,101 1,110 1,001 1,000 00010001 0101 ", totally 61 bit, a high position fill 20 after be " 001 0,001 0,010 0,010 0,001 0,000 1,111 01000111 1,101 1,110 1,001 1,000 0,001 0,001 0101 " totally 63 bit.Use binary error-correcting code BCH (n, k, t) code49 bit error correction positions are generated to this 63 bit data, wherein n=112 is the total bit that target data position adds error correction bit, and k=63 isThe digit (error correction bit length is 112-63=49) of data bit, t=7 mark maximum error correcting capabilities are 7 (i.e. most error 7 ratiosIn the case of spy can also error correction success), generation 49 bit error correction positions be " 1 0,000 0,001 1,101 0,000 0,110 00001110 0,101 0,011 1,101 0,110 0100 ", 112 are obtained after this 49 bit error correction position being connected into 63 bit data positionsBinary number " 1,010 1,000 1,000 0,001 1,001 0,111 1,011 1,110 0,010 1,111 0,000 1,000 01000100 1000 100 1 0000 0001 1101 0000 0110 0000 1110 0101 0011 1101 0110 0100”(the arrangement sequence for paying attention to 63 bit data positions is from minimum bit 20To dominant bit 262)。
112 bit data is inserted in 112 data slots, the corresponding data slot of each bit,Filled in the direction of the clock since data slot 1201, bit " 0 " is filled with C1 fill colors, and bit " 1 " is filled out with C2 fill colorsFill, obtain final result figure as shown in fig. 13 that.Special instruction, in Figure 12 the brightness of C2 fill colors specially increased, in order to it is easy to human eye to distinguish color C1 fill colors and C2 fill colors, so as to should be readily appreciated that present invention, actual fortuneWithout considering such a situation.
To further illustrate technical scheme, the present embodiment also provides another embodiment.As shown in figure 14, scheme14 are embedded under the graph-text content of paper printed matter for the unique ID of multimedia object of the embodiment by storage beyond the cloudsIn the double-crossed 401 of side.Identified using the intelligent terminal with camera and position double-crossed, then read from double-crossedID values, then ask broadcasting to cloud server with the ID values or download the multimedia object that ID is identified.Figure 15 is double-crossed 401Amplification internal anatomy, each square is dark or light color filling, i.e., each square is a data slot.Wherein, 501,503 are3bit sync bits, by light, dark, light data chunk into, sync bit as 9 501 is provided with whole double-crossed altogether,503 filling mode is dark, light color, dark color, just with 2501 filling mode at the other three end points on the contrary, can useRotation and mirror image in identification image.502 be data bit, shares 8 data bit, and each data bit contains 14 data slots,Therefore whole figure share 8*14=112 data bit data slot, just with the memory capacity of embodiment as shown in figure 13It is identical, therefore can use and the ID is encoded with embodiment identical BCH (112,63,7) coding parameters as shown in Figure 8.
It should be noted that in order to ensure that double-crossed does not influence the attractive in appearance of graph-text content, avoid making video text editing typesettingInto difficulty, the lines of double-crossed should be as thin as possible, but is taken pictures identification in order to facilitate intelligent terminal, and lines should be wide as far as possible,Contradiction between the two be present.By taking general book typesetting as an example, two words of row 5 are with 1.5 times of line-spacing typesettings, the space between two style of writing wordsFor 1.852 millimeters [(10.5/72) * (25.4/2)=1.852], i.e., double-crossed is highly necessarily less than 1.852 millimeters.Modern times printingThe resolution ratio of machine is generally 2400DPI, it is assumed that printing ink dot is square, and each ink dot length of side is 1/600 inch (so eachInk dot can include the micro- ink dots of 4*4 under 2400DPI printing precisions, it is ensured that ink dot energy reliable attachment is on paper), in Figure 15Each data slot takes 5*5 ink dot area, then the height of wall scroll data band is 5/600*25.4=0.2117 millimeters, if doubleThe spacing of line is the height of wall scroll data band, then the height of whole double-crossed is 3*0.2117=0.635 millimeters, less than above-mentioned1.852 millimeters of the double-crossed height of typesetting requirement;The width of double-crossed is 71*5/600*25.4=15.028 millimeters.To sum up instituteState, the size of double-crossed is (0.635*15.028) square millimeter, and the image of such size can easily be placed in picture and text editionMost of white spaces in face, as between two style of writing words, the corner of chart, neither difficulty brought to typesetting, also without interference with peopleNormal reading of the eye to picture and text.
In order to read data bit from the image of double-crossed, according to Nyquist-Shannon's sampling theorem, in theory each2*2pixel need to be at least occupied after the data bit imaging printed on paper.By taking common smart mobile phone camera parameter as an example, differentiateRate 8,000,000 (is approximately equal to 3192*2500), and single pixel area is 1.5*1.5 μm2, the angle of visual field (FOV) is 60 °.Such as Figure 16 institutesShow, 601 be imaging sensor, and its short side physical size is 2500*1.5/1000=3.75 millimeters, and 602 be lens centre from paperThe vertical range in face, 100 millimeters are set to, 603 be the visual field sizes of camera lens, equal to 100/cos30 °=115.47 millimeters, thereforeIt is 3.75/115.47*0.2117* that a square data code-point is imaged the corresponding pixel length of side on the image sensor on paper1000/1.5=4.58, more than 2 pixel, therefore can be from leaving that the image captured by the distance of 10 centimetres of paper can ensure thatRead data bit in the image of data band.For most smart mobile phones, 100 millimeters of vertical range shooting can be clearImaging is without using microshot function.
In summary, provided compared to the method for associating content of multimedia to papery picture and text with conventional two-dimensional code, the present embodimentMethod difficulty will not be both brought to editing and composing, will not also be interfered to human eye reading text and graph content, while also support intelligenceEnergy terminal device is distinguished so that friendly the taking pictures distance of interaction is reliable, has great practical value.
In the present embodiment, corresponding fill color is filled by the data slot in data band, generation sync bit, mesh is setData bit and error correction data position are marked, so as to complete the telescopiny of data.
Reference picture 4, third embodiment of the invention provide a kind of method for reading data, and the method for reading data includes:
Step S40, obtain the target digital image containing data insertion figure;
In specific implementation, the given figure that embedded in data is clapped with the picture pick-up device of digital camera, video camera etcAccording to obtaining clearly digital picture, wherein, digital picture need to include complete data band.Related figure can also be used to identifyProgram carries out the identification and acquisition of target digital image.
Step S50, according to the target digital image, identify the data band in the data insertion figure;
Concretely comprise the following steps:Determine corresponding region of the data insertion figure in the target digital image;Wherein, instituteState corresponding region and contain complete data band;The data that the corresponding region is matched with default recognizer are embedded in figure;RootAccording to matching result and desired guiding trajectory track algorithm, each tracing point of data band in the data insertion figure is identified;Obtain instituteState the coordinate value of each tracing point of data band, data band center line analytic equation corresponding to fitting generation.
Step S60, sampled on the data band, obtain the fill color color value of each sampled point;
Step S70, according to the fill color color value and default reading rule, generate original embedding data.
Specifically, equidistantly sampled along the data band center line being fitted, read the fill color color value of each sampled point, itsIn, the gray value of the preferred sampled point of Fill Color value.One-dimensional data sequence is obtained after sampling, to one-dimensional data sequence by defaultFiltering parameter filtering obtains one-dimensional waveform.It should be noted that according to Nyquist-Shannon's sampling theorem, it is necessary to calculate properlySampling interval to ensure that each data slot is at least sampled 2 times, each sampled value in the one-dimensional waveform represents oneColor value.Rule is read according to default, reads the bit stream that sampled point is corresponded on the waveform.The bit stream will have been read to spellDeliver a child into corresponding binary number.
The present embodiment is sampled by identifying the data band in target digital image on data band, is sampledThe fill color color value of point;And according to the default mapping relations of fill color color value and binary number, target data is generated, so as toThe reading of data is realized, solves the problems, such as that data insertion is difficult to coordinate with carrier pattern outward appearance so that traditional trade mark, business are markedKnowledge symbol, standard identifier possess the ability for carrying machine-readable data, without introducing extra two-dimensional code symbol.
Further, reference picture 5, fourth embodiment of the invention provides a kind of method for reading data, based on shown in above-mentioned Fig. 4Embodiment, described according to the target digital image, the step of identifying the data band in the data insertion figure, includes:
Step S51, determine corresponding region of the data insertion figure in the target digital image;Wherein, it is describedContain complete data band in corresponding region;
For example, Figure 13 figure is imprinted on flat carrier, it is taken pictures with digital camera;Or it is shown in screenOn;So as to obtain 256 grades of gray level images 702 that resolution ratio as shown in figure 17 is 640*480,701 be Figure 13's in the imageGraphics field image, and also have complete data band region on 701.
Step S52, the data that the corresponding region is matched with default recognizer are embedded in figure;
Step S53, according to matching result and desired guiding trajectory track algorithm, identify the data in the data insertion figureWith each tracing point;
Step S54, the coordinate value of each tracing point of the data band is obtained, data band center line parsing corresponding to fitting generationEquation.
Given figure is matched in the area image with image steganalysis algorithm, after the match is successful described in acquisitionDeviation post O and anglec of rotation A of the figure in the area image.According to the deviation post O and the anglec of rotation A,Default relative skew of each data band in the given figure can be calculated, and calculates the initial coordinate P of data band0;Since initial coordinate point, track the data band center line and obtain serial coordinate points P1(X1, Y1), P2(X2, Y2) ..., Pn(Xn, Yn), the serial coordinate points are fitted to curve, such as the use of least square fitting is polynomial curve Y=C0+C1*X+C2*X2+...+Cn*Xn, X0≤X≤Xn.Finally give the analytic equation of data band center line.
For example, the first step, the given figure 101 in Fig. 8 is observed, in addition to alphabetical " SL ", whole figure is left and rightSymmetrically, therefore use the bar sky wide sequence detection method similar with one-dimensional bar code to realize and the given graphical symbol is determinedPosition, if the white line segment 801 in Figure 18 is the matching result in the present embodiment.The number is estimated according to the length of line segment 801Width according to band is r.
Second step, track following is carried out to the data band, obtains the serial coordinate on data band center line.With line segmentAny one in 801 two end points is starting point, and any one direction in the both direction of line segment 801 is initialDirection of advance, using the estimation width r of the data band as step-length, track the track centers point coordinates of the data band.In trackHeart point coordinates Pn-1To PnTrack algorithm comprise the following steps that:
1) P is correctedn-1Coordinate, be on the data band center line;
2) advance step-length (dx, dy)=P is calculatedn-1-Pn
3) P is calculatednInitial value Pn=Pn-1+ (dx, dy), judges whether tracking terminates, if 1) not terminating to jump to entersRow next round tracks.
As shown in figure 19, coordinate point set 901 is that the result of track following is carried out to the data band.
3rd step:The serial coordinate points result obtained according to track following, fitting data band center line curve, obtains everyThe Curve Resolution equation coefficient of data band center line.
It is connected contact as cut-point using 4 data bands, coordinate point set 901 is divided into four groups of coordinate point sets.If 901Altogether comprising n point P1(X1,Y1)、P2(X2,Y2)……Pn(Xn,Yn), point calculates " turn " angle, θ (0≤θ≤180 °) one by one, such asShown in Figure 20, i-th point of turn angle, θiFor straight line Pi+dPiWith straight line PiPi-d, d is preset value 4, because of P1~PnJoin end to end,If i+d>N, then Pi+dTake Pi+d-nValue;If i-d<0, then Pi-dTake Pi-d+nValue.
As shown in figure 21, transverse axis is the numbering of point sequence, and the longitudinal axis is " turn " angle of point, and the corresponding overall situation in four big turning is mostBig four peak values, therefore coordinate point set 901 can be divided into the corresponding data band according to this 4 peak values.
The coordinate points of each data band are fitted to cubic polynomial Y=C with least square method0+C1*X+C2*X2+C3*X3,Obtain coefficient C0~C3Value.It should be noted that in order to improve the precision of fitting, and subsequently according to the curve logarithm of fittingAccording to the precision that image sampling is carried out with center line, the present embodiment is translated every group of coordinate points and rotation process so that head and the tailCoordinate points are in X-axis, and first coordinate points is located at origin.The fitting result C of the data band of the present embodiment four0~C3KnotFruit is:
Data bandC0C1C2C3
L1+0.019914-0.138270+0.001673-3.949375e-6
L2-0.012627-0.094049+0.000147+5.724030e-6
L3-0.357652+0.729894-0.003296+2.701150e-6
L4-0.325505+0.512086-0.001128-2.376793e-6
Drawing result is as shown in figure 22 after corresponding 4 curve despinings instead translate, 1901 homologous thread L1,1902 correspondencesCurve L2,1903 homologous thread L3,1904 homologous thread L4.
The last tracing point of data band curve is calculated by matching the given figure in target digital image in the present embodimentCoordinate value, and generation data band Curve Resolution equation is fitted, so as to identify data band, in order to perform follow-up digital independentStep.
Further, reference picture 6, fifth embodiment of the invention provides a kind of method for reading data, based on shown in above-mentioned Fig. 4Embodiment, it is described fitting generation corresponding to data band center line analytic equation the step of after include:
Step S61, according to the data band center line analytic equation, up-sampled in data band center line, read the numberAccording to the Fill Color value that sampled point is corresponded on center line;
Step S62, according to gray value corresponding to the Fill Color value, Wave data is obtained, and generate corresponding waveform.
It should be noted that the pre-set color value of the pre-determined synchronization position in data band, in the one-dimensional waveformWith simultaneously positioning synchronous position;Further, on the basis of above-mentioned sync bit, equidistantly sampling obtains the data bit progress to the waveformObtain M color value (preset value when M is coding, i.e., the data bit number on current data band).
Further, reference picture 7, sixth embodiment of the invention provides a kind of method for reading data, based on shown in above-mentioned Fig. 4Embodiment, it is described according to the fill color color value and default the step of reading rule, generating original embedding data includes:
Step S71, rule is read according to default, read the waveform of the fill color color value generation based on each sampled pointThe bit stream of upper corresponding sampled point;
Presetting reading rule is preferably:To each color value in the M color value respectively compared with C1 and C2, such asFruit is bit " 0 " closer to then reading with C1, being bit " 1 " if read with C2 if, reading M-bit data.It will readData bit bit stream splicing, you can binary number corresponding to generation.
For example, bit stream is read from waveform W1~W4.For waveform W1~W4, waveform, which performs, one by one such as flows downJourney:
1) in reference picture 11 sync bit set-up mode, position waveform in sync bit.As shown in figure 23, the institute of vertical line 1101The position of instruction is default sync bit position, and W1 and W2 have 3 sync bits, and W3 and W4 have 5 sync bits, and their position isBe mapped in proportion in waveform according to relative position of the sync bit in Figure 11 in the data band, it is found that due intoThe non-linear factor of picture and the curve matching in the 3rd step, cause part 1101 not in the center of sync bit (i.e. waveformLocal maximum position), the center according to sync bit is this default characteristic of the local maximum of waveform, by sync bitAmendment is to closest waveform peak, and as shown in figure 24,1201 be revised result.
2) threshold value of waveform is calculated.The threshold of sync bit is used as using the waveform peak-to-valley intermediate value near the sampled point of sync bit placeValue, the threshold value of other sampled points of waveform are calculated in a manner of the threshold value of sync bit is with reference to by linear interpolation, such as schemedShown in 25, the sectional broken line 1301 for crossing waveform is exactly the display result of the threshold value;
3) using sync bit as reference point, the data bit between two adjacent sync positions is equidistantly sampled, compares and adoptsThreshold value in sample value and step 2), it is bit " 1 " to be read more than threshold value, and it is bit " 0 ", as shown in figure 26, each ripple to be read less than threshold valueTo read result, sync bit need not be read numeral below shape transverse axis.
Step S72, the bit stream is assembled by preset order during coding, generate original embedding data;
With the decoding FEC algorithm with the forward error correction coding algorithmic match in first embodiment to described initialRead data and carry out error correction decoding, if error correction decoding success, the preceding D bits in error correction decoding result for decoded result (i.e.Original embedding data), the success of this decoding process;If error correction decoding fails, show the mistake in the initial read dataNumber is beyond the error correcting capability of the decoding FEC algorithm, then this decoding process failure.
For example, the bit stream that 4 waveforms in Figure 26 are read is spliced into 112 bits, as a result for“1010100010000001100101111011111000101111000010000100010010001001000000011101000001100000111001010011110101100100 ", it should be noted that waveform W4 read data need inverted sequence (becauseIt is in opposite direction with data insertion for W4 sample direction and 1005), then decoded with BCH (112,63,7) error correction decoding algorithm,It was found that number of errors is 0, (first bit weightings is 2 to preceding 63 bit0, last bit weightings is 262) change into decimal numberResult is " 1234567890123456789 " afterwards, identical with the data of original insertion, shows to read successfully.
In addition, the embodiment of the present invention also proposes a kind of computer-readable recording medium, the computer-readable recording mediumOn be stored with data insertion application program and digital independent application program, when the data insertion application program is executed by processorRealize following operation:
Based on given figure, the mark figure of structure at least one, to generate the data band for being used for data insertion;
The data band generated is split according to predetermined manner, forms several data slots;
According to data and the default mapping relations of fill color color value, filled on each data slot and need to be embedded inData corresponding to fill color, with generate data insertion figure.
Further, following operation is also realized when the data insertion application program is executed by processor:
According to data and the default mapping relations of fill color color value, on the data slot of the data band predeterminated positionDefault fill color is filled, forms the sync bit that figure positions during for digital independent.
Further, following operation is also realized when the data insertion application program is executed by processor:
According to data and the default mapping relations of fill color color value, on the data slot of the data band predeterminated positionDefault fill color is filled, forms the data bit for being embedded in target data.
The digital independent application program also realizes following operation when being executed by processor:
Obtain the target digital image containing data insertion figure;
According to the target digital image, the data band in the data insertion figure is identified;
Sampled on the data band, obtain the fill color color value of each sampled point;
According to the fill color color value and default reading rule, original embedding data is generated.
Further, following operation is also realized when the data insertion application program is executed by processor:
Determine corresponding region of the data insertion figure in the target digital image;Wherein, the corresponding regionContain complete data band;
The data that the corresponding region is matched with default recognizer are embedded in figure;
According to matching result and desired guiding trajectory track algorithm, each track of data band in the data insertion figure is identifiedPoint;
Obtain the coordinate value of each tracing point of the data band, data band center line analytic equation corresponding to fitting generation.
Further, following operation is also realized when the data insertion application program is executed by processor:
According to the data band center line analytic equation, up-sampled in data band center line, read the data band centerThe Fill Color value of sampled point is corresponded on line;
According to gray value corresponding to the Fill Color value, Wave data is obtained, and generates corresponding waveform.
Further, following operation is also realized when the data insertion application program is executed by processor:
Rule is read according to default, reads and is correspondingly adopted on the waveform of the generation of the fill color color value based on each sampled pointThe bit stream of sampling point;
The bit stream is assembled by preset order during coding, generate original embedding data.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-rowHis property includes, so that process, method, article or system including a series of elements not only include those key elements, andAnd also include the other element being not expressly set out, or also include for this process, method, article or system institute inherentlyKey element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including thisOther identical element also be present in the process of key element, method, article or system.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment sideMethod can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many casesThe former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other wordsGoing out the part of contribution can be embodied in the form of software product, and the computer software product is stored in one as described aboveIn storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone,Computer, server, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hairThe equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skillsArt field, is included within the scope of the present invention.

Claims (10)

CN201710856102.7A2017-09-202017-09-20Data embedding method, method for reading data, device and readable storage medium storing program for executingPendingCN107742145A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710856102.7ACN107742145A (en)2017-09-202017-09-20Data embedding method, method for reading data, device and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710856102.7ACN107742145A (en)2017-09-202017-09-20Data embedding method, method for reading data, device and readable storage medium storing program for executing

Publications (1)

Publication NumberPublication Date
CN107742145Atrue CN107742145A (en)2018-02-27

Family

ID=61236080

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710856102.7APendingCN107742145A (en)2017-09-202017-09-20Data embedding method, method for reading data, device and readable storage medium storing program for executing

Country Status (1)

CountryLink
CN (1)CN107742145A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110991590A (en)*2020-02-272020-04-10长沙像素码科技有限公司Image data processing method and pixel image and application system obtained by same
CN112766937A (en)*2021-04-072021-05-07中国科学院成都文献情报中心Knowledge work organization and processing system and method
WO2021169502A1 (en)*2020-02-272021-09-02Changsha Pixel Code Technology Co. LtdA pixel image as well as its processing method and application system

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101449278A (en)*2003-12-052009-06-03新泽西理工学院System and method for robust reversible data hiding and data recovery in the spatial domain
WO2009122888A1 (en)*2008-03-312009-10-08ブラザー工業株式会社Image data creation device, image data creation method, and computer-readable medium containing image data creation program
CN102087736A (en)*2009-12-082011-06-08北京大学Method and system for implicitly embedding information in official seal image and detecting
CN102147873A (en)*2011-03-212011-08-10上海彩码信息科技有限公司Method and system for generating color code as well as method and system for analyzing color code
CN102799920A (en)*2012-06-282012-11-28王学武Two-dimensional code generation system and method and two-dimensional code identification system and method in combination with image
CN104396225A (en)*2012-07-052015-03-04株式会社东芝Device and method that embed data in object, and device and method that extract embedded data
US20160019538A1 (en)*2014-05-152016-01-21Koobecafe, LlcTransaction Authorization Employing Drag-And-Drop of a Security-Token-Encoded Image

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101449278A (en)*2003-12-052009-06-03新泽西理工学院System and method for robust reversible data hiding and data recovery in the spatial domain
WO2009122888A1 (en)*2008-03-312009-10-08ブラザー工業株式会社Image data creation device, image data creation method, and computer-readable medium containing image data creation program
CN102087736A (en)*2009-12-082011-06-08北京大学Method and system for implicitly embedding information in official seal image and detecting
CN102147873A (en)*2011-03-212011-08-10上海彩码信息科技有限公司Method and system for generating color code as well as method and system for analyzing color code
CN102799920A (en)*2012-06-282012-11-28王学武Two-dimensional code generation system and method and two-dimensional code identification system and method in combination with image
CN104396225A (en)*2012-07-052015-03-04株式会社东芝Device and method that embed data in object, and device and method that extract embedded data
US20160019538A1 (en)*2014-05-152016-01-21Koobecafe, LlcTransaction Authorization Employing Drag-And-Drop of a Security-Token-Encoded Image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110991590A (en)*2020-02-272020-04-10长沙像素码科技有限公司Image data processing method and pixel image and application system obtained by same
WO2021169502A1 (en)*2020-02-272021-09-02Changsha Pixel Code Technology Co. LtdA pixel image as well as its processing method and application system
CN112766937A (en)*2021-04-072021-05-07中国科学院成都文献情报中心Knowledge work organization and processing system and method

Similar Documents

PublicationPublication DateTitle
JP6729868B2 (en) Dot matrix two-dimensional code encoding and recognition method
TWI746882B (en)Two-dimensional barcode, printed publication, generating device, and information processing method
US10878213B2 (en)Two-dimensional code and method, terminal, and apparatus for recognizing two-dimensional code
KR102029727B1 (en) Coding and Reading Method of Dot Matrix QR Codes
US7950589B2 (en)Program, information storage medium, two-dimensional code generation system, image generation system and printed material
JP6623465B2 (en) Dot pattern
CN106022431B (en) Method and device for generating and reading color two-dimensional image code with color identification
KR100905705B1 (en) Computer-readable recording media recording methods, systems and programs for providing electronic notebook services using digital pens and digital papers
CN106372699B (en)It is provided with the object of Quick Response Code, the generation method of Quick Response Code, recognition methods and device
CN108319578B (en)Method for generating medium for data recording
CN107742145A (en)Data embedding method, method for reading data, device and readable storage medium storing program for executing
CN106874819A (en)Can be by sparse horizontal and vertical parity check code control method of handset identity
KR20070036150A (en) Coding and Decoding Data
US20180330211A1 (en)Billboard containing encoded information
US20160373735A1 (en)Method For Encoding Four Bits Color Construct Code
CN111028316A (en)Picture editing method based on mobile terminal and picture editing method across mobile terminals
EP4273741A1 (en)Method for building dot matrix code, method for generating and reading dot matrix code, terminal, and dot matrix code system
CN119047505A (en)Scannable image generation method and system integrating binary digital codes
CN104978592B (en)A kind of color code generating method of two dimension
CN114254719B (en)Anti-counterfeiting two-dimensional code generation method and device
CN101540003B (en)Processing method for realizing multimedia recording and broadcasting with multimedia printed matter
CN105376593B (en)A kind of information processing method, terminal and system
CN108596131A (en)A kind of recognition methods based on dot matrix
Bandyopadhyay et al.An application of palette based steganography
CN108664224A (en)Coding pattern processing method and processing device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20180227

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp