CN110855990B - Image encoding method, image decoding method, computer device, and image processing system - Google Patents

Image encoding method, image decoding method, computer device, and image processing system Download PDF

Info

Publication number
CN110855990B
CN110855990B CN201911200463.1A CN201911200463A CN110855990B CN 110855990 B CN110855990 B CN 110855990B CN 201911200463 A CN201911200463 A CN 201911200463A CN 110855990 B CN110855990 B CN 110855990B
Authority
CN
China
Prior art keywords
image data
image
data block
data vector
data
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.)
Active
Application number
CN201911200463.1A
Other languages
Chinese (zh)
Other versions
CN110855990A (en
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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN201911200463.1A priority Critical patent/CN110855990B/en
Publication of CN110855990A publication Critical patent/CN110855990A/en
Application granted granted Critical
Publication of CN110855990B publication Critical patent/CN110855990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods 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/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Abstract

The invention relates to an image encoding method, an image decoding method, a computer device and an image processing system. The image encoding method includes: acquiring a first image data vector, wherein the first image data vector comprises N elements, the first image data vector comprises M bit pairs, and the M bit pairs are used for expressing K colors; k is a positive integer less than M; encoding the first image data vector to obtain a second image data vector; the second image data vector comprises N elements, the second image data vector comprises K bit pairs, and the K bit pairs are used for representing K colors; dividing N elements in the second image data vector into L first data blocks, and compressing and coding the first data blocks into the second data blocks to obtain a third image data vector, wherein the third image data vector comprises L second data blocks; the length of the second data block is smaller than the length of the first data block. According to the embodiments of the present invention, the data amount of image data can be reduced by encoding.

Description

Image encoding method, image decoding method, computer device, and image processing system
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image encoding method, an image decoding method, a computer device, and an image processing system.
Background
The electronic ink screen is used more and more in intelligent hardware products, and is used more and more frequently especially in some low-power application scenes which have static display requirements and are not updated frequently. The three-color electronic ink screen includes three colors, such as white, red, black, or white, yellow, black, but not limited to the above color matching schemes. For example, with W, G, B for each of the three colors, the color coding rules for a three-color electronic ink screen are as follows: 00 denotes W, 01 and 10 both denote G, and 11 denotes B. Where 00, 11 each represent a color, 01, 10 represent the same color, and there is redundancy in the coding rules. Therefore, how to reduce the data transmission amount and the power consumption in the data transmission process in the image data transmission process of the three-color electronic ink screen is a problem to be solved.
Disclosure of Invention
The invention provides an image encoding method, an image decoding method, a computer device and an image processing system, which aim to solve the defects in the related art.
According to a first aspect of embodiments of the present invention, there is provided an image encoding method including:
obtaining a first image data vector, wherein the first image data vector comprises N elements, the first image data vector comprises M bit pairs, and the M bit pairs are used for representing K colors; n is a positive integer, and K is a positive integer less than M;
encoding the first image data vector to obtain a second image data vector; the second image data vector comprises N elements, the second image data vector comprises K bit pairs, the K bit pairs being used to represent K colors;
dividing N elements in the second image data vector into L first data blocks, wherein the length of each first data block is the same; l is a positive integer;
compressing and encoding the first data block into a second data block to obtain a third image data vector, wherein the third image data vector comprises L second data blocks; the length of each second data block is the same, and the length of the second data block is smaller than that of the first data block.
In one embodiment, the element is one byte, M is 4, and K is 3.
In one embodiment, said encoding said first image data vector to obtain a second image data vector comprises:
encoding the nth element in the first image data vector according to the following encoding rule to obtain the nth element in the second image data vector:
cx+1cx=bx+1+bx
where N is 1, 2, … …, or N, and the nth element in the first image data vector is Bn,Bn=b7b6b5b4b3b2b1b0The nth element in the second image data vector is Cn,Cn=c7c6c5c4c3c2c1c0,bxIs represented by BnX-th bit of (1), cxIs represented by CnThe x-th bit in (1) is 0,2, 4 or 6.
In one embodiment, the first data block is 5 bytes long and the second data block is 4 bytes long.
In one embodiment, the compression encoding the first data block into the second data block includes:
performing compression coding on the first data block according to the following coding rule to obtain the second data block:
D(7:0)=34*c9c8+33*c7c6+32*c5c4+31*c3c2+30*c1c0
wherein D (7:0) is a second data block, and D (7:0) ═ D7d6d5d4d3d2d1d0C (9:0) is a first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0
According to a second aspect of the embodiments of the present invention, there is provided an image decoding method including:
dividing elements in a third image data vector into L second data blocks, wherein the length of each second data block is the same; l is a positive integer;
decompressing and coding the second data block into a first data block to obtain a second image data vector, wherein the length of each first data block is the same, and the length of the second data block is smaller than that of the first data block; the second image data vector comprises N elements; n is a positive integer, the second image data vector comprises K bit pairs, the K bit pairs being for representing K colors;
decoding the second image data vector to obtain a first image data vector; the first image data vector comprises N elements, the first image data vector comprises M types of bit pairs, and the M types of bit pairs are used for representing K colors; k is a positive integer less than M.
In one embodiment, the element is one byte, M is 4, K is 3, the length of the first data block is 5 bytes, and the length of the second data block is 4 bytes.
In one embodiment, the decompressing and encoding the second data block into the first data block to obtain the second image data vector includes:
decompressing and coding the second data block according to the following decoding rule to obtain the first data block:
c1c0=D(7:0)%3,c3c2=(D(7:0)%32)/3,c5c4=(D(7:0)%33)/32,c7c6=(D(7:0)%34)/33,c9c8=(D(7:0)%35)/34
wherein D (7:0) is the second data block, and D (7:0) ═ D7d6d5d4d3d2d1d0C (9:0) is the first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0% is the remainder operator,/is the rounding operator.
In one embodiment, said decoding said second image data vector to obtain a first image data vector comprises:
decoding the first data block according to the following decoding rule to obtain the first image data vector:
bx+1bx=cx+1cx+cx+1
wherein the first image data vector comprises L third data blocks, the length of the third data blocks is equal to the length of the first data blocks, the third data blocks are B '(9: 0), and B' (9:0) is B ═ B9b8b7b6b5b4b3b2b1b0C (9:0) is a first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0,bxDenotes the x-th bit, c, in B' (9:0)xRepresents the x-th bit in C (9:0), and the value of x is 0,2, 4, 6 or 8.
According to a third aspect of embodiments of the present invention, there is provided a computer device comprising a processor and a memory; the memory for storing a computer program; the processor is configured to execute the computer program stored in the memory to implement the method steps of the first aspect or the second aspect.
According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, performs the method steps of the first or second aspect described above.
According to a fifth aspect of an embodiment of the present invention, there is provided an image processing system including an image encoding device and an image decoding device;
the image encoding apparatus includes a processor and a memory; the memory for storing a computer program; the processor is configured to execute the computer program stored in the memory to implement the method steps of the first aspect;
the image decoding apparatus includes a processor and a memory; the memory for storing a computer program; the processor is configured to execute the computer program stored in the memory to implement the method steps of the second aspect.
According to the above embodiment, the second image data vector is obtained by encoding the first image data vector, since the first image data vector includes M types of bit pairs for representing K colors, the second image data vector includes K types of bit pairs for representing K colors, and K is a positive integer smaller than M, redundant information is reduced, and the third image data vector is obtained by dividing N elements in the second image data vector into L first data blocks and compression-encoding each first data block into a corresponding second data block, and the length of the second data block is smaller than that of the first data block, so that the data amount of the third image data vector is smaller than that of the first image data vector. Therefore, the data volume of the image data can be reduced through encoding, the image data receiving and transmitting time can be effectively shortened, and the power consumption in the image data transmission process can be reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating an image encoding method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a bitstream data structure according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating another bitstream data structure according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating another bitstream data structure according to an embodiment of the present invention;
FIG. 5 is a schematic diagram showing a comparison of bitstream data before and after encoding according to an embodiment of the present invention;
FIG. 6 is a flow chart illustrating an image decoding method according to an embodiment of the present invention;
FIG. 7 is a block diagram illustrating a computer device according to an embodiment of the present invention;
FIG. 8 is a block diagram illustrating another computer device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a diagram illustrating an image encoding method according to an embodiment of the present invention. The image coding method can be applied to computer equipment with an electronic ink screen, wherein the computer equipment can be an electronic book reader, an electronic tag, a smart phone, a tablet computer, a personal computer or a server and the like. The image coding method, as shown in FIG. 1, may include the following steps 101-104:
in step 101, obtaining a first image data vector, where the first image data vector includes N elements, the first image data vector includes M types of bit pairs, and the M types of bit pairs are used to represent K colors; n is a positive integer, and K is a positive integer less than M.
In one embodiment, the electronic ink screen may be a three-color electronic ink screen. The three-color electronic ink screen can display three colors. Data for an image displayed by a three-color electronic ink screen may be represented by a first image data Vector comprising N elements. Each element may be an integer number between 0 and 255.
In one embodiment, one element is one byte. One element may be stored as an 8bits binary number.
In one embodiment, M is 4 and K is 3. That is, the first image data vector comprises 4 types of bit pairs, e.g. the 4 types of bit pairs comprise a first type of bit pair 00, a second type of bit pair 01, a third type of bit pair 10 and a fourth type of bit pair 11.
In one embodiment, the displayed image of the three-color electronic ink screen includes pixels of 3 colors. The 3 colors are represented by W, G, B, respectively, where W is represented by a first type bit pair 00, G is represented by a second type bit pair 01 and a third type bit pair 10, and B is represented by a fourth type bit pair 11.
In one embodiment, assuming that the resolution of the displayed image of the three-color electronic ink screen is X × Y and each pixel in the image is represented by 2bits, the number of elements N of the first image data Vector is X × Y2/8. It should be noted that the first image data Vector may be a one-dimensional Vector, but is not limited thereto.
In step 102, encoding a first image data vector to obtain a second image data vector; the second image data vector comprises N elements, the second image data vector comprising K bit pairs, the K bit pairs being for representing K colors.
In one embodiment, the second image data vector comprises 3 types of bit pairs, which may be a first type of bit pair 00, a second type of bit pair 01, and a third type of bit pair 10, respectively. W is represented by a first type bit pair 00, G is represented by a second type bit pair 01, and B is represented by a third type bit pair 10.
In one embodiment, the nth element in the first image data vector may be encoded according to the encoding rule shown in the following formula (1), to obtain the nth element in the second image data vector:
cx+1cx=bx+1+bx (1)
wherein N is 1, 2, … …, or N. The nth element in the first image data vector is Bn,Bn=b7b6b5b4b3b2b1b0The nth element in the second image data vector is Cn,Cn=c7c6c5c4c3c2c1c0,bxIs represented by BnX-th bit of (1), cxIs represented by CnThe x-th bit in (1), wherein x is a natural number, and the value of x is 0,2, 4 or 6. For example, when x is 0, c1c0=b1+b0(ii) a When x is 6, c7c6=b7+b6
For data representation of W, G, B three colors, the correspondence between before and after encoding is shown in table 1 below:
TABLE 1
Colour(s) Before coding After being coded
W 00 00
G 01 01
G 10 01
B 11 10
After encoding, each color still adopts 2-bit binary number representation, and the encoding of each color only exists in one form, namely 00 represents W color, 01 represents G color and 10 represents B color. After encoding, 11 does not represent any color.
And (2) regarding N bytes in the first image data vector as 8N bit stream data, taking every 10 bits as a group, and encoding according to the encoding rule shown in the formula (1) to obtain the 8N bit stream data in the second image data vector. For example, take B (9:0) ═ B in the first image data vector9b8b7b6b5b4b3b2b1b0And B (9:0) is encoded according to the encoding rule shown in equation (1), and then C (9:0) in the second image data vector can be obtained, where C (9:0) is C9c8c7c6c5c4c3c2c1c0. For the bitstream data of B (9:0), see fig. 2, and for the bitstream data of C (9:0), see fig. 3.
After the encoding, the second image data vector also comprises N elements, so that effective information is not lost in the transcoding process, and the data length is not changed.
It should be noted that, when the color coding rule of the three-color electronic ink screen is not "00 represents W, 01 and 10 represent G, and 11 represents B", the nth element in the first image data vector may not be coded according to the coding rule shown in formula (1), and the nth element in the second image data vector is obtained, but is coded by using other coding rules.
In step 103, dividing N elements in the second image data vector into L first data blocks, wherein the length of each first data block is the same; l is a positive integer.
In one embodiment, the first data block is 5 bytes in length. In this embodiment, N elements in the second image data vector may be equally divided into L first data blocks, each of which has a length of 5 bytes.
In step 104, compression-coding the first data block into a second data block to obtain a third image data vector, wherein the third image data vector comprises L second data blocks; the length of each second data block is the same, and the length of the second data block is smaller than that of the first data block.
In one embodiment, the second data block is 4 bytes in length. That is, each first data block is compression encoded into a corresponding second data block. For example, a first data block of 5 bytes may be compression encoded into a corresponding second data block of 4 bytes.
In one embodiment, each first data block may be compression-encoded according to an encoding rule as shown in the following formula (2), to obtain a corresponding second data block:
D(7:0)=34*c9c8+33*c7c6+32*c5c4+31*c3c2+30*c1c0 (2)
wherein D (7:0) is a second data block, and D (7:0) ═ D7d6d5d4d3d2d1d0C (9:0) is a first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0. D (7:0) is shown in FIG. 4.
Note that, for ease of understanding, each first data block is denoted as C (9:0), and C (9:0) ═ C in the foregoing description9c8c7c6c5c4c3c2c1c0The corresponding second data block is denoted as D (7:0), D (7:0) ═ D7d6d5d4d3d2d1d0
Of course, in practical applications, the first data block is not necessarily represented by C (9:0), for example, the second image data vector starts from 0bit, the first data block is represented by C (9:0), and C (9:0) ═ C9c8c7c6c5c4c3c2c1c0The second first data block is denoted as C (19:10), and C (19:10) ═ C19c18c17c16c15c14c13c12c11c00The third first data block is denoted as C (29:20), and C (29:20) ═ C29c28c27c26c25c24c23c22c21c20. Similarly, the second data blocks are not necessarily all represented by D (7:0), for example, starting from 0 bits in the third image data vector, the first second data block is represented by D (7:0), and D (7:0) ═ D7d6d5d4d3d2d1d0The second data block is denoted as D (15:8), D (15:8) ═ D15d14d13d12d11d10d9d8The third second data block is denoted as D (23:16), and D (23:16) ═ D23d22d21d20d19d18d17d16. The first data block C (9:0) is compressed and encoded into a second data block D (7:0), the first data block C (19:10) is compressed and encoded into a second data block D (15:8), and the first data block C (29:20) is compressed and encoded into a second data block D (23: 16).
It should be noted that, when the color coding rule of the three-color electronic ink screen is not "00 represents W, 01 and 10 represent G, and 11 represents B", each first data block may not be compression-coded according to the coding rule shown in formula (2) to obtain a corresponding second data block, but may be coded by using another compression coding rule.
Through steps 101-104, the first image data vector can be compressed into a third image data vector. For example, as shown in FIG. 5, when the first image data vector is B (39:0), the third image data vector may be D (31: 0). For convenience of description, the fourth data block in the first image data vector is sequentially represented as B starting from 0bit1、B2、B3、B4、B5And each fourth data block is 10 bits. The second data block in the third image data vector is marked as D in sequence from 0bit1、D2、C3、D4And each second data block is 8 bits.
With the above encoding method, every 5 bytes in the first image data vector can be compressed and encoded into 4 bytes, as shown in fig. 5, the consecutive 5 bytes in the first image data vector are divided into a group, which is represented by binary number, and from the lowest bit, every 10 bits can be converted into a compressed and encoded byte, and the original data B1、B2、B3、B4、B5Can be converted into compressed data D1、D2、D3、D4
The compression-encoded data D (7:0) and the compression-encoded data B (9:0) contain the same image information. D (7:0) has a value in the range of [0,242], and D (7:0) is an 8-bit binary number, and the value in the range of [0,255] of the 8-bit binary number is sufficient to cover the information represented by the first image data vector before the above compression encoding. Therefore, the data information represented by the coding method is not lost, the compression ratio is 1.25, and the data volume in the image transmission process can be effectively reduced. The coding method is applied to the low-power-consumption intelligent terminal, can effectively shorten the time of receiving and sending data by the wireless terminal, reduces the power consumption in the data transmission process, and has important use value.
In this embodiment, a second image data vector is obtained by encoding a first image data vector, since the first image data vector includes M types of bit pairs for representing K colors, the second image data vector includes K types of bit pairs for representing K colors, and K is a positive integer smaller than M, redundant information is reduced, and a third image data vector is obtained by dividing N elements in the second image data vector into L first data blocks and compression-encoding each first data block into a corresponding second data block, and the length of the second data block is smaller than that of the first data block, and thus, the data amount of the third image data vector is smaller than that of the first image data vector. Therefore, the data volume of the image data can be reduced through encoding, the image data receiving and transmitting time can be effectively shortened, and the power consumption in the image data transmission process can be reduced.
The embodiment of the invention also provides an image decoding method. Corresponding to the image encoding method described in the embodiment shown in fig. 1. As shown in FIG. 6, the image decoding method includes the following steps 601-603:
in step 601, dividing elements in the third image data vector into L second data blocks, wherein the length of each second data block is the same; l is a positive integer.
In one embodiment, each second data block is 4 bytes in length. In this embodiment, the bitstream data of the third image data vector may be equally divided into several second data blocks.
In step 602, decompressing and encoding the second data block into the first data block to obtain a second image data vector, where the length of each first data block is the same, and the length of the second data block is smaller than the length of the first data block; the second image data vector comprises N elements; n is a positive integer, the second image data vector comprises K pairs of bits, the K pairs of bits being for representing K colors.
In one embodiment, each element is one byte, K is 3, and the first data block is 5 bytes in length.
In one embodiment, each second data block is decompressed and encoded according to a decoding rule as shown in the following formula (3), so as to obtain a corresponding first data block:
c1c0=D(7:0)%3,
c3c2=(D(7:0)%32)/3,
c5c4=(D(7:0)%33)/32
c7c6=(D(7:0)%34)/33
c9c8=(D(7:0)%35)/34, (3)
wherein D (7:0) is a second data block, and D (7:0) ═ D7d6d5d4d3d2d1d0C (9:0) is a first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0% is the remainder operator,/is the rounding operator.
According to the decoding rule, each second data block can be decoded, so that the corresponding first data block is obtained. That is, D (7:0) can be decoded to obtain C (9:0), where D (7:0) ═ D7d6d5d4d3d2d1d0,C(9:0)=c9c8c7c6c5c4c3c2c1c0
It should be noted that, when the color coding rule of the three-color electronic ink screen is not "00 represents W, 01 and 10 both represent G, and 11 represents B", each second data block may not be decompressed and coded according to the decoding rule shown in formula (3) to obtain the corresponding first data block, but may be decoded by using another decoding rule.
In step 603, decoding the second image data vector to obtain a first image data vector; the first image data vector comprises N elements, the first image data vector comprises M bit pairs, and the M bit pairs are used for representing K colors; k is a positive integer less than M.
In one embodiment, M is 4. In this embodiment, 4 types of bit pairs may be used to represent 3 colors.
In one embodiment, each first data block is decoded according to a decoding rule as shown in the following formula (4), and the first image data vector is obtained:
bx+1bx=cx+1cx+cx+1 (4)
wherein the first image data vector comprises L third data blocks, the length of the third data blocks is equal to the length of the first data blocks, the third data blocks are B '(9: 0), and B' (9:0) ═ B9b8b7b6b5b4b3b2b1b0C (9:0) is a first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0,bxDenotes the x-th bit, c, in B' (9:0)xRepresents the x-th bit in C (9:0), wherein x is a natural number and is 0,2, 4, 6 or 8.
When x is 0, b1b0=c1c0+c1
When x is 2, b3b2=c3c2+c3
When x is 4, b5b4=c5c4+c5
When x is 6, b7b6=c7c6+c7
When x is 8, b9b8=c9c8+c9
In one embodiment, a first data block C (9:0) is decoded according to the decoding rule shown in equation (4), and a corresponding third data block B '(9: 0) can be obtained, where B' (9:0) ═ B9b8b7b6b5b4b3b2b1b0. B' (9:0) and B (9:0) have the same data valid information.
It should be noted that, when the color coding rule of the three-color electronic ink screen is not "00 represents W, 01 and 10 both represent G, and 11 represents B", each first data block may not be decoded according to the decoding rule shown in equation (4) to obtain the first image data vector, but may be decoded by using another decoding rule.
The image decoding method in this embodiment is used in cooperation with the image encoding method, and can decode data after data reception is completed, restore original image information, and reduce data transmission amount.
FIG. 7 is a block diagram illustrating a computer device in accordance with an example embodiment. For example, device 1000 may be provided as an electronic book reader. Referring to fig. 7, device 1000 includes a processing component 1022 that further includes one or more processors and memory resources, represented by memory 1032, for storing instructions, such as applications, that are executable by processing component 1022. The application programs stored in memory 1032 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1022 is configured to execute instructions to perform the image encoding method described above.
The device 1000 may also include a power supply component 1026 configured to perform power management for the device 1000, a wired or wireless network interface 1050 configured to connect the device 1000 to a network, and an input/output (I/O) interface 1058. The device 1000 may operate based on an operating system stored in memory 1032, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 1032 comprising instructions, executable by the processing component 1022 of the device 1000 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The embodiment of the invention also provides computer equipment. Referring to FIG. 8, device 1100 includes a processing component 1122 that further includes one or more processors and memory resources, represented by memory 1132, for storing instructions, such as application programs, that are executable by processing component 1122. The application programs stored in memory 1132 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1122 is configured to execute instructions to perform the image decoding method described in fig. 2 or fig. 3.
The device 1100 may also include a power component 1126 configured to perform power management for the device 1100, a wired or wireless network interface 1150 configured to connect the device 1100 to a network, and an input/output (I/O) interface 1158. The device 1100 may operate based on an operating system stored in memory 1132, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided that includes instructions, such as memory 1132, that are executable by processing component 1122 of device 1100 to perform the above-described method. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
An embodiment of the present invention further provides an image processing system including an image encoding apparatus and an image decoding apparatus. The image encoding apparatus may be a computer device as shown in fig. 7, and the image decoding apparatus may be a computer device as shown in fig. 8.
In one embodiment, the image encoding device and the image decoding device may be wirelessly connected.
In the embodiment of the invention, before the image data is transmitted, the image coding device can compress and code the data of the original image, after the data is received, the image decoding device can decode the received data, restore the data of the original image, reduce the data transmission amount, effectively shorten the time of receiving and transmitting the data by the wireless terminal and reduce the power consumption in the data transmission process.
The specific manner in which the processor performs the operations with respect to the apparatus in the above-described embodiment has been described in detail in relation to the embodiment of the method, and will not be elaborated upon here.
In the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The term "plurality" means two or more unless expressly limited otherwise.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (8)

1. An image encoding method, comprising:
obtaining a first image data vector, wherein the first image data vector comprises N elements, the first image data vector comprises M bit pairs, and the M bit pairs are used for representing K colors; n is a positive integer, and K is a positive integer less than M; the image data vector is used for representing data of an image, is a one-dimensional vector, and comprises one byte;
encoding the first image data vector to obtain a second image data vector; the second image data vector comprises N elements, the second image data vector comprises K bit pairs, the K bit pairs being used to represent K colors;
dividing N elements in the second image data vector into L first data blocks, wherein the length of each first data block is the same; l is a positive integer;
compressing and encoding the first data block into a second data block to obtain a third image data vector, wherein the third image data vector comprises L second data blocks; the length of each second data block is the same, and the length of the second data block is smaller than that of the first data block;
the length of the first data block is 10 bits, and the length of the second data block is 8 bits;
the compression encoding of the first data block into a second data block comprises:
performing compression coding on the first data block according to the following coding rule to obtain the second data block:
D(7:0)=34*c9c8+33*c7c6+32*c5c4+31*c3c2+30*c1c0
wherein D (7:0) is a second data block, and D (7:0) ═ D7d6d5d4d3d2d1d0C (9:0) is a first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0
2. The image encoding method of claim 1, wherein the element is one byte, M is 4, and K is 3.
3. The image encoding method of claim 2, wherein the encoding the first image data vector to obtain a second image data vector comprises:
encoding the nth element in the first image data vector according to the following encoding rule to obtain the nth element in the second image data vector:
cx+1cx=bx+1+bx
where N is 1, 2, … …, or N, and the nth element in the first image data vector is Bn,Bn=b7b6b5b4b3b2b1b0The nth element in the second image data vector is Cn,Cn=c7c6c5c4c3c2c1c0,bxIs represented by BnX-th bit of (1), cxIs represented by CnThe x-th bit in (1) is 0,2, 4 or 6.
4. An image decoding method, comprising:
dividing elements in a third image data vector into L second data blocks, wherein the length of each second data block is the same; l is a positive integer; the image data vector is used for representing data of an image and is a one-dimensional vector;
decompressing and coding the second data block into a first data block to obtain a second image data vector, wherein the length of each first data block is the same, and the length of the second data block is smaller than that of the first data block; the second image data vector comprises N elements; n is a positive integer, the second image data vector comprises K bit pairs, the K bit pairs being for representing K colors;
decoding the second image data vector to obtain a first image data vector; the first image data vector comprises N elements, the first image data vector comprises M types of bit pairs, and the M types of bit pairs are used for representing K colors; k is a positive integer less than M, and the element is one byte;
m is 4, K is 3, the length of the first data block is 10 bits, and the length of the second data block is 8 bits;
the decompressing and encoding the second data block into the first data block to obtain the second image data vector includes:
decompressing and coding the second data block according to the following decoding rule to obtain the first data block:
c1c0=D(7:0)%3,c3c2=(D(7:0)%32)/3,c5c4=(D(7:0)%33)/32,c7c6=(D(7:0)%34)/33,c9c8=(D(7:0)%35)/34
wherein D (7:0) is the second data block, and D (7:0) ═ D7d6d5d4d3d2d1d0C (9:0) is the first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0% is the remainder operator,/is the rounding operator.
5. The image decoding method of claim 4, wherein the decoding the second image data vector to obtain a first image data vector comprises:
decoding the first data block according to the following decoding rule to obtain the first image data vector:
bx+1bx=cx+1cx+cx+1
wherein the first image data vector comprises L third data blocks, the length of the third data blocks is equal to the length of the first data blocks, the third data blocks are B '(9: 0), and B' (9:0) is B ═ B9b8b7b6b5b4b3b2b1b0C (9:0) is a first data block, C (9:0) ═ C9c8c7c6c5c4c3c2c1c0,bxDenotes the x-th bit, c, in B' (9:0)xRepresents the x-th bit in C (9:0), and the value of x is 0,2, 4, 6 or 8.
6. A computer device comprising a processor and a memory; the memory for storing a computer program; the processor, for executing the computer program stored on the memory, implementing the method steps of any of claims 1-3 or 4-5.
7. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-3 or 4-5.
8. An image processing system characterized by comprising an image encoding device and an image decoding device;
the image encoding apparatus includes a processor and a memory; the memory for storing a computer program; the processor, for executing the computer program stored on the memory, to implement the method steps of any of claims 1-3;
the image decoding apparatus includes a processor and a memory; the memory for storing a computer program; the processor, for executing the computer program stored on the memory, implements the method steps of any of claims 4-5.
CN201911200463.1A 2019-11-29 2019-11-29 Image encoding method, image decoding method, computer device, and image processing system Active CN110855990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911200463.1A CN110855990B (en) 2019-11-29 2019-11-29 Image encoding method, image decoding method, computer device, and image processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911200463.1A CN110855990B (en) 2019-11-29 2019-11-29 Image encoding method, image decoding method, computer device, and image processing system

Publications (2)

Publication Number Publication Date
CN110855990A CN110855990A (en) 2020-02-28
CN110855990B true CN110855990B (en) 2022-04-22

Family

ID=69606447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911200463.1A Active CN110855990B (en) 2019-11-29 2019-11-29 Image encoding method, image decoding method, computer device, and image processing system

Country Status (1)

Country Link
CN (1) CN110855990B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113747167A (en) * 2020-05-27 2021-12-03 深圳绿米联创科技有限公司 Image compression coding method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106961604A (en) * 2017-03-07 2017-07-18 腾讯科技(深圳)有限公司 Data Rate Distribution, coding unit code rate allocation method and the device of Video coding
CN109933393A (en) * 2019-01-30 2019-06-25 北京无线体育俱乐部有限公司 Electronic label display system
CN110235176A (en) * 2019-04-17 2019-09-13 京东方科技集团股份有限公司 Processing method and processing device, data transmission method and device, the storage medium of image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9396509B1 (en) * 2011-10-30 2016-07-19 Digimarc Corporation Closed form non-iterative watermark embedding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106961604A (en) * 2017-03-07 2017-07-18 腾讯科技(深圳)有限公司 Data Rate Distribution, coding unit code rate allocation method and the device of Video coding
CN109933393A (en) * 2019-01-30 2019-06-25 北京无线体育俱乐部有限公司 Electronic label display system
CN110235176A (en) * 2019-04-17 2019-09-13 京东方科技集团股份有限公司 Processing method and processing device, data transmission method and device, the storage medium of image

Also Published As

Publication number Publication date
CN110855990A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
US10904408B2 (en) Picture file processing method, device, and computer storage medium
CN102523367B (en) Real time imaging based on many palettes compresses and method of reducing
CN106170921B (en) It is related to the source code and decoding method and device of the data of sign compression
CN109842803B (en) Image compression method and device
CN100576195C (en) With the system and method for lossless manner to digital picture and voice data decoding
CN113542740B (en) Image transmission method and device
CN107665128B (en) Image processing method, system, server and readable storage medium
CN104683805A (en) Image encoding method, image decoding method, image encoding device and image decoding device
CN105100814A (en) Methods and devices for image encoding and decoding
CN104581177A (en) Image compression method and device combining block matching with string matching
CN104754362A (en) Image compression method using fine division block matching
CN105828089A (en) Video coding method based on self-adaptive perception quantization and video coding system thereof
EP3180910B1 (en) Method for optimized chroma subsampling, apparatus for optimized chroma subsampling and storage device
CN110855990B (en) Image encoding method, image decoding method, computer device, and image processing system
CN114640857A (en) Image compression method and 3D noise reduction method based on improved Huffman coding
JP3462867B2 (en) Image compression method and apparatus, image compression program, and image processing apparatus
CN109819254B (en) Lossy image compression transmission method and system
CN112887722B (en) Lossless image compression method
CN115941958A (en) Video coding method and device, electronic equipment and storage medium
CN115037941A (en) Intelligent bracelet picture compression storage method for improving compression rate
CN106713924B (en) For text layered compression method and device
CN113554719B (en) Image encoding method, decoding method, storage medium and terminal equipment
KR101541869B1 (en) Method for encoding and decoding using variable length coding and system thereof
CN103209322A (en) Methods, systems, and computer program products for assessing macroblock candidate for conversion to skipped macroblock
Barannik et al. The concept of a quantitative sign formation for the internal restructuring of information resource data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant