TECHNICAL FIELD

This disclosure generally relates to artificial-reality system, and in particular, related to generating a composite image for a frame of a video stream.

BACKGROUND

Artificial reality is a form of reality that has been adjusted in some manner before presentation to a user, which may include, e.g., a virtual reality (VR), an augmented reality (AR), a mixed reality (MR), a hybrid reality, or some combination and/or derivatives thereof. Artificial reality content may include completely generated content or generated content combined with captured content (e.g., real-world photographs). The artificial reality content may include video, audio, haptic feedback, or some combination thereof, and any of which may be presented in a single channel or in multiple channels (such as stereo video that produces a three-dimensional effect to the viewer). Artificial reality may be associated with applications, products, accessories, services, or some combination thereof, that are, e.g., used to create content in an artificial reality and/or used in (e.g., perform activities in) an artificial reality. The artificial reality system that provides the artificial reality content may be implemented on various platforms, including a head-mounted display (HMD) connected to a host computer system, a standalone HMD, a mobile device or computing system, or any other hardware platform capable of providing artificial reality content to one or more viewers.

SUMMARY OF PARTICULAR EMBODIMENTS

Particular embodiments described herein relate to systems and methods for generating a composite image for a frame of a video stream based on images from multiple sources. Contemporary media devices are expected to have high resolution, low latency displays. However, Graphics Processing Units (GPUs) on the media devices may not have enough computing capability to render images with the resolutions at the frame rates of the displays. To mitigate such a discrepancy between the computing capability and the desired resolutions of the rendered images, a computing device may prioritize a part of the screen and render only the prioritized part of the screen at a high resolution. In an application, the computing device may render an inset area (e.g., a central/foveal area) at a full frame rate while the computing device renders an outset area (a remaining area of the image) at a half frame rate. In another application, the computing device may access an image rendered at a low resolution. The computing device may apply a compute intensive upscaling algorithm to an area of the image while the computing device may apply a cheaper algorithm to the rest of the image. In yet another application, the computing device may perform a computing-intensive Chromatic Aberration Correction (CAC) to a part of the image while the computing device does not perform the CAC to the rest of the image.

Images on the display viewed via a lens system may undergo a distortion called ‘lens distortion.’ To counter this lens distortion, a complimentary distortion called ‘barrel distortion’ may need to be applied. A logical component of the computing device called a compositor module may handle the process of applying the barrel distortion using a distortion mesh to a rectangular image. The position of the vertices in the distortion mesh may inherently encode the necessary barrel distortion. The distortion may be then applied to the image by mapping the image onto the distortion mesh. The invention disclosed herein may enable an efficient mapping of the images from a number of image sources. The invention may eliminate misalignments and sharp transitions between the images from the number of image sources on the composite image.

A compositor module of a computing device may receive a source image and its associated parameters from each of n image sources. The n image sources may include at least two image sources. The parameters associated with each of the source images may comprise a layer parameter, clipping parameters, reprojection parameters, or blending parameters. The compositor module may associate each of the source images with a layer in a range of layers based on the layer parameter associated with the source images. The range of layers may specify a composition layering order of the source images. The clipping parameters associated with a source image may indicate a bounding area for the source image. The bounding area for the source image may be an area within the output image that is to be filled by the source image. The reprojection parameters associated with the source image may comprise information associated with one or more warping operations to be performed on the source image. In particular embodiments, the one or more warping operations may comprise a space warping operation. The reprojection parameters may comprise motion vectors in the source image. In particular embodiments, the one or more warping operations may comprise a time warping operation. The reprojection parameters may comprise a head position. The compositor module may update the bounding area for each of the source images based on an expected impact of the one or more warping operations. The compositor module may further update an updated bounding area for a first source image of the source images based on the updated bounding areas for second source images among the source images. Each of the second source images is associated with any layer preceding a layer associated with the first source image. For each of the second source images, the compositor module may subtract an intersection between the updated bounding area for the first source image and the updated bounding area for the second source image.

The compositor module may generate a customized distortion mesh corresponding to the first source image based on the parameters associated with the first source image and at least a portion of the parameters associated with each of the second source images. The compositor module may generate a distortion mesh that matches to the updated bounding area for the first source image. The updated bounding area for the first source image may be determined based on the clipping parameters and the reprojection parameters associated with the first source image and the clipping parameters and the reprojection parameters associated with each of the second source images. The compositor module may modify each of the source images using the corresponding customized distortion mesh. To modify the source image, the compositor module may perform the one or more warping operations on the source image based on the associated reprojection parameters. The compositor module may map the warped source image onto the corresponding customized distortion mesh. The compositor module may perform an alpha blending to a transition area for the source image. The blending parameter associated with the source image may comprise information associated with the transition area for the source image. The transition area may be a subject of an alpha blending. The transition area for the source image may be a subset of the updated bounding area for the source image. The blending parameters comprise a cutoff distance. A point within the cutoff distance from a boundary of the updated bounding area for the source image may belong to the transition area for the source image. The blending parameters associated with the source image may comprise a level of transparency to be applied to the transition area for the source image. The compositor module may apply the level of transparency to the transition area for the source image. The compositor module may generate a composite image using the modified source images. The compositor module may display the composite image as a frame in a video. The displayed composite image may be viewed by a user through a lens systems. The customized distortion mesh corresponding to each of the source images may be used to compensate a lens distortion caused by the lens system. The compositor module may send a composition result to each of the n image sources. The composition result may comprise parameter suggestions. The composition result may comprise a result code indicating whether the bounding area for the source image is fully, partially, or zero occluded by the bounding areas for the other source images. The parameter suggestions may comprise a new layer suggestion that is determined based on the result code. The image source may adjust parameters associated with a source image corresponding to a next frame based on the parameter suggestions.

The embodiments disclosed herein are only examples, and the scope of this disclosure is not limited to them. Particular embodiments may include all, some, or none of the components, elements, features, functions, operations, or steps of the embodiments disclosed above. Embodiments according to the invention are in particular disclosed in the attached claims directed to a method, a storage medium, a system and a computer program product, wherein any feature mentioned in one claim category, e.g. method, can be claimed in another claim category, e.g. system, as well. The dependencies or references back in the attached claims are chosen for formal reasons only. However, any subject matter resulting from a deliberate reference back to any previous claims (in particular multiple dependencies) can be claimed as well, so that any combination of claims and the features thereof are disclosed and can be claimed regardless of the dependencies chosen in the attached claims. The subject-matter which can be claimed comprises not only the combinations of features as set out in the attached claims but also any other combination of features in the claims, wherein each feature mentioned in the claims can be combined with any other feature or combination of other features in the claims. Furthermore, any of the embodiments and features described or depicted herein can be claimed in a separate claim and/or in any combination with any embodiment or feature described or depicted herein or with any of the features of the attached claims.

