WO2023123357A1 - Image processing method and apparatus - Google Patents

Image processing method and apparatus Download PDF

Info

Publication number
WO2023123357A1
WO2023123357A1 PCT/CN2021/143687 CN2021143687W WO2023123357A1 WO 2023123357 A1 WO2023123357 A1 WO 2023123357A1 CN 2021143687 W CN2021143687 W CN 2021143687W WO 2023123357 A1 WO2023123357 A1 WO 2023123357A1
Authority
WO
WIPO (PCT)
Prior art keywords
plane
coordinate
position information
coordinates
ray
Prior art date
Application number
PCT/CN2021/143687
Other languages
French (fr)
Chinese (zh)
Inventor
杨铀
蒋小广
刘琼
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2021/143687 priority Critical patent/WO2023123357A1/en
Publication of WO2023123357A1 publication Critical patent/WO2023123357A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration

Definitions

  • the embodiments of the present application relate to the technical field of computer vision, and more specifically, to an image processing method and device.
  • Multiplane image is a common scene representation, that is, for a given reference viewpoint as the spatial coordinate system of the coordinate origin, MPI can decompose the scene into a series of plane layers or spherical layers. Take for example an MPI composed of planar layers that are positively parallel and located at different depths with respect to the reference viewpoint.
  • the scene representation of depth adaptive change can be performed through Patch Multiplane Image (PMPI).
  • PMPI introduces the depth information of the scene on the basis of MPI, increases the adaptive ability for the depth of the scene, and places more sampling points in the effective position of the scene.
  • PMPI divides the plane into multiple regions, and each region can set a depth range according to the corresponding scene depth. In this way, the depth values of multi-planar images in different regions may be different.
  • rendering can be performed according to reference camera parameters and target camera parameters to obtain a new view.
  • standard inverse homography Standard inverse homography
  • alpha synthesis can be used for rendering.
  • PMPI since PMPI has multiple plane regions with different depth ranges compared to MPI, if the MPI rendering method is still used, the rendering process will be more complex.
  • Embodiments of the present application provide an image processing method and device, which can reduce the complexity of the pixel rendering process.
  • a method for image processing is provided, the method is applied to a decoder, including:
  • Image information of at least one pixel point is determined according to the coordinates of the at least one intersection point.
  • an image processing device which is applied to a decoder, including:
  • a first processing unit configured to determine first position information of at least two plane regions of the multi-plane image in a reference coordinate system
  • the first processing unit is further configured to determine second position information of at least one ray in the reference coordinate system
  • the first processing unit is further configured to determine coordinates of at least one intersection point of the at least one ray and the at least two planar regions based on the first position information and the second position information;
  • the second processing unit is configured to determine image information of at least one pixel point according to the coordinates of the at least one intersection point.
  • an electronic device including a processor and a memory.
  • the memory is used to store a computer program
  • the processor is used to invoke and run the computer program stored in the memory to execute the method in the first aspect above.
  • a chip including: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the method in the first aspect above.
  • a fifth aspect provides a computer-readable storage medium for storing a computer program, and the computer program causes a computer to execute the method in the first aspect above.
  • a computer program product including computer program instructions, the computer program instructions cause a computer to execute the method in the first aspect above.
  • a computer program which, when running on a computer, causes the computer to execute the method of the first aspect above.
  • the embodiment of the present application realizes the simplified expression of at least two planar areas of the multi-plane image in the reference coordinate system through the first position information, and realizes the light corresponding to the pixel point in the first view through the second position information.
  • the simplified expression in the coordinate system during the rendering process of the pixel point, according to the first position information and the second position information, the calculation process of the coordinates of the light rays and at least one intersection point of the at least two planar regions can be simplified, Further, the complexity of the rendering process of the pixel is reduced.
  • FIG. 1 is a schematic diagram of an encoding process of an encoder provided by an embodiment of the present application.
  • Fig. 2 is a schematic diagram of a decoding process of a decoder provided by an embodiment of the present application.
  • Figure 3 is an example of an MPI structure consisting of 4 planar layers.
  • Fig. 4 is a schematic diagram of standard inverse homography transformation.
  • Figure 5 shows several examples of MPI plane layers.
  • Fig. 6 is a schematic diagram of a scenario where an embodiment of the present application is applied.
  • Figure 7 is an example of PMPI divided by two grids.
  • FIG. 8 is a schematic diagram of the PMPI in FIG. 7 at a reference viewing angle.
  • Fig. 9 is a specific example of determining the initial depth value of the depth map.
  • Fig. 10 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • Fig. 11 is an example of the intersection of the ray and the patch of PMPI in the embodiment of the present application.
  • Fig. 12 is a schematic block diagram of an image processing device provided by an embodiment of the present application.
  • Fig. 13 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an encoding process of an encoder provided by an embodiment of the present application.
  • the encoder may be an MPI encoder of a test model of immersive video (Test model of immersive video, TMIV).
  • Test model of immersive video, TMIV Test model of immersive video
  • Each plane layer in MPI can be divided into two parts: a color frame and a transparency frame.
  • the color map contains the appearance texture of the scene at the position of the plane layer
  • the transparency map contains the transparency information of the scene at the position of the plane layer.
  • MPI's view parameters (view parameters), color map and transparency map can be used as the input of TMIV's MPI encoder after compression.
  • the input of the encoder can be source MPI, which includes view parameters (view parameters), texture attribute component (texture attribute component), and transparency attribute component (transparency attribute component).
  • view parameters view parameters
  • texture attribute component texture attribute component
  • transparency attribute component transparency attribute component
  • a part of the video stream parameters can be directly obtained, such as a view parameter list (view parameters list) and a parameter set (parameters set), and steps 101 to 106 can also be performed to obtain another part of the encoded video stream parameters, such as the Set data (atlas data), texture attribute video data (texture attribute video data) and transparency attribute video data (transparency attribute video data).
  • steps 101 to 106 are described below. Wherein, steps 101 and 102 are mask processes (mask processes), steps 103 to 105 are atlas processes (atlas processes), and step 106 is video processes (video processes).
  • steps 101 and 102 are mask processes (mask processes)
  • steps 103 to 105 are atlas processes (atlas processes)
  • step 106 is video processes (video processes).
  • Step 101 create a mask from MPI (create mask from MPI).
  • Masks can be used to cull invalid regions of the colormap and transparency map.
  • Step 102 aggregate MPI masks (aggregate MPI masks).
  • step 102 may aggregate MPI masks over a period of time.
  • Step 103 clustering effective pixels (cluster active pixels).
  • the mask can be divided into 8-connected regions through step 103 .
  • Step 104 split the cluster to reduce invalid pixels in the cluster and compress the data volume.
  • Step 105 pack patches (pack patches).
  • atlas data can be obtained.
  • the segmentation result obtained in step 104 may be packed into an atlas.
  • Step 106 generate video data (generate video data).
  • the atlas obtained in step 105 may be used to generate video data.
  • the video data texture attribute video data and transparency attribute video data can be obtained.
  • Fig. 2 is a schematic diagram of a decoding process of a decoder provided by an embodiment of the present application.
  • the decoder may be an MPI decoder of TMIV.
  • the decoder may include a decoded access unit (decoded access unit) 210 and a renderer 220 .
  • the decoding and accessing unit 210 can obtain parameter sets, view parameters, and atlases by decoding the acquired coded video stream.
  • the atlas may include an atlas parameter list, a patch parameter list, a block to patch map, texture video data and transparency Video data (transparency video data), etc.
  • the renderer 220 may take parameters in the decoding access unit 210 and viewport parameters as input.
  • the viewing angle parameter may be a viewing angle parameter of a playback device.
  • the renderer 220 may execute steps 201 to 204 to obtain the viewing angle image under the viewing angle parameter, so as to obtain the playing video stream.
  • Steps 201 to 204 are described below.
  • Step 201 layer depth values decoding (layer depth values decoding) to reconstruct the MPI to obtain the layer depth values of each plane layer of the MPI.
  • Step 202 view synthesis.
  • rendering may be performed according to the MPI and the viewing angle parameter to obtain a new view, that is, a viewing angle image under the viewing angle parameter.
  • the perspective image may be post-processed to enhance the image through the following steps 203 and 204, so as to obtain the final perspective image.
  • Step 203 inpainting.
  • Step 204 viewing space handling
  • MPI decomposes the scene into a series of plane layers or spherical layers.
  • an MPI composed of planar layers that are positively parallel and located at different depths with respect to the reference viewpoint.
  • FIG. 3 shows an example of an MPI structure composed of 4 plane layers, where the depth range [d min ,d max ] of the plane layer can be set in advance according to the scene depth data.
  • Each plane layer in MPI can be divided into two parts: color frame and transparency frame.
  • the color frame contains the appearance texture of the scene at the position of the plane layer. For example, red green blue (red green) can be used blue, RGB) values;
  • the transparency map contains the transparency information of the scene at the position of the plane layer, for example, it can be represented by ⁇ .
  • rendering may be performed by MPI, reference camera parameters and target camera parameters to obtain a new view, for example, it may correspond to the processing procedure of step 202 in FIG. 2 .
  • a current rendering method can obtain a new view through two steps of standard inverse homography and alpha synthesis.
  • the standard inverse homography transformation can be shown in the following formula (1):
  • R and t are the rotation matrix and translation vector from the reference camera coordinate system to the target camera coordinate system in the world coordinate system; a is the opposite number of the plane depth value in MPI.
  • (u t ,v t ,1) are the homogeneous coordinates of the pixels in the image in the target camera coordinate system;
  • (u s ,v s ,1) are the homogeneous coordinates of the MPI point in the corresponding plane under the reference viewing angle.
  • the pixel point (u t , v t ) has a corresponding point (u s1 , v s1 ) in the first plane from far to near in MPI, and a corresponding point (u s1 , v s1 ) in the second plane s2 ,v s2 ), there is a corresponding point (u s3 ,v s3 ) on the third plane.
  • the RGB value C at each MPI point can be obtained i and the transparency ⁇ value ⁇ i are calculated according to the following formula (2) to obtain the RGB value C t of the pixel.
  • This process is called alpha synthesis:
  • MPI is a non-redundant scene representation method.
  • FIG. 5 several examples of MPI plane layers are shown, wherein (a) to (f) are respectively the 40th plane layer to the 45th plane layer, the first row of each plane layer is a color map, the second Behavioral transparency map, black is the invalid area.
  • PMPI depth-adaptive change characteristics - Patch Multiplane Image
  • PMPI can be seen as an extension of MPI.
  • the basic unit of MPI is the plane layer, and PMPI divides the plane into multiple regions, that is, the plane layer in MPI is regarded as a collection of multiple regions.
  • the depth range [d min , d max ] of the MPI plane layer is set by the global depth of the scene (the depth range is enough to cover most of the effective information of the scene).
  • MPI must use a large depth range to represent the main information of the scene (four geometric bodies), and the resulting plane layer is relatively sparse. Apparently, for the three objects located in the foreground area, effective information will only appear on the two planes with larger depths.
  • PMPI can be used, that is, the grid is used to divide the plane layer into an uncertain number (such as two or more) areas, and each area sets the depth range according to the corresponding scene depth.
  • Fig. 7 shows an example of PMPI divided by two grids. In this example, the number of regions A is set to 2, each region contains 4 depth layers, the end depths of the 4 depth layers are set to be the same, and the starting depth is set by the scene depth of this region and its adjacent regions .
  • the black line in each region in FIG. 7 represents the position of the depth layer in the region.
  • Fig. 8 shows a schematic diagram of the PMPI in Fig. 7 at a reference viewing angle, wherein each of the two regions of the PMPI includes 4 sub-planes (patch), and a patch can be a square sub-plane, not done limited.
  • the number of PMPI areas can be set to M ⁇ N, that is, the scene is divided into M ⁇ N grids, where M can represent the number of areas divided into plane layers, and N can represent the depth layer in each area quantity.
  • M and N can be set according to factors such as the complexity of the scene.
  • K ⁇ K minimum pooling in units of grid regions can be used.
  • the original depth map grid can be copied and filled, and the pooling step size is set to 1;
  • FIG. 9 shows a specific example of determining the initial depth value of the depth map, where the pooling size is 5 ⁇ 5.
  • the grid number of the original depth map is 6 ⁇ 6.
  • the grid of the original depth map can be copied and filled, and the grid number of the filled depth map is 10 ⁇ 10, and then the pooling size is 5 ⁇ 5, and the step size is 1 for minimum pooling, and the pooled depth map is obtained, and the number of grids is the same as that of the original depth map.
  • the depth value of each region of the pooled depth map may be used as the depth value of each region.
  • the grid number and pooling size in FIG. 9 are for example only, and do not limit the embodiment of the present application.
  • the initial depth values of the M ⁇ N regions of the PMPI can be determined.
  • the depth range end value dmax of each region in PMPI is the same as MPI and can be given in advance.
  • the number of depths is the same, and can be distributed according to the same law, such as equidistant distribution or equal parallax distribution, which is not limited.
  • PMPI has multiple plane areas with different depth ranges, which means that the rendering method of MPI is no longer applicable to the rendering of PMPI. That is to say, if the rendering method of MPI is used for rendering of PMPI, that is, the standard inverse homography transformation and alpha synthesis are used to render PMPI, which will lead to a high complexity of the rendering process.
  • the embodiments of the present application provide an image processing method and device, and when the method is used for rendering a multi-plane image in a decoder, the complexity of the rendering process can be reduced.
  • the present application by determining the first position information of at least two plane regions of the multi-plane image under the reference coordinate system, and the second position information of at least one ray under the reference coordinate system, and then according to the first position information a position information and a second position information, determine the coordinates of at least one intersection point of the at least one ray and the at least two planar areas in the reference coordinate system, and finally determine according to the coordinates of the at least one intersection point in the reference coordinate system Image information of at least one pixel.
  • the embodiment of the present application realizes the simplified expression of at least two planar areas of the multi-plane image in the reference coordinate system through the first position information, and realizes the light corresponding to the pixel point in the first view through the second position information.
  • the simplified expression in the coordinate system during the rendering process of the pixel point, according to the first position information and the second position information, the calculation process of the coordinates of the light rays and at least one intersection point of the at least two planar regions can be simplified, Further, the complexity of the rendering process of the pixel is reduced.
  • the light corresponding to each patch in the PMPI and the pixel point can be determined through simple addition and subtraction operations and judgment Intersect, instead of using the standard inverse homography transformation to determine whether the ray intersects the patch, which can greatly simplify the calculation process of determining the coordinates of the intersection point of the ray corresponding to the pixel and the patch in PMPI, thereby reducing the rendering of the pixel the complexity of the process.
  • FIG. 10 shows a schematic flowchart of an image processing method 400 provided by an embodiment of the present application.
  • the method 400 may be applied to a decoder, such as the decoder in FIG. 2 , or a decoding process involved in the decoder. Further, the method 400 may be used for view synthesis of the renderer 220 in the decoder in FIG. 2 . As shown in FIG. 10 , method 400 includes steps 410 to 440 .
  • the multi-plane image may be a PMPI, which corresponds to at least two plane areas in each area after the at least two plane areas are divided into at least two areas.
  • the at least two plane areas include each sub-plane (patch) in 2 areas, ie a total of 8 plane areas.
  • the multi-plane layer when the multi-plane image is PMPI, before step 410, may also be divided into at least two regions, wherein the scene depth ranges of the at least two regions are different; then According to the scene depth ranges of the at least two areas, planar areas are respectively acquired in the at least two areas as the at least two planar areas.
  • the plane layer can be divided into at least two regions with a grid, and the depth range of each region can be set according to the corresponding scene, for example, the starting depth can be determined by the region or the adjacent region of the region Depth of scene setting. Then, in each area, at least two sub-planes can be obtained according to the scene depth range of the area, and the sub-planes in all areas can form the above-mentioned at least two plane areas.
  • the multi-plane image may be an MPI, and the corresponding at least two plane areas may be each plane area of the MPI.
  • the at least two plane areas include a plane area corresponding to each plane layer in the four plane layers.
  • the first position information of the at least two plane regions of the multi-plane image under the reference coordinate system may also be described as the first position of the at least two plane regions of the multi-plane image under the reference viewing angle information, without limitation.
  • the reference coordinate system may also be referred to as the reference camera coordinate system, and the two have the same or similar meanings.
  • the first position information includes coordinates of the geometric center of the planar area in the reference coordinate system and size information of the planar area.
  • the first position information of the patch may include the coordinates of the geometric center of the patch in the reference coordinate system and each side of the patch side length.
  • the sub-plane may be a square, a rectangle, or other shapes, which are not limited.
  • the first position information of the patch can be expressed as a vector (x p , y p , d p , r p ), where (x p , y p , d p ) represents the patch's
  • the coordinates of the geometric center in the reference coordinate system, x p , y p , and d p are the coordinates of the x, y, and z axes respectively
  • d p can represent the depth value of the patch
  • r p can represent the patch in the reference coordinate system half the length of the lower side.
  • the unit normal vector of the patch is fixed to (0,0,1).
  • the first position information such as the position coordinates and size information of the geometric center of the plane area
  • the first position information can realize the simplified expression of at least two plane areas of the multi-plane image in the reference coordinate system.
  • the at least one ray may include a ray corresponding to at least one pixel in at least one view (such as a first view, or a target view), and the first view may be the target view.
  • the first view may be the target view.
  • one pixel point in each first view may correspond to one ray.
  • the at least one ray includes a ray whose starting point is the target camera and passes through the at least one pixel.
  • a pixel in a first view corresponds to a ray as an example.
  • the ray corresponding to the pixel may be a ray whose starting point is the target camera and passes through the pixel.
  • the target coordinate system may also be referred to as the target camera coordinate system, and both have the same or similar meanings.
  • the second position information includes the coordinates and direction vector of the starting point of the ray (under the reference coordinate system) corresponding to the pixel point, where the coordinates of the starting point are the coordinates of the target camera at the reference coordinates Coordinates under the system.
  • each pixel in the first view its corresponding ray can be expressed as a vector (x 0 , y 0 , z 0 , x d , y d ), where (x 0 , y 0 , z 0 ) represents the coordinates of the starting point of the ray, that is, the coordinates of the target camera in the reference coordinate system, and (x d , y d , 1) represents the direction vector of the ray in the reference coordinate system.
  • the direction vector of the ray in the reference coordinate system can be obtained according to the direction vector of the ray in the target coordinate system and the mapping relationship between the target coordinate system and the reference coordinate system, which is not limited in the present application.
  • the embodiment of the present application uses the second position information, such as the starting point and direction information of the ray corresponding to the pixel, to realize the simplified expression of the ray corresponding to the pixel in the view in the reference coordinate system.
  • a pixel corresponding to a ray in a first view is taken as an example for description.
  • the intersection point of the ray corresponding to the pixel point and the plane where at least two plane regions of the multi-plane image are located can be determined according to the first position information and the second position information, and then it is judged that the ray and each Whether the intersection point of the plane where the plane area is located is on the plane area.
  • the intersection point is on the corresponding plane area, it can be determined that the ray intersects the plane area, and then the coordinates of the intersection point in the reference coordinate system can be obtained; when the intersection point is not on the corresponding plane area, it can be determined that the ray does not intersect the plane area intersect.
  • the process of judging whether a ray intersects a plane area here may be referred to as an algorithm for judging whether a ray intersects a plane area, which is not limited in this application.
  • the first intersection point of the first plane where the first plane area of the at least two plane areas is located and the above ray can be calculated in the reference coordinate system
  • the first coordinate and the boundary position of the first plane area it is determined that the first intersection point is on the first plane area, and then the first coordinate can be determined as the ray and the first plane area The coordinates of the intersection point in the reference coordinate system.
  • determining that the first intersection point is on the first plane area may be achieved in the following manner:
  • the Y coordinate in the first coordinate is greater than or equal to the lower boundary of the first plane area on the Y axis.
  • the X coordinate in the first coordinate is between the left boundary of the first plane area on the X axis and the border
  • the Y coordinate is between the upper boundary and the lower boundary of the Y axis of the first plane area
  • the x-coordinate range of a point in the first plane area is [x1, x2), where x1 represents the left boundary of the first plane area on the x-axis, x2 represents the right boundary of the first plane area on the x-axis,
  • the y-coordinate range of points in the first plane area is [y1, y2), where y1 represents the lower boundary of the first plane area on the y-axis, and y2 represents the upper boundary of the first plane area on the y-axis, where x1, x2, y1 and y2 are real numbers, and x1 is smaller than x2, and y1 is smaller than y2.
  • the reference coordinates of the second intersection point of the second plane where the second plane area of the at least two plane areas is located and the light ray can be calculated according to the first position information and the second position information. Then, according to the second coordinates and the boundary position of the second plane area, it is determined that the second intersection point is not on the first plane area, that is, it can be determined that the ray does not intersect the second plane area.
  • the reference coordinate system is the XOY coordinate system
  • the second coordinates and the boundary position of the second plane area it is determined that the second intersection point is not on the first plane area, which may be implemented in the following manner:
  • the Y coordinate in the second coordinate is smaller than the lower boundary of the second plane area on the Y axis.
  • the X coordinate in the second coordinate is not between the left boundary of the X axis and the border of the second plane area, or the Y coordinate is between the upper boundary and the lower boundary of the Y axis of the second plane area , it can be determined that the second intersection point is not on the second plane area.
  • the x-coordinate range of the point in the second plane area is [x3, x4), where x3 represents the left boundary of the second plane area on the x-axis, x4 represents the right boundary of the second plane area on the x-axis,
  • the y-coordinate range of the points in the second plane area is [y3, y4), where y3 represents the lower boundary of the second plane area on the y-axis, and y4 represents the upper boundary of the second plane area on the y-axis, where x3, x4, y3 and y4 are real numbers, and x3 is smaller than x4, and y3 is smaller than y4.
  • the coordinates of the intersection point of the pixel point and at least one plane area in the reference coordinate system may be determined according to the following steps a) to g).
  • the embodiment of the present application based on the above-mentioned first position information and second position information, only simple addition and subtraction operations and judgments are required to determine that the light corresponding to the pixel point intersects with at least one intersection point of the at least two planar regions within the reference
  • the coordinates in the coordinate system that is, the embodiment of the present application can simplify the calculation process of the coordinates of at least one intersection point of the ray corresponding to the pixel point and the at least two planar regions.
  • steps a) to g no more than 4 times of addition and subtraction operations and judgments are required to determine whether the first patch intersects the light corresponding to the pixel.
  • the standard inverse homography transformation described above is used to determine whether the ray intersects the plane area, then it is necessary to run the formula (1) once and several judgment statements (to determine whether the intersection point is within the boundary of the patch), the formula (1) It is a complex matrix operation that takes a long time to calculate.
  • Fig. 11 shows an example where the ray corresponding to the pixel intersects with the three patches of PMPI.
  • the PMPI includes 8 patches. If the standard inverse homography is used to judge whether the ray intersects with the plane area, then the formula (1) needs to be calculated 8 times to find 3 intersection points (black dots in the figure) , and if the scheme provided by the embodiment of the present application is adopted, the above steps a) to g) are run 8 times (each operation only needs no more than 4 addition and subtraction operations and judgment statements), and these 3 can be found intersection. Therefore, the embodiment of the present application can greatly simplify the calculation process of determining the coordinates of the intersection of the ray corresponding to the pixel point and the patch in the PMPI.
  • the at least two plane areas may be arranged according to the depth values of the at least two plane areas, and then based on the first position information and the second position information, the pixel points corresponding to Coordinates of at least one intersection point of the ray and the at least two planar areas in the reference coordinate system, so as to obtain coordinates of at least one intersection point arranged in sequence according to depth values.
  • the at least two plane regions may be arranged in ascending or descending order according to the depth values of the at least two plane regions, which is not limited in the present application.
  • At least one pixel point may be a pixel point in the above view (for example, the first view or the target view).
  • image information of pixels (for example, all pixels) in the first view is rendered to the first view to obtain a new view.
  • the embodiment of the present application realizes the simplified expression of at least two plane regions of the multi-plane image in the reference coordinate system through the first position information, and realizes the light corresponding to the pixel point in the first view through the second position information Simplified expression in the reference coordinate system, so that in the rendering process of the pixel point, according to the first position information and the second position information, the calculation of the coordinates of the light rays and at least one intersection point of the at least two planar regions can be simplified process, thereby reducing the complexity of the rendering process of the pixel.
  • the plane image where the at least one intersection point is located it is possible to sample the plane image where the at least one intersection point is located to obtain at least one image information of the plane image where the pixel is located at the at least one intersection point, and then according to the at least one image information and the The transparency information of the plane image where the at least one intersection point is located determines the image information of the pixel point.
  • the image information of each intersection point in the plane image of the at least one intersection point may include RGB values
  • the transparency information of each intersection point in the plane image is, for example, the ⁇ value mentioned above. That is to say, after obtaining a series of intersection points (x cross , y cross , d p ) corresponding to the pixel points through the above step 430, the RGB value and transparency value ⁇ of the series of intersection points at each plane image can be obtained, Therefore, alpha synthesis can be performed according to the above formula (2), and the RBG value of the pixel can be obtained as the image information of the pixel.
  • the series of intersection points are arranged according to their depth values at each plane image.
  • some or all of the above steps 410 to 440 may be deployed on a GPU for parallel computing, so as to utilize the parallel acceleration feature of the GPU to greatly improve the rendering efficiency of pixels.
  • the above steps a) to g) and step 440 may be deployed on the GPU, which is not limited in this application.
  • the embodiment of the present application measures the process of rendering 2000 pixels in a PMPI with a region number of 33 ⁇ 40 and a depth number of 40. Under the same hardware conditions, standard inverse homography transformation and alpha synthesis are used. The time spent on rendering is 383.480 milliseconds, and the time spent on rendering is 36.022 milliseconds by using the algorithm for judging whether a ray intersects a plane area and alpha compositing provided by the embodiment of the present application. It can be seen that the method provided by the embodiment of the present application can increase the speed of the pixel-marking rendering process by more than 10 times.
  • sequence numbers of the above-mentioned processes do not mean the order of execution, and the order of execution of the processes should be determined by their functions and internal logic, and should not be used in this application.
  • the implementation of the examples constitutes no limitation. It is to be understood that these ordinal numbers may be interchanged under appropriate circumstances such that the described embodiments of the application can be practiced in sequences other than those illustrated or described.
  • FIG. 12 is a schematic block diagram of an image processing apparatus 700 according to an embodiment of the present application.
  • the apparatus 700 is, for example, the decoder in FIG. 2 .
  • the device 700 may include a first processing unit 710 and a second processing unit 720 .
  • the first processing unit 710 is configured to determine first position information of at least two plane regions of the multi-plane image in the reference coordinate system
  • the first processing unit 710 is further configured to determine second position information of at least one ray in the reference coordinate system
  • the first processing unit 710 is further configured to determine coordinates of at least one intersection point of the at least one ray and the at least two planar regions based on the first position information and the second position information;
  • the second processing unit 720 is configured to determine image information of at least one pixel point according to the coordinates of the at least one intersection point.
  • the second processing unit 720 is specifically configured to:
  • the image information of the at least one pixel point is determined according to the at least one image information and the transparency information of the plane image where the at least one intersection point is located.
  • the first processing unit 710 is specifically configured to:
  • the first position information and the second position information calculate the first coordinates of the first intersection point of the first plane where the first plane area of the at least two plane areas is located and the at least one ray;
  • the first coordinate is determined as a coordinate of an intersection point of the at least one ray and the first plane area.
  • the first processing unit 710 is specifically used for:
  • the Y coordinate in the first coordinate is greater than or equal to the lower boundary of the first plane area on the Y axis.
  • the first processing unit 710 is specifically configured to:
  • the first processing unit 710 is specifically configured to:
  • the Y coordinate in the second coordinate is smaller than the lower boundary of the second plane area on the Y axis.
  • the first processing unit 710 is specifically configured to:
  • the first processing unit 710 is also used for:
  • planar areas are respectively acquired in the at least two areas as the at least two planar areas.
  • the first position information includes coordinates of the geometric center of the planar area and size information of the planar area.
  • the at least one ray includes a ray corresponding to at least one pixel in at least one view, and the at least one ray includes a ray whose starting point is the target camera and passes through the at least one pixel.
  • the second position information includes the coordinates and direction vector of the starting point of the ray.
  • the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, details are not repeated here.
  • the device 700 may correspond to the corresponding subject that executes the method 400 of the embodiment of the present application, and the aforementioned and other operations and/or functions of the modules in the device 700 are for realizing each method in FIG. 4 , or the corresponding process in the method in FIG. 4 , for the sake of brevity, details are not repeated here.
  • each step of the method embodiment in the embodiment of the present application can be completed by an integrated logic circuit of the hardware in the processor and/or instructions in the form of software, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as hardware
  • the execution of the decoding processor is completed, or the combination of hardware and software modules in the decoding processor is used to complete the execution.
  • the software module may be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, and registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps in the above method embodiments in combination with its hardware.
  • FIG. 13 is a schematic block diagram of an electronic device 800 provided by an embodiment of the present application.
  • the electronic device 800 may include:
  • a memory 810 and a processor 820 the memory 810 is used to store computer programs and transmit the program codes to the processor 820 .
  • the processor 820 can invoke and run a computer program from the memory 810, so as to implement the method in the embodiment of the present application.
  • the processor 820 may be configured to execute the steps in the above-mentioned method 400 according to instructions in the computer program.
  • the processor 820 may include but not limited to:
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the memory 810 includes but is not limited to:
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash.
  • the volatile memory can be Random Access Memory (RAM), which acts as external cache memory.
  • RAM Static Random Access Memory
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • Synchronous Dynamic Random Access Memory Synchronous Dynamic Random Access Memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM, DDR SDRAM double data rate synchronous dynamic random access memory
  • Enhanced SDRAM, ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • Direct Rambus RAM Direct Rambus RAM
  • the computer program can be divided into one or more modules, and the one or more modules are stored in the memory 810 and executed by the processor 820 to complete the method.
  • the one or more modules may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 800 .
  • the electronic device 800 may further include:
  • Transceiver 830 the transceiver 830 can be connected to the processor 820 or the memory 810 .
  • the processor 820 can control the transceiver 830 to communicate with other devices, specifically, can send information or data to other devices, or receive information or data sent by other devices.
  • Transceiver 830 may include a transmitter and a receiver.
  • the transceiver 830 may further include an antenna, and the number of antennas may be one or more.
  • bus system includes a power bus, a control bus and a status signal bus in addition to a data bus.
  • an electronic device including a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory, so that the electronic device executes The method of the above method embodiment.
  • a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can execute the methods of the above method embodiments.
  • the embodiments of the present application further provide a computer program product including instructions, and when the instructions are executed by a computer, the computer executes the methods of the foregoing method embodiments.
  • a computer program product or computer program comprising computer instructions stored in a computer readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method of the above method embodiment.
  • 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 may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a digital video disc (digital video disc, DVD)), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
  • B corresponding to A means that B is associated with A.
  • B may be determined from A.
  • determining B according to A does not mean determining B only according to A, and B may also be determined according to A and/or other information.
  • At least one means one or more
  • plural means two or more than two.
  • “and/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which may indicate: A exists alone, A and B exist simultaneously, and B exists alone, among them A and B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an “or” relationship.
  • “At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
  • modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • the disclosed devices, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
  • a module described as a separate component may or may not be physically separated, and a component displayed as a module may or may not be a physical module, that is, it may be located in one place, or may also be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.

