WO2018040860A1 - 一种全景视频的压缩方法及装置 - Google Patents

一种全景视频的压缩方法及装置 Download PDF

Info

Publication number
WO2018040860A1
WO2018040860A1 PCT/CN2017/096432 CN2017096432W WO2018040860A1 WO 2018040860 A1 WO2018040860 A1 WO 2018040860A1 CN 2017096432 W CN2017096432 W CN 2017096432W WO 2018040860 A1 WO2018040860 A1 WO 2018040860A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
pictures
triangle
panoramic video
height
Prior art date
Application number
PCT/CN2017/096432
Other languages
English (en)
French (fr)
Inventor
王涛
诸加丹
杜瑶
刘鸿彬
Original Assignee
北京奇艺世纪科技有限公司
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 北京奇艺世纪科技有限公司 filed Critical 北京奇艺世纪科技有限公司
Priority to CA3030258A priority Critical patent/CA3030258C/en
Priority to US16/320,409 priority patent/US10834399B2/en
Priority to EP17845162.1A priority patent/EP3509300A1/en
Priority to SG11201900337UA priority patent/SG11201900337UA/en
Priority to MYPI2019000153A priority patent/MY193893A/en
Priority to KR1020197004697A priority patent/KR102287773B1/ko
Priority to AU2017317839A priority patent/AU2017317839B2/en
Priority to JP2019510298A priority patent/JP6735908B2/ja
Publication of WO2018040860A1 publication Critical patent/WO2018040860A1/zh

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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/16Spatio-temporal transformations, e.g. video cubism
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4015Image demosaicing, e.g. colour filter arrays [CFA] or Bayer patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • 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/162User input
    • 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
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/48Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using compressed domain processing techniques other than decoding, e.g. modification of transform coefficients, variable length coding [VLC] data or run-length data
    • 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
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing

