CN109922329B - Compression method, decompression method and device for virtual reality image data - Google Patents

Compression method, decompression method and device for virtual reality image data Download PDF

Info

Publication number
CN109922329B
CN109922329B CN201711336475.8A CN201711336475A CN109922329B CN 109922329 B CN109922329 B CN 109922329B CN 201711336475 A CN201711336475 A CN 201711336475A CN 109922329 B CN109922329 B CN 109922329B
Authority
CN
China
Prior art keywords
compressed
pixel point
pixel
ith row
matrix
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
CN201711336475.8A
Other languages
Chinese (zh)
Other versions
CN109922329A (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.)
Beijing Chuansong Technology Co ltd
Original Assignee
Beijing Chuansong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chuansong Technology Co ltd filed Critical Beijing Chuansong Technology Co ltd
Priority to CN201711336475.8A priority Critical patent/CN109922329B/en
Publication of CN109922329A publication Critical patent/CN109922329A/en
Application granted granted Critical
Publication of CN109922329B publication Critical patent/CN109922329B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to the technical field of image compression, in particular to a compression method and a decompression method of virtual reality image dataA method and apparatus comprising: acquiring VR image data to be compressed; compressing each row of pixel point sequences to be compressed contained in the pixel point matrix to be compressed based on a preset compression ratio to obtain a compressed pixel point matrix, and outputting the compressed pixel point matrix as compressed VR image data; determining the number Q 'of compressed pixel points contained in the ith row of compressed pixel point sequence'i(ii) a Establishment of comprising Q'iThe ith row of compressed pixel point sequences are used for compressing the pixel points and have the same image length as the ith row of pixel point sequences to be compressed; aligning the ith row of pixel point sequences to be compressed with the ith row of compressed pixel point sequences from beginning to end; calculating the weighted average value of m pixels to be compressed which are closest to the jth compressed pixel in the ith row of pixel sequences to be compressed, taking the weighted average value as the pixel value of the jth compressed pixel in the ith row of compressed pixel sequences, and taking m as being less than or equal to QiIs a positive integer of (1).

Description

