CN103700120A - Data storage method based on RGB (red green blue) color coding - Google Patents
Data storage method based on RGB (red green blue) color coding Download PDFInfo
- Publication number
- CN103700120A CN103700120A CN201310427524.4A CN201310427524A CN103700120A CN 103700120 A CN103700120 A CN 103700120A CN 201310427524 A CN201310427524 A CN 201310427524A CN 103700120 A CN103700120 A CN 103700120A
- Authority
- CN
- China
- Prior art keywords
- color
- data
- rgb
- binary
- data storage
- 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
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
The invention relates to a data storage method based on RGB (red green blue) color coding. By utilizing an RGB colored image technology, and by the corresponding relation between binary codes of colors and binary codes of file contents, file information is stored. According to the invention, by adopting a three-dimensional layered coding technology, and according to certain rules, the color of a ith layer is specified as Fi(ri,gi,bi), and on any pixel P of the ith layer, there are only two color states, namely Fi(ri,gi,bi) and Fi(0, 0,0); Fi(ri,gi,bi) represents being colored, with the corresponding binary code of 1 and the color code of (ri,gi,bi); Fi(0, 0,0) represents a black color, with the corresponding binary code of 0; the comprehensively superposed color F of any point on a colored image is superposed through any combination of the states of all color layers, and the formula can be found in the Specificaiton; the code of the color F can correspond to the binary codes of corresponding data contents, so that the purpose of recording data is realized. The data can be output by a color printer, or can be conveniently and quickly transmitted through an electronic file and the like; the data storage method is widely applied to the fields of data storage, data transmission, advertisements, information authentication, data encryption, electronic payment and the like.
Description
Technical field
The present invention relates to utilize RGB primaries principle, adopt chpn coding techniques, the binary coding of color is corresponding with fileinfo binary coding, thus realize the method for storage file content.
Background technology
Computer system data is taked binary format at present, only has " 0 " and " 1 " two kinds of forms, and one " 0 " or " 1 " account for one " position ", it is the storage cell of storer minimum, be called bit (bit), 8 bits are called a byte (byte), equal 8 binary digits.Common each numeral, English alphabet will account for a byte, and a Chinese character will account for two bytes.Currently be stored in data on the media such as floppy disk, CD, DVD, hard disk, flash memory, USB flash disk, CF card and all take this pattern to carry out access.
In computer system, any color of occurring in nature all can be added and mix in different ratios by R, G, B three primary colours, and the color of mixing when three primary color components are all 0 is black light; The color of mixing when three primary colours component is all 255 is white light.When adjusting, by the arbitrary coefficient in three chroma brightness coefficient r, g, b, all can change the colour of color F, also change the coding of F.Each color F is corresponding unique r, g, b coefficient, thereby has unique coding.When file binary coding is corresponding with different colours F coding, every kind of color represents certain binary sequence, and some color alignment together, just can realize the object of log file data.
Summary of the invention
The present invention proposes a kind of based on RGB
coloredcoded data storage means: adopt chpn coding techniques, according to certain rule, the color of i layer is appointed as
, on any one the pixel P on i layer, can only there be two kinds of color state, the one,
, it is " 1 " that representative has color, corresponding binary coding, its color coding is
; The 2nd,
, be black, corresponding binary coding is " 0 ".The color F of any point on image, is that the state combination in any by each layer of color is formed by stacking, and counts
.The coding of color F can be corresponding with the binary coding of corresponding data content, thereby reach the object of record data.
For achieving the above object, the scheme of taking is in the present invention:
1) color assignment standard.Suppose that we will take N layer data to store data, consider that every kind of color is comprised of R, G, tri-color components of B.Selected necessary following two conditions that meet of color of every one deck: the one, the coding of each layer of color must be different, and the 2nd, each layer of color that color combination in any mode superposes and makes new advances, different.So we adopt M position coloud coding to represent, M bit binary data is described, and M is greater than or equals N.
We select the binary-coded rule of color as follows:
The 1st kind of color: 00 ... 000 ... 001
The 2nd kind of color: 00 ... 000 ... 010
The 3rd kind of color: 00 ... 000 ... 100
……
N-1 kind color: 00 ... 001 ... 000
N kind color: 00 ... 010 ... 000
N+1 kind color: 00 ... 100 ... 000
……
M-1 kind color: 01 ... 000 ... 000
M kind color: 10 ... 000 ... 000
For storing every one deck of data, can choose a kind of color as this layer from above colour sequential, or when N is less than M, select several color combination of above sequence to form, but in above-mentioned sequence, color only can be used once.Because each pixel P of every one deck can only have two states, a kind of is complete " 0 " black, and another kind is exactly the selected look of this layer, respectively corresponding coding " 0 " and " 1 ".
Take above principle, the coding of the color of N layer is added arbitrarily, can not produce carry, so different array modes can only generate different codings, and then presents different colors.Above colour sequential can be upset or adjust, but every kind of color can only occur once.
2) file on computing machine, is all with binary mode, to be recorded on the media such as disk, internal memory, CD, on file symbol, character, numeral, Chinese character etc. all convert " 0 " to or record " 1 ".By computer documents, with N position, binary sequence is cut apart, every N binary digit is as a unit, and not enough N position is with 0 polishing, and the coding of the just corresponding color in the unit of each N position, presents a kind of color of correspondence with it like this.
3) a pixel P in each unit correspondence image, when some unit are arranged together, has just formed a width N position coloured image, has so just realized computer documents information recording on coloured image.
The invention has the beneficial effects as follows: utilize coloured image, by the binary coding of different colours, to enter mechanism corresponding with document content information two, thereby realize, fileinfo is recorded in coloured image.The present invention can export with color printer, also can realize the convenient propagation of data by modes such as e-files, is widely used in the fields such as data storage and propagation, advertisement, authentification of message, data encryption, E-Payment.
Accompanying drawing explanation
Fig. 1, the binary format of file.
Fig. 2, rgb true color hierarchical coding schematic diagram.
Embodiment
Transparency component, and RGB component still only accounts for 24), M equals 24. our hypothesis and will, by the file taking up room on computer disk as 15k size, be stored in a width coloured image.
The color value sequence of 24 true color is:
1:00000000 00000000 00000001
2:00000000 00000000 00000010
……
23:01000000 00000000 00000000
24:10000000 00000000 00000000
Example one, employing 24 layer data pictures storages
Adopt 24 layer data storages, N equals 24, any one color in the desirable above colour sequential of color of every one deck, and can only choose unique a kind of color.Its array mode can only have a kind of.
First, we need to calculate the size of this file required image of storage.
15k is converted to bit unit:
15kХ1024bit/k=15360bit
Owing to having adopted 24 layer data storages, the color that pixel P represents is comprehensively formed by stacking by 24 layers of different colours, and a pixel can record the long data of 24 bit, so the number of pixels that will store the large small documents of 15k and at least need is:
15360bit/24bit=640 pixel
So we can adopt 24 true color images of rectangle of 20*32 pixel to store.
The second, open the above file that will store, the binary sequence of this document is cut apart by one group of every 24 bit, correspondence pixel in image lists successively, and each pixel records the data of 24 bits.So just by the content record of file in 24 layer data of 24 true color of a width 20*32 pixel.
Example two, employing 8 layer data pictures storages
Adopt 8 layer data storages, N equals 8, any one color in the desirable above colour sequential of color of every one deck, and can only choose unique a kind of color.Its array mode has 735471(
) plant.
First, we need to calculate the size of this file required image of storage.
15k is converted to bit unit:
15kХ1024bit/k=15360bit
Owing to having adopted 8 layer data storages, the color that pixel P represents is comprehensively formed by stacking by 8 layers of different colours, a pixel can record the long data of 8 bit, because 24 coloured images have 24, thus not enough 16 layers can take number of pixels that the large small documents of " 0 " polishing occupy-place storage 15k at least needs as:
15360bit/8bit=1920 pixel
So we can adopt 24 true color images of rectangle of 60*32 pixel to store.
Second, open the above file that will store, the binary sequence of this document is cut apart by one group of every 8 bit, increase in the back 16 " 0 " and carry out occupy-place simultaneously, form a unit successively corresponding in image pixel list, each pixel records the data of 8 bits.So just by the content record of file in 8 layer data of 24 true color of a width 60*32 pixel.
The present invention utilizes RGB coloured image hierarchical coding technology, file is divided into a pair of ordered series of numbers according to the figure place of color, the binary coding of the corresponding color of each element, is recorded in fileinfo in coloured image thereby realize, and has realized the visual storage of file.
Claims (2)
1. one kind based on RGB
coloredcoded data storage means, is characterized in that:
1) utilize M position RGB coloured image storage data, color solid coding principle can be stored in data respectively on N layer, N must be less than or equal to M;
2) the binary-coded rule of color is as follows:
The 1st kind of color: 00 ... 000 ... 001
The 2nd kind of color: 00 ... 000 ... 010
The 3rd kind of color: 00 ... 000 ... 100
……
N-1 kind color: 00 ... 001 ... 000
N kind color: 00 ... 010 ... 000
N+1 kind color: 00 ... 100 ... 000
……
M-1 kind color: 01 ... 000 ... 000
M kind color: 10 ... 000 ... 000
3) color of every layer can be selected arbitrarily a kind ofly in above colour sequential, or when N is less than M, also can chooses several color combination of above colour sequential and form, but color in above-mentioned sequence only can be used once; The color of guaranteeing every layer is different, and the binary coding of any two-layer color is added and can produce carry, the binary coding sum of different its colors of combination simultaneously
different;
4) utilizing file on the RGB color image storage computing machine of M position, is first that N is cut apart to the data of its binary format by length, when N is less than M; after each cell encoding, increase M-N position " 0 " occupy-place; be combined into a new unit, all unit are sequentially arranged in once, form a sequence; A pixel P on the corresponding coloured image in each unit, writes aforementioned sequence in each pixel in image successively.
2. a kind of based on RGB according to claim 1
coloredcoded data storage means, is characterized in that: described M and N are greater than 0 integer, and wherein M is more than or equal to N.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310427524.4A CN103700120A (en) | 2013-09-19 | 2013-09-19 | Data storage method based on RGB (red green blue) color coding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310427524.4A CN103700120A (en) | 2013-09-19 | 2013-09-19 | Data storage method based on RGB (red green blue) color coding |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103700120A true CN103700120A (en) | 2014-04-02 |
Family
ID=50361638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310427524.4A Pending CN103700120A (en) | 2013-09-19 | 2013-09-19 | Data storage method based on RGB (red green blue) color coding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103700120A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113765650A (en) * | 2020-10-15 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Data encryption and decryption method and device, electronic equipment and storage medium |
CN113878864A (en) * | 2021-08-25 | 2022-01-04 | 青岛理工大学 | Color coding method and 3D printing device |
CN114079765A (en) * | 2021-11-17 | 2022-02-22 | 京东方科技集团股份有限公司 | Image display method, device and system |
-
2013
- 2013-09-19 CN CN201310427524.4A patent/CN103700120A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113765650A (en) * | 2020-10-15 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Data encryption and decryption method and device, electronic equipment and storage medium |
CN113878864A (en) * | 2021-08-25 | 2022-01-04 | 青岛理工大学 | Color coding method and 3D printing device |
CN113878864B (en) * | 2021-08-25 | 2024-04-30 | 青岛理工大学 | Color coding method and 3D printing device |
CN114079765A (en) * | 2021-11-17 | 2022-02-22 | 京东方科技集团股份有限公司 | Image display method, device and system |
CN114079765B (en) * | 2021-11-17 | 2024-05-28 | 京东方科技集团股份有限公司 | Image display method, device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102103463B (en) | Processing method and equipment of user interface information with transparency | |
WO2020181592A1 (en) | Matrix qr code, generating method and device therefor and decoding method and device therefor | |
Wang et al. | On general construction for extended visual cryptography schemes | |
CN101766018B (en) | Method for describing an actual color gamut of a color device or of a color content | |
CN101340587A (en) | Method for encoding input image, method and apparatus for displaying an encoded image | |
CN104657768A (en) | Colorful three-dimensional code structure and colorful three-dimensional code reading method | |
CN106573472A (en) | Transform map at printer cartridge | |
CN103700120A (en) | Data storage method based on RGB (red green blue) color coding | |
CN112001467B (en) | Commodity anti-counterfeiting code generation and identification method based on picture encryption and decryption | |
CN104794518A (en) | Color two-dimension code generating method and device | |
CN115604401B (en) | Traceable electronic seal encryption method | |
CN104778440A (en) | Color two-dimension code recognition method and recognition device | |
CN105847619A (en) | Method of compression for color plane of digital images and computing device | |
CN105046306A (en) | Method for encoding color multi-dimensional codes containing information of variety of biological characteristics | |
CN101459854B (en) | Encoding/decoding apparatus for picture compression and encoding/decoding method therefor | |
Bandyopadhyay et al. | An alternative approach of steganography using reference image | |
CN105160378A (en) | Color invisible image code generating method | |
CN104573781A (en) | Encoding and decoding method of two-dimensional code | |
Pande et al. | Visual cryptography schemes using compressed random shares | |
Ji et al. | Image encryption schemes for JPEG and GIF formats based on 3D baker with compound chaotic sequence generator | |
WO2022131965A1 (en) | Method for encoding and decoding digital information in the form of a multidimensional nano-barcode | |
Zhang et al. | Visual Cryptography for General Access Structure Using Pixel-block Aware Encoding. | |
CN105930890B (en) | A kind of multidimensional coloured silk code label generating method based on magic square Encryption Algorithm | |
US20160373735A1 (en) | Method For Encoding Four Bits Color Construct Code | |
CN105359548A (en) | Method and system for providing information from print |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140402 |
|
WD01 | Invention patent application deemed withdrawn after publication |