CN106488233B - A kind of panoramic video diamond shape method of sampling and device - Google Patents

A kind of panoramic video diamond shape method of sampling and device Download PDF

Info

Publication number
CN106488233B
CN106488233B CN201610933426.1A CN201610933426A CN106488233B CN 106488233 B CN106488233 B CN 106488233B CN 201610933426 A CN201610933426 A CN 201610933426A CN 106488233 B CN106488233 B CN 106488233B
Authority
CN
China
Prior art keywords
data
sampling
region
row
column
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
CN201610933426.1A
Other languages
Chinese (zh)
Other versions
CN106488233A (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.)
SHANGHAI GMT DIGITAL TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI GMT DIGITAL 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 SHANGHAI GMT DIGITAL TECHNOLOGY Co Ltd filed Critical SHANGHAI GMT DIGITAL TECHNOLOGY Co Ltd
Priority to CN201610933426.1A priority Critical patent/CN106488233B/en
Publication of CN106488233A publication Critical patent/CN106488233A/en
Application granted granted Critical
Publication of CN106488233B publication Critical patent/CN106488233B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Stereoscopic And Panoramic Photography (AREA)

Abstract

The invention discloses a kind of panoramic video diamond shape method of sampling and devices, this method comprises: requiring according to spatial resolution, spherical surface are divided into N=2K annular surface with equally spaced weft, annular surface is successively denoted as Oi;With equally spaced warp by annular surface OiIt is divided evenly into Ti=2N-2-4M region;The average value of the light in each region on the spherical surface being calculated, the sampled value as the corresponding sampled point in the region;Sampled value is aligned in the matrix of a N × N.The present invention sampled point can be made to meet on spherical surface equator sampling number is more, the few characteristic of the two poles of the earth sampling number, the distribution character of the sampling number on longitude and latitude figure with diamond shape distribution property, so referred to as diamond shape sample.The method of sampling avoids sampling structure redundancy, so that sampling number reduces under conditions of reaching identical spatial resolution, the data volume after sampling reduces.

Description

