Embodiment
The color overlaid decoding method of one embodiment of the present invention is by chromaticity coordinates and colouring intensity and use superimposing technique to realize the encoding and decoding of communication signal.Communication signal after this coding, using light as transmission medium, provides a kind of selection newly of the mode of intelligence transmission in communication network.
Consulting shown in Fig. 1, is the flow chart of the decode procedure of color overlaid decoding method of the present invention preferred embodiment.
Step S10, utilizes transducer 10 to receive a chrominance signal.In the present embodiment, described chrominance signal is that the communication information that will express carries out encoding obtaining according to a kind of chromaticity coordinates and predetermined superposition demal.Described chrominance signal is a color matrices comprising multiple pixel, and each matrix dot (i.e. each pixel) represents different communication informations by different colors.The color of each matrix dot obtains by carrying out colouring intensity superposition according to superposition demal in chromaticity coordinates.
Specific coding process following (consulting shown in Fig. 2):
First determine to encode the chromaticity coordinates (step S202) that will use to this communication information.Color space has different coordinate describing modes, and now conventional chromaticity coordinates has XYZ, RGB, LUV etc., and had chromaticity coordinates, can determine a point on a chromaticity diagram, this Precise Representation goes out a kind of color.In the present embodiment, RGB(RGB is selected) chromaticity coordinates (consulting shown in Fig. 3) is described for example.In RGB chromaticity coordinates, often kind of color all can represent with three variablees: the intensity (i.e. B coordinate figure) of red intensity (i.e. R coordinate figure), green intensity (i.e. G coordinate figure) and blueness.
Carry out according to RGB chromaticity coordinates the chrominance signal obtained of encoding, only use red, green, blue three kinds of colors, in each pixel, make them according to the mixing of different ratios (colouring intensity), present different colors.Consulting shown in Fig. 4, is the chrominance signal schematic diagram of a kind of simple RGB tri-mixture of colours.Wherein red, green, blue three look all only has 0 and 150 two kind of colouring intensity, and these three kinds of colors mix with wherein any one colouring intensity respectively in each pixel.
Then determine to encode the superposition demal (step S204) that will use to this communication information.Described superposition demal is the digital collection of one group of disassembled identification, and the digital summation of wherein norator set is not equal to any one numeral in set, and the summation of any two subclass is unequal.Such as 1,2,4,8,16,32 ..., 1,3,5,7,17,34 ... etc..Choose arbitrarily y (wherein 0≤y≤i) from i numeral of one group of superposition demal { n (i) }, an intensity coding can be formed.And all numerals in intensity coding are added, the numerical value obtained can be used for representing a coordinate figure in chromaticity coordinates.In the present embodiment, the bit of each the digital corresponding digital coding in superposition demal, such as, superpose demal { four binary digits of the corresponding digital coding 1111 of four numerals 1,2,4,8 difference in 1,2,4,8}.Therefore, namely the intensity coding be made up of y superposition demal may correspond to a digital coding, expresses a kind of communication information.
According to the digital coding of this communication information, each coordinate (R coordinate, G coordinate, B coordinate) for each pixel of chrominance signal is chosen and is superposed demal accordingly, forms the intensity coding (step S206) of each coordinate.Such as, { 1,2,8 three numeral is chosen in 1,2,4,8}, intensity coding { 1,2, the 8} of composition R coordinate from superposition demal.
Again the intensity coding of each coordinate is superposed, obtain each coordinate figure (step S208) of each pixel of chrominance signal.Consulting shown in Fig. 5, is the schematic diagram superposed the intensity coding of the R coordinate of each pixel of chrominance signal.Wherein, the intensity coding of the R coordinate of the first pixel be 2,4,8,16}, the R coordinate figure obtaining the first pixel after superposition is 2+4+8+16=30(and red color intensity is 30); The intensity coding of the R coordinate of the second pixel be 1,2,8}, the R coordinate figure obtaining the second pixel after superposition is 1+2+8=11(and red color intensity is 11), the rest may be inferred.
The last color represented in chromaticity coordinates according to the coordinate figure of each pixel, generates chrominance signal (step S210).
Return Fig. 1, step S12, determine chromaticity coordinates that this chrominance signal is corresponding and superpose demal, namely determine that this chrominance signal carries out encoding obtaining according to which kind of chromaticity coordinates and what group superposition demal.Such as, determine that the chromaticity coordinates that this chrominance signal is corresponding is RGB chromaticity coordinates, superposition demal is { 1,2,4,8,16,32}.In the database that described chromaticity coordinates and superposition demal and the correspondence relationship information of chrominance signal can be stored in advance in recipient or memory, also can be sent to recipient with this chrominance signal.
Step S14, according to the chromaticity coordinates determined, utilizes filter 20 that the chrominance signal received is carried out coordinate decomposition, obtains the coordinate figure of this each pixel of chrominance signal.Such as, filter 20 decomposites the chromaticity coordinates of the first pixel of this chrominance signal for (R:G:B)=(11,62,19).
Step S16, according to the superposition demal determined, each coordinate figure after each pixel of this chrominance signal being decomposed is resolved, and obtains the intensity coding that each coordinate figure is corresponding.Described parsing is the inverse operation each coordinate figure being carried out to intensity coding superposition, namely calculates each coordinate figure and by what group intensity coding is undertaken superposing obtaining respectively.Such as, the R coordinate figure of above-mentioned first pixel is 11=1+2+8, is that namely R coordinate intensity coding is { 1,2,8} by 1,2,8 three numbers pile up gained in superposition demal; The G coordinate figure of above-mentioned first pixel is 62=2+4+8+16+32, is that namely G coordinate intensity coding is { 2,4,8,16,32} by 2,4,8,16,32 5 numbers pile up gained in superposition demal; The B coordinate figure of above-mentioned first pixel is 19=1+2+16, is that namely B coordinate intensity coding is { 1,2,16} by 1,2,16 3 numbers pile up gained in superposition demal.
Step S18, carries out digitlization by the intensity coding of each coordinate of this each pixel of chrominance signal, obtains corresponding digital coding.Such as, when superposition demal is { n (i) }={ 1, 2, 4, during 8}, the digital coding that intensity coding { } is corresponding is 0000, { digital coding that 1} is corresponding is 0001 to intensity coding, { digital coding that 2} is corresponding is 0010 to intensity coding, intensity coding { 1, the digital coding that 2} is corresponding is 0011, { digital coding that 4} is corresponding is 0100 to intensity coding, intensity coding { 1, the digital coding that 4} is corresponding is 0101, intensity coding { 2, the digital coding that 4} is corresponding is 0110, intensity coding { 1, 2, the digital coding that 4} is corresponding is 0111, { digital coding that 8} is corresponding is 1000 to intensity coding, intensity coding { 1, the digital coding that 8} is corresponding is 1001, intensity coding { 2, the digital coding that 8} is corresponding is 1010, intensity coding { 1, 2, the digital coding that 8} is corresponding is 1011, intensity coding { 4, the digital coding that 8} is corresponding is 1100, intensity coding { 1, 4, the digital coding that 8} is corresponding is 1101, intensity coding { 2, 4, the digital coding that 8} is corresponding is 1110, intensity coding { 1, 2, 4, the digital coding that 8} is corresponding is 1111.
Step S20, according to the digital coding obtained, shows the communication information that this chrominance signal is expressed in display 30.
Consulting shown in Fig. 6, is the another kind of manifestation mode of Fig. 1.After chrominance signal 100 is received (step S10) by transducer 10, determine chromaticity coordinates 102 and the superposition demal 110(step S12 of this chrominance signal 100 correspondence).According to chromaticity coordinates 102, utilize filter 20 that chrominance signal 100 is carried out coordinate decomposition (step S14), obtain the R coordinate figure 104 of each pixel of chrominance signal 100, G coordinate figure 106 and B coordinate figure 108.According to superposition demal 110, R coordinate figure 104, G coordinate figure 106 and B coordinate figure 108 after each pixel being decomposed carry out resolving (step S16) respectively, obtain corresponding intensity coding 112,114,116.Digitlization (step S18) is carried out respectively to intensity coding 112,114,116, obtains digital coding 118,120,122.Digital coding 118,120,122 is combined the communication information 124 that have expressed this pixel and comprise.Finally decoded for each pixel of chrominance signal 100 communication information 124 is carried out showing (step S20) in display 30.
From foregoing, the amount of information that chrominance signal comprises can reach (I^M) ^K kind, wherein I=sum (C (i, y), y=0 ~ i)), i is total number of code in superposition demal, and M is the coordinate number (such as RGB chromaticity coordinates is 3) of chromaticity coordinates, and K is that the matrix of chrominance signal counts (i.e. the number of pixel).And if each matrix dot can only be the digitized signal of 0 or 1, the amount of information comprised can only reach 2^K kind.Therefore, through the communication signal of color overlaid coding, the amount of information comprised can greatly be increased.
Above embodiment is only in order to illustrate technical scheme of the present invention and unrestricted, although with reference to preferred embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that, can modify to technical scheme of the present invention or equivalent replacement, and not depart from the spirit and scope of technical solution of the present invention.