Abstract

An image processing method and apparatus, which are applied to a decoder. The image processing method comprises: determining first position information of at least two planar regions of a multiplane image in a reference coordinate system; determining second position information of at least one light ray in the reference coordinate system; determining the coordinates, in the reference coordinate system, of at least one intersection point of the light ray and the at least two planar regions on the basis of the first position information and the second position information; and determining image information of at least one pixel point according to the coordinates of the at least one intersection point. The method can simplify the operation process of determining the coordinates of at least one intersection point of a light ray, which corresponds to a pixel point, and at least two planar regions, such that the complexity of a rendering process of the pixel point can be reduced.

Description

图像处理的方法和装置Method and device for image processing 技术领域technical field
本申请实施例涉及计算机视觉技术领域,并且更具体地,涉及一种图像处理的方法和装置。The embodiments of the present application relate to the technical field of computer vision, and more specifically, to an image processing method and device.
背景技术Background technique
多平面图像(Multiplane image,MPI)是一种常见的场景表征,即对于一个给定的参考视点作为坐标原点的空间坐标系内,MPI可以将场景分解为一系列平面层或球面层。以由平面层组成的MPI为例,平面层相对于参考视点正向平行并且位于不同的深度上。为了提高MPI的采样效率,可以通过分块多平面图像(Patch Multiplane Image,PMPI)进行深度自适应变化的场景表示。PMPI是在MPI的基础上引入了场景的深度信息,增加了针对场景深度的自适应能力,将更多的采样点放置在场景的有效位置上。PMPI将平面划分多个区域,每个区域可以根据对应的场景深度设定深度范围。这样,不同区域中的多平面图像的深度值可以是不相同的。Multiplane image (MPI) is a common scene representation, that is, for a given reference viewpoint as the spatial coordinate system of the coordinate origin, MPI can decompose the scene into a series of plane layers or spherical layers. Take for example an MPI composed of planar layers that are positively parallel and located at different depths with respect to the reference viewpoint. In order to improve the sampling efficiency of MPI, the scene representation of depth adaptive change can be performed through Patch Multiplane Image (PMPI). PMPI introduces the depth information of the scene on the basis of MPI, increases the adaptive ability for the depth of the scene, and places more sampling points in the effective position of the scene. PMPI divides the plane into multiple regions, and each region can set a depth range according to the corresponding scene depth. In this way, the depth values of multi-planar images in different regions may be different.
对于MPI,可以根据参考相机参数和目标相机参数进行渲染,得到新视图,例如可以采用标准反向单应变换(Standard inverse homography)和alpha合成两个步骤进行渲染。但是,对于PMPI,由于PMPI相对于MPI具有多个不同深度范围的平面区域,如果仍然采用MPI的渲染方式,会导致渲染过程复杂度较高。For MPI, rendering can be performed according to reference camera parameters and target camera parameters to obtain a new view. For example, standard inverse homography (Standard inverse homography) and alpha synthesis can be used for rendering. However, for PMPI, since PMPI has multiple plane regions with different depth ranges compared to MPI, if the MPI rendering method is still used, the rendering process will be more complex.
发明内容Contents of the invention
本申请实施例提供了一种图像处理的方法和装置,能够降低像素点的渲染过程的复杂度。Embodiments of the present application provide an image processing method and device, which can reduce the complexity of the pixel rendering process.
第一方面,提供了一种图像处理的方法,该方法应用于解码器,包括:In the first aspect, a method for image processing is provided, the method is applied to a decoder, including:
确定多平面图像的至少两个平面区域在参考坐标系下的第一位置信息;Determine first position information of at least two plane regions of the multi-plane image in the reference coordinate system;
确定至少一条光线在所述参考坐标系下的第二位置信息;determining second position information of at least one ray in the reference coordinate system;
基于所述第一位置信息和所述第二位置信息,确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标;determining coordinates of at least one intersection point of the at least one ray with the at least two planar regions based on the first position information and the second position information;
根据所述至少一个交点的坐标,确定至少一个像素点的图像信息。Image information of at least one pixel point is determined according to the coordinates of the at least one intersection point.
第二方面,提供了一种图像处理的装置,应用于解码器,包括:In a second aspect, an image processing device is provided, which is applied to a decoder, including:
第一处理单元,用于确定多平面图像的至少两个平面区域在参考坐标系下的第一位置信息;A first processing unit, configured to determine first position information of at least two plane regions of the multi-plane image in a reference coordinate system;
所述第一处理单元还用于确定至少一条光线在所述参考坐标系下的第二位置信息;The first processing unit is further configured to determine second position information of at least one ray in the reference coordinate system;
所述第一处理单元还用于基于所述第一位置信息和所述第二位置信息,确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标;The first processing unit is further configured to determine coordinates of at least one intersection point of the at least one ray and the at least two planar regions based on the first position information and the second position information;
第二处理单元,用于根据所述至少一个交点的坐标,确定至少一个像素点的图像信息。The second processing unit is configured to determine image information of at least one pixel point according to the coordinates of the at least one intersection point.
第三方面,提供了一种电子设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第一方面中的方法。In a third aspect, an electronic device is provided, including a processor and a memory. The memory is used to store a computer program, and the processor is used to invoke and run the computer program stored in the memory to execute the method in the first aspect above.
第四方面,提供了一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如上述第一方面的方法。In a fourth aspect, a chip is provided, including: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the method in the first aspect above.
第五方面,提供了一种计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述第一方面中的方法。A fifth aspect provides a computer-readable storage medium for storing a computer program, and the computer program causes a computer to execute the method in the first aspect above.
第六方面,提供了一种计算机程序产品,包括计算机程序指令,所述计算机程序指令使得计算机执行上述第一方面的方法。In a sixth aspect, a computer program product is provided, including computer program instructions, the computer program instructions cause a computer to execute the method in the first aspect above.
第七方面,提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面的方法。In a seventh aspect, a computer program is provided, which, when running on a computer, causes the computer to execute the method of the first aspect above.
本申请实施例通过第一位置信息实现了对的多平面图像的至少两个平面区域在参考坐标系下的简化表述,通过第二位置信息实现了对第一视图中像素点对应的光线在该参考坐标系下的简化表述,从而可以在该像素点的渲染过程中,根据该第一位置信息和第二位置信息,简化光线与该至少两个平面区域的至少一个交点的坐标的计算过程,进而降低该像素点的渲染过程的复杂度。The embodiment of the present application realizes the simplified expression of at least two planar areas of the multi-plane image in the reference coordinate system through the first position information, and realizes the light corresponding to the pixel point in the first view through the second position information. Referring to the simplified expression in the coordinate system, during the rendering process of the pixel point, according to the first position information and the second position information, the calculation process of the coordinates of the light rays and at least one intersection point of the at least two planar regions can be simplified, Further, the complexity of the rendering process of the pixel is reduced.
附图说明Description of drawings
图1是本申请实施例提供的编码器的编码流程的一个示意图。FIG. 1 is a schematic diagram of an encoding process of an encoder provided by an embodiment of the present application.
图2是本申请实施例提供的解码器的解码流程的一个示意图。Fig. 2 is a schematic diagram of a decoding process of a decoder provided by an embodiment of the present application.
图3是由4个平面层组成的MPI结构的一个示例。Figure 3 is an example of an MPI structure consisting of 4 planar layers.
图4是标准反向单应变换的一个示意图。Fig. 4 is a schematic diagram of standard inverse homography transformation.
图5是MPI平面层的几个实例。Figure 5 shows several examples of MPI plane layers.
图6是应用本申请实施例的一个场景的示意图。Fig. 6 is a schematic diagram of a scenario where an embodiment of the present application is applied.
图7是采用2个网格进行划分的PMPI一个示例。Figure 7 is an example of PMPI divided by two grids.
图8是图7中的PMPI在参考视角下的示意图。FIG. 8 is a schematic diagram of the PMPI in FIG. 7 at a reference viewing angle.
图9是确定深度图的起始深度值的一个具体例子。Fig. 9 is a specific example of determining the initial depth value of the depth map.
图10是本申请实施例提供的一种图像处理的方法的示意性流程图。Fig. 10 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
图11是本申请实施例中的光线与PMPI的patch相交的一个示例。Fig. 11 is an example of the intersection of the ray and the patch of PMPI in the embodiment of the present application.
图12是本申请实施例提供的一种图像处理的装置的示意性框图。Fig. 12 is a schematic block diagram of an image processing device provided by an embodiment of the present application.
图13是本申请实施例提供的一种电子设备的示意性框图。Fig. 13 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。针对本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. With regard to the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts all belong to the scope of protection of this application.
首先,结合图1和图2对本申请实施例的可适用的编解码框架下的视频编解码的基本流程进行说明。First, the basic flow of video encoding and decoding under the applicable encoding and decoding framework of the embodiment of the present application will be described with reference to FIG. 1 and FIG. 2 .
图1是本申请实施例提供的编码器的编码流程的一个示意图。该编码器可以为沉浸式视频测试模型(Test model of immersive video,TMIV)的MPI编码器。MPI中的每个平面层可以分为两部分:颜色图(color frame)和透明度图(transparency frame)。颜色图包含了场景在该平面层位置处的外观纹理,透明度图包含了场景在该平面层位置处的透明度信息。MPI的视角参数(view parameters)、颜色图和透明度图经过压缩之后可以作为TMIV的MPI编码器的输入。FIG. 1 is a schematic diagram of an encoding process of an encoder provided by an embodiment of the present application. The encoder may be an MPI encoder of a test model of immersive video (Test model of immersive video, TMIV). Each plane layer in MPI can be divided into two parts: a color frame and a transparency frame. The color map contains the appearance texture of the scene at the position of the plane layer, and the transparency map contains the transparency information of the scene at the position of the plane layer. MPI's view parameters (view parameters), color map and transparency map can be used as the input of TMIV's MPI encoder after compression.
如图1所示,编码器的输入可以为源MPI,其中包括视角参数(view parameters)、纹理属性组件(texture attribute component)、透明度属性组件(transparency attribute component)。对于源MPI,可以直接得到一部分视频流参数,例如视角参数列表(view parameters list)和参数集(parameters set),还可以执行步骤101至106,以得到另一部分编码后的视频流参数,例如图集数据(atlas data)、纹理属性视频数据(texture attribute video data)和透明度属性视频数据(transparency attribute video data)。As shown in Figure 1, the input of the encoder can be source MPI, which includes view parameters (view parameters), texture attribute component (texture attribute component), and transparency attribute component (transparency attribute component). For the source MPI, a part of the video stream parameters can be directly obtained, such as a view parameter list (view parameters list) and a parameter set (parameters set), and steps 101 to 106 can also be performed to obtain another part of the encoded video stream parameters, such as the Set data (atlas data), texture attribute video data (texture attribute video data) and transparency attribute video data (transparency attribute video data).
下面对步骤101至106进行描述。其中,步骤101和102为掩模处理(mask processes)流程,步骤103至105为图集处理(atlas processes)流程,步骤106为视频处理(video processes)流程。 Steps 101 to 106 are described below. Wherein, steps 101 and 102 are mask processes (mask processes), steps 103 to 105 are atlas processes (atlas processes), and step 106 is video processes (video processes).
步骤101,从MPI创建掩模(create mask from MPI)。掩模可以用于剔除颜色图和透明度图的无效区域。 Step 101, create a mask from MPI (create mask from MPI). Masks can be used to cull invalid regions of the colormap and transparency map.
步骤102,聚合MPI掩模(aggregate MPI masks)。示例性的,步骤102可以聚合一段时间内的MPI掩模。 Step 102, aggregate MPI masks (aggregate MPI masks). Exemplarily, step 102 may aggregate MPI masks over a period of time.
步骤103,聚类有效像素(cluster active pixels)。示例性的,通过步骤103可以将掩模分为8连通的区域。 Step 103, clustering effective pixels (cluster active pixels). Exemplarily, the mask can be divided into 8-connected regions through step 103 .
步骤104,分割聚类(split cluster),以减少cluster中的无效像素,压缩数据体积。 Step 104, split the cluster to reduce invalid pixels in the cluster and compress the data volume.
步骤105,打包补丁(pack patches)。在打包补丁中,可以得到atlas data。示例性的,在步骤105中,可以将步骤104分割得到的结果打包到图集上。 Step 105, pack patches (pack patches). In the package patch, atlas data can be obtained. Exemplarily, in step 105, the segmentation result obtained in step 104 may be packed into an atlas.
步骤106,生成视频数据(generate video data)。示例性的,可以将由步骤105得到的图集,生成视频数据。在视频数据中,可以得到纹理属性视频数据和透明度属性视频数据。 Step 106, generate video data (generate video data). Exemplarily, the atlas obtained in step 105 may be used to generate video data. Among the video data, texture attribute video data and transparency attribute video data can be obtained.
图2是本申请实施例提供的解码器的解码流程的一个示意图。该解码器可以为TMIV的MPI解码器。如图2所示,在该解码器中可以包括解码存取单元(decoded access unit)210和渲染器220。其中,解码存取单元210通过对获取的编码视频流进行解码,可以得到参数集(parameters sets)、视角参数(view parameters)、图集(atlas)。示例性的,atlas中可以包括图集参数列表(atlas parameter list)、分块参数列表(patch parameter list)、块到补丁的映射(block to patch map)、纹理视频数据(texture video data)和透明度视频数据(transparency video data)等。Fig. 2 is a schematic diagram of a decoding process of a decoder provided by an embodiment of the present application. The decoder may be an MPI decoder of TMIV. As shown in FIG. 2 , the decoder may include a decoded access unit (decoded access unit) 210 and a renderer 220 . Wherein, the decoding and accessing unit 210 can obtain parameter sets, view parameters, and atlases by decoding the acquired coded video stream. Exemplarily, the atlas may include an atlas parameter list, a patch parameter list, a block to patch map, texture video data and transparency Video data (transparency video data), etc.
渲染器220可以将解码存取单元210中的参数和视角参数(viewport parameters)作为输入。示例性的,该视角参数可以为播放设备的视角参数。渲染器220可以执行步骤201至204,得到该视角参数下的视角图像,从而得到播放视频流。The renderer 220 may take parameters in the decoding access unit 210 and viewport parameters as input. Exemplarily, the viewing angle parameter may be a viewing angle parameter of a playback device. The renderer 220 may execute steps 201 to 204 to obtain the viewing angle image under the viewing angle parameter, so as to obtain the playing video stream.
下面对步骤201至204进行描述。 Steps 201 to 204 are described below.
步骤201,层深度值解码(layer depth values decoding),以重建MPI,得到MPI的各平面层的层深度值。 Step 201, layer depth values decoding (layer depth values decoding) to reconstruct the MPI to obtain the layer depth values of each plane layer of the MPI.
步骤202,视角合成(view synthesis)。例如可以根据MPI和视角参数进行渲染,得到新视图,即该视角参数下的视角图像。 Step 202, view synthesis. For example, rendering may be performed according to the MPI and the viewing angle parameter to obtain a new view, that is, a viewing angle image under the viewing angle parameter.
在通过步骤201和202得到新视图后,可以通过以下步骤203和204,对视角图像进行后处理以增强图像,从而得到最终的视角图像。After the new view is obtained through steps 201 and 202, the perspective image may be post-processed to enhance the image through the following steps 203 and 204, so as to obtain the final perspective image.
步骤203,修补(inpainting)。 Step 203, inpainting.
步骤204,视角空间处理(viewing space handling)Step 204, viewing space handling
需要说明的是,以上结合图1或图2描述了基于TMIV的MPI编解码框架下的视频编解码的基本流程,该编解码框架或基本流程仅用于说明本申请实施例而非限定。例如,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化。在具体实施时,可以根据实际需要灵活地应用本申请实施例提供的技术方案。It should be noted that the basic process of video encoding and decoding under the TMIV-based MPI encoding and decoding framework is described above with reference to FIG. 1 or FIG. For example, with the development of technology, some modules or steps of the framework or process may be optimized. During specific implementation, the technical solutions provided by the embodiments of the present application may be flexibly applied according to actual needs.
为便于更好的理解本申请实施例,对本申请实施例涉及的MPI进行说明。To facilitate a better understanding of the embodiments of the present application, the MPI involved in the embodiments of the present application will be described.
在一个给定的参考视点作为坐标原点的空间坐标系内,MPI将场景分解为一系列平面层或球面层。以由平面层组成的MPI为例,平面层相对于参考视点正向平行并且位于不同的深度上。图3示出了由4个平面层组成的MPI结构的一个示例,其中平面层的深度范围[d min,d max]可以根据场景的景深数据提前设定。 In a space coordinate system with a given reference viewpoint as the coordinate origin, MPI decomposes the scene into a series of plane layers or spherical layers. Take for example an MPI composed of planar layers that are positively parallel and located at different depths with respect to the reference viewpoint. FIG. 3 shows an example of an MPI structure composed of 4 plane layers, where the depth range [d min ,d max ] of the plane layer can be set in advance according to the scene depth data.
MPI中每个平面层可以分为两部分:颜色图(color frame)和透明度图(transparency frame),颜色图包含了场景在该平面层位置处的外观纹理,例如可以用红绿蓝(red green blue,RGB)值表示;透明度图包含了场景在该平面层位置处的透明度信息,例如可以用α表示。Each plane layer in MPI can be divided into two parts: color frame and transparency frame. The color frame contains the appearance texture of the scene at the position of the plane layer. For example, red green blue (red green) can be used blue, RGB) values; the transparency map contains the transparency information of the scene at the position of the plane layer, for example, it can be represented by α.
为便于更好的理解本申请实施例,对本申请实施例涉及的解码端的渲染过程进行说明。In order to better understand the embodiment of the present application, the rendering process of the decoding end involved in the embodiment of the present application will be described.
在解码端,可以由MPI、参考相机参数和目标相机参数进行渲染,得到新视图,例如可以对应于图2中步骤202的处理过程。当前的一种渲染方式,可以通过标准反向单应变换(Standard inverse homography)和alpha合成两个步骤,得到新视图。作为示例,标准反向单应变换可以如下公式(1)所示:At the decoding end, rendering may be performed by MPI, reference camera parameters and target camera parameters to obtain a new view, for example, it may correspond to the processing procedure of step 202 in FIG. 2 . A current rendering method can obtain a new view through two steps of standard inverse homography and alpha synthesis. As an example, the standard inverse homography transformation can be shown in the following formula (1):
Figure PCTCN2021143687-appb-000001
Figure PCTCN2021143687-appb-000001
其中,R和t分别是世界坐标系下从参考相机坐标系到目标相机坐标系的旋转矩阵和平移向量;a是MPI中平面深度值的相反数。n=(0,0,1)是参考相机坐标系下MPI平面的单位法向量;k s和k t是参考相机和目标相机的内参数。(u t,v t,1)是目标相机坐标系下图像中像素点的齐次坐标;(u s,v s,1)是参考视角下MPI点在对应平面中的齐次坐 标。 Among them, R and t are the rotation matrix and translation vector from the reference camera coordinate system to the target camera coordinate system in the world coordinate system; a is the opposite number of the plane depth value in MPI. n=(0,0,1) is the unit normal vector of the MPI plane in the reference camera coordinate system; k s and k t are the internal parameters of the reference camera and the target camera. (u t ,v t ,1) are the homogeneous coordinates of the pixels in the image in the target camera coordinate system; (u s ,v s ,1) are the homogeneous coordinates of the MPI point in the corresponding plane under the reference viewing angle.
对于目标视图(target view)中的每一个像素(u t,v t,1),在MPI中的第i个平面(由远及近排序)中存在一个对应的点(u si,v si,1)。假设MPI的平面数为D,则每一个像素点(u t,v t,1)在MPI中存在D个对应的像素点。图4示出了标准反向单应变换的一个示意图,其中D=3。如图4所示,像素点(u t,v t)在MPI中的由远及近的第1个平面存在对应的点(u s1,v s1),第2个平面存在对应的点(u s2,v s2),第3个平面存在对应的点(u s3,v s3)。 For each pixel (u t ,v t ,1) in the target view, there is a corresponding point (u si ,v si , 1). Assuming that the number of planes of the MPI is D, each pixel point (u t ,v t ,1) has D corresponding pixel points in the MPI. FIG. 4 shows a schematic diagram of standard inverse homography transformation, where D=3. As shown in Figure 4, the pixel point (u t , v t ) has a corresponding point (u s1 , v s1 ) in the first plane from far to near in MPI, and a corresponding point (u s1 , v s1 ) in the second plane s2 ,v s2 ), there is a corresponding point (u s3 ,v s3 ) on the third plane.
在根据标准反向单应变换获得了与像素点(u t,v t,1)相对应的一系列MPI点(u si,v si,1)后,可以由各MPI点处的RGB值C i和透明度α值α i,按照以下公式(2)计算得到像素点的RGB值C t,这个过程称为alpha合成: After obtaining a series of MPI points (u si ,v si ,1) corresponding to the pixel point (u t ,v t ,1) according to the standard inverse homography transformation, the RGB value C at each MPI point can be obtained i and the transparency α value α i are calculated according to the following formula (2) to obtain the RGB value C t of the pixel. This process is called alpha synthesis:
Figure PCTCN2021143687-appb-000002
Figure PCTCN2021143687-appb-000002
为便于更好的理解本申请实施例,对本申请实施例涉及的PMPI进行说明。To facilitate a better understanding of the embodiments of the present application, the PMPI involved in the embodiments of the present application will be described.
在TMIV的编解码架构中,MPI是一种无冗余的场景表征方式。然而在现实场景中,大部分空间区域中是没有可见表面的,直观体现是MPI平面层中的颜色图和透明度图大部分区域为无效值,即不包含可见信息。参见图5,示出了MPI平面层的几个实例,其中(a)至(f)分别为第40个平面层到第45个平面层,每个平面层的第一行为颜色图,第二行为透明度图,黑色即为无效区域。In the codec architecture of TMIV, MPI is a non-redundant scene representation method. However, in real scenes, there are no visible surfaces in most spatial regions. The intuitive reflection is that most regions of the color map and transparency map in the MPI plane layer have invalid values, that is, they do not contain visible information. Referring to Fig. 5, several examples of MPI plane layers are shown, wherein (a) to (f) are respectively the 40th plane layer to the 45th plane layer, the first row of each plane layer is a color map, the second Behavioral transparency map, black is the invalid area.
如图5所示,如果将MPI视为对于场景的采样,MPI中的绝大部分采样点位于场景中的无效位置,极小部分位于场景的有效区域。然而从沉浸式体验的角度而言,起决定性作用的是场景中的有效区域。因此,在图1所示的编码架构中,TMIV在对MPI进行编码时会通过掩膜剔除颜色图和透明度图的无效区域。这意味着MPI的大部分采样结果被浪费,采样效率低,最终呈现的沉浸视频分辨率也较低。As shown in Figure 5, if the MPI is regarded as a sampling of the scene, most of the sampling points in the MPI are located in invalid positions in the scene, and a very small part are located in the valid area of the scene. However, from the perspective of immersive experience, it is the effective area in the scene that plays a decisive role. Therefore, in the encoding architecture shown in Figure 1, when TMIV encodes MPI, it will remove the invalid areas of the color map and transparency map through the mask. This means that most of the sampling results of MPI are wasted, the sampling efficiency is low, and the final immersive video resolution is also low.
为了提高MPI的采样效率,提出了一种具有深度自适应变化特性的场景表征——分块多平面图像(Patch Multiplane Image,PMPI)。PMPI是在MPI的基础上引入场景的深度信息,意在增加针对场景深度的自适应能力,将更多的采样点放置在场景的有效位置上。In order to improve the sampling efficiency of MPI, a scene representation with depth-adaptive change characteristics - Patch Multiplane Image (PMPI) is proposed. PMPI introduces the depth information of the scene on the basis of MPI, and aims to increase the adaptive ability for the depth of the scene, and place more sampling points in the effective position of the scene.
PMPI可以视为MPI的扩展。MPI的基本单元是平面层,而PMPI将平面划分多个区域,即将MPI中的平面层视作多个区域的集合。MPI的平面层深度范围[d min,d max]由场景的全局深度而设定(深度范围足以囊括场景大部分有效信息即可)。以图6的简单场景为例,MPI为了表征场景的主要信息(四个几何体)必须采用较大的深度范围,由此得到的平面层较为稀疏。显然,对于位于远景区域的三个物体而言,有效信息只会出现在深度较大的两个平面上。 PMPI can be seen as an extension of MPI. The basic unit of MPI is the plane layer, and PMPI divides the plane into multiple regions, that is, the plane layer in MPI is regarded as a collection of multiple regions. The depth range [d min , d max ] of the MPI plane layer is set by the global depth of the scene (the depth range is enough to cover most of the effective information of the scene). Taking the simple scene in Figure 6 as an example, MPI must use a large depth range to represent the main information of the scene (four geometric bodies), and the resulting plane layer is relatively sparse. Apparently, for the three objects located in the foreground area, effective information will only appear on the two planes with larger depths.
为了缓解这种情况,可以采用PMPI,即使用网格将平面层划分为不确定的数个(比如两个或以上)区域,每个区域根据对应的场景深度设定深度范围。图7示出了采用2个网格进行划分的PMPI一个示例。在该例子中,将区域数A设置为2,每一个区域中包含4个深度层,4个深度层的终止深度设置为相同,而起始深度由该区域及其邻近区域的场景深度设定。示例性的,图7中每个区域内的黑线代表该区域内深度层的位置。图8示出了图7中的PMPI在参考视角下的示意图,其中,该PMPI的两个区域中的每个区域包括4个子平面(patch),一个patch可以为一个正方形的子平面,不做限定。In order to alleviate this situation, PMPI can be used, that is, the grid is used to divide the plane layer into an uncertain number (such as two or more) areas, and each area sets the depth range according to the corresponding scene depth. Fig. 7 shows an example of PMPI divided by two grids. In this example, the number of regions A is set to 2, each region contains 4 depth layers, the end depths of the 4 depth layers are set to be the same, and the starting depth is set by the scene depth of this region and its adjacent regions . Exemplarily, the black line in each region in FIG. 7 represents the position of the depth layer in the region. Fig. 8 shows a schematic diagram of the PMPI in Fig. 7 at a reference viewing angle, wherein each of the two regions of the PMPI includes 4 sub-planes (patch), and a patch can be a square sub-plane, not done limited.
以上仅为举例展示PMPI与MPI的不同。在实际使用中可将PMPI的区域数设置为M×N,即使用M×N的网格对场景进行划分,其中M可表示将平面层划分的区域数,N可表示每个区域中深度层的数量。其中M和N可根据场景的复杂度等因素自行设定。M和N确定之后,根据参考视点下的深度图确定PMPI中各区域的起始深度值。具体流程如下:The above is just an example to show the difference between PMPI and MPI. In actual use, the number of PMPI areas can be set to M×N, that is, the scene is divided into M×N grids, where M can represent the number of areas divided into plane layers, and N can represent the depth layer in each area quantity. Among them, M and N can be set according to factors such as the complexity of the scene. After M and N are determined, the initial depth value of each area in PMPI is determined according to the depth map under the reference viewpoint. The specific process is as follows:
a).使用M×N的网格将深度图划分为M×N的区域;a). Divide the depth map into M×N regions using an M×N grid;
b).对于深度图的每个区域,其深度值替换为该区域的K×K邻域中的最小值,以减小该区域的深度值的误差,其中K为正奇数。例如,可以以网格区域为单位的K×K最小值池化。为了使得池化后的深度图的网格数仍然是M×N,可以对原始深度图网格进行复制填充,并将池化的步长设置为1;b). For each region of the depth map, its depth value is replaced by the minimum value in the K×K neighborhood of the region to reduce the error of the depth value of the region, where K is a positive odd number. For example, K×K minimum pooling in units of grid regions can be used. In order to make the grid number of the pooled depth map still M×N, the original depth map grid can be copied and filled, and the pooling step size is set to 1;
c).由a)和b)步骤得到的每个区域的深度值作为PMPI对应区域的起始深度值。c). The depth value of each region obtained in steps a) and b) is used as the initial depth value of the PMPI corresponding region.
图9示出了确定深度图的起始深度值的一个具体例子,其中池化尺寸为5×5。如图9所示,原始深度图的网格数为6×6,首先可以对原始深度图网格进行复制填充,得到填充后的深度图的网格数为10×10,然后以池化尺寸为5×5,步长为1进行最小池化,得到池化后的深度图,其网格数与原始深度图的网格数相同。此时,可以将池化后深度图的每个区域的深度值作为每个区域的深度值。应理解,图9中的网格数和池化尺寸仅用于举例,并不会对本申请实施例构成限定。FIG. 9 shows a specific example of determining the initial depth value of the depth map, where the pooling size is 5×5. As shown in Figure 9, the grid number of the original depth map is 6×6. First, the grid of the original depth map can be copied and filled, and the grid number of the filled depth map is 10×10, and then the pooling size is 5×5, and the step size is 1 for minimum pooling, and the pooled depth map is obtained, and the number of grids is the same as that of the original depth map. At this time, the depth value of each region of the pooled depth map may be used as the depth value of each region. It should be understood that the grid number and pooling size in FIG. 9 are for example only, and do not limit the embodiment of the present application.
经过上述处理,可以确定PMPI的M×N个区域的起始深度值。PMPI中每个区域的深度范围终止值dmax和MPI相同,并且可以提前给定。可选的,在每个区域中,深度数相同,且可以按照相同规律分布,例如等距分布,或者等视差分布,不做限定。After the above processing, the initial depth values of the M×N regions of the PMPI can be determined. The depth range end value dmax of each region in PMPI is the same as MPI and can be given in advance. Optionally, in each region, the number of depths is the same, and can be distributed according to the same law, such as equidistant distribution or equal parallax distribution, which is not limited.
为便于更好的理解本申请实施例,对本申请实施例需要解决的技术问题进行说明。In order to better understand the embodiments of the present application, the technical problems to be solved in the embodiments of the present application are described.
由上文描述可知,PMPI和MPI在结构上存在较大的差异,PMPI相对于MPI具有多个不同深度范围的平面区域,这意味着MPI的渲染方式不再适用于PMPI的渲染。也就是说,如果沿用MPI的渲染方式,用于对PMPI的渲染,即采用标准反向单应变换和alpha合成对PMPI进行渲染,会导致渲染过程的复杂度较高。As can be seen from the above description, there is a big difference in structure between PMPI and MPI. Compared with MPI, PMPI has multiple plane areas with different depth ranges, which means that the rendering method of MPI is no longer applicable to the rendering of PMPI. That is to say, if the rendering method of MPI is used for rendering of PMPI, that is, the standard inverse homography transformation and alpha synthesis are used to render PMPI, which will lead to a high complexity of the rendering process.
具体而言,在公式(1)描述的标准反向单应变换标准反向单应变换过程中,需要对PMPI的每一个区域中的每一个子平面(patch)都计算一遍。以区域数为M×N的PMPI为例,相较于同等深度数的MPI,PMPI计算的复杂度是MPI的M×N倍。在实际使用中,PMPI的渲染复杂度是MPI渲染复杂度的成百上千倍。Specifically, in the process of the standard reverse homography transformation described by formula (1), it is necessary to calculate once for each sub-plane (patch) in each region of the PMPI. Taking PMPI with the number of regions as M×N as an example, compared with MPI with the same depth number, the complexity of PMPI calculation is M×N times that of MPI. In actual use, the rendering complexity of PMPI is hundreds or thousands of times that of MPI rendering.
有鉴于此,本申请实施例提供了一种图像处理的方法和装置,当该方法用于解码器中的多平面图像的渲染时,能够降低渲染过程的复杂度。In view of this, the embodiments of the present application provide an image processing method and device, and when the method is used for rendering a multi-plane image in a decoder, the complexity of the rendering process can be reduced.
具体而言,本申请实施例通过确定多平面图像的至少两个平面区域在参考坐标系下的第一位置信息,以及至少一 条光线在该参考坐标系下的第二位置信息,然后根据该第一位置信息和第二位置信息,确定该至少一条光线与该至少两个平面区域的至少一个交点在该参考坐标系下的坐标,最后根据该至少一个交点在该参考坐标系下的坐标,确定至少一个像素点的图像信息。Specifically, in this embodiment of the present application, by determining the first position information of at least two plane regions of the multi-plane image under the reference coordinate system, and the second position information of at least one ray under the reference coordinate system, and then according to the first position information a position information and a second position information, determine the coordinates of at least one intersection point of the at least one ray and the at least two planar areas in the reference coordinate system, and finally determine according to the coordinates of the at least one intersection point in the reference coordinate system Image information of at least one pixel.
本申请实施例通过第一位置信息实现了对的多平面图像的至少两个平面区域在参考坐标系下的简化表述,通过第二位置信息实现了对第一视图中像素点对应的光线在该参考坐标系下的简化表述,从而可以在该像素点的渲染过程中,根据该第一位置信息和第二位置信息,简化光线与该至少两个平面区域的至少一个交点的坐标的计算过程,进而降低该像素点的渲染过程的复杂度。The embodiment of the present application realizes the simplified expression of at least two planar areas of the multi-plane image in the reference coordinate system through the first position information, and realizes the light corresponding to the pixel point in the first view through the second position information. Referring to the simplified expression in the coordinate system, during the rendering process of the pixel point, according to the first position information and the second position information, the calculation process of the coordinates of the light rays and at least one intersection point of the at least two planar regions can be simplified, Further, the complexity of the rendering process of the pixel is reduced.
示例性的,对于具有多个不同深度范围的平面区域的PMPI,通过本申请实施例的方案,可以通过简单的加减运算和判断,即可确定该PMPI中的各patch与像素点对应的光线是否相交,而不需要采用标准反向单应变换来判断光线和patch是否相交,从而能够大大简化确定像素点对应的光线与PMPI中的patch的交点的坐标的运算过程,进而降低像素点的渲染过程的复杂度。Exemplarily, for a PMPI having a plurality of planar regions with different depth ranges, through the solution of the embodiment of the present application, the light corresponding to each patch in the PMPI and the pixel point can be determined through simple addition and subtraction operations and judgment Intersect, instead of using the standard inverse homography transformation to determine whether the ray intersects the patch, which can greatly simplify the calculation process of determining the coordinates of the intersection point of the ray corresponding to the pixel and the patch in PMPI, thereby reducing the rendering of the pixel the complexity of the process.
以下结合附图详细描述本申请实施例提供的图像处理的方法。The image processing method provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
图10示出了本申请实施例提供的一种图像处理的方法400的示意性流程图。方法400可以应用于解码器,例如图2的解码器,或该解码器涉及的解码流程。进一步的,方法400可以用于图2中的解码器中的渲染器220的视角合成。如图10所示,方法400包括步骤410至440。FIG. 10 shows a schematic flowchart of an image processing method 400 provided by an embodiment of the present application. The method 400 may be applied to a decoder, such as the decoder in FIG. 2 , or a decoding process involved in the decoder. Further, the method 400 may be used for view synthesis of the renderer 220 in the decoder in FIG. 2 . As shown in FIG. 10 , method 400 includes steps 410 to 440 .
410,确定多平面图像的至少两个平面区域在参考坐标系下的第一位置信息。410. Determine first position information of at least two plane regions of a multi-plane image in a reference coordinate system.
作为一个示例,多平面图像可以为PMPI,对应的该至少两个平面区域即将平面层划分为至少两个区域后,每个区域中的至少两个平面区域。例如,对于图8中的PMPI,该至少两个平面区域包括2个区域中的每个子平面(patch),即总共8个平面区域。As an example, the multi-plane image may be a PMPI, which corresponds to at least two plane areas in each area after the at least two plane areas are divided into at least two areas. For example, for the PMPI in FIG. 8 , the at least two plane areas include each sub-plane (patch) in 2 areas, ie a total of 8 plane areas.
在一些可选的实施例中,当多平面图像为PMPI时,在步骤410之前,还可以将该多平面层划分为至少两个区域,其中,该至少两个区域的场景深度范围不同;然后根据该至少两个区域的场景深度范围,在该至少两个区域中分别获取平面区域作为该至少两个平面区域。In some optional embodiments, when the multi-plane image is PMPI, before step 410, the multi-plane layer may also be divided into at least two regions, wherein the scene depth ranges of the at least two regions are different; then According to the scene depth ranges of the at least two areas, planar areas are respectively acquired in the at least two areas as the at least two planar areas.
示例性的,可以根据具体的场景,用网格将平面层划分为至少两个区域,每个区域可以根据对应的场景设定深度范围,例如起始深度可以由该区域或者该区域的邻近区域的场景深度设定。然后在每个区域中,可以根据该区域的场景深度范围,获取至少两个子平面,所有区域中的子平面即可以组成上述至少两个平面区域。作为具体的例子,可以参考上文中图7至图9中获取PMPI的多个patch的过程,这里不再赘述。Exemplarily, according to the specific scene, the plane layer can be divided into at least two regions with a grid, and the depth range of each region can be set according to the corresponding scene, for example, the starting depth can be determined by the region or the adjacent region of the region Depth of scene setting. Then, in each area, at least two sub-planes can be obtained according to the scene depth range of the area, and the sub-planes in all areas can form the above-mentioned at least two plane areas. As a specific example, reference may be made to the process of obtaining multiple patches of PMPI in FIG. 7 to FIG. 9 above, which will not be repeated here.
作为另一个示例,多平面图像可以为MPI,对应的该至少两个平面区域即可以为该MPI的每个平面区域。例如,对于图3中的MPI,该至少两个平面区域包括该4个平面层中每个平面层对应的平面区域。As another example, the multi-plane image may be an MPI, and the corresponding at least two plane areas may be each plane area of the MPI. For example, for the MPI in FIG. 3 , the at least two plane areas include a plane area corresponding to each plane layer in the four plane layers.
在一些实施例中,该多平面图像的至少两个平面区域在参考坐标系下的第一位置信息,也可以描述为该多平面图像的至少两个平面区域在参考视角下的的第一位置信息,不作限定。In some embodiments, the first position information of the at least two plane regions of the multi-plane image under the reference coordinate system may also be described as the first position of the at least two plane regions of the multi-plane image under the reference viewing angle information, without limitation.
在一些实施例中,参考坐标系也可以被称为参考相机坐标系,二者表示相同或相似的含义。In some embodiments, the reference coordinate system may also be referred to as the reference camera coordinate system, and the two have the same or similar meanings.
在一些可选的实施例中,该第一位置信息包括该平面区域的几何中心在该参考坐标系下的坐标和该平面区域的尺寸信息。In some optional embodiments, the first position information includes coordinates of the geometric center of the planar area in the reference coordinate system and size information of the planar area.
示例性的,对于PMPI中的每一个patch,即每一个区域中的每一个子平面,该patch的第一位置信息可以包括该patch的几何中心在参考坐标系下的坐标和该patch每个边的边长。作为示例,该子平面可以为正方形、长方形,或者其他形状,不作限定。Exemplarily, for each patch in the PMPI, that is, each sub-plane in each region, the first position information of the patch may include the coordinates of the geometric center of the patch in the reference coordinate system and each side of the patch side length. As an example, the sub-plane may be a square, a rectangle, or other shapes, which are not limited.
例如,当子平面为正方形时,可以将该patch的第一位置信息表示为向量(x p,y p,d p,r p),其中(x p,y p,d p)表示该patch的几何中心在该参考坐标系下的坐标,x p、y p、d p分别为x、y、z轴坐标,d p可表示该patch的深度值,r p可以表示该patch在该参考坐标系下的边长的一半。这里,patch的单位法向量固定为(0,0,1)。 For example, when the sub-plane is a square, the first position information of the patch can be expressed as a vector (x p , y p , d p , r p ), where (x p , y p , d p ) represents the patch's The coordinates of the geometric center in the reference coordinate system, x p , y p , and d p are the coordinates of the x, y, and z axes respectively, d p can represent the depth value of the patch, and r p can represent the patch in the reference coordinate system half the length of the lower side. Here, the unit normal vector of the patch is fixed to (0,0,1).
可以理解的是,本申请实施例通过该第一位置信息,例如平面区域的几何中心的位置坐标和尺寸信息,可以实现对多平面图像的至少两个平面区域在参考坐标系下进行简化表述。It can be understood that, in the embodiment of the present application, the first position information, such as the position coordinates and size information of the geometric center of the plane area, can realize the simplified expression of at least two plane areas of the multi-plane image in the reference coordinate system.
420,确定至少一条光线在该参考坐标系下的第二位置信息。420. Determine second position information of at least one ray in the reference coordinate system.
示例性的,该至少一条光线可以包括至少一个视图(比如第一视图,或目标视图)中的至少一个像素点对应的光线,该第一视图可以为目标视图。其中,每个第一视图中的一个像素点可以对应一条光线。Exemplarily, the at least one ray may include a ray corresponding to at least one pixel in at least one view (such as a first view, or a target view), and the first view may be the target view. Wherein, one pixel point in each first view may correspond to one ray.
示例性的,该至少一条光线包括起始点为目标相机且经过该至少一个像素点的光线。以下,以一个第一视图中的一个像素点对应一条光线为例进行描述,该像素点对应的光线可以是起始点为目标相机,且经过该像素点的光线。在一些实施例中,目标坐标系也可以被称为目标相机坐标系,二者表示相同或相似的含义。Exemplarily, the at least one ray includes a ray whose starting point is the target camera and passes through the at least one pixel. In the following, a pixel in a first view corresponds to a ray as an example. The ray corresponding to the pixel may be a ray whose starting point is the target camera and passes through the pixel. In some embodiments, the target coordinate system may also be referred to as the target camera coordinate system, and both have the same or similar meanings.
在一些可选的实施例中,该第二位置信息包括像素点对应的光线(在参考坐标系下)的起始点的坐标和方向向量,其中,该起始点的坐标为目标相机在该参考坐标系下的坐标。In some optional embodiments, the second position information includes the coordinates and direction vector of the starting point of the ray (under the reference coordinate system) corresponding to the pixel point, where the coordinates of the starting point are the coordinates of the target camera at the reference coordinates Coordinates under the system.
示例性的,对于第一视图中的每一个像素点,可以将其对应的光线表示为向量(x 0,y 0,z 0,x d,y d),其中(x 0,y 0,z 0)表示该光线的起始点坐标,即目标相机在参考坐标系下的坐标,(x d,y d,1)表示该光线在参考坐标系下的方向向量。 Exemplarily, for each pixel in the first view, its corresponding ray can be expressed as a vector (x 0 , y 0 , z 0 , x d , y d ), where (x 0 , y 0 , z 0 ) represents the coordinates of the starting point of the ray, that is, the coordinates of the target camera in the reference coordinate system, and (x d , y d , 1) represents the direction vector of the ray in the reference coordinate system.
作为示例,可以根据光线在目标坐标系下的方向向量,以及目标坐标系和参考坐标系之间的映射关系,得到该光线在参考坐标系下的方向向量,本申请对此不做限定。As an example, the direction vector of the ray in the reference coordinate system can be obtained according to the direction vector of the ray in the target coordinate system and the mapping relationship between the target coordinate system and the reference coordinate system, which is not limited in the present application.
可以理解的是,本申请实施例通过第二位置信息,例如像素点对应的光线的起始点和方向信息,能够实现对视图中像素点对应的光线在参考坐标系下进行简化表述。It can be understood that, the embodiment of the present application uses the second position information, such as the starting point and direction information of the ray corresponding to the pixel, to realize the simplified expression of the ray corresponding to the pixel in the view in the reference coordinate system.
430,基于该第一位置信息和第二位置信息,确定该至少一条光线与该至少两个平面区域的至少一个交点在该参考坐标系下的坐标。430. Based on the first position information and the second position information, determine coordinates in the reference coordinate system of at least one intersection point of the at least one ray and the at least two planar regions.
以下以一个第一视图中的一个像素点对应一条光线为例进行描述。In the following, a pixel corresponding to a ray in a first view is taken as an example for description.
在一些可选的实施例中,可以根据上述第一位置信息和第二位置信息,确定像素点对应的光线与多平面图像的至少两个平面区域所在的平面的交点,然后判断该光线与每个平面区域所在平面的交点是否在该平面区域上。当交点在对应的平面区域上时,可以确定光线与该平面区域相交,进而可以获取该交点在参考坐标系下的坐标;当交点不在对应的平面区域上时,可以确定光线与该平面区域不相交。In some optional embodiments, the intersection point of the ray corresponding to the pixel point and the plane where at least two plane regions of the multi-plane image are located can be determined according to the first position information and the second position information, and then it is judged that the ray and each Whether the intersection point of the plane where the plane area is located is on the plane area. When the intersection point is on the corresponding plane area, it can be determined that the ray intersects the plane area, and then the coordinates of the intersection point in the reference coordinate system can be obtained; when the intersection point is not on the corresponding plane area, it can be determined that the ray does not intersect the plane area intersect.
示例性的,这里判断光线与平面区域是否相交的过程,可以称为光线与平面区域相交判断算法,本申请对此不做限定。Exemplarily, the process of judging whether a ray intersects a plane area here may be referred to as an algorithm for judging whether a ray intersects a plane area, which is not limited in this application.
作为一种可能的实现方式,可以根据上述第一位置信息和第二位置信息,计算上述至少两个平面区域中的第一平面区域所在的第一平面与上述光线的第一交点在参考坐标系下的第一坐标,然后根据该第一坐标和该第一平面区域的边界位置,确定该第一交点在该第一平面区域上,之后可以确定该第一坐标为该光线与第一平面区域的交点在参考坐标系下的坐标。As a possible implementation, according to the above first position information and the second position information, the first intersection point of the first plane where the first plane area of the at least two plane areas is located and the above ray can be calculated in the reference coordinate system Next, according to the first coordinate and the boundary position of the first plane area, it is determined that the first intersection point is on the first plane area, and then the first coordinate can be determined as the ray and the first plane area The coordinates of the intersection point in the reference coordinate system.
示例性的,当参考坐标系为XOY坐标系时,根据该第一坐标和第一平面区域的边界位置,确定该第一交点在第一平面区域上,可以通过以下方式实现:Exemplarily, when the reference coordinate system is the XOY coordinate system, according to the first coordinate and the boundary position of the first plane area, determining that the first intersection point is on the first plane area may be achieved in the following manner:
确定第一坐标中的X坐标大于或等于第一平面区域在X轴的左边界;Determine that the X coordinate in the first coordinate is greater than or equal to the left boundary of the first plane area on the X axis;
确定第一坐标中的X坐标小于第一平面区域在X轴的右边界;Determine that the X coordinate in the first coordinate is smaller than the right boundary of the first plane area on the X axis;
确定第一坐标中的Y坐标小于第一平面区域在Y轴的上边界;Determine that the Y coordinate in the first coordinate is smaller than the upper boundary of the first plane area on the Y axis;
确定第一坐标中的Y坐标大于或等于第一平面区域在Y轴的下边界。It is determined that the Y coordinate in the first coordinate is greater than or equal to the lower boundary of the first plane area on the Y axis.
当满足上述条件,即第一坐标中的X坐标在第一平面区域在X轴的左边界和有边界之间,且Y坐标在第一平面区域的Y轴的上边界和下边界之间,则可以确定第一交点在该第一平面区域上。When the above conditions are met, that is, the X coordinate in the first coordinate is between the left boundary of the first plane area on the X axis and the border, and the Y coordinate is between the upper boundary and the lower boundary of the Y axis of the first plane area, Then it can be determined that the first intersection point is on the first plane area.
作为具体的例子,第一平面区域中的点的x坐标范围为[x1,x2),其中x1表示第一平面区域在x轴的左边界,x2表示第一平面区域在x轴的右边界,第一平面区域中的点的y坐标范围为[y1,y2),其中y1表示第一平面区域在y轴的下边界,y2表示第一平面区域在y轴的上边界,其中x1、x2、y1、y2为实数,且x1小于x2,y1小于y2。当第一坐标(x,y)满足x1≤x<x2,以及y1≤y<y2时,则确定该第一交点在第一平面区域上。As a specific example, the x-coordinate range of a point in the first plane area is [x1, x2), where x1 represents the left boundary of the first plane area on the x-axis, x2 represents the right boundary of the first plane area on the x-axis, The y-coordinate range of points in the first plane area is [y1, y2), where y1 represents the lower boundary of the first plane area on the y-axis, and y2 represents the upper boundary of the first plane area on the y-axis, where x1, x2, y1 and y2 are real numbers, and x1 is smaller than x2, and y1 is smaller than y2. When the first coordinates (x, y) satisfy x1≤x<x2 and y1≤y<y2, it is determined that the first intersection point is on the first plane area.
作为另一种可能的实现方式,可以根据上述第一位置信息和第二位置信息,计算上述至少两个平面区域中的第二平面区域所在的第二平面与上述光线的第二交点在参考坐标系下的第二坐标,然后根据该第二坐标和该第二平面区域的边界位置,确定该第二交点没有在该第一平面区域上,即可以确定光线与该第二平面区域不相交。As another possible implementation, the reference coordinates of the second intersection point of the second plane where the second plane area of the at least two plane areas is located and the light ray can be calculated according to the first position information and the second position information. Then, according to the second coordinates and the boundary position of the second plane area, it is determined that the second intersection point is not on the first plane area, that is, it can be determined that the ray does not intersect the second plane area.
示例性的,当参考坐标系为XOY坐标系时,根据该第二坐标和第二平面区域的边界位置,确定该第二交点没有在第一平面区域上,可以通过以下方式实现:Exemplarily, when the reference coordinate system is the XOY coordinate system, according to the second coordinates and the boundary position of the second plane area, it is determined that the second intersection point is not on the first plane area, which may be implemented in the following manner:
确定第二坐标中的X坐标小于第二平面区域在X轴的左边界;和/或Determining that the X coordinate in the second coordinate is smaller than the left boundary of the second planar area on the X axis; and/or
确定第二坐标中的X坐标大于或等于第二平面区域在X轴的右边界;和/或determining that the X coordinate in the second coordinate is greater than or equal to the right boundary of the second planar area on the X axis; and/or
确定第二坐标中的Y坐标大于或等于第二平面区域在Y轴的上边界;和/或Determining that the Y coordinate in the second coordinate is greater than or equal to the upper boundary of the second planar area on the Y axis; and/or
确定第二坐标中的Y坐标小于第二平面区域在Y轴的下边界。It is determined that the Y coordinate in the second coordinate is smaller than the lower boundary of the second plane area on the Y axis.
当满足上述条件之一,即第二坐标中的X坐标没有在第二平面区域在X轴的左边界和有边界之间,或Y坐标在第二平面区域的Y轴的上边界和下边界之间,则可以确定第二交点不在该第二平面区域上。When one of the above conditions is met, that is, the X coordinate in the second coordinate is not between the left boundary of the X axis and the border of the second plane area, or the Y coordinate is between the upper boundary and the lower boundary of the Y axis of the second plane area , it can be determined that the second intersection point is not on the second plane area.
作为具体的例子,第二平面区域中的点的x坐标范围为[x3,x4),其中x3表示第二平面区域在x轴的左边界,x4表示第二平面区域在x轴的右边界,第二平面区域中的点的y坐标范围为[y3,y4),其中y3表示第二平面区域在y轴的下边界,y4表示第二平面区域在y轴的上边界,其中x3、x4、y3、y4为实数,且x3小于x4,y3小于y4。当第二坐标(x′,y′)满足x′<x3,或x′≥x4,或y′<y3,或y′≥y4至少一项时,则确定该第二交点不在第二平面区域上。As a specific example, the x-coordinate range of the point in the second plane area is [x3, x4), where x3 represents the left boundary of the second plane area on the x-axis, x4 represents the right boundary of the second plane area on the x-axis, The y-coordinate range of the points in the second plane area is [y3, y4), where y3 represents the lower boundary of the second plane area on the y-axis, and y4 represents the upper boundary of the second plane area on the y-axis, where x3, x4, y3 and y4 are real numbers, and x3 is smaller than x4, and y3 is smaller than y4. When the second coordinate (x', y') satisfies at least one item of x'<x3, or x'≥x4, or y'<y3, or y'≥y4, it is determined that the second intersection point is not in the second plane area superior.
作为具体的例子,可以按照以下步骤a)至g),确定像素点与至少一个平面区域的交点在参考坐标系下的坐标。As a specific example, the coordinates of the intersection point of the pixel point and at least one plane area in the reference coordinate system may be determined according to the following steps a) to g).
a).计算像素点对应的光线与第一patch所在平面的交点的X坐标x crossa). Calculate the X coordinate x cross of the intersection point of the light corresponding to the pixel point and the plane where the first patch is located:
x cross=x 0+(d p-z 0)×x d x cross =x 0 +(d p -z 0 )×x d
b).计算该第一patch在X轴上的左边界x left=x p-r p,当x cross≥x left时,则继续执行后续步骤。否则,当x cross<x left时,则确定光线与第一patch不相交。 b). Calculate the left boundary x left =x p -r p of the first patch on the X axis, and when x cross ≥ x left , proceed to the subsequent steps. Otherwise, when x cross < x left , it is determined that the ray does not intersect with the first patch.
c).计算该第一patch在X轴上的右边界x right=x p+r p,当x cross<x right时,则继续执行后续步骤。否则,当x cross≥x left时,则确定光线与第一patch不相交。 c). Calculate the right boundary of the first patch on the X axis x right =x p +r p , and when x cross < x right , proceed to the subsequent steps. Otherwise, when x cross ≥ x left , it is determined that the ray does not intersect the first patch.
d).计算该光线与第一patch所在平面的交点的Y坐标y crossd). Calculate the Y coordinate y cross of the intersection point between the ray and the plane where the first patch is located:
y cross=y 0+(d p-z 0)×y d y cross =y 0 +(d p -z 0 )×y d
e).计算该第一patch在Y轴的上边界y up=y p+r p,当y cross<y up时,则继续执行后续步骤。否则,当y cross≥y up时,则确定光线与第一patch不相交。 e). Calculate the upper boundary of the first patch on the Y axis y up =y p +r p , and when y cross <y up , proceed to the subsequent steps. Otherwise, when y cross ≥ y up , it is determined that the ray does not intersect with the first patch.
f).计算该第一patch在Y轴的下边界y down=y p-r p,当y cross>y down时,则继续执行后续步骤。否则,当y cross<y up时,则确定光线与第一patch不相交。 f). Calculate the lower boundary of the first patch on the Y axis y down =y p -r p , and when y cross >y down , proceed to the subsequent steps. Otherwise, when y cross < y up , it is determined that the ray does not intersect with the first patch.
g).存储光线与第一patch的交点在参考坐标系下的坐标(x cross,y cross,d p)。 g). Store the coordinates (x cross , y cross , d p ) of the intersection point of the ray and the first patch in the reference coordinate system.
因此,本申请实施例根据上述第一位置信息和第二位置信息,只需要简单的加减运算和判断,即可确定像素点对应的光线与所述至少两个平面区域的至少一个交点在参考坐标系下的坐标,即本申请实施例能够简化该像素点对应的光线与该至少两个平面区域的至少一个交点的坐标的计算过程。Therefore, in the embodiment of the present application, based on the above-mentioned first position information and second position information, only simple addition and subtraction operations and judgments are required to determine that the light corresponding to the pixel point intersects with at least one intersection point of the at least two planar regions within the reference The coordinates in the coordinate system, that is, the embodiment of the present application can simplify the calculation process of the coordinates of at least one intersection point of the ray corresponding to the pixel point and the at least two planar regions.
例如在步骤a)至g)中,只需要不多于4次的加减运算和判断,即可确定第一patch与像素点对应的光线是否相交。而如果使用上文中描述的标准反向单应变换判断光线和平面区域是否相交,那么需要运行一次公式(1)以及几次判断 语句(判断交点是否在patch的边界内),该公式(1)是一个复杂的矩阵运算,需要花费的计算时间较长。For example, in steps a) to g), no more than 4 times of addition and subtraction operations and judgments are required to determine whether the first patch intersects the light corresponding to the pixel. However, if the standard inverse homography transformation described above is used to determine whether the ray intersects the plane area, then it is necessary to run the formula (1) once and several judgment statements (to determine whether the intersection point is within the boundary of the patch), the formula (1) It is a complex matrix operation that takes a long time to calculate.
图11示出了像素点对应的光线与PMPI的3个patch相交的一个示例。如图11所示,该PMPI包括8个patch,如果采用标准反向单应变换判断光线和平面区域是否相交,那么需要对公式(1)运算8次才能找到3个交点(图中黑点),而通过如果采用本申请实施例提供的方案,则运行8次上述步骤a)至g)(每次运算只需要不多于4次的加减运算和判断语句),即可找到这3个交点。因此,本申请实施例能够大大简化确定像素点对应的光线与PMPI中的patch的交点的坐标的计算过程。Fig. 11 shows an example where the ray corresponding to the pixel intersects with the three patches of PMPI. As shown in Figure 11, the PMPI includes 8 patches. If the standard inverse homography is used to judge whether the ray intersects with the plane area, then the formula (1) needs to be calculated 8 times to find 3 intersection points (black dots in the figure) , and if the scheme provided by the embodiment of the present application is adopted, the above steps a) to g) are run 8 times (each operation only needs no more than 4 addition and subtraction operations and judgment statements), and these 3 can be found intersection. Therefore, the embodiment of the present application can greatly simplify the calculation process of determining the coordinates of the intersection of the ray corresponding to the pixel point and the patch in the PMPI.
在一些可选的实施例中,可以按照该至少两个平面区域的深度值,对该至少两个平面区域进行排列,然后基于该第一位置信息和第二位置信息,依次确定像素点对应的光线与该至少两个平面区域的至少一个交点在参考坐标系下的坐标,以得到按照深度值依次排列的至少一个交点的坐标。In some optional embodiments, the at least two plane areas may be arranged according to the depth values of the at least two plane areas, and then based on the first position information and the second position information, the pixel points corresponding to Coordinates of at least one intersection point of the ray and the at least two planar areas in the reference coordinate system, so as to obtain coordinates of at least one intersection point arranged in sequence according to depth values.
示例性的,可以按照该至少两个平面区域的深度值,对该至少两个平面区域进行升序排列,或者降序排列,本申请对此不做限定。Exemplarily, the at least two plane regions may be arranged in ascending or descending order according to the depth values of the at least two plane regions, which is not limited in the present application.
440,根据该至少一个交点的坐标,确定至少一个像素点的图像信息。440. Determine image information of at least one pixel point according to the coordinates of the at least one intersection point.
示例性的,示例性的,至少一个像素点可以为上述视图(例如第一视图或目标视图)中的像素点。例如,第一视图中的像素点(比如所有像素点)的图像信息即对该第一视图进行渲染得到新视图。Exemplarily, exemplary, at least one pixel point may be a pixel point in the above view (for example, the first view or the target view). For example, image information of pixels (for example, all pixels) in the first view is rendered to the first view to obtain a new view.
因此,本申请实施例通过第一位置信息实现了对的多平面图像的至少两个平面区域在参考坐标系下的简化表述,通过第二位置信息实现了对第一视图中像素点对应的光线在该参考坐标系下的简化表述,从而可以在该像素点的渲染过程中,根据该第一位置信息和第二位置信息,简化光线与该至少两个平面区域的至少一个交点的坐标的计算过程,进而降低该像素点的渲染过程的复杂度。Therefore, the embodiment of the present application realizes the simplified expression of at least two plane regions of the multi-plane image in the reference coordinate system through the first position information, and realizes the light corresponding to the pixel point in the first view through the second position information Simplified expression in the reference coordinate system, so that in the rendering process of the pixel point, according to the first position information and the second position information, the calculation of the coordinates of the light rays and at least one intersection point of the at least two planar regions can be simplified process, thereby reducing the complexity of the rendering process of the pixel.
作为一种可能的实现方式,可以对上述至少一个交点所在的平面图像分别进行采样,得到该像素点在所述至少一个交点所在平面图像的至少一个图像信息,然后根据该至少一个图像信息和该至少一个交点所在平面图像的透明度信息,确定该像素点的图像信息。As a possible implementation, it is possible to sample the plane image where the at least one intersection point is located to obtain at least one image information of the plane image where the pixel is located at the at least one intersection point, and then according to the at least one image information and the The transparency information of the plane image where the at least one intersection point is located determines the image information of the pixel point.
示例性的,该至少一个交点中的每个交点在平面图像的图像信息可以包括RGB值,该每个交点在平面图像的透明度信息例如为上文中所述的α值。也就是说,通过上述步骤430获取了与像素点相对应的一系列交点(x cross,y cross,d p)后,可以获取该一系列交点在各平面图像处的RGB值和透明度值α,从而可以根据上述公式(2)进行alpha合成,得到像素点的RBG值,作为该像素点的图像信息。可选的,在进行alpha合成时,该一系列交点在各平面图像处是按照其深度值排列。 Exemplarily, the image information of each intersection point in the plane image of the at least one intersection point may include RGB values, and the transparency information of each intersection point in the plane image is, for example, the α value mentioned above. That is to say, after obtaining a series of intersection points (x cross , y cross , d p ) corresponding to the pixel points through the above step 430, the RGB value and transparency value α of the series of intersection points at each plane image can be obtained, Therefore, alpha synthesis can be performed according to the above formula (2), and the RBG value of the pixel can be obtained as the image information of the pixel. Optionally, when alpha compositing is performed, the series of intersection points are arranged according to their depth values at each plane image.
在一些可选的实施例中,可以将上述步骤410至440的部分或全部步骤,部署到GPU上进行并行运算,以利用GPU的并行加速特性,较大程度提高像素点的渲染效率。示例性的,可以将上述步骤a)至g),以及步骤440部署到GPU上,本申请对此不做限定。In some optional embodiments, some or all of the above steps 410 to 440 may be deployed on a GPU for parallel computing, so as to utilize the parallel acceleration feature of the GPU to greatly improve the rendering efficiency of pixels. Exemplarily, the above steps a) to g) and step 440 may be deployed on the GPU, which is not limited in this application.
示例性的,本申请实施例对区域数为33×40,深度数为40的PMPI,渲染2000个像素点的过程进行实测,在相同硬件条件下,采用标准反向单应变换以及alpha合成,渲染所花费的时间为383.480毫秒,而采用本申请实施例提供的判断光线与平面区域是否相交的算法以及alpha合成,渲染所花费的时间为36.022毫秒。可见,本申请实施例提供的方法能够使得标像素点的渲染过程的速度提高超过10倍。Exemplarily, the embodiment of the present application measures the process of rendering 2000 pixels in a PMPI with a region number of 33×40 and a depth number of 40. Under the same hardware conditions, standard inverse homography transformation and alpha synthesis are used. The time spent on rendering is 383.480 milliseconds, and the time spent on rendering is 36.022 milliseconds by using the algorithm for judging whether a ray intersects a plane area and alpha compositing provided by the embodiment of the present application. It can be seen that the method provided by the embodiment of the present application can increase the speed of the pixel-marking rendering process by more than 10 times.
因此,通过本申请实施例的方案,通过简单的加减运算和判断,即可确定该PMPI中的各patch与像素点对应的光线是否相交,而不需要采用标准反向单应变换来判断光线和patch是否相交,从而能够大大简化确定像素点对应的光线与PMPI中的patch的交点的坐标的运算过程,进而降低像素点的渲染过程的复杂度。Therefore, through the scheme of the embodiment of the present application, through simple addition and subtraction and judgment, it can be determined whether each patch in the PMPI intersects with the light corresponding to the pixel point, without using standard reverse homography transformation to judge the light Whether it intersects with the patch can greatly simplify the calculation process of determining the coordinates of the intersection point of the ray corresponding to the pixel and the patch in the PMPI, thereby reducing the complexity of the rendering process of the pixel.
以上结合附图详细描述了本申请的具体实施方式,但是,本申请并不限于上述实施方式中的具体细节,在本申请的技术构思范围内,可以对本申请的技术方案进行多种简单变型,这些简单变型均属于本申请的保护范围。例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。The specific implementation of the application has been described in detail above in conjunction with the accompanying drawings. However, the application is not limited to the specific details in the above-mentioned implementation. Within the scope of the technical concept of the application, various simple modifications can be made to the technical solution of the application. These simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific implementation manners can be combined in any suitable manner if there is no contradiction. Separately. As another example, any combination of various implementations of the present application can also be made, as long as they do not violate the idea of the present application, they should also be regarded as the content disclosed in the present application.
还应理解,在本申请的各种方法实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。应理解这些序号在适当情况下可以互换,以便描述的本申请的实施例能够以除了在图示或描述的那些以外的顺序实施。It should also be understood that, in various method embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the order of execution of the processes should be determined by their functions and internal logic, and should not be used in this application. The implementation of the examples constitutes no limitation. It is to be understood that these ordinal numbers may be interchanged under appropriate circumstances such that the described embodiments of the application can be practiced in sequences other than those illustrated or described.
上文详细描述了本申请的方法实施例,下文结合图12至图13,详细描述本申请的装置实施例。The method embodiment of the present application is described in detail above, and the device embodiment of the present application is described in detail below in conjunction with FIG. 12 to FIG. 13 .
图12是本申请实施例的图像处理的装置700的示意性框图。装置700例如为图2中的解码器。如图12所示,所述装置700可包括第一处理单元710和第二处理单元720。FIG. 12 is a schematic block diagram of an image processing apparatus 700 according to an embodiment of the present application. The apparatus 700 is, for example, the decoder in FIG. 2 . As shown in FIG. 12 , the device 700 may include a first processing unit 710 and a second processing unit 720 .
第一处理单元710,用于确定多平面图像的至少两个平面区域在参考坐标系下的第一位置信息;The first processing unit 710 is configured to determine first position information of at least two plane regions of the multi-plane image in the reference coordinate system;
所述第一处理单元710还用于确定至少一条光线在所述参考坐标系下的第二位置信息;The first processing unit 710 is further configured to determine second position information of at least one ray in the reference coordinate system;
所述第一处理单元710还用于基于所述第一位置信息和所述第二位置信息,确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标;The first processing unit 710 is further configured to determine coordinates of at least one intersection point of the at least one ray and the at least two planar regions based on the first position information and the second position information;
第二处理单元720,用于根据所述至少一个交点的坐标,确定至少一个像素点的图像信息。The second processing unit 720 is configured to determine image information of at least one pixel point according to the coordinates of the at least one intersection point.
可选的,所述第二处理单元720具体用于:Optionally, the second processing unit 720 is specifically configured to:
对所述至少一个交点所在的平面图像分别进行采样,得到所述至少一个像素点在所述至少一个交点所在平面图像的至少一个图像信息;Sampling the plane image where the at least one intersection point is located respectively, to obtain at least one image information of the plane image where the at least one pixel point is located in the at least one intersection point;
根据所述至少一个图像信息和所述至少一个交点所在平面图像的透明度信息,确定所述至少一个像素点的图像信息。The image information of the at least one pixel point is determined according to the at least one image information and the transparency information of the plane image where the at least one intersection point is located.
可选的,所述第一处理单元710具体用于:Optionally, the first processing unit 710 is specifically configured to:
根据所述第一位置信息和所述第二位置信息,计算所述至少两个平面区域中的第一平面区域所在的第一平面与所述至少一条光线的第一交点的第一坐标;According to the first position information and the second position information, calculate the first coordinates of the first intersection point of the first plane where the first plane area of the at least two plane areas is located and the at least one ray;
根据所述第一坐标和所述第一平面区域的边界位置,确定所述第一交点在所述第一平面区域上;determining that the first intersection point is on the first plane area according to the first coordinates and the boundary position of the first plane area;
确定所述第一坐标为所述至少一条光线与所述第一平面区域的交点的坐标。The first coordinate is determined as a coordinate of an intersection point of the at least one ray and the first plane area.
可选的,第一处理单元具体710用于:Optionally, the first processing unit 710 is specifically used for:
确定所述第一坐标中的X坐标大于或等于所述第一平面区域在X轴的左边界;determining that the X coordinate in the first coordinate is greater than or equal to the left boundary of the first plane area on the X axis;
确定所述第一坐标中的X坐标小于所述第一平面区域在X轴的右边界;determining that the X coordinate in the first coordinate is smaller than the right boundary of the first plane area on the X axis;
确定所述第一坐标中的Y坐标小于所述第一平面区域在Y轴的上边界;determining that the Y coordinate in the first coordinate is smaller than the upper boundary of the first plane area on the Y axis;
确定所述第一坐标中的Y坐标大于或等于所述第一平面区域在Y轴的下边界。It is determined that the Y coordinate in the first coordinate is greater than or equal to the lower boundary of the first plane area on the Y axis.
可选的,所述第一处理单元710具体用于:Optionally, the first processing unit 710 is specifically configured to:
根据所述第一位置信息和所述第二位置信息,计算所述至少两个平面区域中的第二平面区域所在的第二平面与所述至少一条光线的第二交点的第二坐标;calculating second coordinates of a second intersection point of a second plane where a second plane area of the at least two plane areas is located and the at least one ray according to the first position information and the second position information;
根据所述第二坐标和所述第二平面区域的边界位置,确定所述第二交点没有在所述第一平面区域上;determining that the second intersection point is not on the first plane area according to the second coordinates and the boundary position of the second plane area;
确定所述至少一条光线与所述第二平面区域不相交。It is determined that the at least one ray does not intersect the second planar region.
可选的,所述第一处理单元710具体用于:Optionally, the first processing unit 710 is specifically configured to:
确定所述第二坐标中的X坐标小于所述第二平面区域在X轴的左边界;和/或determining that the X coordinate in the second coordinate is smaller than the left boundary of the second planar area on the X axis; and/or
确定所述第二坐标中的X坐标大于或等于所述第二平面区域在X轴的右边界;和/或determining that the X coordinate in the second coordinates is greater than or equal to the right boundary of the second planar region on the X axis; and/or
确定所述第二坐标中的Y坐标大于或等于所述第二平面区域在Y轴的上边界;和/或determining that the Y coordinate in the second coordinate is greater than or equal to the upper boundary of the second planar area on the Y axis; and/or
确定所述第二坐标中的Y坐标小于所述第二平面区域在Y轴的下边界。It is determined that the Y coordinate in the second coordinate is smaller than the lower boundary of the second plane area on the Y axis.
可选的,第一处理单元710具体用于:Optionally, the first processing unit 710 is specifically configured to:
按照所述至少两个平面区域的深度值,对所述至少两个平面区域进行排列;arranging the at least two planar regions according to the depth values of the at least two planar regions;
基于所述第一位置信息和所述第二位置信息,依次确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标。Based on the first position information and the second position information, sequentially determine the coordinates of at least one intersection point of the at least one ray and the at least two planar regions.
可选的,第一处理单元710还用于:Optionally, the first processing unit 710 is also used for:
将所述多平面图像对应的多平面层划分为至少两个区域,其中,所述至少两个区域的场景深度范围不同;Dividing the multi-plane layer corresponding to the multi-plane image into at least two regions, wherein the scene depth ranges of the at least two regions are different;
根据所述至少两个区域的场景深度范围,在所述至少两个区域中分别获取平面区域作为所述至少两个平面区域。According to scene depth ranges of the at least two areas, planar areas are respectively acquired in the at least two areas as the at least two planar areas.
可选的,所述第一位置信息包括所述平面区域的几何中心的坐标和所述平面区域的尺寸信息。Optionally, the first position information includes coordinates of the geometric center of the planar area and size information of the planar area.
可选的,所述至少一条光线包括至少一个视图中的至少一个像素点对应的光线,所述至少一条光线包括起始点为目标相机且经过所述至少一个像素点的光线。Optionally, the at least one ray includes a ray corresponding to at least one pixel in at least one view, and the at least one ray includes a ray whose starting point is the target camera and passes through the at least one pixel.
可选的,所述第二位置信息包括所述光线的起始点的坐标和方向向量。Optionally, the second position information includes the coordinates and direction vector of the starting point of the ray.
应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,在该实施例中装置700可以对应于执行本申请实施例的方法400的相应主体,并且装置700中的各个模块的前述和其它操作和/或功能分别为了实现图4中的各个方法,或图4中的方法中的相应流程,为了简洁,在此不再赘述。It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, details are not repeated here. Specifically, in this embodiment, the device 700 may correspond to the corresponding subject that executes the method 400 of the embodiment of the present application, and the aforementioned and other operations and/or functions of the modules in the device 700 are for realizing each method in FIG. 4 , or the corresponding process in the method in FIG. 4 , for the sake of brevity, details are not repeated here.
上文中结合附图从功能模块的角度描述了本申请实施例的装置和系统。应理解,该功能模块可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过硬件和软件模块组合实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。可选地,软件模块可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。The device and system of the embodiments of the present application are described above from the perspective of functional modules with reference to the accompanying drawings. It should be understood that the functional modules may be implemented in the form of hardware, may also be implemented by instructions in the form of software, and may also be implemented by a combination of hardware and software modules. Specifically, each step of the method embodiment in the embodiment of the present application can be completed by an integrated logic circuit of the hardware in the processor and/or instructions in the form of software, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as hardware The execution of the decoding processor is completed, or the combination of hardware and software modules in the decoding processor is used to complete the execution. Optionally, the software module may be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, and registers. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps in the above method embodiments in combination with its hardware.
如图13是本申请实施例提供的电子设备800的示意性框图。FIG. 13 is a schematic block diagram of an electronic device 800 provided by an embodiment of the present application.
如图13所示,该电子设备800可包括:As shown in Figure 13, the electronic device 800 may include:
存储器810和处理器820,该存储器810用于存储计算机程序,并将该程序代码传输给该处理器820。换言之,该处理器820可以从存储器810中调用并运行计算机程序,以实现本申请实施例中的方法。A memory 810 and a processor 820 , the memory 810 is used to store computer programs and transmit the program codes to the processor 820 . In other words, the processor 820 can invoke and run a computer program from the memory 810, so as to implement the method in the embodiment of the present application.
例如,该处理器820可用于根据该计算机程序中的指令执行上述方法400中的步骤。For example, the processor 820 may be configured to execute the steps in the above-mentioned method 400 according to instructions in the computer program.
在本申请的一些实施例中,该处理器820可以包括但不限于:In some embodiments of the present application, the processor 820 may include but not limited to:
通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等等。General-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates Or transistor logic devices, discrete hardware components, and so on.
在本申请的一些实施例中,该存储器810包括但不限于:In some embodiments of the present application, the memory 810 includes but is not limited to:
易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。volatile memory and/or non-volatile memory. Among them, the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash. The volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (Static RAM, SRAM), Dynamic Random Access Memory (Dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synch link DRAM, SLDRAM) and Direct Memory Bus Random Access Memory (Direct Rambus RAM, DR RAM).
在本申请的一些实施例中,该计算机程序可以被分割成一个或多个模块,该一个或者多个模块被存储在该存储器810中,并由该处理器820执行,以完成本申请提供的方法。该一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述该计算机程序在该电子设备800中的执行过程。In some embodiments of the present application, the computer program can be divided into one or more modules, and the one or more modules are stored in the memory 810 and executed by the processor 820 to complete the method. The one or more modules may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 800 .
可选的,如图8所示,该电子设备800还可包括:Optionally, as shown in FIG. 8, the electronic device 800 may further include:
收发器830,该收发器830可连接至该处理器820或存储器810。 Transceiver 830 , the transceiver 830 can be connected to the processor 820 or the memory 810 .
其中,处理器820可以控制该收发器830与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。收发器830可以包括发射机和接收机。收发器830还可以进一步包括天线,天线的数 量可以为一个或多个。Wherein, the processor 820 can control the transceiver 830 to communicate with other devices, specifically, can send information or data to other devices, or receive information or data sent by other devices. Transceiver 830 may include a transmitter and a receiver. The transceiver 830 may further include an antenna, and the number of antennas may be one or more.
应当理解,该电子设备800中的各个组件通过总线系统相连,其中,总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。It should be understood that various components in the electronic device 800 are connected through a bus system, wherein the bus system includes a power bus, a control bus and a status signal bus in addition to a data bus.
根据本申请的一个方面,提供了一种电子设备,包括处理器和存储器,该存储器用于存储计算机程序,该处理器用于调用并运行所述存储器中存储的计算机程序,使得所述电子设备执行上述方法实施例的方法。According to one aspect of the present application, an electronic device is provided, including a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory, so that the electronic device executes The method of the above method embodiment.
根据本申请的一个方面,提供了一种计算机存储介质,其上存储有计算机程序,该计算机程序被计算机执行时使得该计算机能够执行上述方法实施例的方法。或者说,本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得计算机执行上述方法实施例的方法。According to one aspect of the present application, a computer storage medium is provided, on which a computer program is stored, and when the computer program is executed by a computer, the computer can execute the methods of the above method embodiments. In other words, the embodiments of the present application further provide a computer program product including instructions, and when the instructions are executed by a computer, the computer executes the methods of the foregoing method embodiments.
根据本申请的另一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方法实施例的方法。According to another aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method of the above method embodiment.
换言之,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In other words, when implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a digital video disc (digital video disc, DVD)), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
应理解,在本申请实施例中,“与A对应的B”表示B与A相关联。在一种实现方式中,可以根据A确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。It should be understood that in this embodiment of the present application, "B corresponding to A" means that B is associated with A. In one implementation, B may be determined from A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B may also be determined according to A and/or other information.
在本申请的描述中,除非另有说明,“至少一个”是指一个或多个,“多个”是指两个或多于两个。另外,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the description of the present application, unless otherwise specified, "at least one" means one or more, and "plurality" means two or more than two. In addition, "and/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which may indicate: A exists alone, A and B exist simultaneously, and B exists alone, among them A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
还应理解,本申请实施例中出现的第一、第二等描述,仅作示意与区分描述对象之用,没有次序之分,也不表示本申请实施例中对设备个数的特别限定,不能构成对本申请实施例的任何限制。It should also be understood that the first, second, etc. descriptions appearing in the embodiments of the present application are only used to illustrate and distinguish the description objects, and there is no order, nor does it represent a special limitation on the number of devices in the embodiments of the present application. It cannot be construed as any limitation to the embodiments of the present application.
还应理解,说明书中与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。It should also be understood that a particular feature, structure, or characteristic described in the specification in relation to an embodiment is included in at least one embodiment of the present application. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments.
此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或服务器不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or server comprising a series of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。例如,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。A module described as a separate component may or may not be physically separated, and a component displayed as a module may or may not be a physical module, that is, it may be located in one place, or may also be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
以上仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以该权利要求的保护范围为准。The above is only the specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the application, and should be covered Within the protection scope of this application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (25)

  1. 一种图像处理的方法,应用于解码器,其特征在于,包括:A method for image processing, applied to a decoder, is characterized in that, comprising:
    确定多平面图像的至少两个平面区域在参考坐标系下的第一位置信息;Determine first position information of at least two plane regions of the multi-plane image in the reference coordinate system;
    确定至少一条光线在所述参考坐标系下的第二位置信息;determining second position information of at least one ray in the reference coordinate system;
    基于所述第一位置信息和所述第二位置信息,确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标;determining coordinates of at least one intersection point of the at least one ray with the at least two planar regions based on the first position information and the second position information;
    根据所述至少一个交点的坐标,确定至少一个像素点的图像信息。Image information of at least one pixel point is determined according to the coordinates of the at least one intersection point.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述至少一个交点的坐标,确定所述至少一个像素点的图像信息,包括:The method according to claim 1, wherein the determining the image information of the at least one pixel point according to the coordinates of the at least one intersection point comprises:
    对所述至少一个交点所在的平面图像分别进行采样,得到所述至少一个像素点在所述至少一个交点所在平面图像的至少一个图像信息;Sampling the plane image where the at least one intersection point is located respectively, to obtain at least one image information of the plane image where the at least one pixel point is located in the at least one intersection point;
    根据所述至少一个图像信息和所述至少一个交点所在平面图像的透明度信息,确定所述至少一个像素点的图像信息。The image information of the at least one pixel point is determined according to the at least one image information and the transparency information of the plane image where the at least one intersection point is located.
  3. 根据权利要求1或2所述的方法,其特征在于,所述基于所述第一位置信息和所述第二位置信息,确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标,包括:The method according to claim 1 or 2, wherein, based on the first position information and the second position information, at least one intersection point between the at least one ray and the at least two planar regions is determined coordinates, including:
    根据所述第一位置信息和所述第二位置信息,计算所述至少两个平面区域中的第一平面区域所在的第一平面与所述至少一条光线的第一交点的第一坐标;According to the first position information and the second position information, calculate the first coordinates of the first intersection point of the first plane where the first plane area of the at least two plane areas is located and the at least one ray;
    根据所述第一坐标和所述第一平面区域的边界位置,确定所述第一交点在所述第一平面区域上;determining that the first intersection point is on the first plane area according to the first coordinates and the boundary position of the first plane area;
    确定所述第一坐标为所述至少一条光线与所述第一平面区域的交点的坐标。The first coordinate is determined as a coordinate of an intersection point of the at least one ray and the first plane area.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第一坐标和所述第一平面区域的边界位置,确定所述第一交点在所述第一平面区域上,包括:The method according to claim 3, wherein the determining that the first intersection point is on the first plane area according to the first coordinates and the boundary position of the first plane area comprises:
    确定所述第一坐标中的X坐标大于或等于所述第一平面区域在X轴的左边界;determining that the X coordinate in the first coordinate is greater than or equal to the left boundary of the first plane area on the X axis;
    确定所述第一坐标中的X坐标小于所述第一平面区域在X轴的右边界;determining that the X coordinate in the first coordinate is smaller than the right boundary of the first plane area on the X axis;
    确定所述第一坐标中的Y坐标小于所述第一平面区域在Y轴的上边界;determining that the Y coordinate in the first coordinate is smaller than the upper boundary of the first plane area on the Y axis;
    确定所述第一坐标中的Y坐标大于或等于所述第一平面区域在Y轴的下边界。It is determined that the Y coordinate in the first coordinate is greater than or equal to the lower boundary of the first plane area on the Y axis.
  5. 根据权利要求3所述的方法,其特征在于,还包括:The method according to claim 3, further comprising:
    根据所述第一位置信息和所述第二位置信息,计算所述至少两个平面区域中的第二平面区域所在的第二平面与所述至少一条光线的第二交点的第二坐标;calculating second coordinates of a second intersection point of a second plane where a second plane area of the at least two plane areas is located and the at least one ray according to the first position information and the second position information;
    根据所述第二坐标和所述第二平面区域的边界位置,确定所述第二交点没有在所述第一平面区域上;determining that the second intersection point is not on the first plane area according to the second coordinates and the boundary position of the second plane area;
    确定所述至少一条光线与所述第二平面区域不相交。It is determined that the at least one ray does not intersect the second planar region.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述第二坐标和所述第二平面区域的边界位置,确定所述第二交点没有在所述第一平面区域上,包括:The method according to claim 5, wherein the determining that the second intersection point is not on the first plane area according to the second coordinates and the boundary position of the second plane area comprises:
    确定所述第二坐标中的X坐标小于所述第二平面区域在X轴的左边界;和/或determining that the X coordinate in the second coordinate is smaller than the left boundary of the second planar area on the X axis; and/or
    确定所述第二坐标中的X坐标大于或等于所述第二平面区域在X轴的右边界;和/或determining that the X coordinate in the second coordinates is greater than or equal to the right boundary of the second planar region on the X axis; and/or
    确定所述第二坐标中的Y坐标大于或等于所述第二平面区域在Y轴的上边界;和/或determining that the Y coordinate in the second coordinate is greater than or equal to the upper boundary of the second planar area on the Y axis; and/or
    确定所述第二坐标中的Y坐标小于所述第二平面区域在Y轴的下边界。It is determined that the Y coordinate in the second coordinate is smaller than the lower boundary of the second plane area on the Y axis.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述基于所述第一位置信息和所述第二位置信息,确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标,包括:The method according to any one of claims 1-6, wherein, based on the first position information and the second position information, determining the distance between the at least one ray and the at least two planar regions Coordinates of at least one point of intersection, including:
    按照所述至少两个平面区域的深度值,对所述至少两个平面区域进行排列;arranging the at least two planar regions according to the depth values of the at least two planar regions;
    基于所述第一位置信息和所述第二位置信息,依次确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标。Based on the first position information and the second position information, sequentially determine the coordinates of at least one intersection point of the at least one ray and the at least two planar regions.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-7, further comprising:
    将所述多平面图像对应的多平面层划分为至少两个区域,其中,所述至少两个区域的场景深度范围不同;Dividing the multi-plane layer corresponding to the multi-plane image into at least two regions, wherein the scene depth ranges of the at least two regions are different;
    根据所述至少两个区域的场景深度范围,在所述至少两个区域中分别获取平面区域作为所述至少两个平面区域。According to scene depth ranges of the at least two areas, planar areas are respectively acquired in the at least two areas as the at least two planar areas.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述第一位置信息包括所述平面区域的几何中心的坐标和所述平面区域的尺寸信息。The method according to any one of claims 1-8, wherein the first position information includes coordinates of a geometric center of the plane area and size information of the plane area.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述至少一条光线包括至少一个视图中的至少一个像素点对应的光线,所述至少一条光线包括起始点为目标相机且经过所述至少一个像素点的光线。The method according to any one of claims 1-9, wherein the at least one ray includes a ray corresponding to at least one pixel point in at least one view, and the at least one ray includes a starting point that is the target camera and passes through Light rays of the at least one pixel point.
  11. 根据权利要求1-10任一项所述方法,其特征在于,所述第二位置信息包括所述光线的起始点的坐标和方向向量。The method according to any one of claims 1-10, wherein the second position information includes coordinates and a direction vector of a starting point of the ray.
  12. 一种图像处理的装置,应用于解码器,其特征在于,包括:A device for image processing, applied to a decoder, is characterized in that it comprises:
    第一处理单元,用于确定多平面图像的至少两个平面区域在参考坐标系下的第一位置信息;A first processing unit, configured to determine first position information of at least two plane regions of the multi-plane image in a reference coordinate system;
    所述第一处理单元还用于确定至少一个至少一条光线在所述参考坐标系下的第二位置信息;The first processing unit is further configured to determine second position information of at least one ray in the reference coordinate system;
    所述第一处理单元还用于基于所述第一位置信息和所述第二位置信息,确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标;The first processing unit is further configured to determine coordinates of at least one intersection point of the at least one ray and the at least two planar regions based on the first position information and the second position information;
    第二处理单元,用于根据所述至少一个交点的坐标,确定所述至少一个像素点的图像信息。The second processing unit is configured to determine the image information of the at least one pixel point according to the coordinates of the at least one intersection point.
  13. 根据权利要求12所述的装置,其特征在于,所述第二处理单元具体用于:The device according to claim 12, wherein the second processing unit is specifically configured to:
    对所述至少一个交点所在的平面图像分别进行采样,得到所述至少一个像素点在所述至少一个交点所在平面图像的至少一个图像信息;Sampling the plane image where the at least one intersection point is located respectively, to obtain at least one image information of the plane image where the at least one pixel point is located in the at least one intersection point;
    根据所述至少一个图像信息和所述至少一个交点所在平面图像的透明度信息,确定所述至少一个像素点的图像信息。The image information of the at least one pixel point is determined according to the at least one image information and the transparency information of the plane image where the at least one intersection point is located.
  14. 根据权利要求12或13所述的装置,其特征在于,所述第一处理单元具体用于:The device according to claim 12 or 13, wherein the first processing unit is specifically used for:
    根据所述第一位置信息和所述第二位置信息,计算所述至少两个平面区域中的第一平面区域所在的第一平面与所述至少一条光线的第一交点的第一坐标;According to the first position information and the second position information, calculate the first coordinates of the first intersection point of the first plane where the first plane area of the at least two plane areas is located and the at least one ray;
    根据所述第一坐标和所述第一平面区域的边界位置,确定所述第一交点在所述第一平面区域上;determining that the first intersection point is on the first plane area according to the first coordinates and the boundary position of the first plane area;
    确定所述第一坐标为所述至少一条光线与所述第一平面区域的交点的坐标。The first coordinate is determined as a coordinate of an intersection point of the at least one ray and the first plane area.
  15. 根据权利要求14所述的装置,其特征在于,第一处理单元具体用于:The device according to claim 14, wherein the first processing unit is specifically used for:
    确定所述第一坐标中的X坐标大于或等于所述第一平面区域在X轴的左边界;determining that the X coordinate in the first coordinate is greater than or equal to the left boundary of the first plane area on the X axis;
    确定所述第一坐标中的X坐标小于所述第一平面区域在X轴的右边界;determining that the X coordinate in the first coordinate is smaller than the right boundary of the first plane area on the X axis;
    确定所述第一坐标中的Y坐标小于所述第一平面区域在Y轴的上边界;determining that the Y coordinate in the first coordinate is smaller than the upper boundary of the first plane area on the Y axis;
    确定所述第一坐标中的Y坐标大于或等于所述第一平面区域在Y轴的下边界。It is determined that the Y coordinate in the first coordinate is greater than or equal to the lower boundary of the first plane area on the Y axis.
  16. 根据权利要求14所述的装置,其特征在于,所述第一处理单元具体用于:The device according to claim 14, wherein the first processing unit is specifically configured to:
    根据所述第一位置信息和所述第二位置信息,计算所述至少两个平面区域中的第二平面区域所在的第二平面与所述至少一条光线的第二交点的第二坐标;calculating second coordinates of a second intersection point of a second plane where a second plane area of the at least two plane areas is located and the at least one ray according to the first position information and the second position information;
    根据所述第二坐标和所述第二平面区域的边界位置,确定所述第二交点没有在所述第一平面区域上;determining that the second intersection point is not on the first plane area according to the second coordinates and the boundary position of the second plane area;
    确定所述至少一条光线与所述第二平面区域不相交。It is determined that the at least one ray does not intersect the second planar region.
  17. 根据权利要求16所述的装置,其特征在于,所述第一处理单元具体用于:The device according to claim 16, wherein the first processing unit is specifically configured to:
    确定所述第二坐标中的X坐标小于所述第二平面区域在X轴的左边界;和/或determining that the X coordinate in the second coordinate is smaller than the left boundary of the second planar area on the X axis; and/or
    确定所述第二坐标中的X坐标大于或等于所述第二平面区域在X轴的右边界;和/或determining that the X coordinate in the second coordinates is greater than or equal to the right boundary of the second planar region on the X axis; and/or
    确定所述第二坐标中的Y坐标大于或等于所述第二平面区域在Y轴的上边界;和/或determining that the Y coordinate in the second coordinate is greater than or equal to the upper boundary of the second planar area on the Y axis; and/or
    确定所述第二坐标中的Y坐标小于所述第二平面区域在Y轴的下边界。It is determined that the Y coordinate in the second coordinate is smaller than the lower boundary of the second plane area on the Y axis.
  18. 根据权利要求12-17任一项所述的装置,其特征在于,第一处理单元具体用于:The device according to any one of claims 12-17, wherein the first processing unit is specifically configured to:
    按照所述至少两个平面区域的深度值,对所述至少两个平面区域进行排列;arranging the at least two planar regions according to the depth values of the at least two planar regions;
    基于所述第一位置信息和所述第二位置信息,依次确定所述至少一条光线与所述至少两个平面区域的至少一个交点的坐标。Based on the first position information and the second position information, sequentially determine the coordinates of at least one intersection point of the at least one ray and the at least two planar regions.
  19. 根据权利要求12-18任一项所述的装置,其特征在于,第一处理单元还用于:The device according to any one of claims 12-18, wherein the first processing unit is further configured to:
    将所述多平面图像对应的多平面层划分为至少两个区域,其中,所述至少两个区域的场景深度范围不同;Dividing the multi-plane layer corresponding to the multi-plane image into at least two regions, wherein the scene depth ranges of the at least two regions are different;
    根据所述至少两个区域的场景深度范围,在所述至少两个区域中分别获取平面区域作为所述至少两个平面区域。According to scene depth ranges of the at least two areas, planar areas are respectively acquired in the at least two areas as the at least two planar areas.
  20. 根据权利要求12-19任一项所述的装置,其特征在于,所述第一位置信息包括所述平面区域的几何中心的坐标和所述平面区域的尺寸信息。The device according to any one of claims 12-19, wherein the first position information includes coordinates of a geometric center of the plane area and size information of the plane area.
  21. 根据权利要求12-20任一项所述的装置,其特征在于,所述至少一条光线包括至少一个视图中的至少一个像素点对应的光线,所述至少一条光线包括起始点为目标相机且经过所述至少一个像素点的光线。The device according to any one of claims 12-20, wherein the at least one ray includes a ray corresponding to at least one pixel point in at least one view, and the at least one ray includes a starting point that is the target camera and passes through Light rays of the at least one pixel point.
  22. 根据权利要求12-21任一项所述装置,其特征在于,所述第二位置信息包括所述光线的起始点的坐标和方向向量。The device according to any one of claims 12-21, wherein the second position information includes coordinates and a direction vector of a starting point of the ray.
  23. 一种电子设备,其特征在于,包括处理器和存储器,所述存储器中存储有指令,所述处理器执行所述指令时,使得所述处理器执行权利要求1-12任一项所述的方法。An electronic device, characterized in that it includes a processor and a memory, and instructions are stored in the memory, and when the processor executes the instructions, the processor executes the method described in any one of claims 1-12. method.
  24. 一种计算机存储介质,其特征在于,用于存储计算机程序,所述计算机程序包括用于执行权利要求1-12中任一项所述的方法。A computer storage medium, characterized in that it is used to store a computer program, and the computer program includes a method for executing the method according to any one of claims 1-12.
  25. 一种计算机程序产品,其特征在于,包括计算机程序代码,当所述计算机程序代码被运行时,执行权利要求1-11中任一项所述的方法。A computer program product, characterized by comprising computer program code, when the computer program code is executed, the method according to any one of claims 1-11 is executed.