A kind of panoramic video diamond shape method of sampling and device
Technical field
The present invention relates to video coding techniques, more particularly to a kind of panoramic video diamond shape method of sampling and device.
Background technique
Panoramic video refers to the scene that a point of observation surrounding is all in space, the institute that can be received by this point of observation There is light composition.Panoramic video can be abstracted into a spherical surface centered on point of observation.
When active computer handles panoramic video, discretized space inevitably is carried out to panoramic video and is adopted Sample.When carrying out discretized space sampling to panoramic video, need to guarantee certain space sampling densities, needed for reaching Clarity.Meanwhile it being needed in some way in view of the memory of computer is not suitable for the data of storage spherical structure again Sampled point is aligned in plane.
Spherical surface sampling process is usually divided into three steps: the first step by the existing spherical surface method of sampling, mapping, spherical Map For a region in plane;Second step, plane sampling, designs the distribution side of sampled point based on the plane domain after mapping Formula;Sampled point, is arranged as a rectangle by third step, arrangement.
The first step mapping during, be not often homalographic mapping, and the different zones of spherical surface before the mapping after The ratio of area is also different.During second step plane samples, sampled point is often designed in the mapped flat Face is uniformly distributed in region.The first step and second step combine, and will result in sampled point being unevenly distributed on spherical surface.Reason By upper, the sampling number of spherical surface equator should be more than sampling number near the two poles of the earth.Third step tends not to do in arrangement To the complete adjacent of content, it is unfavorable to come to Video coding compression strap.
Currently, there are three types of the common spherical surface method of samplings: the sampling of longitude and latitude figure, hexahedron sampling and pyramid sampling.
The sampling of longitude and latitude figure is as shown in Figure 1, any one point can use locating longitude θ and latitude on spherical surfaceDescription, θ ∈ [0,2 π),Then spherical Map can be arrivedThe next the ratio of width to height of coordinate system is the rectangle of 2:1.It is right This rectangle carries out uniform sampling.Although the longitude and latitude figure method of sampling has complete adjacency, sampled near the two poles of the earth of spherical surface Density is excessively high, can generate very big redundancy.
Hexahedron sampling as shown in Fig. 2, be six faces of its circumscribed regular hexahedron by spherical Map, to obtain six first A plane square, then uniform sampling is carried out to six plane squares, six squares are finally combined into one by some way A rectangle.Distribution of the sampled point on spherical surface of hexahedron sampling be also it is non-uniform, still remain biggish redundancy, and square The content of shape does not have complete adjacency yet.
Pyramid sampling is as shown in figure 3, be first a circumscribed positive rectangular pyramid by spherical Map, then by the every of the positive rectangular pyramid A side (isosceles triangle) is compressed along the direction of bottom edge vertical line, until apex angle becomes right angle.Bottom surface and four warps in this way The side for crossing Quadratic Map can just be combined into a square.Uniform sampling finally is carried out to this square.Pyramid sampling Distribution of the sampled point on spherical surface be also it is non-uniform, the content of rectangle does not have complete adjacency yet.Its degree of irregularity Between the sampling of longitude and latitude figure and hexahedron sampling, degree of redundancy is also between the sampling of longitude and latitude figure and hexahedron sampling.
In conclusion the major defect of the existing panoramic video method of sampling is there are biggish sampling structure redundancy and most End form at rectangle do not have content intact adjacency.Sampled point uneven distribution on spherical surface can not only bring sampling redundancy, Returning video quality evaluation makes troubles, because the corresponding area of spherical surface of final sampled point is different, each sampling Influence of the distortion of point to video quality is also different, and is handled calculating panoramic video by certain, such as compressed and decompressed When rear mass loss, it is necessary to consider that the importance of each sampled point is different.Rectangular video in terms of content non-conterminous Property is also unfavorable for the compressed encoding of Video coding.
Summary of the invention
In order to overcome the deficiencies of the above existing technologies, purpose of the present invention is to provide a kind of samplings of panoramic video diamond shape Method and device can make distribution of the sampled point on spherical surface meet equator sampling number more, the neighbouring sampled point in the two poles of the earth Number is seldom, so as to avoid sampling structure redundancy, so that sampling number subtracts under conditions of reaching identical spatial resolution It is few, moreover, the rectangle being combined into has complete content adjacency, coding compression efficiency can be improved.
In view of the above and other objects, the present invention proposes a kind of panoramic video diamond shape method of sampling, include the following steps:
Step 1 is required according to spatial resolution, spherical surface is divided into N=2K annular surface with equally spaced weft, N is Even number, K are integer.Obtained annular surface is successively denoted as Oi, i=0,1 ..., N-1, from the angle of the centre of sphere, OiAccording to Sequence arrangement from top to bottom;
Step 2, with equally spaced warp by annular surface Oi(i=K+M or i=K-1-M, M=0,1,2 ..., K-1) It is divided evenly into 2N-2-4M region, wherein a warp is 0 ° of warp.Obtained region is successively denoted as Ai,j, j=0, 1 ..., 2N-3-4M, from the angle of the centre of sphere, Ai,jIncrease according to east longitude degree or the sequence of west longitude degree reduction arrange, Middle Ai,0And Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp;
Step 3 calculates each region A on the spherical surface that step 2 obtainsi,jThe average value of interior light, as the area The sampled value S of the corresponding sampled point in domaini,j
Sampled value is aligned in the matrix of a N × N, B by step 4x,yThe element of representing matrix xth row y column, Ti Indicate OiAreal, then
Bx,y=Si,j.As y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j.As y-x > K, j=x-Ti+ 1, i=y-K-1;
Bx,y=Si,j.As x-y > K, j=Ti+ k-x, i=k+x;
Bx,y=Si,j.As x+y > 3K-1, j=Ti+ x-2K, i=3k-1-y;
Bx,y=Si,j.Work as x, when y is not belonging to four kinds of situations above, j=y-Ti/ 2, i=x;
Further, in step 1, N is even number, is the convenience of computer disposal, and N can take 16 multiple;
Further, in step 2, when the value of i increases from 0 to K-1, OiBeing divided obtained number of regions is 2,6, 10 ..., 2N-2, at an arithmetic progression, tolerance 4;When the value of i increases from K to 2K-1, OiIt is divided obtained number of regions For 2N-2,2N-6 ..., 6,2, at an arithmetic progression, tolerance is -4, and the sum of sampled point is N2
Further, in step 3, the number of sampled point is (i, 0), (i, 1) ..., (i, Ti- 1), Ti=2N-4* | i- (N-1)/2|。
Further, in step 3, number is the corresponding region of sampled point of (i, 0) and number is (i, Mi- 1) adopt The corresponding region of sampling point be it is adjacent, their cut-off rule is 0 degree of warp, and from the angle of the centre of sphere, number is adopting for (i, k) Left side of the corresponding region of sampling point in the corresponding region of sampled point that number is (i, k+1).
Further, this method further include: in storage, record N first;Then by the data of resulting all sampled points It forms a line in the following order: (0,0), (0,1) ..., (0, M0-1),(1,0),(1,1),...,(1,M1-1),...,(N- 1,0),(N-1,1),...,(N-1,MN-1-1)。
Further, this method further include: when showing on the flat panel display, resulting sample point data is arranged in one It in the rectangular area that a N row, M are arranged, and is the alignment of data of (i, 0) by each row number, other data are arranged successively, rectangle region It is filled with arbitrary data the part that do not filled up in domain.
Further, this method further include: need the sampling number by each frame to tear the rectangle for being combined into a N row, N column open, Specifically tearing splicing method open is: resulting sample point data being first arranged in the rectangle of a N row, 2N column, then with 0 ° of warp both sides Each K column, total N column data are arranged together in one as rear quarter, by front and back hemisphere data as preceding hemisphere, remaining N-2 column data The diamond data region of rear quarter in the rectangle of N row N-2 column, then is divided into 4 parts by a N row, N column, by while while between phase All there are video data, and number in area without data before adjacent relationship is spliced to respectively in hemisphere rectangle in hemisphere rectangle before making There are complete neighbouring relations between, specific permutation algorithm can be realized according to step 4.
In order to achieve the above objectives, the present invention also provides a kind of panoramic video diamond shape sampling apparatuses, comprising:
Spherical surface cutting unit, requires according to spatial resolution, and spherical surface is divided into N=2K annular song with equally spaced weft Face, N are even number, and K is integer.Obtained annular surface is successively denoted as Oi, i=0,1 ..., N-1 are seen from the angle of the centre of sphere It examines, OiIt arranges in accordance with the order from top to bottom;
Annular surface cutting unit, with equally spaced warp by annular surface Oi(i=K+M or i=K-1-M, M=0,1, 2 ..., K-1) it is divided evenly into 2N-2-4M region, wherein a warp is 0 ° of warp.Obtained region is successively denoted as Ai,j, j=0,1 ..., 2N-3-4M, from the angle of the centre of sphere, Ai,jIt is reduced according to the increase of east longitude degree or west longitude degree suitable Sequence arranges, wherein Ai,0And Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp;
Sampled value computing unit calculates each region A on the spherical surface that step 2 obtainsi,jThe average value of interior light, Sampled value S as the corresponding sampled point in the regioni,j
Sampled value is aligned in the matrix of a N × N, B by arrangement unitsx,yThe element of representing matrix xth row y column, TiIndicate OiAreal, then
Bx,y=Si,j, as y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j, as y-x > K, j=x-Ti+ 1, i=y-K-1;
Bx,y=Si,j, as x-y > K, j=Ti+ k-x, i=k+x;
Bx,y=Si,j, as x+y > 3K-1, j=Ti+ x-2K, i=3k-1-y;
Bx,y=Si,j, work as x, when y is not belonging to four kinds of situations above, j=y-Ti/ 2, i=x;
Further, the device is in storage, record N first;Then by the data of resulting all sampled points according to Lower sequence forms a line: (0,0), (0,1) ..., (0, T0-1),(1,0),(1,1),...,(1,T1-1),...,(N-1,0), (N-1,1),...,(N-1,TN-1-1);When showing on the flat panel display, by resulting sample point data be arranged in a N row, It in the rectangular area of 2N column, and is the alignment of data of (i, 0) by each row number, other data are arranged successively, in rectangular area It is filled with arbitrary data the part that do not fill up.
Compared with prior art, point of a kind of panoramic video diamond shape method of sampling of the present invention and device sampled point on spherical surface It is more to be covered with sufficient equator sampling number, nearby sampling number is seldom at the two poles of the earth, so as to avoid sampling structure redundancy, so that reaching To under conditions of identical spatial resolution, sampling number is reduced, moreover, the rectangle being combined into has complete content adjacency, Coding compression efficiency can be improved.
Detailed description of the invention
Fig. 1 is the schematic diagram of longitude and latitude figure sampling in the prior art spherical surface method of sampling;
Fig. 2 is the schematic diagram of hexahedron sampling in the prior art spherical surface method of sampling;
Fig. 3 is the lab diagram of pyramid sampling in the prior art spherical surface method of sampling;
Fig. 4 is a kind of step flow chart of the panoramic video diamond shape method of sampling of the present invention;
Fig. 5 is a kind of system architecture diagram of panoramic video diamond shape sampling apparatus of the present invention;
Fig. 6 show a wherein width figure for the panoramic video that one is indicated with the longitude and latitude figure that resolution ratio is 4096 × 2048 Picture;
Fig. 7 show resulting display image after applying the present invention.
Fig. 8 show the intermediate image that resulting display figure after applying the present invention tears Heisei coded image open.
Fig. 9 show resulting coded image after applying the present invention.
Specific embodiment
Below by way of specific specific example and embodiments of the present invention are described with reference to the drawings, those skilled in the art can Understand further advantage and effect of the invention easily by content disclosed in the present specification.The present invention can also pass through other differences Specific example implemented or applied, details in this specification can also be based on different perspectives and applications, without departing substantially from Various modifications and change are carried out under spirit of the invention.
Fig. 4 is a kind of step flow chart of the panoramic video diamond shape method of sampling of the present invention.As shown in figure 4, the present invention is a kind of The panoramic video diamond shape method of sampling, includes the following steps:
Step 401, it is required according to spatial resolution, spherical surface is divided into N=2K annular surface, N with equally spaced weft For even number, K is integer.Obtained annular surface is successively denoted as Oi, i=0,1 ..., N-1, from the angle of the centre of sphere, OiIt presses According to sequence arrangement from top to bottom;
Step 402, with equally spaced warp by annular surface Oi(i=K+M or i=K-1-M, M=0,1,2 ..., K-1) It is divided evenly into 2N-2-4M region, wherein a warp is 0 ° of warp.Obtained region is successively denoted as Ai,j, j=0, 1 ..., 2N-3-4M, from the angle of the centre of sphere, Ai,jIncrease according to east longitude degree or the sequence of west longitude degree reduction arrange, Middle Ai,0And Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp;
Step 403, each region A on the spherical surface that step 2 obtains is calculatedi,jThe average value of interior light, as this The sampled value S of the corresponding sampled point in regioni,j
Step 404, sampled value is aligned in the matrix of a N × N, Bx,yThe element of representing matrix xth row y column, Ti Indicate OiAreal, then
Bx,y=Si,j.As y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j.As y-x > K, j=x-Ti+ 1, i=y-K-1;
Bx,y=Si,j.As x-y > K, j=Ti+ k-x, i=k+x;
Bx,y=Si,j.As x+y > 3K-1, j=Ti+ x-2K, i=3k-1-y;
Bx,y=Si,j.Work as x, when y is not belonging to four kinds of situations above, j=y-Ti/ 2, i=x;
In storage, record N and M first.Then the data of resulting all sampled points are lined up one in the following order Column: (0,0), (0,1) ..., (0, T0-1),(1,0),(1,1),...,(1,T1-1),...,(N-1,0),(N-1,1),..., (N-1,TN-1-1)。
When showing on the flat panel display, resulting sample point data can be arranged in the rectangle region of a N row, M column It in domain, and is the alignment of data of (i, 0) by each row number, other data are arranged successively.The portion that do not filled up in rectangular area Dividing can be filled with arbitrary data.
When carrying out compressed encoding, the sampling number by each frame is needed to tear the rectangle for being combined into a N row, N column, tool open Body tears splicing method open: the rectangle of a N row, 2N column is first arranged according to the above method, then with each K column in 0 ° of warp both sides, total N column Data are arranged together in one as rear quarter, by front and back hemisphere data as preceding hemisphere, remaining N-2 column data according to the above method The diamond data region of rear quarter in the rectangle of N row N-2 column, then is divided into 4 parts by N row, N column, by while while between it is adjacent All there are video data, and data in area without data before relationship is spliced to respectively in hemisphere rectangle in hemisphere rectangle before making Between there are complete neighbouring relations, specific permutation algorithm can realize according to step 404.
Fig. 5 is a kind of system architecture diagram of panoramic video diamond shape sampling apparatus of the present invention.As shown in figure 5, the present invention is a kind of Panoramic video diamond shape sampling apparatus, comprising: spherical surface cutting unit 501, annular surface cutting unit 502, sampled value computing unit 503 and arrangement units 504.
Wherein, spherical surface cutting unit 501, requires according to spatial resolution, and spherical surface is divided into N=2K with equally spaced weft A annular surface, N are even number, and K is integer.Obtained annular surface is successively denoted as Oi, i=0,1 ..., N-1, from the centre of sphere Angle observation, OiIt arranges in accordance with the order from top to bottom.
Annular surface cutting unit 502, with equally spaced warp by annular surface Oi(i=K+M or i=K-1-M, M=0, 1,2 ..., K-1) it is divided evenly into 2N-2-4M region, wherein a warp is 0 ° of warp.Obtained region is successively denoted as Ai,j, j=0,1 ..., 2N-3-4M, from the angle of the centre of sphere, Ai,jIt is reduced according to the increase of east longitude degree or west longitude degree suitable Sequence arranges, wherein Ai,0And Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp.
Sampled value computing unit 503 calculates each region A on the spherical surface that annular surface cutting unit 502 obtainsi,j The average value of interior light, the sampled value S as the corresponding sampled point in the regioni,j
Arrangement units 504, for sampled value to be aligned in the matrix of a N × N, Bx,yRepresenting matrix xth row y column Element, TiIndicate OiAreal, then
Bx,y=Si,j.As y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j.As y-x > K, j=x-Ti, i=y-K-1;
Bx,y=Si,j.As x-y > K, j=Ti+ k+1-x, i=k+x;
Bx,y=Si,j.As x+y > 3K-1, j=Ti+ x+1-2K, i=3k-1-y;
Bx,y=Si,j.Work as x, when y is not belonging to four kinds of situations above, j=y- (Ti+ 2)/2, i=x;
The present invention is in storage, record N first.Then the data of resulting all sampled points are lined up in the following order One column: (0,0), (0,1) ..., (0, T0-1),(1,0),(1,1),...,(1,T1-1),...,(N-1,0),(N-1, 1),...,(N-1,TN-1-1)。
When showing on the flat panel display, resulting sample point data can be arranged in the rectangle region of a N row, 2N column It in domain, and is the alignment of data of (i, 0) by each row number, other data are arranged successively.The portion that do not filled up in rectangular area Dividing can be filled with arbitrary data.
When carrying out compressed encoding, the sampling number by each frame is needed to tear the rectangle for being combined into a N row, N column, tool open Body tears splicing method open: being first arranged in the rectangle of a N row, 2N column by method when showing in flat-panel screens, is then passed through with 0 ° Each K column in line both sides, total N column data press front and back hemisphere data flat as rear quarter as preceding hemisphere, remaining N-2 column data Method when showing on the display of face is arranged together in a N row, N column, in the rectangle of N row N-2 column, then by the diamond shape of rear quarter Data area is divided into 4 parts, by while while between neighbouring relations be spliced to respectively before area without data in hemisphere rectangle, make All there is video data in preceding hemisphere rectangle, and there are complete neighbouring relations between data, specific permutation algorithm can be according to It is realized by arrangement units 504.
Hereinafter the present invention will be further illustrated by specific embodiment:
Embodiment one
It is illustrated in figure 6 a wherein width figure for the panoramic video that one is indicated with the longitude and latitude figure that resolution ratio is 4096 × 2048 Picture, in the specific embodiment of the invention, which is color video, and there are three components for tool.Assuming that used color point Amount is RGB, still indicates the color of each sampled point after sampling with RGB.Assuming that the requirement of spatial resolution is to three components It is identical, it is all N=1024, M=2048, it is all to be quantified as 256 grades that quantified precision requirement, which is also identical to each component,. Then to each component, repeats following steps one and arrives step 4:
Spherical surface is divided into 1024=2*512 annular surface with equally spaced weft by the first step.The annular surface that will be obtained Successively it is denoted as Oi, i=0,1 ..., 1023, from the angle of the centre of sphere, OiIt arranges in accordance with the order from top to bottom;
Second step, with equally spaced warp by annular surface Oi(i=512+M or i=512-1-M, M=0,1,2 ..., K-1 it) is divided evenly into 2048-2-4M region, wherein a warp is 0 ° of warp.Obtained region is successively denoted as Ai,j, j =0,1 ..., 2048-3-4M, from the angle of the centre of sphere, Ai,jAccording to the sequence of the increase of east longitude degree or west longitude degree reduction It arranges, wherein Ai,0And Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp;
Third step calculates each region A on the spherical surface that step 2 obtainsi,jThe average value of interior light, and carry out 256 grades of quantizations, obtain the integer value between one 0 to 255, as the sampled value of the corresponding sampled point in the region, are denoted as Si,j
Sampled value is aligned in one 1024 × 1024 matrix, B by the 4th stepx,yThe member of representing matrix xth row y column Element, TiIndicate OiAreal, then
Bx,y=Si,j.As y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j.As y-x > K, j=x-Ti+ 1, i=y-K-1;
Bx,y=Si,j.As x-y > K, j=Ti+ k-x, i=k+x;
Bx,y=Si,j.As x+y > 3K-1, j=Ti+ x-2K, i=3k-1-y;
Bx,y=Si,j.Work as x, when y is not belonging to four kinds of situations above, j=y-Ti/ 2, i=x;
In storage, the line number 1024 of each component samples is recorded first.Then by the data of resulting all sampled points It forms a line in the following order: (0,0), (0,1) ..., (0, T0-1),(1,0),(1,1),...,(1,T1-1),..., (1023,0),(1023,1),...,(1023,T1023-1).Three components of the same sampled point are arranged according to B, the sequence of G, R Column.
When showing on the flat panel display, resulting sampled point can be arranged in the rectangle of 1024 rows, 2048 column In region, and the data that each row number is (i, 0) are placed on the 1024th position of every a line, number is (i, k), k= 1..Ti/ 2, the data of sampled point be placed on the 1024+k position of the i-th row, number is (i, Ti- k), k=1..Ti/ 2-1, adopt The data of sampling point are placed on the 1024-k position of the i-th row.The part that do not filled up in rectangular area 255 fillings, gained image As shown in Figure 7
In compressed encoding, the sampling number by each frame is needed to tear the rectangle for being combined into 1024 rows, 1024 column open, specifically Tearing splicing method open is: the rectangle of 1024 rows, 2048 column is first arranged in by method when showing in flat-panel screens, then basis Front and back hemisphere by diamond data region be divided into two diamond shapes there are two 1024 rows, 1024 column rectangles in, as shown in figure 8, again The diamond data region of rear quarter is divided into 4 parts, by while while between neighbouring relations be spliced to respectively before in hemisphere rectangle Area without data, all have video data in hemisphere rectangle before making, gained image is as shown in Figure 9.
Embodiment two
It is illustrated in figure 6 a wherein width figure for the panoramic video that one is indicated with the longitude and latitude figure that resolution ratio is 4096 × 2048 Picture, in the specific embodiment of the invention, which is color video, and there are three components for tool.Assuming that used color point Amount is YcbCr, and oversampling ratio is 4:4:4, still indicates the color of each sampled point after sampling with YCbCr.Assuming that space is clear The requirement of degree is N=1024,2N=2048 to Y-component, is N=512,2N=1024, quantified precision requirement to Cb and Cr component It is identical to each component, is all to be quantified as 256 grades.
Then to Y-component, following steps are carried out:
Spherical surface is divided into 1024=2*512 annular surface with equally spaced weft by the first step.The annular surface that will be obtained Successively it is denoted as Oi, i=0,1 ..., 1023, from the angle of the centre of sphere, OiIt arranges in accordance with the order from top to bottom;
Second step, with equally spaced warp by annular surface Oi(i=512+M or i=512-1-M, M=0,1,2 ..., K-1 it) is divided evenly into 2048-2-4M region, wherein a warp is 0 ° of warp.Obtained region is successively denoted as Ai,j, j =0,1 ..., 2048-3-4M, from the angle of the centre of sphere, Ai,jAccording to the sequence of the increase of east longitude degree or west longitude degree reduction It arranges, wherein Ai,0And Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp;
Third step calculates each region A on the spherical surface that step 2 obtainsi,jThe average value of interior light, and carry out 256 grades of quantizations, obtain the integer value between one 0 to 255, as the sampled value of the corresponding sampled point in the region, are denoted as Si,j
Sampled value is aligned in one 1024 × 1024 matrix, B by the 4th stepx,yThe member of representing matrix xth row y column Element, TiIndicate OiAreal, then
Bx,y=Si,j.As y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j.As y-x > K, j=x-Ti+ 1, i=y-K-1;
Bx,y=Si,j.As x-y > K, j=Ti+ k-x, i=k+x;
Bx,y=Si,j.As x+y > 3K-1, j=Ti+ x-2K, i=3k-1-y;
Bx,y=Si,j.Work as x, when y is not belonging to four kinds of situations above, j=y-Ti/ 2, i=x;
Then to Cb and Cr component, following steps are carried out respectively:
Spherical surface is divided into 512=2*256 annular surface with equally spaced weft by the first step.The annular surface that will be obtained Successively it is denoted as Oi, i=0,1 ..., 512, from the angle of the centre of sphere, OiIt arranges in accordance with the order from top to bottom;
Second step, with equally spaced warp by annular surface Oi(i=256+M or i=256-1-M, M=0,1,2 ..., K-1 it) is divided evenly into 1024-2-4M region, wherein a warp is 0 ° of warp.Obtained region is successively denoted as Ai,j, j =0,1 ..., 1024-3-4M, from the angle of the centre of sphere, Ai,jAccording to the sequence of the increase of east longitude degree or west longitude degree reduction It arranges, wherein Ai,0And Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp;
Third step calculates each region A on the spherical surface that step 2 obtainsi,jThe average value of interior light, and carry out 256 grades of quantizations, obtain the integer value between one 0 to 255, as the sampled value of the corresponding sampled point in the region, are denoted as Si,j
Sampled value is aligned in one 512 × 512 matrix, B by the 4th stepx,yThe member of representing matrix xth row y column Element, TiIndicate OiAreal, then
Bx,y=Si,j.As y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j.As y-x > K, j=x-Ti+ 1, i=y-K-1;
Bx,y=Si,j.As x-y > K, j=Ti+ k-x, i=k+x;
Bx,y=Si,j.As x+y > 3K-1, j=Ti+ x-2K, i=3k-1-y;
Bx,y=Si,j.Work as x, when y is not belonging to four kinds of situations above, j=y-Ti/ 2, i=x;
In storage, the line number 1024 of record Y-component sampling and the maximum sampling number 2048 of every row, Cb component are adopted first The line number 512 of sample and the maximum sampling number 1024 of every row.The line number 512 and the maximum sampling number of every row of Cr component samples 1024.Then the data of resulting Y-component sampled point are formed a line in the following order: (0,0), (0,1) ..., (0, M0- 1),(1,0),(1,1),...,(1,T1-1),...,(1023,0),(1023,1),...,(1023,T1023-1).It is adopted in Y-component The data of resulting Cb component samples point are formed a line in the following order behind the data of sampling point: (0,0), (0,1) ..., (0,T0-1),(1,0),(1,1),...,(1,T1-1),...,(511,0),(511,1),...,(511,T511-1).In Cb component The data of resulting Cr component samples point are formed a line in the following order behind the data of sampled point: (0,0), (0, 1),...,(0,T0-1),(1,0),(1,1),...,(1,M1-1),...,(511,0),(511,1),...,(511,T511-1)。
In compressed encoding, need to tear open the Y-component sampling number of each frame the square for being combined into 1024 rows, 1024 column Shape, Cb and Cr component tear the rectangle for being combined into 512 rows, 512 column open respectively.Specifically tearing splicing method open is: first by flat-panel screens Y-component is arranged in the rectangles of 1024 rows, 2048 column by method when display, then according to front and back hemisphere by diamond data area Domain be divided into two diamond shapes there are two 1024 rows, 1024 column rectangles in, then the diamond data region of rear quarter is divided into 4 Part, by while while between neighbouring relations be spliced to respectively before area without data in hemisphere rectangle, it is complete in hemisphere rectangle before making There is video data in portion;Then Cb and Cr component is torn open by the method for Y-component to the square for being combined into 512 rows, 512 column respectively respectively Shape.
In conclusion the distribution of a kind of panoramic video diamond shape method of sampling of the present invention and device sampled point on spherical surface meets Equator sampling number is more, and nearby sampling number is seldom at the two poles of the earth, so as to avoid sampling structure redundancy, so that identical reaching Spatial resolution under conditions of, sampling number reduce, moreover, the rectangle being combined into have complete content adjacency, can improve Encode compression efficiency.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.Any Without departing from the spirit and scope of the present invention, modifications and changes are made to the above embodiments by field technical staff.Therefore, The scope of the present invention, should be as listed in the claims.