Compression method, decompression method and device for virtual reality image data
Technical Field
The present invention relates to the field of image compression technologies, and in particular, to a method and an apparatus for compressing and decompressing virtual reality image data.
Background
Virtual Reality (VR) technology is a computer simulation system capable of creating and experiencing a virtual world, which utilizes a computer to generate a simulation environment, and is a system simulation of multi-source information fusion, interactive three-dimensional dynamic views and entity behaviors. Along with the increasing development of VR technique, more and more VR equipment has appeared, and in order to improve the use convenience of VR equipment, wired VR equipment has also been replaced to wireless VR equipment day by day.
For wireless VR devices, in the process of transmitting VR images from a computer to the wireless VR devices, because a wireless transmission mode is adopted, in order to ensure that the bandwidth requirements of a wireless transmission module are met, the VR images generally need to be compressed. However, in the prior art, the VR video is compressed by using the JPEG compression method, and then the image definition is low when the VR video is restored.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a method and an apparatus for compressing and decompressing virtual reality image data that overcome or at least partially solve the above problems.
The embodiment of the invention provides a method for compressing virtual reality image data, which comprises the following steps:
acquiring Virtual Reality (VR) image data to be compressed, wherein the VR image data to be compressed corresponds to a pixel matrix to be compressed, the pixel matrix to be compressed comprises n rows of pixel sequences to be compressed, and n is an integer greater than or equal to 1;
on the basis of a preset compression ratio, compressing each row of pixel point sequences to be compressed contained in the pixel point matrix to be compressed respectively to obtain a compressed pixel point matrix containing n rows of compressed pixel point sequences, and outputting the compressed pixel point matrix as compressed VR (virtual reality) image data, wherein the ith row of compressed pixel point sequences in the compressed pixel point matrix is obtained by compressing the ith row of pixel point sequences to be compressed in the pixel point matrix to be compressed, and i is a positive integer less than or equal to n;
the process of compressing the ith row of pixel point sequences to be compressed into the ith row of compressed pixel point sequences comprises the following steps:
determining the number Q 'of compressed pixel points contained in the ith row of compressed pixel point sequence'iWherein, Q'i=Qi(1-c),QiC is the number of the pixel points to be compressed contained in the pixel point sequence to be compressed in the ith row, and is the preset compression ratio;
establishment of comprising Q'iThe ith row of compressed pixel point sequences are used for compressing pixel points and have the same image length as the ith row of pixel point sequences to be compressed;
assigning values to each compressed pixel point in the ith row of compressed pixel point sequences respectively;
wherein j is less than or equal to Q'iThe process of assigning the value of the jth compressed pixel point in the ith row of compressed pixel point sequence comprises the following steps:
aligning the ith row of pixel point sequences to be compressed with the ith row of compressed pixel point sequences from beginning to end;
calculating the nearest distance to the jth compression pixel point in the ith row of pixel point sequences to be compressedThe weighted average value of m pixel points to be compressed is used as the pixel value of the jth compressed pixel point in the ith row of compressed pixel point sequence, and m is less than or equal to QiIs a positive integer of (1).
Preferably, the pixel matrix to be compressed and the compressed pixel matrix have the same matrix type, and the matrix type is a two-dimensional matrix or a three-dimensional matrix.
Preferably, in the process of calculating the weighted average of m pixels to be compressed closest to the jth compressed pixel in the ith row of pixel to be compressed sequence, the weight of the pixel to be compressed close to the jth compressed pixel is greater than the weight of the pixel to be compressed far away from the jth compressed pixel.
Preferably, after the obtaining of the VR image data to be compressed and before the compressing of each row of pixel sequences to be compressed included in the pixel matrix to be compressed, the method further includes:
and compressing the corresponding relation between the gray values and the chromatic values in the VR image data to be compressed into a group of chromatic values corresponding to every four adjacent gray values.
Preferably, if the correspondence between the gray values and the chrominance values in the VR image data to be compressed is that each gray value corresponds to a set of chrominance values, compressing the correspondence between the gray values and the chrominance values in the VR image data to be compressed into a set of chrominance values corresponding to every four adjacent gray values includes:
deleting any three groups of colorimetric values in four groups of colorimetric values corresponding to every four adjacent gray values in the VR image data to be compressed, and taking the remaining colorimetric values as common colorimetric components of the four adjacent gray values; or
And averaging four groups of chrominance values corresponding to every four adjacent gray values in the VR image data to be compressed to obtain a group of average chrominance values, and taking the average chrominance values as the common chrominance components of the four adjacent gray values.
The embodiment of the invention also provides a virtual reality image data decompression method, which comprises the following steps:
obtaining compressed VR image data, wherein the compressed VR image data corresponds to a compressed pixel matrix, the compressed pixel matrix comprises n rows of compressed pixel point sequences, and n is an integer greater than or equal to 1;
respectively decompressing each row of compressed pixel point sequences contained in the compressed pixel point matrix based on a preset decompression proportion to obtain a decompressed pixel point matrix containing n rows of decompressed pixel point sequences, and outputting the decompressed pixel point matrix as VR (virtual reality) image data to be displayed, wherein the ith row of decompressed pixel point sequences in the decompressed pixel point matrix is obtained by decompressing the ith row of compressed pixel point sequences in the compressed pixel point matrix, and i is a positive integer less than or equal to n;
the process of compressing the ith row of compressed pixel point sequences into the ith row of decompressed pixel point sequences comprises the following steps:
determining the number Q of decompressed pixel points contained in the ith row of decompressed pixel point sequenceiWherein, in the step (A),
Figure BDA0001506588930000031
Qi' is the number of compressed pixel points contained in the ith row of compressed pixel point sequence, and d is the preset decompression proportion;
establishing a container containing QiAn ith row of decompressed pixel point sequences having the same image length as the ith row of compressed pixel point sequences;
respectively assigning values to each decompression pixel point in the ith row of decompression pixel point sequences;
wherein j is less than or equal to QiThe process of assigning the value to the jth decompressed pixel point in the ith row of decompressed pixel point sequence comprises the following steps:
aligning the ith row of compressed pixel point sequence with the ith row of uncompressed pixel point sequence from beginning to end;
calculating m compressed pixel points which are nearest to the jth decompressed pixel point in the ith row of compressed pixel point sequenceAnd taking the weighted average as the pixel value of the jth decompressed pixel point in the ith row of decompressed pixel point sequence, wherein m is less than or equal to QiA positive integer of.
Preferably, after the obtaining of the decompressed pixel matrix including the n rows of decompressed pixel point sequences, and before the outputting of the decompressed pixel matrix as VR image data to be displayed, the method further includes:
and decompressing the corresponding relation between the gray value and the chromatic value in the decompression pixel point matrix into a group of chromatic values corresponding to each gray value.
Preferably, if the original correspondence between the gray values and the chromatic values in the decompressed pixel matrix is that every four adjacent gray values correspond to a set of chromatic values, the decompressing the correspondence between the gray values and the chromatic values in the decompressed pixel matrix into a set of chromatic values corresponding to each gray value includes:
and copying a group of colorimetric values corresponding to every four adjacent gray values in the decompression pixel point matrix to obtain four groups of colorimetric values, and enabling the four groups of colorimetric values to correspond to the four adjacent colorimetric values one by one.
The embodiment of the invention also provides a virtual reality image data compression device, which comprises a video interface, an image compression module and a wireless transmission module;
the video interface is used for connecting a main control device and acquiring VR image data to be compressed from the main control device, the VR image data to be compressed corresponds to a pixel matrix to be compressed, the pixel matrix to be compressed comprises n rows of pixel sequences to be compressed, and n is an integer greater than or equal to 1;
the image compression module is used for respectively compressing each row of pixel point sequences to be compressed contained in the pixel point matrix to be compressed based on a preset compression ratio to obtain a compressed pixel point matrix containing n rows of compressed pixel point sequences, wherein the ith row of compressed pixel point sequences in the compressed pixel point matrix is obtained by compressing the ith row of pixel point sequences to be compressed in the pixel point matrix to be compressed, and i is a positive integer less than or equal to n;
the process of compressing the ith row of pixel point sequences to be compressed into the ith row of compressed pixel point sequences comprises the following steps:
determining the number Q 'of compressed pixel points contained in the ith row of compressed pixel point sequence'iWherein, Q'i=Qi(1-c),QiC is the number of the pixel points to be compressed contained in the pixel point sequence to be compressed in the ith row, and is the preset compression ratio;
establishment of comprising Q'iThe ith row of compressed pixel point sequences are used for compressing pixel points and have the same image length as the ith row of pixel point sequences to be compressed;
assigning values to each compressed pixel point in the ith row of compressed pixel point sequences respectively;
wherein j is less than or equal to Q'iThe process of assigning the value of the jth compressed pixel point in the ith row of compressed pixel point sequence comprises the following steps:
aligning the ith row of pixel point sequences to be compressed with the ith row of compressed pixel point sequences from beginning to end;
calculating the weighted average value of m pixels to be compressed which are closest to the jth compressed pixel in the ith row of pixel sequences to be compressed, taking the weighted average value as the pixel value of the jth compressed pixel in the ith row of compressed pixel sequences, wherein m is less than or equal to QiA positive integer of (d);
and the wireless transmitting module is used for outputting the compressed pixel matrix as compressed VR image data.
The embodiment of the invention also provides a virtual reality image data decompression device, which comprises a wireless receiving module, an image decompression module and a video interface;
the wireless receiving module is used for receiving compressed VR image data, the compressed VR image data corresponds to a compressed pixel matrix, the compressed pixel matrix comprises n rows of compressed pixel point sequences, and n is an integer greater than or equal to 1;
the image decompression module is used for respectively decompressing each row of compressed pixel point sequences contained in the compressed pixel point matrix based on a preset decompression proportion to obtain a decompressed pixel point matrix containing n rows of decompressed pixel point sequences, wherein the ith row of decompressed pixel point sequences in the decompressed pixel point matrix is obtained by decompressing the ith row of compressed pixel point sequences in the compressed pixel point matrix, and i is a positive integer less than or equal to n;
the process of compressing the ith row of compressed pixel point sequences into the ith row of decompressed pixel point sequences comprises the following steps:
determining the number Q of decompressed pixel points contained in the ith row of decompressed pixel point sequenceiWherein, in the step (A),
Figure BDA0001506588930000061
Qi' is the number of compressed pixel points contained in the ith row of compressed pixel point sequence, and d is the preset decompression proportion;
establishing a container containing QiAn ith row of decompressed pixel point sequences having the same image length as the ith row of compressed pixel point sequences;
respectively assigning values to each decompression pixel point in the ith row of decompression pixel point sequences;
wherein j is less than or equal to QiThe process of assigning the value to the jth decompressed pixel point in the ith row of decompressed pixel point sequence comprises the following steps:
aligning the ith row of compressed pixel point sequence with the ith row of uncompressed pixel point sequence from beginning to end;
calculating the weighted average value of m compressed pixel points which are closest to the jth decompressed pixel point in the ith row of compressed pixel point sequence, taking the weighted average value as the pixel value of the jth decompressed pixel point in the ith row of decompressed pixel point sequence, and taking m as being less than or equal to QiA positive integer of';
and the video interface is used for connecting VR equipment and outputting the decompressed pixel point matrix to the VR equipment as to-be-displayed VR image data.
One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
after obtaining VR image data to be compressed, based on a preset compression ratio, compressing each row of pixel point sequences to be compressed contained in a pixel point matrix to be compressed respectively to obtain a compressed pixel point matrix containing n rows of compressed pixel point sequences, outputting the compressed pixel point matrix as compressed VR image data, wherein the ith row of compressed pixel point sequences in the compressed pixel point matrix is obtained by compressing the ith row of pixel point sequences to be compressed in the pixel point matrix to be compressed, i is a positive integer less than or equal to n, and the process of compressing the ith row of pixel point sequences to be compressed into the ith row of compressed pixel point sequences comprises the following steps: determining the number Q 'of compressed pixel points contained in the ith row of compressed pixel point sequence'iWherein, Q'i=Qi(1-c),QiEstablishing Q 'for the number of pixels to be compressed contained in the ith row of pixel point sequence to be compressed and c is a preset compression proportion'iAssigning each compressed pixel point in the ith row of compressed pixel point sequence, wherein the ith row of compressed pixel point sequence has the same image length as the ith row of pixel point sequence to be compressed, and j is less than or equal to Q'iThe process of assigning the value of the jth compressed pixel point in the ith row of compressed pixel point sequence comprises the following steps: aligning the ith row of pixel point sequences to be compressed with the ith row of compressed pixel point sequences end to end, calculating the weighted average value of m pixel points to be compressed which are closest to the jth compressed pixel point in the ith row of pixel point sequences to be compressed, taking the weighted average value as the pixel value of the jth compressed pixel point in the ith row of compressed pixel point sequences, and taking m as being less than or equal to QiThe positive integer of (2) is obtained by executing the process to compress VR image data, so that the size of the compressed VR image data can be reduced while the definition of the restored and displayed image is ensured, the transmission bandwidth of the data is saved, and meanwhile, the compression ratio can be flexibly configured.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a method for compressing virtual reality image data according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a pixel matrix A according to an embodiment of the invention;
fig. 3 is a schematic diagram of a pixel matrix B in the embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a row of pixel point sequences to be compressed of a pixel point matrix a is compressed into a row of compressed pixel point sequences of a matrix B according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a method for decompressing virtual reality image data according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram illustrating a virtual reality image data compression apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram illustrating a virtual reality image data compression apparatus including a chrominance compression module according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram illustrating a decompression apparatus for virtual reality image data according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram illustrating a virtual reality image data decompression device including a chrominance decompression module according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
A first embodiment of the present invention provides a method for compressing virtual reality image data, which is used to compress VR image data. In the process of transmitting the VR image data to the VR device by the master control device, on one hand, the compression method of the virtual reality image data of the present application can be applied to the master control device, and then the master control device will be used as an execution subject of the compression method of the virtual reality image data of the present application, and the master control device executes compression of the VR image data and transmits the compressed VR image data to the VR device; on the other hand, the method for compressing virtual reality image data according to the present application may also be applied to a third device other than the main control device and the VR device, where the third device is to be used as an execution subject of the method for compressing virtual reality image data according to the present application, and after the main control device transmits VR image data to the third device, the third device performs compression on the VR image data, and meanwhile, the third device also transmits the compressed VR image data to the VR device. In addition, no matter whether master control equipment transmits the VR image data after compression to VR equipment, or the third equipment transmits the VR image data after compression to VR equipment, to the transmission mode of data, can adopt wired transmission mode, and for the convenience that improves, also can adopt wireless transmission mode.
The following will describe in detail a method for compressing virtual reality image data according to the present application with reference to fig. 1, where the method for compressing virtual reality image data according to the present application includes:
step 101: obtaining VR image data to be compressed, wherein the VR image data to be compressed corresponds to a pixel matrix to be compressed, the pixel matrix to be compressed comprises n rows of pixel sequences to be compressed, and n is an integer greater than or equal to 1.
Specifically, the matrix type of the pixel matrix to be compressed may be a two-dimensional matrix or a three-dimensional matrix. When the matrix type of the pixel matrix to be compressed is a two-dimensional matrix, the pixel matrix to be compressed is composed of rows and columns, and specifically, the pixel matrix to be compressed may include more than one row and/or more than one column of pixel point sequences to be compressed. When the matrix type of the pixel matrix to be compressed is a three-dimensional matrix, the pixel matrix to be compressed is composed of rows, columns and pages, and specifically, the pixel matrix to be compressed may include more than one row and/or more than one column and/or more than one page of pixel point sequences to be compressed.
In the embodiment of the present invention, the compression method of virtual reality image data of the present application will be described in detail by taking the matrix type of the pixel matrix to be compressed as a two-dimensional matrix as an example, and how to compress the pixel matrix to be compressed when the matrix type of the pixel matrix to be compressed is a three-dimensional matrix can be obtained in the same way, which will not be described in detail herein. In the following, a specific two-dimensional pixel matrix a to be compressed is provided, and the method for compressing virtual reality image data according to the present application is described in detail in combination with the two-dimensional pixel matrix a to be compressed, as shown in fig. 2, the two-dimensional pixel matrix a to be compressed includes 6 rows of pixel point sequences to be compressed and 10 columns of pixel point sequences to be compressed.
After obtaining the VR image data to be compressed, step 102 is executed: and compressing each row of pixel point sequences to be compressed contained in the pixel point matrix to be compressed respectively based on a preset compression ratio to obtain a compressed pixel point matrix containing n rows of compressed pixel point sequences, and outputting the compressed pixel point matrix as compressed VR image data.
Specifically, the matrix type of the compressed pixel matrix is the same as the matrix type of the pixel matrix to be compressed, that is, when the pixel matrix to be compressed is a two-dimensional matrix, the compressed pixel matrix is also the two-dimensional matrix; and when the pixel matrix to be compressed is a three-dimensional matrix, the compressed pixel matrix is also the three-dimensional matrix. When the pixel matrix to be compressed is a two-dimensional matrix, the compression process in step 102 may be to compress each row or each column of pixel point sequences to be compressed in the two-dimensional pixel matrix to be compressed, and when the pixel matrix to be compressed is a three-dimensional matrix, the compression process in step 102 may be: compressing each row of pixel point sequences to be compressed existing along the row direction, the column direction or the page direction of the three-dimensional pixel point matrix to be compressed.
In step 102, the compressed pixel matrix is obtained by compressing the pixel matrix to be compressed, specifically, by compressing the ith row of pixel sequences to be compressed in the pixel matrix to be compressed, the ith row of compressed pixel sequences in the compressed pixel matrix is obtained, and i is a positive integer less than or equal to n.
Further, the process of compressing the ith row of pixel point sequences to be compressed into the ith row of compressed pixel point sequences includes:
step 201: determining the number Q 'of compressed pixel points contained in the ith row of compressed pixel point sequence'iWherein, Q'i=Qi(1-c),QiC is the number of the pixels to be compressed contained in the ith row of pixel point sequences to be compressed, and is a preset compression ratio.
Step 202: establishment of comprising Q'iAnd the ith row of compressed pixel point sequences are used for compressing the pixel points and have the same image length with the ith row of pixel point sequences to be compressed.
Step 203: and respectively assigning values to each compressed pixel point in the ith row of compressed pixel point sequences.
For step 201, regarding the two-dimensional pixel point matrix a to be compressed shown in fig. 2, if the compression mode is to compress each row of pixel point sequences to be compressed of the two-dimensional pixel point matrix a to be compressed, and the preset compression ratio is 20%, then since the number of pixels to be compressed included in any row of pixel point sequences to be compressed of the two-dimensional pixel point matrix a to be compressed is 10, that is, Q isiIs 10, c is 20 percent, then Q 'can be obtained according to the formula'iAnd 8, so that the two-dimensional compressed pixel point matrix B obtained after compression contains 6 rows of compressed pixel point sequences, each row of compressed pixel point sequences contains 8 compressed pixel points, and the two-dimensional compressed pixel point matrix B is shown in fig. 3.
For step 202, in the present application, the image lengths of the pixel point sequence to be compressed and the compressed pixel point sequence corresponding to the pixel point sequence to be compressed are the same, that is, the image lengths of the pixel point sequence to be compressed in the ith row and the compressed pixel point sequence in the ith row are the same.
For step 203, j is taken to be less than or equal to Q'iThe process of assigning the value of the jth compressed pixel point in the ith row of compressed pixel point sequence comprises the following steps:
step 2031: and aligning the ith row of pixel point sequences to be compressed with the ith row of compressed pixel point sequences from beginning to end.
Step 2032: calculating the weighted average value of m pixels to be compressed which are closest to the jth compressed pixel in the ith row of pixel sequences to be compressed, taking the weighted average value as the pixel value of the jth compressed pixel in the ith row of compressed pixel sequences, and taking m as being less than or equal to QiIs a positive integer of (1).
In the following, a detailed description will be given of how to assign values to a row of compressed pixels by taking a first row of compressed pixel point sequence of the two-dimensional compressed pixel point matrix B as an example.
As shown in fig. 4, first, the first row of pixel point sequences to be compressed and the first row of compressed pixel point sequences are aligned end to end, that is, the first row of pixel point sequences to be compressed and the first row of compressed pixel point sequences are overlapped on a straight line. Then, 8 compressed pixel points in the compressed pixel point sequence are sequentially assigned, that is, j is sequentially taken from 1 to 8. For the 1 st compressed pixel, m is a preset number, and m is a positive integer less than or equal to 10, for example, m may be 4, and m may also be 10. When m is 4, calculating the weighted average value of 4 pixels to be compressed which are closest to the 1 st compressed pixel in the first row of pixel point sequences to be compressed, and according to fig. 4, it can be known that the 4 pixels to be compressed which are closest to the 1 st compressed pixel in the first row of pixel point sequences to be compressed are the 1 st pixel to be compressed, the 2 nd pixel to be compressed, the 3 rd pixel to be compressed and the 4 th pixel to be compressed respectively, and further, taking the weighted average value of the 4 pixels to be compressed as the pixel value of the 1 st compressed pixel. And when m is 10, calculating the weighted average value of all the pixels to be compressed contained in the first row of pixel point sequences to be compressed, and taking the obtained weighted average value as the pixel value of the 1 st compressed pixel point. According to the above process of assigning values to the 1 st compressed pixel point, similarly, it can be known how to assign values to the 7 compressed pixel points, which is not described herein again.
In the present application, m is satisfying Q or lessiUnder the condition of (1), the larger the value is, the more lossless the compressed VR image data can be reduced and displayed, and m is Q to obtain the best display effecti
In addition, in order to further improve the definition of compressed VR image data during restoration display, a weighted average value of m pixels to be compressed closest to the jth compressed pixel in the ith row of pixel sequences to be compressed is calculated, and the weight of the pixel to be compressed close to the jth compressed pixel is greater than the weight of the pixel to be compressed far away from the jth compressed pixel. For example, for the first selection method, as shown in fig. 4, in the process of calculating the weighted average of the 1 st to-be-compressed pixel, the 2 nd to-be-compressed pixel, the 3 rd to-be-compressed pixel, and the 4 th to-be-compressed pixel, the weights of the four to-be-compressed pixels are the 1 st to-be-compressed pixel, the 2 nd to-be-compressed pixel, the 3 rd to-be-compressed pixel, and the 4 th to-be-compressed pixel in sequence from large to small.
In the method for compressing virtual reality image data according to the present application, in order to further save bandwidth, after step 101 and before step 102, the following steps may be further performed:
and compressing the corresponding relation between the gray values and the chromatic values in the VR image data to be compressed into a group of chromatic values corresponding to every four adjacent gray values.
Specifically, before performing the chroma compression, the corresponding relationship between the gray value and the chroma value in the VR image data to be compressed is a set of chroma values corresponding to each gray value, where the gray value is Y, and the set of chroma values includes one U and one V. In this case, the present application gives the following two specific ways of chroma compression.
The first chroma compression method is as follows: deleting any three groups of colorimetric values in four groups of colorimetric values corresponding to every four adjacent gray values in VR image data to be compressed, and taking the remaining colorimetric values as common colorimetric components of the four adjacent gray values. The first chroma compression method has the advantage of a fast compression rate.
The second chroma compression method is: four groups of chroma values corresponding to every four adjacent gray values in VR image data to be compressed are averaged to obtain a group of average chroma values, and the average chroma values are used as common chroma components of the four adjacent gray values. The second chroma compression mode has the advantage of high chroma reduction rate.
For the chroma compression process, if the color depth of VR image data to be compressed is 24 bits, Y, U and V respectively account for 8 bits, Y: U: V is 8: 8, and after chroma compression, Y: U: V is 8: 2. This application is through the corresponding relation compression between grey value and the chromatic value in waiting to compress VR image data for every four adjacent grey values correspond a set of chromatic values, can be under the prerequisite of the reduction display effect of guaranteeing compression VR image data, reduce half required bandwidth.
Based on the same inventive concept, a second embodiment of the present invention further provides a virtual reality image data decompression method, which is used for decompressing compressed VR image data. On one hand, the decompression method of the virtual reality image data can be applied to the VR device, and then the VR device is used as an execution subject of the decompression method of the virtual reality image data, and the VR device performs decompression on the compressed VR image data and displays the decompressed VR image data; on the other hand, the method for decompressing virtual reality image data of the present application may also be applied to a third device other than the main control device and the VR device, and then the third device will be an execution subject of the method for decompressing virtual reality image data of the present application, and the third device obtains compressed VR image data and decompresses the compressed VR image data, and finally, the third device transmits the decompressed VR image data to the VR device.
The following describes in detail a method for decompressing virtual reality image data according to the present application with reference to fig. 5, where the method for decompressing virtual reality image data according to the present application includes:
step 501: obtaining compressed VR image data, wherein the compressed VR image data corresponds to a compressed pixel matrix, the compressed pixel matrix comprises n rows of compressed pixel point sequences, and n is an integer greater than or equal to 1.
Specifically, the same principle as the embodiment corresponding to the foregoing method for compressing virtual reality image data is adopted, and in the embodiment corresponding to the method for decompressing virtual reality image data, the matrix type of the compressed pixel matrix may be a two-dimensional matrix or a three-dimensional matrix, which is not described herein again.
After the compressed VR video data is acquired, step 502 is executed: and respectively decompressing each row of compressed pixel point sequences contained in the compressed pixel point matrix based on a preset decompression proportion to obtain a decompressed pixel point matrix containing n rows of decompressed pixel point sequences, and outputting the decompressed pixel point matrix as VR image data to be displayed.
Specifically, the matrix type of the decompressed pixel matrix is the same as the matrix type of the compressed pixel matrix. In step 402, the decompressed pixel matrix is obtained by decompressing the compressed pixel matrix, specifically, the ith row of decompressed pixel point sequences in the decompressed pixel matrix is obtained by decompressing the ith row of compressed pixel point sequences in the compressed pixel matrix, where i is a positive integer less than or equal to n.
Further, the process of compressing the ith row of compressed pixel point sequences into the ith row of decompressed pixel point sequences comprises:
step 601: determining the number Q of decompressed pixel points contained in the ith row of decompressed pixel point sequenceiWherein, in the step (A),
Figure BDA0001506588930000131
Qi' is the number of compressed pixel points contained in the ith row of compressed pixel point sequence, and d is the preset decompression proportion.
Step 602: establishing a container containing QiAnd the ith row of decompressed pixel point sequences are used for decompressing the pixel points and have the same image length as the ith row of compressed pixel point sequences.
Step 603: and respectively assigning values to each decompressed pixel point in the ith row of decompressed pixel point sequences.
For step 601, regarding the pixel matrix B shown in fig. 3, if the decompression mode is to decompress each row of compressed pixel point sequences of the pixel matrix B and the preset decompression proportion is 20%, then since the number of compressed pixels included in any row of compressed pixel point sequences of the pixel matrix B is 8, that is, Q isiIf' is 8 and d is 20%, Q can be obtained according to the formula i10, so that the pixel matrix a obtained after decompression includes 6 rows of decompressed pixel point sequences, and each row of decompressed pixel point sequences includes 10 decompressed pixel points, as shown in fig. 2.
For step 602, in the present application, the image lengths of the compressed pixel point sequence and the decompressed pixel point sequence corresponding to the compressed pixel point sequence are the same, that is, the image lengths of the ith row of compressed pixel point sequence and the ith row of decompressed pixel point sequence are the same.
For step 603, j is taken to be less than or equal to QiThe process of assigning the value to the jth decompressed pixel point in the ith row of decompressed pixel point sequence comprises the following steps:
step 6031: and aligning the ith row of compressed pixel point sequence and the ith row of decompressed pixel point sequence from head to tail.
Step 6032: calculating the weighted average value of m compressed pixel points which are closest to the jth decompressed pixel point in the ith row of compressed pixel point sequence, taking the weighted average value as the pixel value of the jth decompressed pixel point in the ith row of decompressed pixel point sequence, and taking m as being less than or equal to QiA positive integer of.
In the following, the first row of decompressed pixel point sequence of the pixel point matrix a is taken as an example to describe in detail how to assign values to a row of decompressed pixel points.
As shown in fig. 4, first, the first row of compressed pixel point sequences and the first row of decompressed pixel point sequences are aligned end to end, that is, the first row of compressed pixel point sequences and the first row of decompressed pixel points are overlapped on a straight line. Then, 10 decompressed pixel points in the sequence of decompressed pixel points are assigned in sequence, i.e., j is taken from 1 to 10 in sequence. For the first decompressed pixel point, m is a preset number, m is a positive integer less than or equal to 8, for example, m may be 4, and m may also be 8, when m is 4, the weighted average value of 4 compressed pixel points closest to the 1 st decompressed pixel point in the first row of compressed pixel point sequence is calculated, as can be seen from fig. 4, the 4 compressed pixel points closest to the 1 st decompressed pixel point in the first row of compressed pixel point sequence are respectively the 1 st compressed pixel point, the 2 nd compressed pixel point, the 3 rd compressed pixel point and the 4 th compressed pixel point, and further, the weighted average value of the 4 compressed pixel points is taken as the pixel value of the 1 st decompressed pixel point. And when m is 8, calculating the weighted average value of all compressed pixel points contained in the first row of compressed pixel point sequences, and taking the obtained weighted average value as the pixel value of the 1 st decompressed pixel point. According to the above process of assigning values to the 1 st decompressed pixel point, similarly, it can be known how to assign values to the 9 decompressed pixel points, which is not described herein again.
In addition, in order to further improve the display definition of the decompressed VR image data, the weighted average value of m compressed pixels closest to the jth decompressed pixel in the ith row of compressed pixel sequence is calculated, and the weight of the compressed pixel close to the jth compressed pixel is greater than that of the compressed pixel far away from the jth compressed pixel.
In the virtual reality image data decompression method of the present application, when the compressed VR image data is chrominance compressed data, after obtaining a decompressed pixel matrix including n rows of decompressed pixel point sequences, and before outputting the decompressed pixel matrix as the VR image data to be displayed, the method further includes:
and decompressing the corresponding relation between the gray value and the chromatic value in the decompressed pixel point matrix into a group of chromatic values corresponding to each gray value.
Specifically, if the original correspondence between the gray values and the chromatic values in the decompressed pixel matrix is that every four adjacent gray values correspond to a set of chromatic values, then decompressing the correspondence between the gray values and the chromatic values in the decompressed pixel matrix into a set of chromatic values corresponding to each gray value, including:
and copying a group of colorimetric values corresponding to every four adjacent gray values in the decompression pixel point matrix to obtain four groups of colorimetric values, and enabling the four groups of colorimetric values to correspond to the four adjacent colorimetric values one by one.
For the chroma decompression process, if the color depth of the compressed VR video data is Y: U: V is 8: 2, after the chroma decompression, Y: U: V is 8: 8.
Based on the same inventive concept, the third embodiment of the present invention further provides a virtual reality image data compression apparatus, as shown in fig. 6, including a video interface 61, an image compression module 62 and a wireless transmission module 63.
The video interface 61 is used for connecting a main control device and acquiring VR image data to be compressed from the main control device, where the VR image data to be compressed corresponds to a pixel matrix to be compressed, the pixel matrix to be compressed includes n rows of pixel sequences to be compressed, and n is an integer greater than or equal to 1;
the image compression module 62 is configured to compress each row of pixel point sequences to be compressed included in the pixel point matrix to be compressed respectively based on a preset compression ratio to obtain a compressed pixel point matrix including n rows of compressed pixel point sequences, where an ith row of compressed pixel point sequences in the compressed pixel point matrix is obtained by compressing an ith row of pixel point sequences to be compressed in the pixel point matrix to be compressed, and i is a positive integer less than or equal to n;
the process of compressing the ith row of pixel point sequences to be compressed into the ith row of compressed pixel point sequences comprises the following steps:
determining the number Q 'of compressed pixel points contained in the ith row of compressed pixel point sequence'iWherein, Q'i=Qi(1-c),QiC is the number of the pixel points to be compressed contained in the pixel point sequence to be compressed in the ith row, and is the preset compression ratio;
establishment of comprising Q'iThe ith row of compressed pixel point sequences are used for compressing pixel points and have the same image length as the ith row of pixel point sequences to be compressed;
assigning values to each compressed pixel point in the ith row of compressed pixel point sequences respectively;
wherein j is less than or equal to Q'iThe process of assigning the value of the jth compressed pixel point in the ith row of compressed pixel point sequence comprises the following steps:
aligning the ith row of pixel point sequences to be compressed with the ith row of compressed pixel point sequences from beginning to end;
calculating the weighted average value of m pixels to be compressed which are closest to the jth compressed pixel in the ith row of pixel sequences to be compressed, taking the weighted average value as the pixel value of the jth compressed pixel in the ith row of compressed pixel sequences, wherein m is less than or equal to QiIs a positive integer of (1).
The wireless transmitting module 63 is configured to output the compressed pixel matrix as compressed VR image data.
Further, as shown in fig. 7, the compressing apparatus may further include a chrominance compressing module 64, where the chrominance compressing module 64 is configured to compress the correspondence between the gray values and the chrominance values in the VR image data to be compressed into a set of chrominance values corresponding to every four adjacent gray values.
For the working process of each module, reference may be made to the description in the first embodiment, and details are not described here.
Based on the same inventive concept, the fourth embodiment of the present invention further provides a virtual reality image data decompression device, as shown in fig. 8, including a wireless receiving module 71, an image decompression module 72 and a video interface 73;
the wireless receiving module 71 is configured to receive compressed VR image data, where the compressed VR image data corresponds to a compressed pixel matrix, and the compressed pixel matrix includes n rows of compressed pixel point sequences, where n is an integer greater than or equal to 1;
the image decompression module 72 is configured to decompress each row of compressed pixel point sequences included in the compressed pixel point matrix respectively based on a preset decompression ratio to obtain a decompressed pixel point matrix including n rows of decompressed pixel point sequences, where an ith row of decompressed pixel point sequences in the decompressed pixel point matrix is obtained by decompressing an ith row of compressed pixel point sequences in the compressed pixel point matrix, and i is a positive integer less than or equal to n;
the process of compressing the ith row of compressed pixel point sequences into the ith row of decompressed pixel point sequences comprises the following steps:
determining the ith row of decompressed pixel sequence packetsNumber Q of decompressed pixels involvediWherein, in the step (A),
Figure BDA0001506588930000171
Qi' is the number of compressed pixel points contained in the ith row of compressed pixel point sequence, and d is the preset decompression proportion;
establishing a container containing QiAn ith row of decompressed pixel point sequences having the same image length as the ith row of compressed pixel point sequences;
respectively assigning values to each decompression pixel point in the ith row of decompression pixel point sequences;
wherein j is less than or equal to QiThe process of assigning the value to the jth decompressed pixel point in the ith row of decompressed pixel point sequence comprises the following steps:
aligning the ith row of compressed pixel point sequence with the ith row of uncompressed pixel point sequence from beginning to end;
calculating the weighted average value of m compressed pixel points which are closest to the jth decompressed pixel point in the ith row of compressed pixel point sequence, taking the weighted average value as the pixel value of the jth decompressed pixel point in the ith row of decompressed pixel point sequence, and taking m as being less than or equal to QiA positive integer of';
the video interface 73 is used for connecting VR equipment and outputting the decompressed pixel matrix to the VR equipment as VR image data to be displayed.
Further, as shown in fig. 9, the decompression apparatus may further include a chrominance decompression module 74, where the chrominance decompression module 74 is configured to decompress the correspondence between the gray values and the chrominance values in the decompression pixel matrix into a set of chrominance values corresponding to each gray value.
For the working process of each module, reference may be made to the description in the second embodiment, which is not described herein again.
One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
the method is based on the fact that after VR image data to be compressed are obtainedPresetting a compression ratio, compressing each row of pixel point sequences to be compressed contained in pixel point matrixes to be compressed respectively, obtaining compressed pixel point matrixes containing n rows of compressed pixel point sequences, outputting the compressed pixel point matrixes as compressed VR image data, compressing the ith row of compressed pixel point sequences in the compressed pixel point matrixes through the ith row of pixel point sequences to be compressed in the pixel point matrixes to be compressed, obtaining i by taking a positive integer less than or equal to n, and compressing the ith row of pixel point sequences to be compressed into the ith row of compressed pixel point sequences by the process comprising the following steps: determining the number Q 'of compressed pixel points contained in the ith row of compressed pixel point sequence'iWherein, Q'i=Qi(1-c),QiEstablishing Q 'for the number of pixels to be compressed contained in the ith row of pixel point sequence to be compressed and c is a preset compression proportion'iAssigning each compressed pixel point in the ith row of compressed pixel point sequence, wherein the ith row of compressed pixel point sequence has the same image length as the ith row of pixel point sequence to be compressed, and j is less than or equal to Q'iThe process of assigning the value of the jth compressed pixel point in the ith row of compressed pixel point sequence comprises the following steps: aligning the ith row of pixel point sequences to be compressed with the ith row of compressed pixel point sequences end to end, calculating the weighted average value of m pixel points to be compressed which are closest to the jth compressed pixel point in the ith row of pixel point sequences to be compressed, taking the weighted average value as the pixel value of the jth compressed pixel point in the ith row of compressed pixel point sequences, and taking m as being less than or equal to QiThe positive integer of (2) is obtained by executing the process to compress VR image data, so that the size of the compressed VR image data can be reduced while the definition of the restored and displayed image is ensured, the transmission bandwidth of the data is saved, and meanwhile, the compression ratio can be flexibly configured.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in an apparatus according to an embodiment of the invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (10)