PCT/CN2021/143687 2021-12-31 2021-12-31 Image processing method and apparatus WO2023123357A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/143687 WO2023123357A1 (en) 2021-12-31 2021-12-31 Image processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/143687 WO2023123357A1 (en) 2021-12-31 2021-12-31 Image processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2023123357A1 true WO2023123357A1 (en) 2023-07-06

Family

ID=86997183

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/143687 WO2023123357A1 (en) 2021-12-31 2021-12-31 Image processing method and apparatus

Country Status (1)

Country Link
WO (1) WO2023123357A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199518A (en) * 2018-11-16 2020-05-26 深圳市中兴微电子技术有限公司 Image presentation method, device and equipment of VR equipment and computer storage medium
GB202011546D0 (en) * 2020-07-24 2020-09-09 Sony Interactive Entertainment Europe Ltd Method and system for generating a target image from plural multi-plane images
CN112200902A (en) * 2020-09-30 2021-01-08 北京达佳互联信息技术有限公司 Image rendering method and device, electronic equipment and storage medium
CN113610929A (en) * 2021-08-09 2021-11-05 西安外事学院 Camera and multi-line laser combined calibration method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199518A (en) * 2018-11-16 2020-05-26 深圳市中兴微电子技术有限公司 Image presentation method, device and equipment of VR equipment and computer storage medium
GB202011546D0 (en) * 2020-07-24 2020-09-09 Sony Interactive Entertainment Europe Ltd Method and system for generating a target image from plural multi-plane images
CN112200902A (en) * 2020-09-30 2021-01-08 北京达佳互联信息技术有限公司 Image rendering method and device, electronic equipment and storage medium
CN113610929A (en) * 2021-08-09 2021-11-05 西安外事学院 Camera and multi-line laser combined calibration method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NAVARRO JULIA; SABATER NEUS: "Compact And Adaptive Multiplane Images For View Synthesis", 2021 IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING (ICIP), IEEE, 19 September 2021 (2021-09-19), pages 3403 - 3407, XP034123482, DOI: 10.1109/ICIP42928.2021.9506403 *