Claims (9)

1. a kind of panoramic video diamond shape method of sampling, includes the following steps:
Step 1 is required according to spatial resolution, spherical surface is divided into N=2K annular surface with equally spaced weft, N is even Number, K is integer, and obtained annular surface is successively denoted as Oi, i=0,1 ..., N-1, from the angle of the centre of sphere, OiAccording to from The sequence of top to bottm arranges;
Step 2, with equally spaced warp by annular surface Oi(i=K+M or i=K-1-M, M=0,1,2 ..., K-1) equably It is divided into 2N-2-4M region, wherein a warp is 0 ° of warp, obtained region is successively denoted as Ai,j, j=0,1 ..., 2N- 3-4M, from the angle of the centre of sphere, Ai,jIncrease according to east longitude degree or the sequence of west longitude degree reduction arranges, wherein Ai,0With Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp;
Step 3 calculates each region A on the spherical surface that step 2 obtainsi,jThe average value of interior light, as the region pair The sampled value S for the sampled point answeredi,j,
Sampled value is aligned in the matrix of a N × N, B by step 4x,yThe element of representing matrix xth row y column, TiIndicate Oi Areal, then
Bx,y=Si,j, as y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j, as y-x > K, j=x-Ti+ 1, i=y-K-1;
Bx,y=Si,j, as x-y > K, j=Ti+ k-x, i=k+x;
Bx,y=Si,j, as x+y > 3K-1, j=Ti+ x-2K, i=3k-1-y;
Bx,y=Si,j, work as x, when y is not belonging to four kinds of situations above, j=y-Ti/ 2, i=x;
Step 5 forms a line the data of resulting all sampled points in the following order: (0,0), (0,1) ..., (0, T0- 1),(1,0),(1,1),...,(1,T1-1),...,(N-1,0),(N-1,1),...,(N-1,TN-1-1);In flat-panel screens When upper display, by resulting sample point data be arranged in a N row, 2N column rectangular area in, and by each row number be (i, 0) alignment of data is placed on Nth column position, and number is (i, k), k=l ..., TiThe data of/2 sampled point are placed on the i-th row N + k positions, number is (i, Ti- k), k=l ..., TiThe data of the sampled point of/2-1 are placed on the N-k position of the i-th row, data Region is a diamond shape, and the part that do not fill up in rectangular area is filled with arbitrary data.
2. a kind of panoramic video diamond shape method of sampling as described in claim 1, it is characterised in that: in step 1, N is even Number, is the convenience of computer disposal, and N takes 16 multiple.
3. a kind of panoramic video diamond shape method of sampling as claimed in claim 2, it is characterised in that: in step 2, when the value of i When increasing from 0 to K-1, OiBeing divided obtained number of regions is 2,6,10 ..., 2N-2, at an arithmetic progression, tolerance 4;Work as i Value when increasing from K to 2K-1, OiBeing divided obtained number of regions is 2N-2,2N-6 ..., 6,2, at an arithmetic progression, tolerance It is -4, the sum of sampled point is N2
4. a kind of panoramic video diamond shape method of sampling as claimed in claim 3, it is characterised in that: in step 3, sampled point Number be (i, 0), (i, 1) ..., (i, Ti- 1), Ti=2N-4* | i- (N-1)/2 |.
5. a kind of panoramic video diamond shape method of sampling as claimed in claim 4, it is characterised in that: in step 3, number is The corresponding region of sampled point of (i, 0) and number are (i, Ti- 1) the corresponding region of sampled point is adjacent, their segmentation Line is 0 degree of warp, and from the angle of the centre of sphere, number is that the corresponding region of sampled point of (i, k) in number is adopting for (i, k+1) The left side in the corresponding region of sampling point.
6. a kind of panoramic video diamond shape method of sampling as claimed in claim 5, which is characterized in that this method further include: depositing Chu Shi, first record N;Then the data of resulting all sampled points are formed a line in the following order: (0,0), (0, 1),...,(0,T0-1),(1,0),(1,1),...,(1,T1-1),...,(N-1,0),(N-1,1),...,(N-1,TN-1-1)。
7. a kind of panoramic video diamond shape method of sampling as claimed in claim 6, which is characterized in that this method further include: flat When being shown on the display of face, resulting sample point data is arranged in the rectangular area of a N row, 2N column, and by every a line Number is that the alignment of data of (i, 0) is placed on Nth column position, and number is (i, k), k=l ..., TiThe data of/2 sampled point are put In the N+k position of the i-th row, number is (i, Ti- k), k=l ..., TiThe data of the sampled point of/2-1 are placed on the i-th row N-k A position, data area are a diamond shapes, and the part that do not fill up in rectangular area is filled with arbitrary data.
8. a kind of panoramic video diamond shape method of sampling as claimed in claim 7, it is characterised in that: this method is used for Video coding When compression, the sampling number by each frame is needed to tear the rectangle for being combined into a N row, N column open, specifically tearing splicing method open is: first by gained Sample point data be arranged in the rectangle of a N row, 2N column, then with each N in 0 ° of warp both sides column, total N column data is as first half Front and back hemisphere data are arranged together in the rectangle of two N rows, N column by ball, remaining N column data as rear quarter, then will be later half The diamond data region of ball is divided into 4 parts, by while while between neighbouring relations be spliced to respectively before it is countless in hemisphere rectangle According to region, all there is video data in hemisphere rectangle before making, and there are complete neighbouring relations between data, specific arrangement side Method is realized according to step 4.
9. a kind of panoramic video diamond shape sampling apparatus, comprising:
Spherical surface cutting unit, requires according to spatial resolution, and spherical surface is divided into N=2K annular surface, N with equally spaced weft For even number, K is integer, and obtained annular surface is successively denoted as Oi, i=0,1 ..., N-1, from the angle of the centre of sphere, OiIt presses According to sequence arrangement from top to bottom;
Annular surface cutting unit, with equally spaced warp by annular surface Oi(i=K+M or i=K-1-M, M=0,1,2 ..., K-1 it) is divided evenly into 2N-2-4M region, wherein a warp is 0 ° of warp, obtained region is successively denoted as Ai,j, j= 0,1 ..., 2N-3-4M, from the angle of the centre of sphere, Ai,jIncrease according to east longitude degree or the sequence of west longitude degree reduction arrange, Wherein Ai,0And Ai,2N-3-4MAdjacent and cut-off rule is 0 ° of warp;
Sampled value computing unit calculates each region A on the spherical surface that the annular surface cutting unit obtainsi,jInterior light Average value, the sampled value S as the corresponding sampled point in the regioni,j,
Sampled value is aligned in the matrix of a N × N, B by arrangement unitsx,yThe element of representing matrix xth row y column, TiIt indicates OiAreal, then
Bx,y=Si,j, as y+x < K-1, j=x, i=K-1-y;
Bx,y=Si,j, as y-x > K, j=x-Ti+ 1, i=y-K-1;
Bx,y=Si,j, as x-y > K, j=Ti+ k-x, i=k+x;
Bx,y=Si,j, as x+y > 3K-1, j=Ti+ x-2K, i=3k-1-y;
Bx,y=Si,j, work as x, when y is not belonging to four kinds of situations above, j=y-Ti/ 2, i=x;
Display unit forms a line the data of resulting all sampled points in the following order: (0,0), (0,1) ..., (0, T0-1),(1,0),(1,1),...,(1,T1-1),...,(N-1,0),(N-1,1),...,(N-1,TN-1-1);It is shown in plane When being shown on device, resulting sample point data is arranged in the rectangular area of a N row, 2N column, and be by each row number The alignment of data of (i, 0) is placed on Nth column position, and number is (i, k), k=l ..., TiThe data of/2 sampled point are placed on the i-th row The N+k position, number are (i, Ti- k), k=l ..., TiThe data of the sampled point of/2-1 are placed on the N-k position of the i-th row, Data area is a diamond shape, and the part that do not fill up in rectangular area is filled with arbitrary data.
CN201610933426.1A 2016-10-31 2016-10-31 A kind of panoramic video diamond shape method of sampling and device Active CN106488233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610933426.1A CN106488233B (en) 2016-10-31 2016-10-31 A kind of panoramic video diamond shape method of sampling and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610933426.1A CN106488233B (en) 2016-10-31 2016-10-31 A kind of panoramic video diamond shape method of sampling and device