Definitions

  • the present application relates to the field of video technologies, and in particular, to a method and an apparatus for compressing panoramic video.
  • Panoramic video refers to 360-degree panoramic video, which is extended from the 360-degree panoramic technology. It converts multiple consecutive still panoramas into dynamic video images, and the panoramic video can watch dynamic video 360 degrees up and down around the shooting angle.
  • the panoramic video is not in the form of a single static panoramic picture. It consists of a series of panoramic pictures connected in series to form a smooth and clear dynamic video image.
  • the method for playing the panoramic video is: the server sends the panoramic video to the client; the client decodes the panoramic video into a panoramic picture, extracts the panoramic picture according to the current angle of the viewer, and plays the video composed of the extracted panoramic picture.
  • the process of extracting the panoramic image according to the current angle of the viewer may be: extracting the panoramic image according to the current angle of the set viewer and the sphere mapping relationship.
  • a traditional spherical panorama is a rectangular image of the sphere's spherical texture coordinates, but the actual useful pixel range can be represented by an ellipse.
  • the width of the ellipse at the widest point is the length of the rectangle, from the widest point of the ellipse to two
  • the width of the end is gradually shortened, the two ends are the shortest, and the shortest width is one pixel width, so the rectangular spherical panorama has redundant pixel information.
  • the panoramic video seen by the user is only a part of the panoramic video sent by the server.
  • the server will send all the panoramic video to the client, resulting in unnecessary data transmission, which will result in waste of network bandwidth.
  • the purpose of the embodiment of the present application is to provide a method and a device for compressing panoramic video to reduce waste of network bandwidth.
  • the embodiment of the present application discloses a method for compressing a panoramic video, and the method includes:
  • the compressing the frame picture for each frame picture separately includes:
  • the frame picture is compressed into a diamond picture by using an interpolation technique, wherein the two diagonal lengths of the diamond picture are respectively the width and height of the frame picture.
  • the dividing the compressed frame picture comprises:
  • the splitting of the divided pictures includes:
  • a triangle picture that is not equally divided in two triangle pictures, the two right triangle picture pieces are combined into one rectangular picture.
  • the dividing the compressed frame picture comprises:
  • the splitting of the divided pictures includes:
  • the two right triangle pictures are combined into one rectangular picture.
  • the method before generating a new panoramic video according to all the pictures obtained by the stitching, the method further includes:
  • the embodiment of the present application discloses a compression device for a panoramic video, and the device includes:
  • a first generating module configured to generate, for a target panoramic video, each frame of the target panoramic video
  • a compression module configured to compress the frame picture for each frame picture separately
  • a dividing module configured to divide the compressed frame image
  • a flattening module for flattening the divided pictures
  • a second generating module configured to generate a new panoramic video according to all the pictures obtained by the stitching.
  • the compression module is specifically configured to:
  • the frame picture is compressed into a diamond picture by using an interpolation technique for each frame picture, wherein the two diagonal lengths of the diamond picture are respectively the width and height of the frame picture.
  • the dividing module is specifically configured to:
  • the split module is specifically configured to:
  • a triangle picture that is not equally divided in two triangle pictures, the two right triangle picture pieces are combined into one rectangular picture.
  • the dividing module is specifically configured to:
  • the height is half of the height of the frame picture or the height of the two triangle pictures is half of the width of the frame picture;
  • the split module is specifically configured to:
  • the two right triangle pictures are combined into one rectangular picture.
  • the device before the second generating module, the device further includes:
  • the processing module is configured to perform preset processing on the split edges of the stitched pictures.
  • an electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through a communication bus;
  • a memory for storing a computer program
  • the processor when used to execute a computer program stored on the memory, implements the compression method of the panoramic video according to any of the above.
  • an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores instructions, when executed on a computer, causing the computer to perform the panoramic video of any of the foregoing Compression method.
  • the embodiment of the present application further provides a computer program product comprising instructions, when executed on a computer, causing the computer to perform the compression method of the panoramic video described in any of the above.
  • a method and an apparatus for compressing a panoramic video for each target frame, generating a frame of each frame of the target panoramic video; respectively, compressing the frame for each frame of the image a frame picture; dividing the compressed frame picture; combining the divided pictures; and generating a new panoramic video according to all the pictures obtained by the combination.
  • the panoramic video is compressed, and the server sends the compressed new panoramic video to the client. Subsequently, the client can play all the panoramic video sent by the server. In the embodiment, unnecessary data is not transmitted, thereby reducing the waste of network bandwidth.
  • FIG. 1 is a schematic flowchart of a method for compressing a panoramic video according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart diagram of another method for compressing panoramic video according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a panoramic video compression apparatus according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of another panoramic video compression apparatus according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of generating a flattened rectangular picture according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of generating another combined rectangular picture according to an embodiment of the present application.
  • 7A is a schematic diagram of a diamond-shaped picture division
  • 7B is another schematic diagram of a diamond-shaped picture division
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for compressing a panoramic video according to an embodiment of the present disclosure, which may include the following steps:
  • each frame of the generated target panoramic video may be a spherical panorama, that is, a rectangular image that may be expanded by spherical texture coordinates.
  • a video decoding technique or the like may be used to generate each frame of the target panoramic video.
  • each frame of the image generated for the target panoramic video is a picture having a rectangular shape.
  • the frame picture may be compressed into a diamond picture by using an interpolation technique for each frame picture, where two diagonal lengths of the diamond picture may be respectively Width and height.
  • the frame picture is: a picture with a rectangular shape expanded by spherical texture coordinates, that is, a picture before compression;
  • the above-mentioned diamond picture is: a picture with a diamond shape, that is, The compressed image.
  • the frame picture is compressed into a diamond picture by using an interpolation technique, wherein the frame picture and the diamond picture have a corresponding relationship, and the corresponding relationship may be: one frame picture corresponds to one Diamond picture.
  • the lengths of the two diagonal lines of the diamond image may be equal to: the width and height of the corresponding frame picture.
  • the length of the shorter diagonal line in the diamond picture may be equal to: the corresponding frame picture Width
  • the length of the longer diagonal in the diamond image may be equal to: the height of the corresponding frame picture.
  • the original frame picture may be transformed and stretched by interpolation techniques such as nearest neighbor interpolation technique, linear interpolation technique, and cubic spline interpolation technique, thereby compressing the frame picture into a diamond picture.
  • interpolation techniques such as nearest neighbor interpolation technique, linear interpolation technique, and cubic spline interpolation technique, thereby compressing the frame picture into a diamond picture.
  • the two diagonal lengths of the diamond image are respectively the width and height of the frame picture.
  • the original frame picture is a picture having a rectangular shape, that is, a picture before compression.
  • the compression ratio of the number of pixels of each line of the frame picture may also be determined for each frame picture, for example, the compression ratio of the most middle line of the frame picture is 1:1 (indicating that the compression is not the most The number of pixels in the middle row), the edge line of the frame picture, that is, the compression ratio of the first line and the last line is the number of pixels of the line: 1 (indicating that the number of pixels of the edge line of the picture is compressed to 1), except for the first Outside the row and the last row, the number of row pixels from the middle row to the first row or the last row is compressed to (xy-2nx)/y, where x is the number of row pixels of the frame image, y The number of column pixels of the frame picture (for example, the size of the frame picture is 200*100, then x is 200, y is 100), and n is the sequence number from the middle row to the first row or the last row;
  • the compression ratio of each row, the image of the row corresponding to the compression ratio The number of prime points is compressed, and
  • the number x of pixels in each line of the frame picture is 20, and the number y of pixels in each column is 21, that is, the frame picture has 21 lines of pixels: the 11th behavior is the most Middle row;
  • the sequence number of the most middle row is 0, and the sequence number of the middle row (11th row) to the first row (1st row) may be 0-10, that is, the value of n is from the middle row.
  • (line 11) to the first line (line 1) are 0 to 10; the number of the middle line (line 11) to the last line (line 21) can be 0 to 10, that is, the value of n is from The middle row (11th row) to the second row (line 21) are 0 to 10 respectively; subsequently, the above-mentioned "(xy-2nx)/y" formula is used to calculate the 10th row to the 1st row, respectively.
  • n corresponding to the 10th row is 1; at this time, there is (20*21-2*1*20)/21; that is, the number of pixels corresponding to the 10th row is 380/21, Can be 18.
  • the diamond picture may be equally divided into two upper and lower (or left and right) triangular pictures, wherein the height of the two triangular pictures is half of the height of the frame picture. Or the height of the two triangle pictures is half of the width of the frame picture; one of the two triangle pictures is equally divided into two right triangle pictures.
  • the diamond picture may be equally divided into two upper and lower (or left and right) triangular pictures, wherein the height of the two triangular pictures is half of the height of the frame picture. Or the height of the two triangular pictures is half of the width of the frame picture.
  • one of the diagonal lines of the diamond picture (for example, the length of the diagonal line is the width of the corresponding frame picture) is divided into two, and the diamond picture is equally divided into two.
  • a triangle picture wherein the heights of the two triangle pictures are half of the height of the corresponding frame picture; further, any one of the two triangle pictures may be equally divided into two right triangle pictures, or may not be Perform an equal division.
  • another diagonal line of the diamond image (for example, the length of the diagonal line is the height of the corresponding frame picture) may be used as a boundary, and the diamond picture is equally divided into two triangle pictures, where The height of the two triangle pictures is half the width of the corresponding frame picture; further, any one of the two triangle pictures can be three
  • the angular picture is equally divided into two right triangle images, or it may not be equally divided.
  • one of the diagonal lines of the diamond picture may be a boundary, and the diamond shape may be used.
  • the picture is equally divided into two triangle pictures, wherein when the diagonal line as the boundary is: the diagonal of the width of the corresponding frame picture, the heights of the two triangle pictures obtained after the division are: One half of the height of the frame picture; further, any one of the two triangle pictures obtained after the division may be equally divided into two right triangle pictures to perform a subsequent compression process of the panoramic video.
  • the diamond picture A has two diagonal lines a and b, and the diagonal line a is divided into boundaries, and the diamond picture A is divided into two congruent triangle pictures, which are respectively divided and obtained.
  • the two triangle pictures are: a triangle picture A1 and a triangle picture A2. It can be understood that the triangle picture A1 and the triangle picture A2 are both isosceles triangles. Further, the triangle picture A1 is further divided into two right-angle triangle pictures A11 and A12. It can be understood that the triangle picture A1 can be equally divided into two right-angle triangles by using the center line of the bottom side of the triangle picture A1 as a division boundary. Picture A11 and A12.
  • the "congruence" described in the embodiment of the present application is only relative to the shape of the triangle picture.
  • the diagonal line of the diamond image (for example, the length of the diagonal line is the height of the corresponding frame picture) may be divided into two triangle images.
  • the diagonal line as the boundary of the division is: the diagonal of the height of the corresponding frame picture
  • the height of the two triangular pictures obtained after the division is half of the width of the corresponding frame picture; further, After the division, any one of the two triangular pictures is equally divided into two right triangle pictures to perform the subsequent compression process of the panoramic video.
  • the diamond picture A has two diagonal lines a and b.
  • the diagonal picture B is divided into two equal-equal triangle pictures by dividing the boundary b.
  • the two triangular pictures obtained afterwards are: a triangle picture A3 and a triangle picture A4.
  • the triangle picture A3 and the triangle picture A4 are both isosceles triangles.
  • the triangle picture A3 is further divided into two right triangle pictures A31 and A32. It can be understood that the middle line of the bottom side of the triangle picture A3 can be used as the division boundary, and the triangle picture A3 can be equally divided into two right triangles. Picture A31 and A32.
  • the "congruence" described in the embodiment of the present application is only relative to the shape of the triangle picture. In terms of shape.
  • a triangle image that is not equally divided in two triangle pictures, and the two right-angle triangle pictures may be combined into one rectangular picture.
  • two congruent triangles can be obtained.
  • one of the two congruent triangles obtained may be further divided to obtain two congruent right triangles.
  • the triangle obtained by the above-mentioned undivided division and the two congruent right-angled triangles obtained by dividing again may be combined to form a rectangular picture.
  • the "congruence" described in the embodiment of the present application is only relative to the shape of the triangle picture.
  • the two right-angled triangle pictures can be respectively translated to the undivided triangles of the two triangular pictures.
  • the left and right sides of the picture or the upper side and the lower side, specifically to achieve flattening into a rectangular picture
  • the width of the rectangular image becomes half the width of the original image, so that the size of the flattened rectangular image is reduced to half the size of the original rectangular image.
  • original picture and original rectangular picture can all represent the frame picture proposed in the embodiment of the present application, that is, the picture before compression.
  • the two triangular pictures may be respectively transformed into two right-angled triangle pictures that are the same height and equal in area as the two triangular pictures; the two right-angled triangle pictures are Flatten into a rectangular picture.
  • the above two triangular figures may be utilized by image transformation techniques.
  • the slices are respectively transformed to obtain two right-angled triangle images having the same height and equal area as the two triangular images; the obtained two right-angle triangle images are combined into one rectangular image, so that the width of the flattened rectangular image is the original
  • the width of the image, the height of the flattened rectangle image becomes half of the height of the original image, or the height of the flattened rectangular image is the height of the original image, and the width of the flattened rectangular image becomes The width of the original image is half, so that the size of the flattened rectangle is reduced to half the size of the original rectangle.
  • original picture and original rectangular picture can all represent the frame picture proposed in the embodiment of the present application, that is, the picture before compression.
  • FIG. 5 is a schematic diagram of generating a flattened rectangular picture according to an embodiment of the present application.
  • the original rectangular picture may be equally divided into upper and lower rectangular pictures M and N, and the rectangular picture M is stretched, and the rectangular picture M is compressed into a triangle A;
  • the picture N is stretched, and the rectangular picture N is compressed into a triangle having the same height as the triangle A and symmetric with the triangle A, and the triangle obtained by compressing the rectangular picture N is equally divided into a right-angled triangle B and a right-angled triangle C; Panning the copy to the right side of the triangle A, obtaining the triangle B 1 , and translating the triangle C to the left side of the triangle A to obtain the triangle C 1 ; combining the triangle A, the triangle B 1 and the triangle C 1 into a rectangular picture, flattening The size of the rectangle after the image is reduced to half the size of the original rectangle.
  • FIG. 6 is a schematic diagram of generating another combined rectangular picture according to an embodiment of the present application.
  • the original rectangular picture may be equally divided into upper and lower rectangular pictures M and N, and the rectangular picture M (same as the above-mentioned rectangular picture M) is stretched, and the rectangle is The picture M is compressed into a triangle A (same as the above-mentioned triangle A); the rectangular picture N (same as the above-described rectangular picture N) is stretched, and the rectangular picture N is compressed to be equal to the triangle A and symmetric with the triangle A.
  • each frame of the picture corresponds to a combined rectangular picture. All the rectangular pictures obtained by the combination are encoded by using the existing coding technology, and a new compressed panoramic video can be generated.
  • the rectangular picture obtained by the combination may be referred to as a diamond panorama.
  • the diamond panorama can be inversely transformed according to the inverse process of the diamond panorama to obtain a spherical panorama, and an Open Graphics Library (OpenGL) shader can be utilized.
  • OpenGL Open Graphics Library
  • the pixel anti-sampling technique or the triangular graphics texture drawing technology of the open graphics library renders the spherical panorama and renders the panoramic image from the spherical panorama.
  • the process of inversely transforming the diamond panorama according to the generation process of the diamond panorama to obtain a spherical panorama may be: first obtain a new compressed panoramic video, after the new compression The panoramic video is decoded to obtain each diamond panorama corresponding to the new compressed panoramic video; for each diamond panorama, each diamond panorama is split and translated to obtain a diamond image corresponding to each diamond panorama Then, using the interpolation technique, transforming and stretching each diamond image (for example, horizontal stretching) to obtain a spherical panorama corresponding to each diamond panorama, and then, using the pixel backsampling technique of the open graphics library shader or Open triangle graphics texture rendering technology for the graphics library shader, rendering the spherical panorama, rendering the panoramic image from the spherical panorama.
  • the process of splitting and panning each diamond panorama to obtain a diamond image corresponding to each diamond panorama may be: splitting the diamond panorama for each diamond panorama to obtain three triangle images a larger triangular image (for an isosceles triangle image) and two smaller congruent triangular images (for two right triangles), wherein the area of the larger triangular image is equal to the above two The sum of the areas of the smaller congruent triangle pictures; the obtained three triangle pictures are combined to obtain a diamond picture corresponding to the diamond panorama.
  • each diamond panorama split the diamond panorama to obtain two congruent right triangle images; use image transformation technology to transform two congruent right triangle images to obtain two Two congruent isosceles triangle images of the same height and equal area as the above two congruent right triangle images, and then the obtained two congruent isosceles triangle images are combined to obtain the diamond panorama Corresponding diamond image.
  • the process of obtaining the spherical panorama is obtained.
  • the new compressed video can be obtained first, and the new compression is performed.
  • the subsequent panoramic video is decoded to obtain each diamond panoramic image corresponding to the new compressed panoramic video; using the interpolation technique, each diamond panoramic image is transformed and stretched to obtain a transformed and stretched image;
  • the stretched image is split and translated to obtain a spherical panorama corresponding to each diamond panorama.
  • the pixel backsampling technique of the open graphics library shader or the triangular polygon texture drawing technique of the open graphics library shader can be utilized. Renders a spherical panorama and renders the panorama from a spherical panorama.
  • the pixel inverse sampling method of the OpenGLshader (open graphics library shader) can also be used to calculate the corresponding diamond by using the texture coordinates of the spherical panorama corresponding to the display viewport of the panoramic video player.
  • the texture coordinates of the panorama so that it is not necessary to inversely transform the diamond panorama according to the inverse process of the diamond panorama, without having to obtain a spherical panorama, the panorama can be directly rendered by the diamond panorama.
  • the pixel anti-sampling method of the OpenGLshader can also be utilized to calculate the corresponding texture of the spherical panorama corresponding to the display viewport of the panoramic video player.
  • the texture coordinates of the diamond panorama further obtain the texture coordinates of the diamond panorama, and the correspondence between the texture coordinates of the spherical panorama corresponding to the display viewport of the panoramic video player, and use the above correspondence to map the diamonds in the panorama
  • Each pixel is converted to a texture based on the spherical panorama based on the texture coordinates in the diamond panorama, resulting in a spherical panorama corresponding to each diamond panorama.
  • the panoramic video is compressed, and the server sends the compressed new panoramic video to the client. Subsequently, the client can play all the panoramic video sent by the server, and does not transmit unnecessary data, thereby reducing the network. Waste of bandwidth.
  • the resolution of the panoramic video can be maintained, so that after the client obtains the panoramic video sent by the server, the obtained panoramic video can be decompressed, and can be obtained and played clearly. Lossless panoramic video.
  • FIG. 2 is a flowchart of another method for compressing panoramic video according to an embodiment of the present application.
  • the embodiment shown in FIG. 2 of the present application is based on the embodiment shown in FIG. 1, and S106 is added to perform preset processing on the split edges of the stitched pictures.
  • the above S106 can be increased between S104 and S105.
  • the above-mentioned preset processing can be understood as an operation of repeatedly drawing a pixel at a split boundary in the divided picture.
  • the pixel crossing the boundary of the adjacent triangle causes the seam to appear, and the stitching of the stitched image can be performed.
  • the edge is processed, that is, the pixels in the divided image are repeatedly drawn. Specifically, one or two or three pixels may be repeatedly drawn at a boundary point of each triangle horizontal scanning line segment, and the pixels have the same color as adjacent pixels of the associated triangle, thereby forming edges of the repeated pixels to be isolated.
  • the formed edge may be a double boundary edge or a single boundary edge. Wherein, the double boundary is a boundary having two colors, and the single boundary is a boundary having a single color.
  • the above single boundary can be understood as: a boundary formed by repeated drawing for a pixel at the boundary of one of the triangles of the split edge
  • the above double boundary can be understood as: the boundary of two triangles respectively for the same split edge
  • the pixels are made to repeat the boundaries formed by the drawing.
  • the panoramic video is compressed, and the server sends the compressed new panoramic video to the client. Subsequently, the client can play all the panoramic video sent by the server, and does not transmit unnecessary data, thereby reducing the network. Waste of bandwidth.
  • the pixels in the divided picture are repeatedly drawn, which avoids the occurrence of the seam phenomenon caused by the pixel crossing at the boundary.
  • FIG. 3 is a schematic structural diagram of a panoramic video compression apparatus according to an embodiment of the present disclosure.
  • the compression apparatus may include: a first generation module 201, a compression module 202, and The dividing module 203, the splitting module 204, and the second generating module 205.
  • a first generating module 201 configured to generate, for a target panoramic video, each frame of the target panoramic video
  • the compression module 202 is configured to compress the frame picture for each frame picture separately;
  • the compression module 202 can be specifically configured to:
  • the frame picture is compressed into a diamond picture by using an interpolation technique, wherein the two diagonal lengths of the diamond picture are respectively the width and height of the frame picture.
  • a dividing module 203 configured to divide the compressed frame picture
  • the splitting module 204 is configured to flatten the divided pictures
  • the dividing module 203 is specifically configured to: divide the diamond picture into two triangle pictures, wherein the height of the two triangle pictures is half of the height of the frame picture or the two triangles The height of the picture is half of the width of the frame picture; one of the two triangle pictures is equally divided into two right triangle pictures.
  • the splitting module 204 is specifically configured to: combine the undivided triangle images and the two right triangle images into two rectangular images.
  • the dividing module 203 is specifically configured to: divide the diamond picture into two triangle pictures, wherein the height of the two triangle pictures is half of the height of the frame picture or the two triangles The height of the picture is half the width of the frame picture.
  • the splitting module 204 is specifically configured to: convert the two triangular pictures into two right-angled triangle pictures that are the same height and equal in area as the two triangular pictures; and combine the two right-angled triangle pictures into A rectangular picture.
  • the second generating module 205 is configured to generate a new panoramic video according to all the pictures obtained by the stitching.
  • the panoramic video is compressed, and the server sends the compressed new panoramic video to the client. Subsequently, the client can play all the panoramic video sent by the server, and does not transmit unnecessary data, thereby reducing the network. Waste of bandwidth.
  • FIG. 4 is a schematic structural diagram of another apparatus for compressing a panoramic video according to an embodiment of the present application.
  • the embodiment shown in FIG. 4 is added to the processing module 206 according to the embodiment shown in FIG. Preset processing on the flattened edges of the stitched pictures.
  • the panoramic video is compressed, and the server sends the compressed new panoramic video to the client. Subsequently, the client can play all the panoramic video sent by the server, and does not transmit unnecessary data, thereby reducing the network. Waste of bandwidth.
  • the pixels in the divided picture are repeatedly drawn, which avoids the occurrence of the seam phenomenon caused by the pixel crossing at the boundary.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 8, which may include a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 pass through a communication bus.
  • a processor 810 may include a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 pass through a communication bus.
  • a memory 830 configured to store a computer program
  • the processor 810 is configured to implement the method for compressing the panoramic video provided by the embodiment of the present application, where the method for compressing the panoramic video may include the following steps:
  • the processor of the electronic device runs a computer program stored in the memory to perform the method for compressing the panoramic video provided by the embodiment of the present application, so that the panoramic video can be compressed, and the server will be compressed.
  • the new panoramic video is sent to the client.
  • the client can play all the panoramic video sent by the server, and does not transmit unnecessary data, thereby reducing the waste of network bandwidth.
  • the electronic device is specifically configured to: in the process of implementing the performing, respectively, compressing the frame image for each frame of the picture:
  • the frame picture is compressed into a diamond picture by using an interpolation technique, wherein the two diagonal lengths of the diamond picture are respectively the width and height of the frame picture.
  • the electronic device is specifically configured to:
  • the electronic device is specifically used to:
  • a triangle picture that is not equally divided in two triangle pictures, the two right triangle picture pieces are combined into one rectangular picture.
  • the electronic device is specifically configured to:
  • the electronic device is specifically used to:
  • the two right triangle pictures are combined into one rectangular picture.
  • the electronic device before the electronic device performs the process of implementing the all the pictures obtained according to the stitching to generate a new panoramic video, the electronic device is further configured to:
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above electronic device and other devices.
  • the memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
  • RAM random access memory
  • NVM non-volatile memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform any of the above embodiments
  • the compression method of the panoramic video may include the following steps:
  • the computer readable storage medium stores instructions for performing a panoramic video compression method provided by the embodiment of the present application when it is run on a computer, thereby enabling compression of the panoramic video.
  • the server sends the compressed new panoramic video to the client. Subsequently, the client can play all the panoramic video sent by the server, and does not transmit unnecessary data, thereby reducing the waste of network bandwidth.
  • the compressing the frame picture for each frame picture separately includes:
  • the frame picture is compressed into a diamond picture by using an interpolation technique, wherein the two diagonal lengths of the diamond picture are respectively the width and height of the frame picture.
  • the dividing the compressed frame picture comprises:
  • the splitting of the divided pictures includes:
  • a triangle picture that is not equally divided in two triangle pictures, the two right triangle picture pieces are combined into one rectangular picture.
  • the dividing the compressed frame picture comprises:
  • the splitting of the divided pictures includes:
  • the two right triangle pictures are combined into one rectangular picture.
  • the method before generating a new panoramic video according to all the pictures obtained by the stitching, the method further includes:
  • a computer program product comprising instructions, when executed on a computer, causing a computer to perform the panoramic video compression method of any of the above embodiments, wherein
  • the compression method of the panoramic video may include the steps of:
  • the computer program product containing the instruction when it is shipped on a computer
  • the computer is configured to perform the compression method of the panoramic video provided by the embodiment of the present application, so that the panoramic video can be compressed, and the server sends the compressed new panoramic video to the client, and the client can play the subsequent All of the panoramic video sent by the server does not transmit unnecessary data, thereby reducing the waste of network bandwidth.
  • the compressing the frame picture for each frame picture separately includes:
  • the frame picture is compressed into a diamond picture by using an interpolation technique, wherein the two diagonal lengths of the diamond picture are respectively the width and height of the frame picture.
  • the dividing the compressed frame picture comprises:
  • the splitting of the divided pictures includes:
  • a triangle picture that is not equally divided in two triangle pictures, the two right triangle picture pieces are combined into one rectangular picture.
  • the dividing the compressed frame picture comprises:
  • the splitting of the divided pictures includes:
  • the two right triangle pictures are combined into one rectangular picture.
  • the method before generating a new panoramic video according to all the pictures obtained by the stitching, the method further includes:
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Studio Devices (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Systems (AREA)
  • Studio Circuits (AREA)

Abstract

本申请实施例公开了一种全景视频的压缩方法及装置,所述方法包括:针对目标全景视频,生成所述目标全景视频的每一帧图片;分别针对每一帧图片,压缩所述帧图片;对压缩后的所述帧图片进行划分;对划分得到的图片进行拼合;根据拼合得到的所有图片,生成新的全景视频。利用本申请实施例,可以减少网络带宽的浪费。

Description

一种全景视频的压缩方法及装置
本申请要求于2016年8月30日提交中国专利局、申请号为201610765058.4发明名称为“一种全景视频的压缩方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及视频技术领域,特别涉及一种全景视频的压缩方法及装置。
背景技术
全景视频,是指360度全景视频,它是在360度全景技术之上发展延伸而来。它将连续多张的静态全景图片转化为动态的视频图像,全景视频可以在拍摄角度左右上下360度任意观看动态视频。全景视频它不在是单一的静态全景图片形式,是由很多张全景图片串联起来组成了流畅清楚的动态视频图像。
目前全景视频的播放方法是:服务器将全景视频发送给客户端;客户端将全景视频解码成全景图片,根据观看者的当前角度对全景图片进行抽取,播放由抽取后的全景图片组成的视频。其中,根据观看者的当前角度对全景图片进行抽取的过程可以是:根据所设置的观看者的当前角度以及球体映射关系,对全景图片进行抽取。传统的球面全景图是以球体的球面纹理坐标展开的一张矩形图像,但是其实际的有用像素范围可以用一个椭圆表示,椭圆最宽处的宽度为矩形的长度,从椭圆最宽处至两端的宽度逐渐变短,上述两端为最短处,最短处的宽度为一个像素点宽度,因此矩形的球面全景图存在冗余的像素信息。
可见,在实际应用中,用户看到的全景视频仅为服务器发送的全景视频的一部分。但是服务器会将全部全景视频发送给客户端,导致不必要数据的传输,进而造成网络带宽的浪费。
发明内容
本申请实施例的目的在于提供一种全景视频的压缩方法及装置,以减少网络带宽的浪费。
为达到上述目的,本申请实施例公开了一种全景视频的压缩方法,方法包括:
针对目标全景视频,生成所述目标全景视频的每一帧图片;
分别针对每一帧图片,压缩所述帧图片;
对压缩后的所述帧图片进行划分;
对划分得到的图片进行拼合;
根据拼合得到的所有图片,生成新的全景视频。
可选地,所述分别针对每一帧图片,压缩所述帧图片,包括:
分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
可选地,所述对压缩后的所述帧图片进行划分,包括:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
将两个三角形图片中的一个三角形图片等分为两个直角三角形图片;
所述对划分得到的图片进行拼合,包括:
将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
可选地,所述对压缩后的所述帧图片进行划分,包括:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
所述对划分得到的图片进行拼合,包括:
将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;
将所述两个直角三角形图片拼合为一个矩形图片。
可选地,在根据拼合得到的所有图片,生成新的全景视频之前,所述方法还包括:
对拼合得到的图片的拼合边缘进行预设处理。
为达到上述目的,本申请实施例公开了一种全景视频的压缩装置,装置包括:
第一生成模块,用于针对目标全景视频,生成所述目标全景视频的每一帧图片;
压缩模块,用于分别针对每一帧图片,压缩所述帧图片;
划分模块,用于对压缩后的所述帧图片进行划分;
拼合模块,用于对划分得到的图片进行拼合;
第二生成模块,用于根据拼合得到的所有图片,生成新的全景视频。
可选地,所述压缩模块,具体用于:
用于分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
可选地,所述划分模块,具体用于:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
将两个三角形图片中的一个三角形图片等分为两个直角三角形图片;
所述拼合模块,具体用于:
将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
可选地,所述划分模块,具体用于:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的 高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
所述拼合模块,具体用于:
将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;
将所述两个直角三角形图片拼合为一个矩形图片。
可选地,在第二生成模块之前,所述装置还包括:
处理模块,用于对拼合得到的图片的拼合边缘进行预设处理。
在本申请实施例的又一方面,还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的计算机程序时,实现上述任一所述的全景视频的压缩方法。
另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述任一所述的全景视频的压缩方法。
在本申请实施例的又一方面,本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一所述的全景视频的压缩方法。
由上述的技术方案可见,本申请实施例提供的一种全景视频的压缩方法及装置,针对目标全景视频,生成所述目标全景视频的每一帧图片;分别针对每一帧图片,压缩所述帧图片;对压缩后的所述帧图片进行划分;对划分得到的图片进行拼合;根据拼合得到的所有图片,生成新的全景视频。
可见,对全景视频进行压缩,服务器将压缩后的新的全景视频发送给客户端,后续的,客户端可以播放服务器所发送的全景视频的全部,本申 请实施例中没有将不必要数据进行传输,进而可以减少网络带宽的浪费。
当然,实施本申请的任一产品或方法必不一定需要同时达到以上所述的所有优点。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。
图1为本申请实施例提供的一种全景视频的压缩方法的流程示意图;
图2为本申请实施例提供的另一种全景视频的压缩方法的流程示意图;
图3为本申请实施例提供的一种全景视频的压缩装置的结构示意图;
图4为本申请实施例提供的另一种全景视频的压缩装置的结构示意图;
图5为本申请实施例提供的一种拼合后的矩形图片的生成示意图;
图6为本申请实施例提供的另一种拼合后的矩形图片的生成示意图;
图7A为菱形图片划分的一种示意图;
图7B为菱形图片划分的另一种示意图;
图8为本申请实施例所提供的一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
下面首先对本申请实施例提供的一种全景视频的压缩方法进行详细说明。
参见图1,图1为本申请实施例提供的一种全景视频的压缩方法的流程示意图,可以包括如下步骤:
S101,针对目标全景视频,生成所述目标全景视频的每一帧图片;
在一种实现方式中,生成的目标全景视频的每一帧图片可以为球面全景图,即可以为按球面纹理坐标展开的一张矩形图片。其中,针对目标全景视频,可以采用视频解码等技术,生成该目标全景视频的每一帧图片。
也就是说,针对目标全景视频生成的每一帧图片,均为形状为矩形的图片。
S102,分别针对每一帧图片,压缩所述帧图片;
在一种实现方式中,可以分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度可以分别为所述帧图片的宽度和高度。
也就是说,本申请实施例中上述帧图片即为:按球面纹理坐标展开的形状为矩形的图片,也即为压缩前的图片;上述菱形图片即为:形状为菱形的图片,也即为压缩后的图片。可以理解的是,分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,帧图片与菱形图片之间存在对应关系,该对应关系可以为:一帧图片对应一菱形图片。该菱形图片的两条对角线的长度可以分别等于:所对应的帧图片的宽度和高度。在一种实现方式中,当帧图片的宽度为短边的长度,帧图片的高度为长边的长度时,该菱形图片中较短的对角线的长度可以等于:所对应的帧图片的宽度,而该菱形图片中较长的对角线的长度可以等于:所对应的帧图片的高度。
示例性的,分别针对每一帧图片,可以利用最近邻插值技术、线性插值技术、三次样条插值技术等插值技术对原有帧图片进行变换拉伸,从而将该帧图片压缩成菱形图片,其中,菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
换言之,上述原有帧图片即为形状为矩形的图片,也即为压缩前的图片。
在一种实现方式中,还可以针对每一帧图片,确定该帧图片的每一行的像素数量的压缩比,例如:该帧图片的最中间行的压缩比为1:1(表示不压缩最中间行的像素数量),该帧图片的边缘行即第一行和最后一行的压缩比为行的像素点个数:1(表示将图片边缘行的像素个数压缩为1),除第一行和最后一行外,将自最中间行到第一行或最后一行的行像素点的数量压缩为(xy-2nx)/y,其中,x为该帧图片的行像素点的数量,y该帧图片的列像素点的数量(例如,该帧图片的尺寸为200*100,则x为200,y为100),n为自最中间行到第一行或最后一行的序号;根据确定的各个行的压缩比,对压缩比对应的行的像 素点的数量进行压缩,将该帧图片压缩成菱形图片,其中,菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
举例而言,一帧图片,该帧图片中每行像素点的数量x为20,每列像素点的数量y为21,即该帧图片具有21行像素点:第11行为该帧图片的最中间行;
在一种情况中,以最中间行的序号为0开始,最中间行(第11行)到第一行(第1行)的序号可以是0~10,即n的取值从最中间行(第11行)到第一行(第1行)分别为0~10;最中间行(第11行)到最后一行(第21行)的序号可以是0~10,即n的取值从最中间行(第11行)到第后一行(第21行)分别为0~10;后续的,利用上述“(xy-2nx)/y”公式分别计算第10行~第1行,以及第12行~第21行对应的像素点的数量;
以第10行为例:第10行对应的n的取值为1;此时存在(20*21-2*1*20)/21;即第10行对应的像素点的数量为380/21,可以为18。
S103,对压缩后的所述帧图片进行划分;
具体的,在实际应用中,可以将所述菱形图片等分为上、下(或左、右)两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;将两个三角形图片中的一个三角形图片等分为两个直角三角形图片。
具体的,在实际应用中,可以将所述菱形图片等分为上、下(或左、右)两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半。
示例性的,分别针对每一帧图片,可以以菱形图片的其中一条对角线(例如该条对角线的长度为所对应帧图片的宽度)为划分边界,将菱形图片等分为两个三角形图片,其中,两个三角形图片的高均为所对应帧图片的高度的一半;进一步地,可以将两个三角形图片中的任一个三角形图片等分为两个直角三角形图片,也可以不对其进行等分。在实际应用中,还可以以菱形图片的另一条对角线(例如该条对角线的长度为所对应帧图片的高度)为划分边界,将菱形图片等分为两个三角形图片,其中,两个三角形图片的高为所对应帧图片的宽度的一半;进一步地,可以将两个三角形图片中的任一个三 角形图片等分为两个直角三角形图片,也可以不对其进行等分。
也就是说,在一种情况中,分别针对每一帧图片,可以以菱形图片的其中一条对角线(例如该条对角线的长度为所对应帧图片的宽度)为划分边界,将菱形图片等分为两个三角形图片,其中,当作为划分边界的对角线为:长度为所对应帧图片的宽度的对角线时,划分后所得的两个三角形图片的高均为:所对应帧图片的高度的一半;进一步地,可以将划分后所得的两个三角形图片中的任一个三角形图片,等分为两个直角三角形图片,以执行后续的全景视频的压缩流程。
举例而言,如图7A所示,菱形图片A存在两条对角线a和b,以对角线a为划分边界,将菱形图片A划分为两个全等的三角形图片,分别划分后所得的两个三角形图片分别为:三角形图片A1和三角形图片A2,可以理解的是,三角形图片A1与三角形图片A2均为等腰三角形。进一步的,再将三角形图片A1等分为两个直角三角形图片A11和A12,可以理解的是,可以以三角形图片A1的底边的中线作为划分边界,将三角形图片A1等分为两个直角三角形图片A11和A12。其中,本申请实施例中所述的“全等”仅相对于三角形图片的形状而言。
在另一种情况中,还可以以菱形图片的另一条对角线(例如该条对角线的长度为所对应帧图片的高度)为划分边界,将菱形图片等分为两个三角形图片,其中,当作为划分边界的对角线为:长度为所对应帧图片的高度的对角线时,划分后所得的两个三角形图片的高为所对应帧图片的宽度的一半;进一步地,可以划分后所得的将两个三角形图片中的任一个三角形图片,等分为两个直角三角形图片,以执行后续的全景视频的压缩流程。
承接上述例子,如图7B所示,菱形图片A存在两条对角线a和b,此时,以对角线b为划分边界,将菱形图片A划分为两个全等的三角形图片,划分后所得的两个三角形图片分别为:三角形图片A3和三角形图片A4,可以理解的是,三角形图片A3与三角形图片A4均为等腰三角形。进一步的,再将三角形图片A3等分为两个直角三角形图片A31和A32,可以理解的是,可以以三角形图片A3的底边的中线作为划分边界,将三角形图片A3等分为两个直角三角形图片A31和A32。其中,本申请实施例中所述的“全等”仅相对于三角形图片的形 状而言。
当然,也可以不对上述划分后所得的两个三角形图片中的任一个三角形图片进行等分,为了布局清楚,后续对上述情况进行说明。
S104,对划分得到的图片进行拼合;
具体的,在实际应用中,可以将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
在一种实现方式中,将菱形图片进行一次划分后,可以获得两个全等的三角形。在一种情况中,可以继续将所获得的两个全等的三角形中的其中一个三角形进行再一次划分,得到两个全等的直角三角形。进一步的,可以将上述所得的未进行再一次划分的三角形,和进行再一次划分后所获得的两个全等的直角三角形进行拼合,形成一个矩形图片。其中,本申请实施例中所述的“全等”仅相对于三角形图片的形状而言。
示例性的,对于在将两个三角形图片中的一个三角形图片等分为两个直角三角形图片的情况下,可以将两个直角三角形图片分别平移到上述两个三角形图片中未进行等分的三角形图片的左侧和右侧(或者上侧和下侧,具体以实现拼合为一个矩形图片为准),从而将上述两个三角形图片中未进行等分的三角形图片和两个直角三角形图片拼合为一个矩形图片,使得该矩形图片的宽度为原有的图片的宽度,该矩形图片的高度变为原有的图片的高度的一半,或者使得该矩形图片的高度为原有的图片的高度,该矩形图片的宽度变为原有的图片的宽度的一半,从而拼合后的矩形图片尺寸减少为原有矩形图片尺寸的一半。
换言之,上述“原有的图片”以及“原有矩形图片”均可以表征本申请实施例中所提的帧图片,即压缩前的图片。
具体的,在一种实现方式中,可以将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;将所述两个直角三角形图片拼合为一个矩形图片。
示例性的,对于在没有将两个三角形图片中的一个三角形图片等分为两个直角三角形图片的情况下,可以利用图像变换技术,将上述两个三角形图 片分别进行变换,得到与这两个三角形图片的高相同、且面积相等的两个直角三角形图片;将得到的两个直角三角形图片拼合为一个矩形图片,使得拼合后的矩形图片的宽度为原有的图片的宽度,拼合后的矩形图片的高度变为原有的图片的高度的一半,或者使得拼合后的矩形图片的高度为原有的图片的高度,拼合后的矩形图片的宽度变为原有的图片的宽度的一半,从而拼合后的矩形图片尺寸减少为原有矩形图片尺寸的一半。
换言之,上述“原有的图片”以及“原有矩形图片”均可以表征本申请实施例中所提的帧图片,即压缩前的图片。
示例性的,如图5所示,图5为本申请实施例提供的一种拼合后的矩形图片的生成示意图。在一种实现方式中,如图5所示,可以将原有矩形图片等分为上下两个矩形图片M和N,对矩形图片M进行拉伸,将矩形图片M压缩为三角形A;对矩形图片N进行拉伸,将矩形图片N压缩为与三角形A同底等高、并与三角形A对称的三角形,将矩形图片N压缩所得的三角形等分为直角三角形B和直角三角形C;将三角形B平移拷贝到三角形A的右侧,得到三角形B1,将三角形C平移拷贝到三角形A的左侧,得到三角形C1;将三角形A、三角形B1和三角形C1拼合为一张矩形图片,拼合后的该矩形图片尺寸减少为原有矩形图片尺寸的一半。
示例性的,如图6所示,图6为本申请实施例提供的另一种拼合后的矩形图片的生成示意图。在一种实现方式中,如图6所示,还可以将原有矩形图片等分为上下两个矩形图片M和N,对矩形图片M(与上述矩形图片M相同)进行拉伸,将矩形图片M压缩为三角形A(与上述三角形A相同);对矩形图片N(与上述矩形图片N相同)进行拉伸,将矩形图片N压缩为与三角形A同底等高、并与三角形A对称的三角形E;将三角形A在水平方向上进行变换,得到直角三角形A1,将三角形E在水平方向上进行变换,得到直角三角形E1;将直角三角形A1和直角三角形E1拼合为一张矩形图片,拼合后的该矩形图片尺寸减少为原有矩形图片尺寸的一半。
S105,根据拼合得到的所有图片,生成新的全景视频。
具体的,根据拼合得到的所有矩形图片,可以采用现有技术例如对所有矩形图片进行编码等技术,生成新的压缩后的全景视频,本申请实施例在此 对其不进行赘述。
换言之,每一帧图片均对应一拼合所得的矩形图片。采用现有的编码技术对拼合所得的所有矩形图片进行编码,可以生成新的压缩后的全景视频。
具体的,在一种实现方式中,拼合得到的矩形图片可以称之为钻石全景图。在播放新的压缩后的全景视频过程中,可以按照钻石全景图的生成逆过程对钻石全景图进行反变换处理,得到球面全景图,可以利用开放图形库(Open Graphics Library,简称OpenGL)着色器的像素反采样技术或者开放图形库的三角面片纹理绘制技术,对球面全景图进行渲染,由球面全景图渲染出全景画面。
对于按照钻石全景图的生成逆过程对钻石全景图进行反变换处理,得到球面全景图的过程,在一种实现方式中,可以是:首先获得新的压缩后的全景视频,对新的压缩后的全景视频进行解码,获得新的压缩后的全景视频对应的每一钻石全景图;针对每一钻石全景图,对每一钻石全景图进行拆分平移,获得每一钻石全景图对应的菱形图片;然后,利用插值技术,对每一菱形图片进行变换拉伸(例如水平拉伸),获得每一钻石全景图对应的球面全景图,继而,可以利用开放图形库着色器的像素反采样技术或者开放图形库着色器的三角面片纹理绘制技术,对球面全景图进行渲染,由球面全景图渲染出全景画面。
其中,对每一钻石全景图进行拆分平移,获得每一钻石全景图对应的菱形图片的过程,可以是:针对每一钻石全景图,对该钻石全景图进行拆分,获得三个三角形图片,一个较大的三角形图片(为一个等腰三角形图片)与两个较小的全等的三角形图片(为两个直角三角形)图片,其中,上述较大的三角形图片的面积,等于上述两个较小的全等的三角形图片的面积之和;对所获得的上述三个三角形图片进行拼合,获得该钻石全景图对应的菱形图片。也可以是:针对每一钻石全景图,对该钻石全景图进行拆分,获得两个全等的直角三角形图片;利用图像变换技术,对两个全等的直角三角形图片进行变换,获得两个与上述两个全等的直角三角形图片的高相同、且面积相等的两个全等的等腰三角形图片,进而将所获得的两个全等的等腰三角形图片进行拼合,获得该钻石全景图对应的菱形图片。
或者,
对于按照钻石全景图的生成逆过程对钻石全景图进行反变换处理,得到球面全景图的过程,在另一种实现方式中,可以是:首先获得新的压缩后的全景视频,对新的压缩后的全景视频进行解码,获得新的压缩后的全景视频对应的每一钻石全景图;利用插值技术,对每一钻石全景图进行变换拉伸,获得变换拉伸后的图片;对每一变换拉伸后的图片进行拆分平移,获得每一钻石全景图对应的球面全景图,继而,可以利用开放图形库着色器的像素反采样技术或者开放图形库着色器的三角面片纹理绘制技术,对球面全景图进行渲染,由球面全景图渲染出全景画面。
具体的,在一种实现方式中,还可以利用OpenGLshader(开放图形库着色器)的像素反采样方法,利用全景视频播放器的显示视口对应的球面全景图的纹理坐标,计算出对应的钻石全景图的纹理坐标,从而不必按照钻石全景图的生成逆过程对钻石全景图进行反变换处理,不必得到球面全景图,直接可以由钻石全景图渲染出全景画面。
也就是说,在一种实现方式中,还可以利用OpenGLshader(开放图形库着色器)的像素反采样方法,利用全景视频播放器的显示视口对应的球面全景图的纹理坐标,计算出对应的钻石全景图的纹理坐标,进一步得到钻石全景图的纹理坐标,与全景视频播放器的显示视口对应的球面全景图的纹理坐标之间的对应关系,利用上述对应关系,将钻石全景图中的每一像素点基于钻石全景图中的纹理坐标,转化为基于球面全景图的纹理坐标,得到每一钻石全景图对应的球面全景图。
可见,对全景视频进行压缩,服务器将压缩后的新的全景视频发送给客户端,后续的,客户端可以播放服务器所发送的全景视频的全部,没有将不必要数据进行传输,进而可以减少网络带宽的浪费。
本发明实施例中,对全景视频进行压缩的同时,可以保持全景视频的清晰度,使得客户端获得服务器所发送的全景视频后,对所获得的全景视频进行解压缩后,可以获得并播放清晰度无损的全景视频。
参见图2,图2为本申请实施例提供的另一种全景视频的压缩方法的流程 示意图,本申请图2所示实施例在图1所示实施例的基础上,增加S106:对拼合得到的图片的拼合边缘进行预设处理。
也就是说,上述S106可以增加在S104与S105之间。上述预设处理可以理解为:对划分得到的图片中处于拼合边界的像素进行重复绘制的操作。
在一种实现方式中,在对拼合得到的钻石全景图渲染时,为了避免反采样操作的子线性插值时,相邻三角形边界处的像素越界导致出现拼缝,可以对拼合得到的图片的拼合边缘进行处理,即对划分得到的图片中处于拼合边界的像素进行重复绘制。具体的,可以在每个三角形水平扫描线段的边界点处,重复绘制1个或2个或3个像素,该像素与所属三角形的相邻像素具有相同颜色,从而形成重复像素的边缘来隔离。具体的,在实际应用中,所形成的边缘可以是双边界边缘,也可以是单边界边缘。其中,双边界为具有两种颜色的边界,单边界为具有单一颜色的边界。
上述的单边界可以理解为:针对拼合边缘的其中一个三角形的边界处的像素,进行重复绘制所形成的边界,上述的双边界可以理解为:分别针对同一个拼合边缘的两个三角形的边界处的像素,进行重复绘制所形成的边界。
可见,对全景视频进行压缩,服务器将压缩后的新的全景视频发送给客户端,后续的,客户端可以播放服务器所发送的全景视频的全部,没有将不必要数据进行传输,进而减少了网络带宽的浪费。另外,对划分得到的图片中处于拼合边界的像素进行重复绘制,避免了边界处的像素越界导致拼缝现象的出现。
参见图3,图3为本申请实施例提供的一种全景视频的压缩装置的结构示意图,与图1所示的流程相对应,该压缩装置可以包括:第一生成模块201、压缩模块202、划分模块203、拼合模块204和第二生成模块205。
第一生成模块201,用于针对目标全景视频,生成所述目标全景视频的每一帧图片;
压缩模块202,用于分别针对每一帧图片,压缩所述帧图片;
具体的,压缩模块202,具体可以用于:
分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
划分模块203,用于对压缩后的所述帧图片进行划分;
拼合模块204,用于对划分得到的图片进行拼合;
具体的,划分模块203,具体可以用于:将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;将两个三角形图片中的一个三角形图片等分为两个直角三角形图片。拼合模块204,具体可以用于:将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
具体的,划分模块203,具体可以用于:将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半。拼合模块204,具体可以用于:将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;将所述两个直角三角形图片拼合为一个矩形图片。
第二生成模块205,用于根据拼合得到的所有图片,生成新的全景视频。
可见,对全景视频进行压缩,服务器将压缩后的新的全景视频发送给客户端,后续的,客户端可以播放服务器所发送的全景视频的全部,没有将不必要数据进行传输,进而可以减少网络带宽的浪费。
参见图4,图4为本申请实施例提供的另一种全景视频的压缩装置的结构示意图,本申请图4所示实施例在图3所示实施例的基础上,增加处理模块206,用于对拼合得到的图片的拼合边缘进行预设处理。
可见,对全景视频进行压缩,服务器将压缩后的新的全景视频发送给客户端,后续的,客户端可以播放服务器所发送的全景视频的全部,没有将不必要数据进行传输,进而减少了网络带宽的浪费。另外,对划分得到的图片中处于拼合边界的像素进行重复绘制,避免了边界处的像素越界导致拼缝现象的出现。
本申请实施例还提供了一种电子设备,如图8所示,可以包括处理器810、通信接口820、存储器830和通信总线840,其中,处理器810,通信接口820,存储器830通过通信总线完成相互间的通信;
存储器830,用于存放计算机程序;
处理器810,用于执行存储器上所存放的计算机程序时,实现本申请实施例所提供的所述全景视频的压缩方法,其中,该全景视频的压缩方法可以包括步骤:
针对目标全景视频,生成所述目标全景视频的每一帧图片;
分别针对每一帧图片,压缩所述帧图片;
对压缩后的所述帧图片进行划分;
对划分得到的图片进行拼合;
根据拼合得到的所有图片,生成新的全景视频。
应用本申请实施例,该电子设备的处理器运行存储器中存储的计算机程序,以执行本申请实施例所提供的全景视频的压缩方法,因此能够实现:对全景视频进行压缩,服务器将压缩后的新的全景视频发送给客户端,后续的,客户端可以播放服务器所发送的全景视频的全部,没有将不必要数据进行传输,进而可以减少网络带宽的浪费。
可选地,所述电子设备在执行实现所述分别针对每一帧图片,压缩所述帧图片的过程中,具体用于:
分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
可选地,所述电子设备在执行实现所述对压缩后的所述帧图片进行划分的过程中,具体用于:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
所述电子设备在执行实现所述对划分得到的图片进行拼合的过程中,具体用于:
将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
可选地,所述电子设备在执行实现所述对压缩后的所述帧图片进行划分的过程中,具体用于:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
所述电子设备在执行实现所述对划分得到的图片进行拼合的过程中,具体用于:
将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;
将所述两个直角三角形图片拼合为一个矩形图片。
可选地,所述电子设备在执行实现所述根据拼合得到的所有图片,生成新的全景视频的过程之前,所述电子设备还用于:
对拼合得到的图片的拼合边缘进行预设处理。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的全景视频的压缩方法。其中,全景视频的压缩方法可以包括步骤:
针对目标全景视频,生成所述目标全景视频的每一帧图片;
分别针对每一帧图片,压缩所述帧图片;
对压缩后的所述帧图片进行划分;
对划分得到的图片进行拼合;
根据拼合得到的所有图片,生成新的全景视频。
应用本申请实施例,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行本申请实施例所提供的全景视频的压缩方法,因此能够实现:对全景视频进行压缩,服务器将压缩后的新的全景视频发送给客户端,后续的,客户端可以播放服务器所发送的全景视频的全部,没有将不必要数据进行传输,进而可以减少网络带宽的浪费。
可选地,所述分别针对每一帧图片,压缩所述帧图片,包括:
分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
可选地,所述对压缩后的所述帧图片进行划分,包括:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
将两个三角形图片中的一个三角形图片等分为两个直角三角形图片;
所述对划分得到的图片进行拼合,包括:
将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
可选地,所述对压缩后的所述帧图片进行划分,包括:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
所述对划分得到的图片进行拼合,包括:
将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;
将所述两个直角三角形图片拼合为一个矩形图片。
可选地,在根据拼合得到的所有图片,生成新的全景视频之前,所述方法还包括:
对拼合得到的图片的拼合边缘进行预设处理。
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的全景视频的压缩方法,其中,全景视频的压缩方法可以包括步骤:
针对目标全景视频,生成所述目标全景视频的每一帧图片;
分别针对每一帧图片,压缩所述帧图片;
对压缩后的所述帧图片进行划分;
对划分得到的图片进行拼合;
根据拼合得到的所有图片,生成新的全景视频。
应用本申请实施例,该包含指令的计算机程序产品,当其在计算机上运 行时,使得计算机执行本申请实施例所提供的全景视频的压缩方法,因此能够实现:对全景视频进行压缩,服务器将压缩后的新的全景视频发送给客户端,后续的,客户端可以播放服务器所发送的全景视频的全部,没有将不必要数据进行传输,进而可以减少网络带宽的浪费。
可选地,所述分别针对每一帧图片,压缩所述帧图片,包括:
分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
可选地,所述对压缩后的所述帧图片进行划分,包括:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
将两个三角形图片中的一个三角形图片等分为两个直角三角形图片;
所述对划分得到的图片进行拼合,包括:
将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
可选地,所述对压缩后的所述帧图片进行划分,包括:
将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
所述对划分得到的图片进行拼合,包括:
将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;
将所述两个直角三角形图片拼合为一个矩形图片。
可选地,在根据拼合得到的所有图片,生成新的全景视频之前,所述方法还包括:
对拼合得到的图片的拼合边缘进行预设处理。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置等实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。

Claims (12)

  1. 一种全景视频的压缩方法,其特征在于,所述方法包括:
    针对目标全景视频,生成所述目标全景视频的每一帧图片;
    分别针对每一帧图片,压缩所述帧图片;
    对压缩后的所述帧图片进行划分;
    对划分得到的图片进行拼合;
    根据拼合得到的所有图片,生成新的全景视频。
  2. 根据权利要求1所述的方法,其特征在于,所述分别针对每一帧图片,压缩所述帧图片,包括:
    分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
  3. 根据权利要求2所述的方法,其特征在于,所述对压缩后的所述帧图片进行划分,包括:
    将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
    将两个三角形图片中的一个三角形图片等分为两个直角三角形图片;
    所述对划分得到的图片进行拼合,包括:
    将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
  4. 根据权利要求2所述的方法,其特征在于,所述对压缩后的所述帧图片进行划分,包括:
    将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
    所述对划分得到的图片进行拼合,包括:
    将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;
    将所述两个直角三角形图片拼合为一个矩形图片。
  5. 根据权利要求1所述的方法,其特征在于,在根据拼合得到的所有图片,生成新的全景视频之前,所述方法还包括:
    对拼合得到的图片的拼合边缘进行预设处理。
  6. 一种全景视频的压缩装置,其特征在于,所述装置包括:
    第一生成模块,用于针对目标全景视频,生成所述目标全景视频的每一帧图片;
    压缩模块,用于分别针对每一帧图片,压缩所述帧图片;
    划分模块,用于对压缩后的所述帧图片进行划分;
    拼合模块,用于对划分得到的图片进行拼合;
    第二生成模块,用于根据拼合得到的所有图片,生成新的全景视频。
  7. 根据权利要求6所述的装置,其特征在于,所述压缩模块,具体用于:
    分别针对每一帧图片,利用插值技术,将所述帧图片压缩成菱形图片,其中,所述菱形图片的两条对角线长度分别为所述帧图片的宽度和高度。
  8. 根据权利要求7所述的装置,其特征在于,所述划分模块,具体用于:
    将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
    将两个三角形图片中的一个三角形图片等分为两个直角三角形图片;
    所述拼合模块,具体用于:
    将两个三角形图片中未进行等分的三角形图片、所述两个直角三角形图片拼合为一个矩形图片。
  9. 根据权利要求7所述的装置,其特征在于,所述划分模块,具体用于:
    将所述菱形图片等分为两个三角形图片,其中,所述两个三角形图片的高均为所述帧图片高度的一半或所述两个三角形图片的高为所述帧图片宽度的一半;
    所述拼合模块,具体用于:
    将所述两个三角形图片分别变换为与所述两个三角形图片的高相同、且面积相等的两个直角三角形图片;
    将所述两个直角三角形图片拼合为一个矩形图片。
  10. 根据权利要求6所述的装置,其特征在于,在第二生成模块之前,所述装置还包括:
    处理模块,用于对拼合得到的图片的拼合边缘进行预设处理。
  11. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的计算机程序时,实现权利要求1-5任一项所述全景视频的压缩方法。
  12. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机权利要求1-5任一项所述全景视频的压缩方法。
PCT/CN2017/096432 2016-08-30 2017-08-08 一种全景视频的压缩方法及装置 WO2018040860A1 (zh)

Priority Applications (8)

Application Number Priority Date Filing Date Title
CA3030258A CA3030258C (en) 2016-08-30 2017-08-08 Panoramic video compression method and device
US16/320,409 US10834399B2 (en) 2016-08-30 2017-08-08 Panoramic video compression method and device
EP17845162.1A EP3509300A1 (en) 2016-08-30 2017-08-08 Panoramic video compression method and device
SG11201900337UA SG11201900337UA (en) 2016-08-30 2017-08-08 Panoramic video compression method and device
MYPI2019000153A MY193893A (en) 2016-08-30 2017-08-08 Panoramic video compression method and device
KR1020197004697A KR102287773B1 (ko) 2016-08-30 2017-08-08 파노라마 비디오 압축 방법 및 장치
AU2017317839A AU2017317839B2 (en) 2016-08-30 2017-08-08 Panoramic video compression method and device
JP2019510298A JP6735908B2 (ja) 2016-08-30 2017-08-08 パノラマビデオ圧縮方法および装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610765058.4 2016-08-30
CN201610765058.4A CN106162140B (zh) 2016-08-30 2016-08-30 一种全景视频的压缩方法及装置

Publications (1)

Publication Number Publication Date
WO2018040860A1 true WO2018040860A1 (zh) 2018-03-08

Family

ID=57343946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/096432 WO2018040860A1 (zh) 2016-08-30 2017-08-08 一种全景视频的压缩方法及装置

Country Status (11)

Country Link
US (1) US10834399B2 (zh)
EP (1) EP3509300A1 (zh)
JP (1) JP6735908B2 (zh)
KR (1) KR102287773B1 (zh)
CN (1) CN106162140B (zh)
AU (1) AU2017317839B2 (zh)
CA (1) CA3030258C (zh)
MY (1) MY193893A (zh)
SG (1) SG11201900337UA (zh)
TW (1) TWI683569B (zh)
WO (1) WO2018040860A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162140B (zh) 2016-08-30 2019-03-15 北京奇艺世纪科技有限公司 一种全景视频的压缩方法及装置
KR20180029315A (ko) * 2016-09-12 2018-03-21 삼성전자주식회사 가상 현실 컨텐트의 영상을 투영하기 위한 영상 처리 방법 및 장치
CN107871304B (zh) * 2017-11-29 2020-05-12 中国科学技术大学 基于球面环切和仿射变换的全景视频帧矩形映射方法
US10735765B2 (en) 2018-06-07 2020-08-04 Hong Kong Applied Science and Technology Research Institute Company, Limited Modified pseudo-cylindrical mapping of spherical video using linear interpolation of empty areas for compression of streamed images
CN109792490B (zh) * 2018-06-07 2021-01-15 香港应用科技研究院有限公司 用于流图像压缩的球面视频的改进的伪圆柱映射
CN115134604A (zh) * 2021-03-26 2022-09-30 影石创新科技股份有限公司 全景视频压缩方法、装置、计算机设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872546A (zh) * 2016-06-13 2016-08-17 上海杰图软件技术有限公司 一种实现全景图像压缩存储的方法和系统
CN105898344A (zh) * 2016-04-12 2016-08-24 乐视控股(北京)有限公司 一种全景视频的播放方法和装置
CN106162140A (zh) * 2016-08-30 2016-11-23 北京奇艺世纪科技有限公司 一种全景视频的压缩方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6331869B1 (en) 1998-08-07 2001-12-18 Be Here Corporation Method and apparatus for electronically distributing motion panoramic images
US6934420B1 (en) 1999-12-22 2005-08-23 Trident Systems Incorporated Wave image compression
JP5005080B2 (ja) 2010-09-06 2012-08-22 キヤノン株式会社 パノラマ画像の生成方法
KR101242550B1 (ko) * 2011-05-30 2013-03-20 (주)포스트미디어 동영상 파노라마 기반의 스토리텔링형 지역 정보 제공방법 및 시스템
CN105898339A (zh) * 2016-04-12 2016-08-24 乐视控股(北京)有限公司 一种全景视频转码的方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898344A (zh) * 2016-04-12 2016-08-24 乐视控股(北京)有限公司 一种全景视频的播放方法和装置
CN105872546A (zh) * 2016-06-13 2016-08-17 上海杰图软件技术有限公司 一种实现全景图像压缩存储的方法和系统
CN106162140A (zh) * 2016-08-30 2016-11-23 北京奇艺世纪科技有限公司 一种全景视频的压缩方法及装置

Also Published As

Publication number Publication date
AU2017317839A1 (en) 2019-01-31
JP2019528627A (ja) 2019-10-10
CN106162140B (zh) 2019-03-15
MY193893A (en) 2022-10-31
US20190268595A1 (en) 2019-08-29
KR20190031283A (ko) 2019-03-25
TW201822534A (zh) 2018-06-16
KR102287773B1 (ko) 2021-08-09
AU2017317839B2 (en) 2019-10-10
CA3030258A1 (en) 2018-03-08
CA3030258C (en) 2022-09-13
TWI683569B (zh) 2020-01-21
JP6735908B2 (ja) 2020-08-05
CN106162140A (zh) 2016-11-23
EP3509300A4 (en) 2019-07-10
SG11201900337UA (en) 2019-03-28
US10834399B2 (en) 2020-11-10
EP3509300A1 (en) 2019-07-10

Similar Documents

Publication Publication Date Title
WO2018040860A1 (zh) 一种全景视频的压缩方法及装置
CN107454468B (zh) 对沉浸式视频进行格式化的方法、装置和流
US10244200B2 (en) View-dependent operations during playback of panoramic video
US11004173B2 (en) Method for processing projection-based frame that includes at least one projection face packed in 360-degree virtual reality projection layout
KR102208773B1 (ko) 파노라마 영상 압축 방법 및 장치
US11057643B2 (en) Method and apparatus for generating and encoding projection-based frame that includes at least one padding region and at least one projection face packed in 360-degree virtual reality projection layout
US10244215B2 (en) Re-projecting flat projections of pictures of panoramic video for rendering by application
JP2006014341A (ja) Mcuバッファを用いて画像データを格納するための方法及び装置
KR102327972B1 (ko) 프로젝션 이미지 구성 방법 및 디바이스
CN112188303A (zh) 一种基于视角的vr流媒体播放方法及装置
TW201921035A (zh) 用於處理包括封裝在360度虛擬現實投影佈局中的至少一個投影面的基於投影的圖框的方法
US10963987B2 (en) Method and apparatus for decoding projection based frame with 360-degree content represented by triangular projection faces packed in triangle-based projection layout
TWI681662B (zh) 用於減少基於投影的圖框中的偽影的方法和裝置
US11270502B2 (en) Method and apparatus for image processing of three-dimensional model maps
TWI696979B (zh) 圖像處理方法和裝置及全景視頻圖像的處理方法和系統
WO2023280266A1 (zh) 鱼眼图像压缩、鱼眼视频流压缩以及全景视频生成方法
JP6517609B2 (ja) 符号化方法及び符号化プログラム
US10652516B2 (en) Method and apparatus for generating and encoding projection-based frame with 360-degree content represented by base projection face and lateral projection faces packed in pyramid projection layout
WO2020042185A1 (zh) 视频处理方法及相关装置
JP2022553846A (ja) 任意ビューの生成

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17845162

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3030258

Country of ref document: CA

ENP Entry into the national phase

Ref document number: 2017317839

Country of ref document: AU

Date of ref document: 20170808

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20197004697

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2019510298

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017845162

Country of ref document: EP

Effective date: 20190401