1. A method for compressing virtual reality image data, the method comprising:
acquiring Virtual Reality (VR) image data to be compressed, wherein the VR image data to be compressed corresponds to a pixel matrix to be compressed, the pixel matrix to be compressed comprises n rows of pixel sequences to be compressed, and n is an integer greater than or equal to 1;
on the basis of a preset compression ratio, compressing each row of pixel point sequences to be compressed contained in the pixel point matrix to be compressed respectively to obtain a compressed pixel point matrix containing n rows of compressed pixel point sequences, and outputting the compressed pixel point matrix as compressed VR (virtual reality) image data, wherein the ith row of compressed pixel point sequences in the compressed pixel point matrix is obtained by compressing the ith row of pixel point sequences to be compressed in the pixel point matrix to be compressed, and i is a positive integer less than or equal to n;
the process of compressing the ith row of pixel point sequences to be compressed into the ith row of compressed pixel point sequences comprises the following steps:
determining the number of compressed pixel points contained in the ith row of compressed pixel point sequence
Figure 277766DEST_PATH_IMAGE001
Wherein, in the step (A),
Figure 917826DEST_PATH_IMAGE002
Figure 482800DEST_PATH_IMAGE003
for the number of pixels to be compressed contained in the ith row of pixel point sequence to be compressed,cthe preset compression ratio is set;
establishing an inclusion
Figure 928825DEST_PATH_IMAGE004
Each compresses pixel points andthe ith row of compressed pixel point sequences have the same image length as the ith row of pixel point sequences to be compressed;
assigning values to each compressed pixel point in the ith row of compressed pixel point sequences respectively;
wherein j is less than or equal to
Figure 964652DEST_PATH_IMAGE004
The process of assigning the value of the jth compressed pixel point in the ith row of compressed pixel point sequence comprises the following steps:
superposing the ith row of pixel point sequences to be compressed and the ith row of compressed pixel point sequences on a straight line;
calculating the weighted average value of m pixels to be compressed which are closest to the jth compressed pixel in the ith row of pixel sequences to be compressed, taking the weighted average value as the pixel value of the jth compressed pixel in the ith row of compressed pixel sequences, wherein m is less than or equal to
Figure 572350DEST_PATH_IMAGE003
Is a positive integer of (1).
2. The method of claim 1, wherein the pixel matrix to be compressed and the compressed pixel matrix have the same matrix type, and the matrix type is a two-dimensional matrix or a three-dimensional matrix.
3. The method according to claim 1, wherein in the process of calculating the weighted average of m pixels to be compressed closest to the jth compressed pixel in the ith row of pixel to be compressed sequence, the weight of the pixel to be compressed close to the jth compressed pixel is greater than the weight of the pixel to be compressed far away from the jth compressed pixel.
4. The method of claim 1, wherein after the obtaining of the VR image data to be compressed and before the compressing of each row of pixel sequences to be compressed included in the pixel matrix to be compressed, the method further comprises:
and compressing the corresponding relation between the gray values and the chromatic values in the VR image data to be compressed into a group of chromatic values corresponding to every four adjacent gray values.
5. The method of claim 4, wherein if the correspondence between gray values and chroma values in the VR image data to be compressed is one set of chroma values for each gray value, the compressing the correspondence between gray values and chroma values in the VR image data to be compressed into one set of chroma values for every four adjacent gray values comprises:
deleting any three groups of colorimetric values in four groups of colorimetric values corresponding to every four adjacent gray values in the VR image data to be compressed, and taking the remaining colorimetric values as common colorimetric components of the four adjacent gray values; or
And averaging four groups of chrominance values corresponding to every four adjacent gray values in the VR image data to be compressed to obtain a group of average chrominance values, and taking the average chrominance values as the common chrominance components of the four adjacent gray values.
6. A method for decompressing virtual reality image data, the method comprising:
obtaining compressed VR image data, wherein the compressed VR image data corresponds to a compressed pixel matrix, the compressed pixel matrix comprises n rows of compressed pixel point sequences, and n is an integer greater than or equal to 1;
respectively decompressing each row of compressed pixel point sequences contained in the compressed pixel point matrix based on a preset decompression proportion to obtain a decompressed pixel point matrix containing n rows of decompressed pixel point sequences, and outputting the decompressed pixel point matrix as VR (virtual reality) image data to be displayed, wherein the ith row of decompressed pixel point sequences in the decompressed pixel point matrix is obtained by decompressing the ith row of compressed pixel point sequences in the compressed pixel point matrix, and i is a positive integer less than or equal to n;
the process of compressing the ith row of compressed pixel point sequences into the ith row of decompressed pixel point sequences comprises the following steps:
determining the number of decompressed pixel points contained in the ith row of decompressed pixel point sequence
Figure 624620DEST_PATH_IMAGE005
Wherein, in the step (A),
Figure 608757DEST_PATH_IMAGE006
Figure 266134DEST_PATH_IMAGE007
d is the preset decompression proportion, and is the number of compressed pixel points contained in the ith row of compressed pixel point sequence;
establishing an inclusion
Figure 44734DEST_PATH_IMAGE005
An ith row of decompressed pixel point sequences having the same image length as the ith row of compressed pixel point sequences;
respectively assigning values to each decompression pixel point in the ith row of decompression pixel point sequences;
wherein j is less than or equal to
Figure 584300DEST_PATH_IMAGE005
The process of assigning the value to the jth decompressed pixel point in the ith row of decompressed pixel point sequence comprises the following steps:
superposing the ith row of compressed pixel point sequence and the ith row of decompressed pixel point sequence on a straight line;
calculating the weighted average value of m compressed pixel points which are closest to the jth decompressed pixel point in the ith row of compressed pixel point sequence, taking the weighted average value as the pixel value of the jth decompressed pixel point in the ith row of decompressed pixel point sequence, wherein m is less than or equal to
Figure 873592DEST_PATH_IMAGE008
Is a positive integer of (1).
7. The method of claim 6, wherein after said obtaining a decompressed pixel matrix comprising n rows of decompressed pixel point sequences and before said outputting said decompressed pixel matrix as VR image data to be displayed, said method further comprises:
and decompressing the corresponding relation between the gray value and the chromatic value in the decompression pixel point matrix into a group of chromatic values corresponding to each gray value.
8. The method of claim 7, wherein decompressing the correspondence between gray values and chroma values in the decompressed pixel matrix into a set of chroma values for each gray value if the original correspondence between gray values and chroma values in the decompressed pixel matrix is a set of chroma values for every four adjacent gray values comprises:
and copying a group of colorimetric values corresponding to every four adjacent gray values in the decompression pixel point matrix to obtain four groups of colorimetric values, and enabling the four groups of colorimetric values to correspond to the four adjacent colorimetric values one by one.
9. A compression device of virtual reality image data is characterized by comprising a video interface, an image compression module and a wireless transmission module;
the video interface is used for connecting a main control device and acquiring VR image data to be compressed from the main control device, the VR image data to be compressed corresponds to a pixel matrix to be compressed, the pixel matrix to be compressed comprises n rows of pixel sequences to be compressed, and n is an integer greater than or equal to 1;
the image compression module is used for respectively compressing each row of pixel point sequences to be compressed contained in the pixel point matrix to be compressed based on a preset compression ratio to obtain a compressed pixel point matrix containing n rows of compressed pixel point sequences, wherein the ith row of compressed pixel point sequences in the compressed pixel point matrix is obtained by compressing the ith row of pixel point sequences to be compressed in the pixel point matrix to be compressed, and i is a positive integer less than or equal to n;
the process of compressing the ith row of pixel point sequences to be compressed into the ith row of compressed pixel point sequences comprises the following steps:
determining the number of compressed pixel points contained in the ith row of compressed pixel point sequence
Figure 182214DEST_PATH_IMAGE009
Wherein, in the step (A),
Figure 334978DEST_PATH_IMAGE010
Figure 96260DEST_PATH_IMAGE011
for the number of pixels to be compressed contained in the ith row of pixel point sequence to be compressed,cthe preset compression ratio is set;
establishing an inclusion
Figure 422199DEST_PATH_IMAGE009
The ith row of compressed pixel point sequences are used for compressing pixel points and have the same image length as the ith row of pixel point sequences to be compressed;
assigning values to each compressed pixel point in the ith row of compressed pixel point sequences respectively;
wherein j is less than or equal to
Figure 850907DEST_PATH_IMAGE009
The process of assigning the value of the jth compressed pixel point in the ith row of compressed pixel point sequence comprises the following steps:
superposing the ith row of pixel point sequences to be compressed and the ith row of compressed pixel point sequences on a straight line;
calculating the weighted average value of m pixels to be compressed which are closest to the jth compressed pixel in the ith row of pixel to be compressed pixel sequence, and taking the weighted average value as the weighted average valueThe pixel value of the j-th compressed pixel point in the ith row of compressed pixel point sequence is m which is less than or equal to
Figure 971309DEST_PATH_IMAGE011
A positive integer of (d);
and the wireless transmitting module is used for outputting the compressed pixel matrix as compressed VR image data.
10. A virtual reality image data decompression device is characterized by comprising a wireless receiving module, an image decompression module and a video interface;
the wireless receiving module is used for receiving compressed VR image data, the compressed VR image data corresponds to a compressed pixel matrix, the compressed pixel matrix comprises n rows of compressed pixel point sequences, and n is an integer greater than or equal to 1;
the image decompression module is used for respectively decompressing each row of compressed pixel point sequences contained in the compressed pixel point matrix based on a preset decompression proportion to obtain a decompressed pixel point matrix containing n rows of decompressed pixel point sequences, wherein the ith row of decompressed pixel point sequences in the decompressed pixel point matrix is obtained by decompressing the ith row of compressed pixel point sequences in the compressed pixel point matrix, and i is a positive integer less than or equal to n;
the process of compressing the ith row of compressed pixel point sequences into the ith row of decompressed pixel point sequences comprises the following steps:
determining the number of decompressed pixel points contained in the ith row of decompressed pixel point sequence
Figure 187265DEST_PATH_IMAGE012
Wherein, in the step (A),
Figure 51316DEST_PATH_IMAGE013
Figure 334529DEST_PATH_IMAGE014
compression for inclusion in the ith row of compressed pixel point sequenceThe number of the pixel points, d is the preset decompression proportion;
establishing an inclusion
Figure 891413DEST_PATH_IMAGE015
An ith row of decompressed pixel point sequences having the same image length as the ith row of compressed pixel point sequences;
respectively assigning values to each decompression pixel point in the ith row of decompression pixel point sequences;
wherein j is less than or equal to
Figure 830550DEST_PATH_IMAGE015
The process of assigning the value to the jth decompressed pixel point in the ith row of decompressed pixel point sequence comprises the following steps:
superposing the ith row of compressed pixel point sequence and the ith row of decompressed pixel point sequence on a straight line;
calculating the weighted average value of m compressed pixel points which are closest to the jth decompressed pixel point in the ith row of compressed pixel point sequence, taking the weighted average value as the pixel value of the jth decompressed pixel point in the ith row of decompressed pixel point sequence, wherein m is less than or equal to
Figure 498291DEST_PATH_IMAGE016
A positive integer of (d);
and the video interface is used for connecting VR equipment and outputting the decompressed pixel point matrix to the VR equipment as to-be-displayed VR image data.
CN201711336475.8A 2017-12-13 2017-12-13 Compression method, decompression method and device for virtual reality image data Active CN109922329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711336475.8A CN109922329B (en) 2017-12-13 2017-12-13 Compression method, decompression method and device for virtual reality image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711336475.8A CN109922329B (en) 2017-12-13 2017-12-13 Compression method, decompression method and device for virtual reality image data