Publications (2)

Publication Number Publication Date
CN106488233A CN106488233A (en) 2017-03-08
CN106488233B true CN106488233B (en) 2019-08-23

Family

ID=58271320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610933426.1A Active CN106488233B (en) 2016-10-31 2016-10-31 A kind of panoramic video diamond shape method of sampling and device

Country Status (1)

Country Link
CN (1) CN106488233B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897964B (en) * 2017-03-09 2019-10-25 中国科学技术大学 Keep the panoramic video frame rectangle mapping method of adjacent pixel correlation
CN106991642A (en) * 2017-03-23 2017-07-28 上海国茂数字技术有限公司 A kind of panoramic video octagonal method of sampling and device
CN107147910B (en) * 2017-05-31 2019-11-22 上海国茂数字技术有限公司 A kind of panoramic video hexagon method of sampling and device
CN107871304B (en) * 2017-11-29 2020-05-12 中国科学技术大学 Panoramic video frame rectangular mapping method based on spherical surface circular cutting and affine transformation
CN108520492B (en) * 2018-03-16 2022-04-26 中国传媒大学 Panoramic video mapping method and system
CN108769680B (en) * 2018-05-31 2021-02-23 上海大学 Slope-based segmented sampling method and device for panoramic video
CN109346004A (en) * 2018-12-19 2019-02-15 广州励丰文化科技股份有限公司 A kind of control system of the diamond shape LED screen for display canopy of the heavens
CN113362336A (en) * 2021-05-10 2021-09-07 上海大学 Panoramic video minimum deformation degree mapping method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020070015A (en) * 2001-02-28 2002-09-05 김남국 Method and apparatus for compressing and broadcasting the spherical or panoramic moving pictures
CN101000461A (en) * 2006-12-14 2007-07-18 上海杰图软件技术有限公司 Method for generating stereoscopic panorama by fish eye image
CN101252687A (en) * 2008-03-20 2008-08-27 上海交通大学 Method for implementing multichannel combined interested area video coding and transmission
WO2009069996A3 (en) * 2007-11-27 2009-10-15 Mimos Berhad Apparatus and method for panoramic imaging
CN105245838A (en) * 2015-09-29 2016-01-13 成都虚拟世界科技有限公司 Panoramic video playing method and player
CN105812759A (en) * 2016-04-15 2016-07-27 杭州当虹科技有限公司 Planar projection method and coding method of 360-degree panoramic video
CN105898339A (en) * 2016-04-12 2016-08-24 乐视控股(北京)有限公司 Method and device for transcoding panoramic video
CN105959702A (en) * 2016-05-30 2016-09-21 北京奇艺世纪科技有限公司 Spherical video coding method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020070015A (en) * 2001-02-28 2002-09-05 김남국 Method and apparatus for compressing and broadcasting the spherical or panoramic moving pictures
CN101000461A (en) * 2006-12-14 2007-07-18 上海杰图软件技术有限公司 Method for generating stereoscopic panorama by fish eye image
WO2009069996A3 (en) * 2007-11-27 2009-10-15 Mimos Berhad Apparatus and method for panoramic imaging
CN101252687A (en) * 2008-03-20 2008-08-27 上海交通大学 Method for implementing multichannel combined interested area video coding and transmission
CN105245838A (en) * 2015-09-29 2016-01-13 成都虚拟世界科技有限公司 Panoramic video playing method and player
CN105898339A (en) * 2016-04-12 2016-08-24 乐视控股(北京)有限公司 Method and device for transcoding panoramic video
CN105812759A (en) * 2016-04-15 2016-07-27 杭州当虹科技有限公司 Planar projection method and coding method of 360-degree panoramic video
CN105959702A (en) * 2016-05-30 2016-09-21 北京奇艺世纪科技有限公司 Spherical video coding method and device

