CN111147854A - Color-based large-capacity data image coding and decoding method - Google Patents
Color-based large-capacity data image coding and decoding method Download PDFInfo
- Publication number
- CN111147854A CN111147854A CN201911356153.9A CN201911356153A CN111147854A CN 111147854 A CN111147854 A CN 111147854A CN 201911356153 A CN201911356153 A CN 201911356153A CN 111147854 A CN111147854 A CN 111147854A
- Authority
- CN
- China
- Prior art keywords
- color
- data
- line
- pixels
- pixel
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1417—2D bar codes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
Abstract
The invention discloses a color-based large-capacity data image coding and decoding method, which comprises an image coding module: the image coding module converts the data into hexadecimal character strings, then takes every two bits as a data segment, every three data segments as a data unit, each data unit corresponds to a color value, within the range of N X M pixel areas, every X2 pixel areas are taken as a code element, each code element is filled with a color value corresponding to a data unit, thereby forming an encoded area representing N × M/X2 symbols, with the left vertex of the encoded area as a reference point, the reference point being adjacent to two pixels to the left, each pixel drawing a line down, the line having a length of M pixels, the image decoding speed is superior to character recognition, the image decoding speed is between the character recognition speed and the two-dimensional code recognition speed, the data which can be expressed by the coded image is larger than the data capacity of the two-dimensional code under the same resolution, and the data capacity of the former is about 10 times that of the latter.
Description
Technical Field
The invention relates to a data image coding and decoding method in a non-contact visual data transmission process, in particular to a large-capacity data image coding and decoding method based on colors.
Background
For enterprises with high safety requirements, an intranet and an intranet are usually isolated, but data of the intranet needs to be transmitted to the extranet for other systems to use, and some enterprises copy data in an intranet database to the extranet for use through regular data copying; some enterprises send data from an internal network to an external network by deploying a forward isolation device; still other enterprises transmit intranet data to extranets via a contactless visual transmission scheme. The solutions can not ensure the timeliness of data, or have high network construction cost, or can not meet the requirement of real-time transmission of large-capacity data.
In the existing non-contact visual data transmission scheme, such as a data transmission scheme based on character recognition, the recognition speed is slow, and the real-time transmission requirement cannot be met; for example, in a data transmission scheme based on the two-dimensional code, the two-dimensional code has a small capacity and cannot meet the requirement of large-capacity data transmission.
Disclosure of Invention
It is an object of the present invention to provide a color-based large-capacity data image encoding and decoding method to solve the above-mentioned problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme:
a color-based large capacity data image encoding and decoding method, comprising:
an image encoding module: the image coding module converts data into hexadecimal character strings, then takes every two bits as a data segment, every three data segments are a data unit, each data unit corresponds to a color value, in the range of N × M pixel regions, every X2 pixel point regions are taken as a code element, each code element is filled with the color value corresponding to one data unit, thereby forming a coding region for representing N × M/X2 code elements, the left vertex of the coding region is taken as a reference point, the reference point is adjacent to two pixels towards the left, each pixel draws a line downwards, the length of the line is M pixels, and the two lines are respectively filled with two colors of #000000 and # FFFFFF and taken as longitudinal color calibration lines; two adjacent pixels with upward reference points are drawn rightwards by one line with the length of N pixels, the two lines are respectively filled with two colors of #000000 and # FFFFFF to serve as transverse color calibration lines, and finally an encoded image of (N +2) × (M +2) pixels is output;
an image decoding module: the image decoding module firstly determines a coding area according to a color datum line, ensures that a datum point is at the left vertex of an image through turning and correcting the image, takes the difference value between each pixel of a transverse and longitudinal color calibration line and two colors of #000000 and # FFFFFF as a calibration basis, calibrates the color value of a convergent point pixel of each pixel point of the transverse and longitudinal color calibration line in a coding area, reads the colors in code elements one by one from left to right and from top to bottom after the color of the coding area is calibrated, analyzes the RGB color value of each code element, and finally converts the RGB color value into output character string data.
As a further scheme of the invention: the data are converted into hexadecimal numbers, every two bits are used as a data segment, every three data segments are used as a data unit, each data unit corresponds to one color value, each color value is used as the filling color of one code element, and each data unit corresponds to one color value by setting, so that the data can be conveniently read and identified.
As a still further scheme of the invention: and taking the left vertex of the coding area as a reference point, drawing a line downwards for each pixel by using two pixels adjacent to the left of the reference point, wherein the length of the line is M pixels, and the two lines are respectively filled with two colors of #000000 and # FFFFFF to be used as longitudinal color calibration lines.
As a still further scheme of the invention: the left vertex of the coding area is used as a reference point, the reference point is upwards adjacent to two pixels, each pixel draws a line to the right, the length of the line is N pixels, the two lines are respectively filled with two colors of #000000 and # FFFFFF and used as a transverse color calibration line, and the arrangement of the longitudinal color calibration line and the transverse color calibration line is beneficial to improving the data reading speed.
As a still further scheme of the invention: the difference value between each pixel of the transverse and longitudinal color calibration lines and the two colors of #000000 and # FFFFFF is used as a calibration basis, the color value of the convergence point pixel of each pixel point of the transverse and longitudinal color calibration lines in the coding area is calibrated, and the data identification is more accurate by setting the color values corresponding to the transverse and longitudinal color calibration lines.
As a still further scheme of the invention: after the color calibration of the coding region, the colors in the code elements are read one by one in the sequence from left to right and from top to bottom, the RGB color values of each code element are analyzed, the character string data output is finally converted, and the RGB color values of each code element are analyzed, so that the image can be effectively converted into the character string data, and the accuracy is improved.
Compared with the prior art, the invention has the beneficial effects that:
1. the image decoding speed is superior to character recognition, and is between the character recognition speed and the two-dimensional code recognition speed.
2. The data that can be expressed by the coded image is larger than the data capacity of the two-dimensional code under the same resolution, and the data capacity of the former is approximately 10 times that of the latter.
Drawings
FIG. 1 is a flow chart of a color-based large capacity data image encoding and decoding method.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, in an embodiment of the present invention, an image encoding and decoding method for color-based large-capacity data includes: the image coding module converts data into hexadecimal character strings, then takes every two bits as a data segment, every three data segments are a data unit, each data unit corresponds to a color value, in the range of N × M pixel regions, every X2 pixel point regions are taken as a code element, each code element is filled with the color value corresponding to one data unit, thereby forming a coding region for representing N × M/X2 code elements, the left vertex of the coding region is taken as a reference point, the reference point is adjacent to two pixels towards the left, each pixel draws a line downwards, the length of the line is M pixels, and the two lines are respectively filled with two colors of #000000 and # FFFFFF and taken as longitudinal color calibration lines; two adjacent pixels with the upward reference points are drawn to the right by one line, the length of the line is N pixels, the two lines are respectively filled with two colors of #000000 and # FFFFFF to serve as transverse color calibration lines, and finally an encoded image of (N +2) × (M +2) pixels is output, and the image decoding module: the image decoding module firstly determines a coding area according to a color datum line, ensures that a reference point is at the left vertex of an image through turning and correcting the image, takes the difference value between each pixel of a transverse color calibration line and a longitudinal color calibration line and two colors of #000000 and # FFFFFF as a calibration basis, calibrates the color value of the convergence point pixel of each pixel point of the transverse color calibration line and the longitudinal color calibration line in a coding area, reads the colors in code elements one by one from left to right and from top to bottom after the color calibration of the coding area, analyzes the RGB color value of each code element, and finally converts the RGB color value into output character string data.
Through the arranged image coding module and the image decoding module, the data capacity of the two-dimensional code is increased, so that the transmission speed is increased, and the recognition speed is accelerated.
And converting the data into hexadecimal numbers, taking every two bits as a data segment, taking every three data segments as a data unit, wherein each data unit corresponds to a color value, and each color value is used as a filling color of a code element.
And each data unit corresponds to one color value, so that the data can be read and identified conveniently.
And taking the left vertex of the coding area as a reference point, drawing a line downwards for each pixel by using two pixels adjacent to the left of the reference point, wherein the length of the line is M pixels, and the two lines are respectively filled with two colors of #000000 and # FFFFFF to be used as longitudinal color calibration lines.
Two adjacent pixels with the reference point upward draw a line to the right, each pixel having a length of N pixels, and the two lines are filled with two colors #000000, # FFFFFF, respectively, as the horizontal color calibration lines.
The arrangement of the longitudinal color calibration line and the transverse color calibration line is beneficial to improving the reading speed of data.
And (3) taking the difference value between each pixel of the transverse and longitudinal color calibration lines and the two colors of #000000 and # FFFFFF as a calibration basis, and calibrating the color value of the convergent point pixel of each pixel point of the transverse and longitudinal color calibration lines in the coding area.
Through setting up the respective colour value that corresponds of horizontal, vertical colour calibration line for data identification is more accurate.
After the color calibration of the coding region, the colors in the code elements are read one by one in the order from left to right and from top to bottom, the RGB color value of each code element is analyzed, and finally the code elements are converted into output character string data.
By analyzing the RGB color value of each code element, the image can be effectively converted into character string data, and the accuracy is improved.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.
Claims (6)
1. A color-based large capacity data image encoding and decoding method, comprising:
an image encoding module: the image coding module converts data into hexadecimal character strings, then takes every two bits as a data segment, every three data segments are a data unit, each data unit corresponds to a color value, in the range of N × M pixel regions, every X2 pixel point regions are taken as a code element, each code element is filled with the color value corresponding to one data unit, thereby forming a coding region for representing N × M/X2 code elements, the left vertex of the coding region is taken as a reference point, the reference point is adjacent to two pixels towards the left, each pixel draws a line downwards, the length of the line is M pixels, and the two lines are respectively filled with two colors of #000000 and # FFFFFF and taken as longitudinal color calibration lines; two adjacent pixels with upward reference points are drawn rightwards by one line with the length of N pixels, the two lines are respectively filled with two colors of #000000 and # FFFFFF to serve as transverse color calibration lines, and finally an encoded image of (N +2) × (M +2) pixels is output;
an image decoding module: the image decoding module firstly determines a coding area according to a color datum line, ensures that a reference point is at the left vertex of an image through turning and correcting the image, takes the difference value between each pixel of a transverse color calibration line and a longitudinal color calibration line and two colors of #000000 and # FFFFFF as a calibration basis, calibrates the color value of the convergence point pixel of each pixel point of the transverse color calibration line and the longitudinal color calibration line in a coding area, reads the colors in code elements one by one from left to right and from top to bottom after the color calibration of the coding area, analyzes the RGB color value of each code element, and finally converts the RGB color value into output character string data.
2. A color-based large-capacity data image coding and decoding method as claimed in claim 1, wherein the data is converted into hexadecimal number, and every two bits are used as a data segment, every three data segments are used as a data unit, each data unit corresponds to a color value, and each color value is used as a filling color of a symbol.
3. A color-based large-capacity data image coding and decoding method as claimed in claim 1, wherein the left vertex of the coded area is used as a reference point, the reference point is adjacent to two pixels to the left, each pixel draws a line downwards, the line has a length of M pixels, and the two lines are filled with two colors of #000000 and # FFFFFF respectively as the vertical color calibration line.
4. A color-based large-capacity data image coding and decoding method as claimed in claim 1, wherein the left vertex of the coded region is taken as a reference point, the reference point is adjacent to two pixels upward, each pixel draws a line to the right, the line has a length of N pixels, and the two lines are filled with two colors #000000, # FFFFFF, respectively, as the horizontal color calibration lines.
5. The method as claimed in claim 1, wherein the difference between each pixel of the horizontal and vertical color calibration lines and the two colors #000000 and # FFFFFF is used as calibration basis to calibrate the color value of the pixels at the convergence point in the coding region of each pixel of the horizontal and vertical color calibration lines.
6. The method as claimed in claim 1, wherein after the color calibration of the encoding region, the colors in the symbols are read one by one in the order from left to right and top to bottom, and the RGB color values of each symbol are analyzed and finally converted into the output character string data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911356153.9A CN111147854A (en) | 2019-12-25 | 2019-12-25 | Color-based large-capacity data image coding and decoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911356153.9A CN111147854A (en) | 2019-12-25 | 2019-12-25 | Color-based large-capacity data image coding and decoding method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111147854A true CN111147854A (en) | 2020-05-12 |
Family
ID=70519992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911356153.9A Pending CN111147854A (en) | 2019-12-25 | 2019-12-25 | Color-based large-capacity data image coding and decoding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111147854A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111246249A (en) * | 2020-01-18 | 2020-06-05 | 江苏提米智能科技有限公司 | Image encoding method, encoding device, decoding method, decoding device and storage medium |
CN111866512A (en) * | 2020-07-29 | 2020-10-30 | 腾讯科技(深圳)有限公司 | Video decoding method, video encoding method, video decoding apparatus, video encoding apparatus, and storage medium |
CN114330610A (en) * | 2021-12-14 | 2022-04-12 | 厦门纳龙健康科技股份有限公司 | Two-dimensional code video-based efficient data transmission method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104899630A (en) * | 2015-06-18 | 2015-09-09 | 桂林电子科技大学 | Method of encoding/decoding color QR code |
JP2016212059A (en) * | 2015-05-13 | 2016-12-15 | 国立大学法人横浜国立大学 | Quantifying method of stain, and quantifying device of stain |
CN108629391A (en) * | 2018-05-10 | 2018-10-09 | 佛山市博知盾识科技有限公司 | Color code decoding method, system and equipment |
CN109978111A (en) * | 2019-03-13 | 2019-07-05 | 杭州百伴生物技术有限公司 | Matrix two-dimensional code, its generation, coding/decoding method and its equipment |
-
2019
- 2019-12-25 CN CN201911356153.9A patent/CN111147854A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016212059A (en) * | 2015-05-13 | 2016-12-15 | 国立大学法人横浜国立大学 | Quantifying method of stain, and quantifying device of stain |
CN104899630A (en) * | 2015-06-18 | 2015-09-09 | 桂林电子科技大学 | Method of encoding/decoding color QR code |
CN108629391A (en) * | 2018-05-10 | 2018-10-09 | 佛山市博知盾识科技有限公司 | Color code decoding method, system and equipment |
CN109978111A (en) * | 2019-03-13 | 2019-07-05 | 杭州百伴生物技术有限公司 | Matrix two-dimensional code, its generation, coding/decoding method and its equipment |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111246249A (en) * | 2020-01-18 | 2020-06-05 | 江苏提米智能科技有限公司 | Image encoding method, encoding device, decoding method, decoding device and storage medium |
CN111866512A (en) * | 2020-07-29 | 2020-10-30 | 腾讯科技(深圳)有限公司 | Video decoding method, video encoding method, video decoding apparatus, video encoding apparatus, and storage medium |
CN114330610A (en) * | 2021-12-14 | 2022-04-12 | 厦门纳龙健康科技股份有限公司 | Two-dimensional code video-based efficient data transmission method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111147854A (en) | Color-based large-capacity data image coding and decoding method | |
US20220327302A1 (en) | Data matrix code, generating method and device thereof, and decoding method and device thereof | |
CN1681330B (en) | Adaptive 2n-ary tree generating method, and method and apparatus for encoding and decoding 3d volume data using it | |
CN102939754A (en) | Sample region merging | |
CN104134085A (en) | Specific bar code and forming method thereof | |
CN105426945B (en) | Intelligent graphic identifies the coded system and method, decoding system and method for two dimensional code | |
CN103488965B (en) | Waybill typing and colored color lump coding/decoding system | |
CN104618703B (en) | A kind of white balance adjustment method | |
JPH06334870A (en) | Coder | |
CN105279539A (en) | Dot-matrix two-dimensional code coding and decoding | |
CN107730508A (en) | Color documents images multichannel binary processing method | |
CN112541369A (en) | Information code identification method and system | |
CN103353950B (en) | A kind of paper counting method | |
CN106446885A (en) | Paper-based Braille recognition method and system | |
CN109902751B (en) | Dial digital character recognition method integrating convolution neural network and half-word template matching | |
KR100199243B1 (en) | Multidimensional multi-valued color image compression and decompression method | |
CN112215781B (en) | Improved local binarization method | |
CN116664431B (en) | Image processing system and method based on artificial intelligence | |
CN105550750A (en) | Method for improving identification precision of convolutional neural network | |
CN108073963B (en) | Fusion two-dimensional code generation method and device | |
CN105654017B (en) | Two-dimentional decoding transmission method and system | |
CN109543803B (en) | Coding system and decoding system capable of editing primary-secondary color two-dimensional codes | |
JP6004187B2 (en) | Information bulletin board control method, information bulletin board display control apparatus, information bulletin board display control system, and information bulletin board control program | |
JP2005208843A (en) | Information encoding/decoding method, device and code indicator | |
WO2021098111A1 (en) | Method for coded image shaping, device, server, and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200512 |