Publications (2)

Publication Number Publication Date
CN109922329A CN109922329A (en) 2019-06-21
CN109922329B true CN109922329B (en) 2021-02-26

Family

ID=66959286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711336475.8A Active CN109922329B (en) 2017-12-13 2017-12-13 Compression method, decompression method and device for virtual reality image data

Country Status (1)

Country Link
CN (1) CN109922329B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6950469B2 (en) * 2001-09-17 2005-09-27 Nokia Corporation Method for sub-pixel value interpolation
JP4241774B2 (en) * 2006-07-20 2009-03-18 カシオ計算機株式会社 Image processing apparatus, image processing method, and program
KR101700358B1 (en) * 2009-12-09 2017-01-26 삼성전자주식회사 Method and apparatus for encoding video, and method and apparatus for decoding video
KR101530284B1 (en) * 2010-07-16 2015-06-19 삼성전자주식회사 Method and apparatus for video intra prediction encoding, and method and apparatus for video intra prediction decoding

Also Published As

Publication number Publication date
CN109922329A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
CN110136066B (en) Video-oriented super-resolution method, device, equipment and storage medium
CN103440612B (en) Image processing method and device in a kind of GPU vitualization
DE60004827T2 (en) SEGMENTATION OF COMPRESSED GRAPHIC DATA FOR PARALLEL DECOMPRESSION AND REPRESENTATION
US7173635B2 (en) Remote graphical user interface support using a graphics processing unit
CN102523367B (en) Real time imaging based on many palettes compresses and method of reducing
WO2020251688A1 (en) Selectively enhancing compressed digital content
CN110163801B (en) Image super-resolution and coloring method, system and electronic equipment
GB2539241B (en) Video processing system
CN103514241A (en) Image loading method and system
CN112991231B (en) Single-image super-image and perception image enhancement joint task learning system
CN108235057A (en) A kind of network transmission and method for visualizing of extensive utilizing ocean current data
CN108334412A (en) A kind of method and apparatus of display image
CN105912289A (en) Startup LOGO image conversion and storage method and apparatus, and startup LOGO image displaying method and apparatus
EP3180910B1 (en) Method for optimized chroma subsampling, apparatus for optimized chroma subsampling and storage device
CN105933707A (en) Compression method and device for panoramic video
US8036473B1 (en) Pixel selective wavelet transform methods
CN108174084A (en) panoramic video processing method and terminal device
CN104639834A (en) Method and system for transmitting camera image data
CN109922329B (en) Compression method, decompression method and device for virtual reality image data
CN110378184A (en) A kind of image processing method applied to automatic driving vehicle, device
US20070211937A1 (en) Hybrid Image Compression Method
US20200074691A1 (en) Processing images using hybrid infinite impulse response (iir) and finite impulse response (fir) convolution block
CN104394387A (en) Multi-channel image display method supporting video superposition for ground control station of unmanned aerial vehicle
CN116405692A (en) Transmission method based on cloud matting and related equipment
KR101379905B1 (en) system and method for rendering an image

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