Also Published As

Publication number Publication date
CN106488233A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN106488233B (en) A kind of panoramic video diamond shape method of sampling and device
CN106375760B (en) A kind of panoramic video polygon method of sampling and device
CN106210716B (en) A kind of panoramic video isodensity method of sampling and device
CN105632443B (en) Mura phenomenon compensation methodes
US10798301B2 (en) Panoramic image mapping method
CN106101535B (en) A kind of video stabilizing method based on part and mass motion disparity compensation
US20200211258A1 (en) Method and apparatus for generating projection-based frame with 360-degree image content represented by triangular projection faces assembled in triangle-based projection layout
CN109949221A (en) A kind of image processing method and electronic equipment
US8971640B1 (en) Image alignment
CN114546206B (en) Special-shaped screen display method and device, computer equipment and storage medium
CN106991642A (en) A kind of panoramic video octagonal method of sampling and device
CN110691236B (en) Panoramic video quality evaluation method
CN107147910B (en) A kind of panoramic video hexagon method of sampling and device
US10380715B2 (en) Method and apparatus for generating and encoding projection-based frame with 360-degree content represented by triangular projection faces packed in octahedron projection layout
CN106658009A (en) Improved double-ring sampling method and device for panoramic video
US10026013B2 (en) Clustering method with a two-stage local binary pattern and an iterative image testing system thereof
CN106356020B (en) LED display display control method and image data dividing method
CN108769680B (en) Slope-based segmented sampling method and device for panoramic video
CN103686029B (en) A kind of video pixel opposite-angle interpolation method for the many optical projection systems of giant-screen
CN114419322B (en) Image instance segmentation method and device, electronic equipment and storage medium
CN106791840A (en) A kind of bicyclic band method of sampling and device of panoramic video
Fang et al. Increasing image resolution on portable displays by subpixel rendering–a systematic overview
CN114266985A (en) Glass insulator spontaneous explosion identification method, device, equipment, medium and program product
CN111402123A (en) Panoramic video mapping method capable of keeping minimum deformation degree under segmented sampling
CN102750681A (en) Processing device and method for sharpening edge of image

Legal Events

Date Code Title Description
C06 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