Similar Documents

Publication Publication Date Title
US11270492B2 (en) Graphics processing systems
CN109936745B (en) Method and system for improving decompression of raw video data
CN106030652B (en) Method, system and composite display controller for providing output surface and computer medium
CN109785417B (en) Method and device for realizing OpenGL cumulative operation
US11418782B2 (en) Multi-resolution regionalized data transmission
US20180174349A1 (en) Adaptive partition mechanism with arbitrary tile shape for tile based rendering gpu architecture
KR20220047284A (en) Systems and methods for foveated rendering
KR100922780B1 (en) An efficient interface and assembler for a graphics processor
CA3030258C (en) Panoramic video compression method and device
US20220254068A1 (en) A method and apparatus for decoding three-dimensional scenes
CN115330986B (en) Method and system for processing graphics in block rendering mode
CN112017228A (en) Method for three-dimensional reconstruction of object and related equipment
TW202141418A (en) Methods and apparatus for handling occlusions in split rendering
DE102021127982A1 (en) STREAMING A FIELD OF LIGHT WITH LOSSLESS OR LOSSY COMPRESSION
US20140161173A1 (en) System and method for controlling video encoding using content information
WO2023123357A1 (en) Image processing method and apparatus
US11263786B2 (en) Decoding data arrays
WO2023142715A1 (en) Video coding method and apparatus, real-time communication method and apparatus, device, and storage medium
US20230245326A1 (en) Methods and systems for dual channel transfer of game
CN109767379B (en) Data normalization processing method and device, storage medium and electronic equipment
US11677927B2 (en) Stereoscopic graphics processing
US11948338B1 (en) 3D volumetric content encoding using 2D videos and simplified 3D meshes
WO2023115408A1 (en) Image processing apparatus and method
WO2023207137A1 (en) Image processing method and device
US20240104822A1 (en) Multicore system for neural rendering

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: 21969708

Country of ref document: EP

Kind code of ref document: A1