Depth-Based Relighting in Augmented Reality
By using depth and color data to adjust lighting in AR scenes, the method addresses the challenge of real-time relighting in AR environments, providing realistic and engaging user experiences.
Patent Information
- Application Number
- JP2022579142
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-06-22
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-06-22
AI Technical Summary
Augmented reality (AR) environments face challenges in relighting virtual elements with physical elements in real-time due to the dynamic nature of AR scenes, making it difficult to achieve realistic and engaging user experiences.
A computer-implemented method that captures image and depth data, places virtual light sources in the AR scene, and adjusts lighting based on depth and color data to simulate realistic lighting effects in real-time.
Enables realistic and engaging lighting effects in AR scenes by accurately simulating virtual light sources based on depth and color data, enhancing user experience with dynamic AR environments.
Smart Images

Figure 0007551791000009 
Figure 0007551791000010 
Figure 0007551791000015
Abstract
Description
[Technical field]
[0001] Technical Field This specification relates to augmented reality (AR), and in particular to lighting for AR. [Background technology]
[0002] background Augmented reality (AR) environments may blend virtual elements with physical elements to generate an AR scene. In some situations, the AR scene may be enhanced by adding various visual effects. For example, in some situations, the AR scene may be enhanced by animation, lighting, etc. Lighting in AR may cause problems in blending virtual elements with physical elements in the AR scene, especially as elements in the AR scene shift or change. Relighting in an AR scene in substantially real time may provide a more engaging and / or more realistic user experience. However, due to the dynamic nature of the AR scene and other similar factors, it is difficult to perform relighting of the AR scene in substantially real time. Summary of the Invention [Means for solving the problem]
[0003] overview In one general aspect, a computer-implemented method may include capturing, by an image sensor of a computing device, image data corresponding to an image of a physical environment; detecting, by a depth sensor of the computing device, depth data corresponding to the physical environment; generating, by a processor of the computing device, an augmented reality (AR) scene from the image data corresponding to the image of the physical environment; accepting, at an input device of the computing device, input for placing a virtual light source in the AR scene; and relighting the AR scene based on a position of the virtual light source in the AR scene and the depth data corresponding to the physical environment.
[0004] In some implementations, detecting depth data may include generating a depth map corresponding to the physical environment. In some implementations, the method also includes detecting color data corresponding to the image of the physical environment with the image sensor and generating a color map corresponding to the image of the physical environment, the color map providing at least one of color or reflectance characteristics of each pixel of a plurality of pixels of the AR scene of the physical environment.
[0005] In some implementations, relighting the AR scene may include detecting a three-dimensional coordinate position of the virtual light source in the physical environment corresponding to the placement position of the virtual light source in the AR scene. In some implementations, the method may include, for each pixel of a plurality of pixels of the AR scene, setting an intensity level of the pixel based on an intensity of the virtual light source and a distance of the pixel from the virtual light source in the AR scene, setting a color of the pixel based on a color of the virtual light source, the distance of the pixel from the virtual light source and a color of the pixel in the AR scene, and setting a reflectance of the pixel based on the color of the virtual light source and the color of the pixel in the AR scene.
[0006] In some implementations, relighting the AR scene may include, for each pixel of the plurality of pixels of the AR scene, detecting an obstacle between the placement position of the virtual light source and the pixel based on the depth map, and adjusting the set intensity level, the set color, and the set reflectance for the pixel based on the detected obstacle. In some implementations, generating the AR scene may include darkening the image of the physical environment to simulate a darkened physical environment. In some implementations, relighting the AR scene may include relighting the darkened AR scene to include, for each pixel of the plurality of pixels, relighting the pixel to the adjusted intensity level, the adjusted color, and the adjusted reflectance.
[0007] In some implementations, relighting the AR scene may include applying the adjusted intensity level, the adjusted color, and the adjusted reflectance to the AR scene, generating a synthetic rendering of the physical environment in the AR scene including the adjusted intensity level, the adjusted color, and the adjusted reflectance, and displaying the synthetic rendering of the AR scene on a display device of the computing device. In some implementations, relighting the AR scene may include detecting, for each pixel of the plurality of pixels, a distance of the pixel from the location of the virtual light source in the AR scene, and setting the intensity, color, and reflectance of the pixel to the intensity, color, and reflectance of the virtual light source in response to detecting the pixel at a position corresponding to the location of the virtual light source in the AR scene. In some implementations, the intensity of the pixel may be inversely proportional to the square of the distance between the virtual light source and the pixel.
[0008] In another general aspect, a system includes a camera assembly, a display device, at least one processor, and a memory storing instructions that, when executed by the at least one processor, cause the system to capture image data corresponding to an image of a physical environment, detect depth data corresponding to the physical environment, generate an augmented reality (AR) scene from the image data corresponding to the image of the physical environment, accept input corresponding to a placement of a virtual light source in the AR scene, and relight the AR scene based on a placement of the virtual light source in the AR scene and the depth data corresponding to the physical environment.
[0009] In some implementations, the camera assembly includes a depth sensor and an image sensor, and the instructions cause the system to generate a depth map of the physical environment based on the depth data collected by the depth sensor and generate a color map of the physical environment based on the image data collected by the image sensor, the color map providing at least one of color characteristics or reflectance characteristics of each pixel of a plurality of pixels for the AR scene of the physical environment.
[0010] In some implementations, the instructions may cause the system to detect a three-dimensional coordinate position of the virtual light source in the physical environment corresponding to the placement position of the virtual light source in the AR scene; for each pixel of the plurality of pixels of the AR scene, set an intensity level of the pixel based on an intensity of the virtual light source and a distance of the pixel from the virtual light source in the AR scene; set a color of the pixel based on a color of the virtual light source, the distance of the pixel from the virtual light source and a color of the pixel in the AR scene; and set a reflectance of the pixel based on the color of the virtual light source and the color of the pixel in the AR scene.
[0011] In some implementations, the instructions may cause the system to detect an obstacle between the location of the virtual light source in the AR scene and the pixel based on the depth map, and adjust the set intensity level, the set color, and the set reflectance for the pixel based on the detected obstacle. In some implementations, the instructions may cause the system to darken the image of the physical environment in the AR scene to simulate a darkened physical environment and relight the darkened AR scene, where relighting the darkened AR scene includes relighting the pixel to the adjusted intensity level, the adjusted color, and the adjusted reflectance for each pixel of the plurality of pixels. In some implementations, the instructions may cause the system to apply the adjusted intensity level, the adjusted color, and the adjusted reflectance to the AR scene, generate a synthetic rendering of the physical environment in the AR scene including the adjusted intensity level, the adjusted color, and the adjusted reflectance, and display the synthetic rendering of the AR scene on the display device.
[0012] In some implementations, the instructions may cause the system to, for each pixel of the plurality of pixels, detect a distance of the pixel from the location of the virtual light source in the AR scene, and in response to detecting the pixel at a location corresponding to the location of the virtual light source in the AR scene, set the intensity, color, and reflectance of the pixel to the intensity, color, and reflectance of the virtual light source. In some implementations, the intensity of the pixel may be inversely proportional to the square of the distance between the virtual light source and the pixel. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is a block diagram illustrating a data system for depth-based relighting of an AR scene according to an example implementation. [Diagram 2] 1 is a diagram illustrating user operation of an exemplary computing device in a physical environment from a third-person perspective according to one exemplary implementation. [Figure 3A] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 3B] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 3C] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 3D] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 3E] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 3F] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 4] 1 is a flowchart illustrating an example method for relighting an AR scene according to an example implementation. [Diagram 5] 1 is a flowchart illustrating an example method of ray marching, according to one example implementation. [Figure 6] FIG. 1 illustrates an example algorithm for ray marching in an AR scene, according to one example implementation. [Figure 7A] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 7B] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 7C] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 7D] FIG. 1 illustrates lighting and relighting of an exemplary AR scene in response to user input according to one exemplary implementation. [Figure 8A] FIG. 2 illustrates an example of facial relighting according to one exemplary implementation. [Figure 8B] FIG. 2 illustrates an example of facial relighting according to one exemplary implementation. [Figure 8C] FIG. 2 illustrates an example of facial relighting according to one exemplary implementation. [Figure 8D] FIG. 2 illustrates an example of facial relighting according to one exemplary implementation. [Figure 8E] FIG. 2 illustrates an example of facial relighting according to one exemplary implementation. [Figure 8F] FIG. 2 illustrates an example of facial relighting according to one exemplary implementation. [Figure 9] FIG. 1 illustrates examples of computing devices and mobile computing devices that can be used with the techniques described herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] It should be noted that these figures are intended to illustrate general features of methods, structures or materials utilized in some exemplary implementations and to supplement the description set forth below. However, these figures are not to scale, may not precisely reflect the exact structural or performance features of any given implementation, and should not be construed as defining or limiting the range of values or properties encompassed by the exemplary implementations. The use of similar or identical reference numbers in various figures is intended to indicate the presence of similar or identical elements or features.
[0015] Detailed Description The present disclosure relates to virtual reality (VR) and / or augmented reality (AR) experiences and techniques for enabling users to view and experience virtual content, for example, in an AR scene. Systems and methods according to implementations described herein may relight an AR scene generated by a computing device and displayed in a camera view of the computing device in substantially real-time or near real-time to provide a more realistic effect and improve a user experience with the AR scene. For example, in some implementations, such real-time scene relighting may enable a virtual light source to illuminate a physical world within the AR scene in the camera view of the computing device. In some implementations, such real-time scene relighting may provide dynamic relighting of the AR scene as the virtual light source shifts and / or as the view of the physical world within the AR scene shifts. In some implementations, the virtual lighting source may illuminate the physical world during the AR experience based on depth data, such as depth data collected by a depth sensor of the computing device.
[0016] FIG. 1 is a block diagram illustrating an example system 100 for providing depth-based substantially real-time relighting of an AR scene according to one example implementation. As shown in FIG. 1, the example system 100 may include an example computing device 102 capable of receiving content from an external source 106 via a network 108. The example computing device 102 may include a memory 110, a processor assembly 112, a communication module 114, a sensing system 116, and a display device 118. In some implementations, the computing device 102 may include various user input devices 132, such as, for example, a touch input device capable of accepting tactile user input, a microphone capable of accepting audible user input, etc. In some implementations, other external / peripheral devices may communicate with and function as input devices. In some implementations, the computing device 102 may include one or more output devices 134, such as, for example, a display for visual output, a speaker for audio output, etc. In some implementations, the memory 110 may include an AR application 120, an image buffer 124, an image analyzer 126, a computer vision system 128, a rendering engine 130, etc. In some implementations, the computer vision system 128 may include a lighting estimator that estimates appropriate lighting for AR content displayed by the computing device 102, extracts lighting information from the AR scene, etc. In some implementations, the sensing system 116 may include, for example, a camera system 136, a position tracking system 136 including, for example, inertial measurement unit sensors (i.e., accelerometers, gyroscopes, magnetometers, etc.), image sensors, distance / proximity sensors, audio sensors, and other types of sensors.
[0017] In some implementations, the computing device 102 may be a mobile computing device that may be configured to provide or output AR content to a user, such as a smartphone, smart glasses or other type of head-mounted display device, a smart watch, a tablet computing device, a laptop computing device, etc.
[0018] The memory 110 may include one or more non-transitory computer-readable storage media. The memory 110 may store instructions and data usable to generate an AR environment for a user.
[0019] The processor assembly 112 may include one or more devices capable of executing instructions, such as instructions stored in the memory 110, to perform various tasks associated with the systems and methods described herein. For example, the processor assembly 112 may include a central processing unit (CPU) and / or a graphics processor unit (GPU). For example, if a GPU is present, some image / video rendering tasks may be offloaded from the CPU to the GPU.
[0020] The communications module 114 may include one or more devices for communicating with other computing devices, such as, for example, external computing devices, external content sources 106, etc. The communications module 114 may communicate over a wireless or wired network, such as the network 108.
[0021] Camera assembly 136 can capture images (e.g., still and / or video images or video) of the physical environment or space surrounding computing device 102. In some implementations, camera assembly 136 may include one or more cameras. In some implementations, camera assembly 136 may include one or more depth sensors, infrared cameras, etc.
[0022] FIG. 2 illustrates a user in an exemplary physical environment 1000 or room 1000 using a computing device 300. In the example illustrated in FIG. 2, for purposes of explanation and illustration only, the exemplary computing device 300 is in the form of a handheld mobile computing device, such as a smartphone held by a user. As mentioned above, the principles described herein may be applied to various types of computing devices such that a system according to implementations described herein may provide a virtual lighting source for illuminating real-world physical entities during a mobile AR experience. The exemplary computing device 300 illustrated in FIG. 2 includes a camera assembly 330. In some implementations, objects within the field of view or live viewfinder of the camera assembly 330 may be visible to a user on a display device 310 of the computing device 300. In some implementations, the camera assembly 330 may include one or more cameras, such as, for example, a forward-facing and / or rear-facing camera that captures still and / or video images, other types of image sensors, one or more depth sensors, one or more light sensors, and other such components.
[0023] Developing (e.g., generating, defining) an AR scene by blending virtual elements (e.g., virtual or AR objects) with the physical world may rely on semantic instance-level knowledge of the elements of the AR scene (i.e., both virtual / AR and physical elements), as well as lighting, relighting the AR scene in response to element movement, perspective changes in the camera view of the AR scene (e.g., due to movement of a computing device), etc. In systems and methods according to implementations described herein, virtual light is generated in real time or substantially in real time by a virtual light source placed in the AR scene using mathematical approximations and light propagation. Systems and methods according to implementations described herein may take into account occlusions, changes in the position of the virtual light source, changes in the viewpoint of (virtual and physical) elements in the AR scene, and other such factors when lighting and relighting the AR scene.
[0024] 3A-3F show exploded views of AR scenes including one or more AR elements, including an exemplary virtual light source, positioned in a camera view of a corresponding portion of physical environment 1000. The camera view may be captured within a viewfinder or field of view of camera assembly 330 of computing device 300 and may be visible on display device 310 of computing device 300.
[0025] As shown in FIG. 3A, the portion of the physical environment 1000 or the room 1000 captured within the field of view of the forward-facing camera 336 of the camera assembly 330 may be displayed on the display device 310 of the computing device 300 to develop an AR scene 400 viewable to the user on the display device 310. When generating the AR scene 400, the user may wish to place a virtual light source 410 in the AR scene 400 including the physical environment 1000 or to perform relighting of the AR scene 400. The user may select a lighting mode or a relighting mode from a menu bar 312 displayed on the display device 310. In FIG. 3A, in response to the user's selection of the lighting mode or the relighting mode, the base for the AR scene 400 is viewable on the display device 310 as shown in FIG. 3B. In this particular example, the portion of the physical environment 1000 within the viewfinder or field of view of the camera assembly 330 is displayed in a dark state (i.e., without ambient lighting) in response to selecting the lighting mode or the relighting mode. In a configuration in which the display device 310 is a touch-input display device 310 capable of accepting touch input, the user may apply touch input to the display device 310 at a location in the AR scene 400 that corresponds to where the user wants to place the light source, as shown in Figure 3C. This may allow a virtual light source 410 to be placed in the AR scene 400 at a location selected by the user in the AR scene 400, which in this example corresponds to a location in the physical environment 1000, as shown in Figure 3D.
[0026] Positioning the virtual light source 410 as described above may illuminate the AR scene 400 from the relatively dark state shown in FIG. 3B to the relatively bright state shown in FIG. 3D. In some implementations, a user may select and / or adjust a property or characteristic of the virtual light source 410. For example, in some implementations, a user may adjust or move the positioning of the virtual light source 410. In some implementations, a user may select and / or change the color of the light emitted by the virtual light source 410. In some implementations, a user may select and / or change the intensity of the light emitted by the virtual light source 410.
[0027] FIG. 3E illustrates an example configuration in which the position, or viewpoint, of the computing device 300 relative to physical elements in the physical environment 1000 is shifted as compared to the configuration illustrated in FIG. 3D.
[0028] 3F illustrates an example configuration in which multiple virtual light sources 410A, 410B, and 410C are disposed in separate locations of the AR scene 400 that correspond to three different locations in the physical environment 1000. The incorporation of multiple virtual light sources 410 into the AR scene of the physical environment 1000 creates a rendering challenge because the illumination resulting from the propagation of light from the multiple light sources 410 may interfere, collide, or intersect. In this situation, the illumination resulting from each of the multiple light sources 410 is individually transformed into linear components in a linear 2D space, which may then be mixed and transformed for 3D illumination of the AR scene 400.
[0029] Systems and methods according to implementations described herein may provide realistic lighting effects in response to the placement and / or adjustment of virtual light sources in an AR scene. That is, the lighting of the AR scene may be adjusted in response to the positioning, color, intensity, and other such characteristics of the light emitted by the virtual light source being adjusted. The exemplary techniques for lighting and relighting the AR scene 400 described above with respect to FIGS. 3A-3D and further described herein may be applied in a number of situations where virtual lighting should be applied and / or adjusted to obtain realistic effects. For example, the principles described herein may be applied in situations where a user desires to simulate lighting effects that may be generated by electric lights in a dark room while capturing images of the room under daylight conditions in order to perform facial relighting or other special effects during the generation of the AR scene.
[0030] Lighting and relighting a relatively realistic physical environment in substantially real time may rely on knowing the physical environment, particularly the physical aspects of the physical environment including, for example, boundaries, physical objects within the physical boundaries, etc. For example, lighting and relighting a physical environment such as the room 1000 shown in FIG. 2 may rely on knowing the positioning of boundaries defined by, for example, walls. This may also rely on knowing the characteristics of physical elements, for example, furniture, decorations, windows, doors, etc., within the room 1000. In some implementations, these characteristics may include, for example, the positioning, shape, contour, etc. of the physical elements. In some implementations, these characteristics may include reflectivity of physical elements within the room 1000, a mapping of distances from the camera assembly 330 of the computing device 300 to the physical elements within the room 1000, etc.
[0031] In some implementations, the computing device 300 may include a depth sensor 338. In some implementations, the depth sensor 338 may be separate from the camera assembly 330. In some implementations, the depth sensor 338 may be included in the camera assembly 330 and / or operate in conjunction with the camera 336. As described above, the camera assembly 330 may capture image information of the physical environment 1000, e.g., the portion of the physical environment 1000 that is within the field of view or viewfinder of the camera assembly 330 and viewable by a user on the display device 310 of the computing device 300. As the camera assembly 330 captures this image information, the depth sensor 338 may detect or collect depth data. The depth data detected by the depth sensor 338 may be used to develop a depth map of the physical environment 1000. The depth map may provide an understanding of the location of physical elements in the physical environment 1000 relative to the computing device 300. For example, a depth map may provide a three-dimensional (3D) coordinate mapping of physical environment 1000 and physical elements therein. Depth maps, and in particular actual depth maps that may be deployed in substantially real-time as a user captures portions of physical environment 1000 that are within the field of view of camera assembly 330 / depth sensor 338 of computing device 300, may be used to accurately composite virtual objects (such as virtual light sources) and occlude areas that are located behind physical obstacles, barriers, etc., to provide proper lighting, shading, etc.
[0032] In some implementations, the system may utilize the depth map thus generated to process an input (e.g., a touch input as shown in FIG. 3C ) to associate the position of the touch input in the AR scene 400 with 3D world space coordinates in the physical environment 1000 (e.g., for positioning the virtual light source 410). The system may use the 3D world space coordinates associated with the placement of the virtual light source 410 along with knowledge (also obtained from the depth map) of the physical elements in the physical environment 1000 to direct light from the virtual light source 410 to each pixel of the images that make up the AR scene 400. This may enable relatively realistic lighting and relighting of the AR scene 400 in the physical environment 1000 based on the placement of the virtual light source 410.
[0033] 4 is a flowchart of an example method 500 for relighting pixels of the example AR scene 400 according to implementations described herein. FIG 5 is a flowchart illustrating an example method 550 of ray marching to achieve relighting pixels of the example AR scene 400 according to implementations described herein.
[0034] As shown in FIG. 4, an image or a sequence of images of a physical environment, such as the physical environment 1000 described above with respect to FIGS. 3A-3F, may be captured by the camera assembly 330 of the computing device 300 (block 510). The image of the physical environment 1000 may be visible on the display device 310 of the computing device 310, as shown in FIGS. 3A-3F. In response to detecting a user input for placement of a virtual light source 410 in the AR scene 400 (block 520), such as a touch input on the touchscreen display device 310 shown in FIG. 3C, the system may develop (e.g., generate, define) a depth map and / or a color map of the physical environment 1000 (block 530). As mentioned above, in some implementations, the computing device 300 may include a depth sensor 338 that is separate from or included with the camera assembly 330. As the camera assembly captures image information of the physical environment 1000, the depth sensor 338 may detect and / or collect depth data characterizing physical elements within the physical environment 1000 to develop a depth map of the physical environment (block 530). In some implementations, the image sensor 336 or camera 336 of the camera assembly 330 may analyze color information of the captured image to develop a color map of the physical environment 1000 (block 530). The color map may, for example, account for reflectance associated with physical elements within the physical environment 1000. The physical environment 1000 displayed in the AR scene 4000 may be accounted for on a pixel-by-pixel basis based on the depth data derived from the depth map and the color / reflectance characteristics derived from the color map.
[0035] In response to detecting a user input for positioning a virtual light source 410 in the AR scene 400 (such as, for example, a touch input on the touch screen display device 310 shown in FIG. 3C ), the system may obtain (e.g., accept) two-dimensional (2D) coordinates associated with the touch input (block 540). The 2D coordinates of the touch input in the AR scene 400 displayed on the display device 310 may be correlated with a location in the physical environment 1000 (with which the 3D coordinates are associated) (block 550). The virtual light source 410 may be positioned in the AR scene 400 to correspond to the location of the touch input on the display device 310 and to correspond to a 3D location in the physical environment 1000, as shown in FIG. 3D .
[0036] The virtual light source 410 may illuminate the AR scene 400 based on depth data derived from the depth map and / or color / reflectance data derived from the color map. That is, the distance of each pixel (corresponding to a physical element in the physical environment 1000) of the AR scene 400 from the virtual light source 410 may be known for each pixel from the depth map. Similarly, the reflectance of each pixel (corresponding to a physical element in the physical environment 1000) of the AR scene 400 may be known for each pixel from the color map. Lighting and / or relighting of each pixel of the AR scene 400 may be performed based on the depth and reflectance / color information, which may enable realistic lighting of the AR scene 400 based on the placement position of the virtual light source 410 and relighting of the AR scene 400 in substantially real time in response to changes in characteristics such as field of view, light intensity, light color, and other such characteristics.
[0037] When lighting and / or relighting the AR scene 400 as described above, the system may copy the depth map and color map to the GPU and set a current initial accumulated intensity value for pixels in the AR scene (block 550). In some implementations, the system may set a current initial accumulated intensity value for each pixel in the AR scene. In some implementations, the system may set a current initial accumulated intensity value for a subset of pixels in the AR scene. In some implementations, the system may set the current initial accumulated intensity value to zero. In some implementations, the system may set the current initial intensity value to another value. The system may then analyze the AR scene 400 pixel by pixel to determine a lighting intensity to be applied to each pixel by directing rays into the AR scene 400 (block 560). In some implementations, when performing the pixel by pixel analysis, the system may determine, for each pixel of the AR scene 400, whether the pixel overlaps with the virtual light source 410 (block 570). In some implementations, when performing the pixel-by-pixel analysis, the system may determine whether the depth value of the virtual light source 410 is greater than the depth value of the pixel (block 570). A determination that the pixel overlaps with the virtual light source 410 and that the depth value of the virtual light source 410 is greater than the depth value of the pixel may indicate that the pixel is coexistent or co-located with the virtual light source 410 and / or that an element in the physical environment 1000 (included in the AR scene 400) may be obscured by the positioned virtual light source 410. In this case, the pixel accumulates or is set to the inherent color and / or intensity of the virtual light source 410 (block 575).
[0038] If it is determined that the pixel does not overlap the virtual light source 410 and / or the depth value of the virtual light source 410 is less than the depth value of the pixel, lighting of the pixel may be triggered according to the depth map and / or color map based on an algorithm (block 580A). In some implementations, lighting of the pixel may be based on the distance of the pixel from the virtual light source 410 (block 580B). In some implementations, lighting of the pixel may be based on a determination of whether a physical element in the physical environment 1000 may block or in some way obstruct light between the virtual scene and the corresponding pixel in the AR scene 400 (block 580C). In some implementations, one or more light rays may be propagated outward from the virtual light source 410 into the AR scene 400, where the intensity of the light may change as the distance from the virtual light source 410 changes (e.g., the intensity of the light may decrease as the distance from the virtual light source 410 increases) (blocks 580D and 580E). This process may be repeated for each pixel until it is determined that all pixels have been analyzed (block 590).
[0039] 5 is a flow chart of an exemplary method of the ray marching algorithm described above with respect to FIG. 4 (particularly block 580 of FIG. 4). As shown in FIG. 5, the system may be initialized to march a ray pixel by pixel in the AR scene 400 based on the placement position of the virtual light source 410 (block 581). Initializing the system may include, for example, initializing a ray marching position or photon position as the position of the current pixel in the corresponding real-world position / physical environment 1000. Initializing the system may also include initializing a ray marching direction as a ray or vector extending between the virtual light source and the current pixel. Initializing the system may also include setting an initial accumulated intensity of the current pixel to zero.
[0040] If it is determined that the photon position for the current pixel is not the same as or within the virtual light source position (block 582), and if it is determined that the light / ray to be forwarded is not a crepuscular ray (block 583), the photon energy of the current pixel may be evaluated based on any occlusion factors associated with the photon position of the current pixel relative to the virtual light source position and the determined distance (block 585). For example, in some implementations, propagating light from the placement location of the virtual light source 410 into the physical environment 1000 may result in a relatively significant drop in photon energy if the current pixel is blocked or obstructed, for example, by a physical element in the physical environment 1000. In addition, generally, the greater the distance of the photon position of the current pixel from the virtual light source 410, the smaller or weaker the intensity will be. That is, generally, the intensity of the light ray propagating from the virtual light source 410 will decrease as the distance from the virtual light source 410 increases. For example, in some implementations, the intensity may be inversely proportional to the distance from the virtual light source 410. For example, in some implementations, the relationship is intensity α1 / (distance 2 ), where the intensity (at a pixel in this example) is inversely proportional to the square of the distance from the light source (in this example, virtual light source 410). Intensity may be accumulated for each pixel of the AR scene 400 based on the distance of each pixel from the virtual light source 410, a corresponding ray may be advanced, and the AR scene 400 may be lit or relit with the accumulated intensity of each pixel in the AR scene 400 (blocks 586 and 587).
[0041] If the light / ray to be advanced is determined to be a crepuscular ray (block 583), then 3D jitter may be injected in the ray direction (block 584) before evaluating the photon energy of the current pixel based on the distance from the virtual light source and any occlusion factors associated with the current pixel (block 585). In some implementations, crepuscular rays may not represent an essentially direct propagation of light, but rather a distortion or dispersion or scattering of light due to dust, fog, and light, for example.
[0042] As described above, a ray marching based algorithm may result in substantially real-time lighting and relighting of an AR scene, such as, for example, the AR scene 400 described above or other AR scenes. In some implementations, an exemplary input to this type of algorithm may include data from, for example, a depth map, a color map, and images provided by, for example, the camera assembly 330, the image sensor 336, and the depth sensor 338, as described above. In some implementations, an exemplary input to this type of algorithm may also include one or more virtual light sources, such as, for example, the virtual light source 410 described above, an associated position for each virtual light source, an associated intensity for each virtual light source, an associated color for each virtual light source, and other such features. In some implementations, an exemplary output of this type of algorithm may be a relighted image of an AR scene including a physical environment and one or more virtual light sources. An exemplary algorithm is shown in FIG. 6.
[0043] As described above, systems and methods according to implementations described herein may enable a user to fix virtual light sources in a 3D physical environment or real world in real time to perform realistic lighting and relighting of 3D physical real world elements therein. Systems and methods according to implementations described herein may provide substantially real-time lighting and relighting based on actual depth maps developed in substantially real time for a particular AR scene to be generated. In some implementations, one or more features of the virtual lighting to be incorporated into the AR scene 400 may be altered or changed. For example, in some implementations, multiple virtual light sources may be placed in the AR scene 400. In some implementations, the view of the physical environment seen on the computing device may change based on, for example, the movement of the computing device, driving changes in the lighting of the physical environment by the virtual light sources, and corresponding relighting of the physical environment shown in the AR scene.
[0044] The above examples are described with respect to point light sources for purposes of explanation and illustration. The principles described herein may be applied to other types of virtual light sources that may be incorporated into an AR scene of a physical environment, such as, for example, surface lighting sources, hemispherical lighting sources, etc. Similarly, the principles described herein may be applied to simulate various types of lighting in a space represented in an AR scene. For example, systems and methods according to implementations described herein may simulate various natural lighting conditions, such as, for example, daytime or nighttime lighting conditions, early morning, midday, evening lighting conditions, etc., by modifying the intensity and color temperature of virtual light sources in an AR scene. Furthermore, the above examples are described with respect to the application of virtual lighting of a physical environment including physical elements, for purposes of explanation and illustration only. The principles described herein may be applied to lighting in other types of AR scenes, figure / face lighting, etc.
[0045] 7A-7D illustrate the lighting or relighting of an AR scene 400 including a physical environment 1000 (shown in FIGS. 3A-3F ) as viewed on a display device 310 of a computing device 300 according to implementations described herein. In one example, a user may wish to compare various lighting options (e.g., from online / network-accessible external sources such as one or more stores) to get an idea of not only how a lighting device will look within the physical environment 1000, but also how the lighting device may illuminate the physical environment 1000, particularly under low light conditions.
[0046] As shown in FIG. 7A , the portion of physical environment 1000 captured in the live viewfinder of camera assembly 330 may be visible on display device 310 of computing device 300. In this figure, a menu bar 312 including icons 314 representing various lighting options 314A, 314B, 314C, 314D, and 314E is also displayed on display device 310. In some situations, a user may select these options by, for example, browsing one or more websites. In some situations, the system may provide suggestions based on knowledge about physical environment 100 obtained, for example, from depth mapping and / or color mapping of physical environment 1000.
[0047] In FIG. 7A, the physical environment 1000 is under daylight conditions and illuminated by natural light. When selecting a lighting device for the physical environment 1000, the user may wish to determine how various lighting options represented by icons 314 in the menu bar 312 may illuminate the physical environment 1000 under dark conditions. In FIG. 7B and FIG. 7C, the user has already selected a lighting device represented by icon 314E for placement in the AR scene 400 (e.g., using touch input as described above with respect to FIG. 3A-3F). In FIG. 7B and FIG. 7C, the image of the physical environment 1000 was captured under daylight conditions, but the AR scene 400 displays the physical environment in a dark state, so that the illumination of the physical environment 1000 under dark conditions by the selected lighting device may be evaluated by the user. FIG. 7D illustrates the illumination of the (dark) physical environment 1000 by the selected lighting device in the AR scene 400. Relighting of the AR scene 400 may be performed as described above according to the processes and algorithms described in FIG. 4, FIG. 5, and FIG. 6.
[0048] 8A-8F illustrate examples of facial relighting according to implementations described herein. The facial relighting effects described with respect to FIGs. 8A-8F are merely exemplary in nature. Other lighting effects may be achieved with different types and / or arrangements of virtual lighting in a virtual scene that includes a facial image.
[0049] In FIG. 8A, an image of a user's face is displayed on display device 310 of computing device 300. In some circumstances, a user may choose to add lighting to an image in virtual scene 400 at one or more positions relative to the image, e.g., to highlight facial features, etc. For example, in FIG. 8B, a user may place a virtual light source 410 at a first position relative to the facial image in virtual scene 400 to create a downlighting effect. The virtual light source 410 may be positioned in virtual scene 400 in the manner described above with respect to, e.g., FIGS. 3A-3F. In some implementations, the virtual light source 410 may also be visible on display device 310, e.g., as an incandescent element. In some implementations, the virtual light source 410 is invisible in virtual scene 400 displayed on display device 310, but the effect of the virtual light source 410 is visible in the facial image displayed in virtual scene 400. The lighting provided by virtual light source 410 and its effect on the elements contained in virtual scene 400 (in this example, facial images) may be generated as described above with respect to FIGS.
[0050] In the example shown in FIG. 8C, a user places a virtual light source 410 at a position relative to the face image in the virtual scene 400 to provide an uplighting effect. The virtual light source 410 may be positioned in the virtual scene 400 in the manner described above with respect to FIGS. 3A-3F, for example. In some implementations, the virtual light source 410 may also be visible on the display device 310, for example as an incandescent element. In some implementations, the virtual light source 410 is invisible in the virtual scene 400 displayed on the display device 310, but the effect of the virtual light source 410 is visible in the face image displayed in the virtual scene 400. The lighting provided by the virtual light source 410 and its effect on the elements included in the virtual scene 400 (in this example, the face image) may be generated as described above with respect to FIGS. 4, 5, and 6.
[0051] Similarly, in the example shown in FIG. 8D, the user places a virtual light source 410 at a position relative to the face image in the virtual scene 400 to create a backlighting effect. In the example shown in FIG. 8E, the user places a virtual light source 410 at a position relative to the face image in the virtual scene 400 to create a sidelighting effect. In the example shown in FIG. 8F, the user places a first virtual light source 410A at a first position and a second virtual light source 410B at a second position to create a dual sidelighting effect. The virtual light source 410 may be positioned in the virtual scene 400 in the manner described above with respect to FIGS. 3A-3F, for example. In some implementations, the virtual light source 410 may also be visible on the display device 310, for example as an incandescent element. In some implementations, the virtual light source 410 is invisible in the virtual scene 400 displayed on the display device 310, but the effect of the virtual light source 410 is visible in the face image displayed in the virtual scene 400. The lighting provided by virtual light source 410 and its effect on the elements contained in virtual scene 400 (in this example, facial images) may be generated as described above with respect to FIGS.
[0052] The systems and methods have been described herein in the context of a handheld computing device, such as a smartphone, for ease of explanation and illustration only. The principles described herein may be applied to many different types of mobile computing devices equipped with a camera assembly and display capabilities in addition to the exemplary handheld computing device used herein for illustrative purposes. For example, the principles described herein may be applied to wearable computing devices, such as head-mounted display devices, smart glasses, wrist-mounted computing devices, and the like, as well as tablet computing devices, laptop computing devices, and other such computing devices.
[0053] 9 illustrates examples of a computing device 700 and a mobile computing device 750 that may be used with the techniques described herein. Computing device 700 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Computing device 750 is intended to represent various forms of mobile devices, such as personal digital assistants, mobile phones, smart phones, and other similar computing devices. The components illustrated herein, their connections and relationships, and their functions are intended to be exemplary only and are not intended to limit the implementation of the invention described and / or claimed herein.
[0054] The computing device 700 includes a processor 702, a memory 704, a storage device 706, a high-speed interface 708 that connects to the memory 704 and a high-speed expansion port 710, and a low-speed interface 712 that connects to a low-speed bus 714 and the storage device 706. Each of the components 702, 704, 706, 708, 710, and 712 may be interconnected using various buses and mounted on a common motherboard or otherwise as needed. The processor 702 can process instructions for execution within the computing device 700, including instructions stored in the memory 704 or the storage device 706 for displaying graphical information for a GUI on an external input / output device such as a display 716 coupled to the high-speed interface 708. In some implementations, multiple processors and / or multiple buses may be used, along with multiple memories and multiple types of memories, as appropriate. Multiple computing devices 700 may also be connected, with each device comprising a portion of the required operations (e.g., as a server bank, a group of blade servers, or a multiprocessor system).
[0055] The memory 704 stores information within the computing device 700. In some implementations, the memory 704 is one or more volatile memory units. In some implementations, the memory 704 is one or more non-volatile memory units. The memory 704 may also be another form of computer-readable medium, such as a magnetic disk or optical disk.
[0056] The storage device 706 can provide mass storage for the computing device 700. In some implementations, the storage device 706 can be or include a computer-readable medium, such as a floppy disk device, a hard disk device, an optical disk device, or a tape device, a flash memory or other similar solid-state memory device, or an array of devices including devices in a storage area network or other configuration. A computer program product can be tangibly embodied in an information carrier. The computer program product can also include instructions that, when executed, perform one or more methods, such as those described above. The information carrier is a computer-readable or machine-readable medium, such as the memory 704, the storage device 706, or a memory on the processor 702.
[0057] The high-speed controller 708 manages bandwidth-intensive operations for the computing device 700, and the low-speed controller 712 manages less bandwidth-intensive operations. Such an allocation of functionality is merely an example. In some implementations, the high-speed controller 708 is coupled to the memory 704, the display 716 (e.g., via a graphics processor or accelerator), and a high-speed expansion port 710 that may accept various expansion cards (not shown). In such implementations, the low-speed controller 712 is coupled to the storage device 706 and the low-speed expansion port 714. The low-speed expansion port, which may include various communication ports (e.g., USB, Bluetooth, Ethernet, wireless Ethernet), may be coupled to one or more input / output devices, such as a keyboard, pointing device, scanner, etc., or to a networking device, such as a switch or router, e.g., via a network adapter.
[0058] Computing device 700 may be implemented in a number of different forms, as shown. For example, it may be implemented as a standard server 720, or multiple times in a group of such servers. It may also be implemented as part of a rack server system 724. Additionally, it may be implemented in a personal computer, such as a laptop computer 722. Alternatively, components from computing device 700 may be combined with other components in a mobile device (not shown), such as device 750. Each such device may include one or more of computing devices 700, 750, and the entire system may be made up of multiple computing devices 700, 750 in communication with each other.
[0059] Computing device 750 includes, among other components, a processor 752, memory 764, input / output devices such as a display 754, a communication interface 766, and a transceiver 768. Device 750 may also include a storage device such as a microdrive or other device to provide additional storage. Each of components 752, 754, 764, 766, and 768 are interconnected using various buses, and some of the components may be mounted on a common motherboard or in other manners as appropriate.
[0060] The processor 752 can execute instructions within the computing device 750, including instructions stored in the memory 764. The processor may be implemented as a chipset of chips including separate analog and digital processors. The processor may provide, for example, control of a user interface, applications executed by the device 750, and coordination of other components of the device 750, such as wireless communication by the device 750.
[0061] The processor 752 may communicate with a user via a control interface 758 and a display interface 756 coupled to a display 754. The display 754 may be, for example, a thin-film-transistor liquid crystal display (TFT LCD) or an organic light emitting diode (OLED) display, or other suitable display technology. The display interface 756 may include appropriate circuitry for driving the display 754 to present graphical and other information to the user. The control interface 758 may receive commands from a user and convert the commands for presentation to the processor 752. Additionally, an external interface 762 may be provided in communication with the processor 752 to enable short-range communication between the device 750 and other devices. The external interface 762 may provide, for example, wired communication in some implementations or wireless communication in some other implementations, and multiple interfaces may be used.
[0062] The memory 764 stores information within the computing device 750. The memory 764 may be implemented as one or more of one or more computer readable media, one or more volatile memory units, or one or more non-volatile memory units. An expansion memory 774 may also be provided and connected to the device 750 via an expansion interface 772, which may include, for example, a Single In Line Memory Module (SIMM) card interface. Such expansion memory 774 may provide additional storage space for the device 750 or may store applications or other information for the device 750. In particular, the expansion memory 774 may include instructions for performing or supplementing the processes described above, as well as secure information. Thus, for example, the expansion memory 774 may be provided as a security module for the device 750 and may be programmed with instructions that enable secure use of the device 750. Additionally, secured applications may be provided via the SIMM card, along with additional information, such as by placing identifying information on the SIMM card in an unhackable manner.
[0063] The memory may include, for example, flash memory and / or NVRAM memory, as described below. In some implementations, a computer program product is tangibly embodied in an information carrier. The computer program product includes instructions that, when executed, perform one or more methods, such as those described above. The information carrier is a computer-readable or machine-readable medium, such as memory 764, expansion memory 774, or memory on processor 752, and may be received, for example, via transceiver 768 or external interface 762.
[0064] Device 750 may communicate wirelessly via communication interface 766, which may include digital signal processing circuitry as necessary. Communication interface 766 may provide for communication under various modes or protocols, such as GSM voice calls, SMS, EMS, or MMS messaging, CDMA, TDMA, PDC, WCDMA, CDMA2000, or GPRS, among others. Such communication may occur, for example, through radio frequency transceiver 768. In addition, short-range communication may occur using Bluetooth, Wi-Fi, or other such transceivers (not shown), or the like. In addition, Global Positioning System (GPS) receiver module 770 may provide device 750 with additional navigation-related and location-related wireless data that may be used as appropriate by applications executing on device 750.
[0065] Device 750 may also communicate speech-enabled using a voice codec 760, which may receive and convert spoken information from a user into usable digital information. Voice codec 760 may also generate audible sounds for the user, such as through a speaker in a handset of device 750. Such sounds may include sounds from a voice telephone call, may include recorded sounds (e.g., voice messages, music files, etc.), and may include sounds generated by applications running on device 750.
[0066] Computing device 750 may be implemented in a number of different forms as shown in the figure, including, for example, as a mobile phone 780. It may also be implemented as part of a smartphone 782, personal digital assistant, or other similar mobile device.
[0067] Various implementations of the systems and techniques described herein may be realized in digital electronic circuitry, integrated circuits, specially designed application specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations of several or more computer programs executable and / or interpretable on a programmable system including at least one programmable processor, which may be dedicated or general purpose, coupled for transmitting and receiving data and instructions to a storage system, at least one input device and at least one output device. Various implementations of the systems and techniques described herein may be realized as and / or generally referred to as circuits, modules, blocks or systems that may combine software and hardware aspects. For example, a module may include functions / operations / computer program instructions executed on a processor (e.g., a processor formed on a silicon substrate, GaAs substrate, etc.) or some other programmable data processing apparatus.
[0068] Some of the above example implementations are described as processes or methods that are depicted as flow charts. Although these flow charts describe operations as a sequential process, many of the operations may be performed in parallel, in parallel, or simultaneously. In addition, the order of operations may be rearranged. Processes may be terminated when their operations are completed, but may include additional steps not included in the figures. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0069] The above-described methods, some of which are illustrated by flowcharts, may be realized by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware, or microcode, the program code or code segments to perform the necessary tasks may be stored in a machine-readable or computer-readable medium such as a storage medium. A processor may perform the necessary tasks.
[0070] Specific structural and functional details disclosed herein are presented for purposes of describing example implementations only, however, example implementations may be embodied in many alternative forms and should not be construed as being limited to only the implementations set forth herein.
[0071] Although terms such as first, second, etc. may be used herein to describe various elements, it will be understood that these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary implementation. As used herein, the terms, etc. include any and all combinations of one or more of the associated items listed.
[0072] When an element is referred to as being connected or coupled to another element, it will be understood that the element may be directly connected or coupled to the other element, or that there may be intervening elements. In contrast, when an element is referred to as being directly connected or coupled to another element, there are no intervening elements present. Other words used to describe relationships between elements (e.g., "between" and "directly between," "adjacent" and "directly adjacent," etc.) should be interpreted similarly.
[0073] The terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the example implementations. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. Furthermore, it will be understood that the words "comprises," "comprising," "includes," and / or "including," as used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0074] It should also be noted that in some alternative implementations, the functions / acts described may occur out of the order shown in the figures. For example, two figures shown in succession may in fact be executed concurrently or may even be executed in the reverse order, depending on the functions / acts involved.
[0075] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the exemplary implementation belongs. It will be further understood that terms (e.g., terms defined in commonly used dictionaries) should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and should not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0076] Portions of the exemplary implementations described above and corresponding detailed description have been presented in terms of software or algorithms and symbolic representations of operations on data bits within a computer memory. These descriptions and representations are the means used by those skilled in the art to effectively convey the substance of their work to others skilled in the art. An algorithm, as the term is used herein, and as it is used generally, is conceived to be a self-consistent sequence of steps leading to a desired result. These steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of optical, electrical, or magnetic signals capable of being stored, transferred, combined, compared and otherwise manipulated. It has proven convenient at times, primarily for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
[0077] In the above-described exemplary implementations, when reference is made to execution and symbolic representations of operations that may be implemented as program modules or functional processes (e.g., in the form of flowcharts), these include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types, and may be described and / or implemented using existing hardware in existing structural elements. Such existing hardware may include one or more central processing units (CPUs), digital signal processors (DSPs), application specific integrated circuits, field programmable gate array (FPGA) computers, etc.
[0078] It should be noted, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless otherwise specified, or as will be apparent from the description, terms such as display processing, computing, calculation or determination refer to operations and processes of a computer system or similar electronic or mobile computing device that manipulate data represented as physical electronic quantities in the computer system's registers and memory and convert such data into other data similarly represented as physical quantities in the computer system's memory, registers, or other similar information storage, transmission, or display devices.
[0079] Also, the software-implemented aspects of the exemplary implementations are typically encoded on some form of non-transitory program storage medium or implemented with respect to some type of transmission medium. The program storage medium may be magnetic (e.g., a floppy disk or hard drive) or optical (e.g., compact disk read only memory, or CD ROM) and may be read-only or random access. Similarly, the transmission medium may be twisted wire pairs, coaxial cable, optical fiber, or some other suitable transmission medium known in the art. The exemplary implementations are not limited by these aspects of any given implementation.
[0080] Finally, it should also be noted that, although the appended claims recite particular combinations of features described in this specification, the scope of the disclosure is not limited to the particular combinations claimed, but rather extends to cover any combination of features or implementations disclosed herein, whether or not that particular combination is currently specifically recited in the appended claims.
[0081] While example implementations may include various modifications and alternative forms, examples of which are shown by way of example in the accompanying drawings and described in detail herein. It should be understood, however, that there is no intention to limit the example implementations to the particular forms disclosed, but on the contrary, the example implementations are to encompass all modifications, equivalents, and alternatives falling within the scope of the appended claims. Like numbers refer to like elements throughout the description of the figures.
Claims
1. 1. A computer-implemented method comprising: capturing, by an image sensor of a computing device, image data corresponding to an image of a physical environment; detecting, by a depth sensor of the computing device, depth data corresponding to the physical environment; generating, by a processor of the computing device, an augmented reality (AR) scene from the image data corresponding to the image of the physical environment, wherein generating the AR scene includes darkening the image of the physical environment to simulate a darkened physical environment; The method comprises: receiving an input at an input device of the computing device to place a virtual light source in the AR scene; relighting the AR scene based on a position of the virtual light source in the darkened physical environment and the depth data corresponding to the physical environment.
2. The method of claim 1 , wherein detecting the depth data comprises generating a depth map corresponding to the physical environment.
3. The method comprises: detecting, with the image sensor, color data corresponding to the image of the physical environment; and generating a color map corresponding to the image of the physical environment, the color map providing at least one of color or reflectance characteristics of each pixel of a plurality of pixels of the AR scene of the physical environment.
4. The step of relighting the AR scene includes: detecting a three-dimensional coordinate position of the virtual light source in the physical environment corresponding to the placement position of the virtual light source in the AR scene; For each of the plurality of pixels of the AR scene, setting an intensity level of the pixel based on an intensity of the virtual light source and a distance of the pixel from the virtual light source in the AR scene; setting a color of the pixel based on a color of the virtual light source, the distance of the pixel from the virtual light source, and a color of the pixel in the AR scene; and setting a reflectance of the pixel based on the color of the virtual light source and the color of the pixel in the AR scene.
5. The step of relighting the AR scene includes, for each of the plurality of pixels of the AR scene, detecting an obstacle between the placement position of the virtual light source and the pixel based on the depth map; 5. The method of claim 4, further comprising adjusting the set intensity level, the set color and the set reflectance for the pixel based on the detected obstacle.
6. 6. The method of claim 5, wherein relighting the AR scene includes, for each pixel of the plurality of pixels, relighting the pixel to the adjusted intensity level, the adjusted color, and the adjusted reflectance.
7. The step of relighting the AR scene includes: applying the adjusted intensity level, the adjusted color, and the adjusted reflectance to the AR scene; generating a synthetic rendering of the physical environment in the AR scene including the adjusted intensity level, the adjusted color, and the adjusted reflectance; and displaying the synthetic rendering of the AR scene on a display device of the computing device.
8. The step of relighting the AR scene includes, for each of the plurality of pixels, Detecting a distance of the pixel from the location of the virtual light source in the AR scene; and in response to detecting the pixel at a location corresponding to the placement location of the virtual light source in the AR scene, setting the intensity, color and reflectance of the pixel to the intensity, color and reflectance of the virtual light source.
9. The method of claim 8 , wherein the intensity of the pixel is inversely proportional to the square of the distance between the virtual light source and the pixel.
10. 1. A system comprising: A camera assembly; A display device; At least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the system to: capturing image data corresponding to an image of a physical environment by an image sensor of the system; detecting depth data corresponding to the physical environment with a depth sensor of the system; generating an augmented reality (AR) scene from the image data corresponding to the image of the physical environment, where generating the AR scene includes darkening the image of the physical environment to simulate a darkened physical environment; receiving an input at an input device of the system corresponding to a placement of virtual light sources in the AR scene; and relighting the AR scene based on a position of the virtual light source in the darkened physical environment and the depth data corresponding to the physical environment.
11. The camera assembly includes the depth sensor and the image sensor, and the instructions provide the system with: generating a depth map of the physical environment based on the depth data collected by the depth sensor; and / or 11. The system of claim 10, further comprising: generating a color map of the physical environment based on the image data collected by the image sensor, the color map providing at least one of color or reflectance characteristics of each pixel of a plurality of pixels for the AR scene of the physical environment.
12. The instructions include: detecting a three-dimensional coordinate position of the virtual light source in the physical environment corresponding to the placement position of the virtual light source in the AR scene; For each of the plurality of pixels of the AR scene, setting an intensity level of the pixel based on an intensity of the virtual light source and a distance of the pixel from the virtual light source in the AR scene; setting a color of the pixel based on a color of the virtual light source, the distance of the pixel from the virtual light source, and a color of the pixel in the AR scene; and setting a reflectance of the pixel based on the color of the virtual light source and the color of the pixel in the AR scene.
13. The instructions include: detecting an obstacle between the pixel and the location of the virtual light source in the AR scene based on the depth map; 13. The system of claim 12, further comprising: adjusting the set intensity level, the set color, and the set reflectance for the pixel based on the detected obstacle.
14. The relighting of the AR scene includes, for each of the plurality of pixels, 14. The system of claim 13, further comprising relighting said pixel to said adjusted intensity level, said adjusted color and said adjusted reflectance.
15. The instructions include: applying the adjusted intensity level, the adjusted color, and the adjusted reflectance to the AR scene; generating a synthetic rendering of the physical environment in the AR scene including the adjusted intensity level, the adjusted color, and the adjusted reflectance; and displaying the synthetic rendering of the AR scene on the display device.
16. The instructions cause the system to, for each pixel of the plurality of pixels: Detecting a distance of the pixel from the location of the virtual light source in the AR scene; and in response to detecting the pixel at a position corresponding to the placement position of the virtual light source in the AR scene, setting the intensity level, color and reflectance of the pixel to the intensity, color and reflectance of the virtual light source.
17. The system of claim 16 , wherein the intensity level of the pixel is inversely proportional to the square of the distance between the virtual light source and the pixel.
18. A program for causing a computer to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Image creation device, image creation program, and recording medium
JP2013125292A
Image processing system and control method and program of the same
JP2015201839A
Photometric registration from arbitrary geometry for augmented reality
US20130271625A1
Augmented reality lighting with dynamic geometry
US20150262412A1
Lighting estimation
WO2019226366A1
