Images with synthetic focus profiles generated from images from multiple perspectives

By employing multiple cameras with different focus profiles and machine-learned models, the method generates synthetic images with enhanced focus control, overcoming the limitations of smartphone camera optics and achieving broader depth-of-field and clarity.

WO2024191418A1PCT designated stage expired Publication Date: 2024-09-19GOOGLE LLC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/US2023/015208
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

Smartphone cameras have limited depth-of-field control due to straightforward optics and smaller imaging sensors, restricting their ability to adjust focus effectively.

Method used

A method using multiple cameras with different focus profiles to capture images from various perspectives, which are then processed by a computing device to generate synthetic images with enhanced or altered focus profiles, leveraging machine-learned models and depth maps to achieve improved focus control.

Benefits of technology

Enables wider depth-of-field capabilities and enhanced image clarity, allowing for artistic effects like bokeh and tilt-shifting, surpassing the limitations of traditional camera optics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IMGF000027_0001
    Figure IMGF000027_0001
  • Figure 00000053_0000
    Figure 00000053_0000
  • Figure 00000054_0000
    Figure 00000054_0000
Patent Text Reader

Abstract

Example embodiments relate to images with synthetic focus profiles generated from images from multiple perspectives. An example embodiment includes a method. The method includes receiving, by a computing device, a first image of a scene captured from a first perspective using a first focus profile and a first camera. The method also includes receiving, by the computing device, a second image of the scene captured from a second perspective using a second focus profile and a second camera. Additionally, the method includes determining, by the computing device, a depth map of the scene. Further, the method includes generating an intermediate image based on the position of the second camera relative to the first camera. In addition, the method includes applying, by computing device, a machine-learned model to the first image, the intermediate image, and the depth map to generate a synthetic image of the scene with a synthetic focus profile.
Need to check novelty before this filing date? Find Prior Art

Description

IMAGES WITH SYNTHETIC FOCUS PROFILES GENERATED FROM IMAGES FROM MULTIPLE PERSPECTIVESBACKGROUND

[0001] Unless otherwise indicated herein, the description in this section is not prior art to the claims in this application and is not admitted to be prior art by inclusion in this section.

[0002] Cameras provide a common imaging modality for capturing images (e.g., photographs). Computational photography techniques, such as burst photography, synthetic bokeh, and superresolution, have improved the imaging capabilities associated with various types of cameras (e.g., smartphone cameras). However, some cameras can still suffer from limited depth-of-field (DoF) control (i.e., limited control of which portions of the scene appear in focus and which portions of the scene appear out of focus). This may be due, at least in part, to the relatively straightforward optics and imaging systems (e.g. fixed aperture, smaller imaging sensors, etc.) provisioned in some cameras (e.g., smartphone cameras).SUMMARY

[0003] Some types of cameras (e.g., smartphone cameras) can traditionally suffer from a limited ability to adjust depth-of-field, especially a limited ability to do so using optical methods (e.g., adjusting aperture size, lens focal length, etc). Example embodiments described herein provide techniques for using images previously captured by a device (e.g., images captured of a single scene at the same time using multiple cameras of the same device positioned at different perspectives relative to the scene) in order to generate a synthetic image having a synthetic focus profile. In doing so, techniques described herein can provide images that: exhibit a wider range of depths of field (e.g., for artistic effect) than otherwise would be possible with the provisioned cameras (e.g., smartphone cameras), have been defocused relative to the images captured by the provisioned cameras, have been sharpened (i.e., had their focus enhanced) relative to the images captured by the provisioned cameras (e.g., to enhance clarity), etc.

[0004] In one aspect, a method is provided. The method includes receiving, by a computing device, a first image of a scene captured from a first perspective using a first focus profile. The first image was captured using a first camera. The method also includes receiving, by the computing device, a second image of the scene captured from a secondperspective using a second focus profile. The second image was captured using a second camera. Additionally, the method includes determining, by the computing device, a depth map of the scene. The depth map of the scene is determined based on the first image, the second image, and a position of the second camera relative to the first camera. Further, the method includes generating, by the computing device based on the position of the second camera relative to the first camera, an intermediate image. The intermediate image represents a transformation of the second image into the first perspective. In addition, the method includes applying, by computing device, a machine-learned model to the first image, the intermediate image, and the depth map to generate a synthetic image of the scene. The synthetic image represents an image of the scene captured from the first perspective using a synthetic focus profile. The synthetic focus profile is different than the first focus profile.

[0005] In another aspect, a non-transitory, computer-readable medium is provided. The non-transitory, computer-readable medium has instructions stored thereon that, when executed by a processor, cause the processor to receive a first image of a scene captured from a first perspective using a first focus profile. The first image was captured using a first camera. The non-transitory, computer-readable medium also has instructions stored thereon that, when executed by the processor, cause the processor to receive a second image of the scene captured from a second perspective using a second focus profile. The second image was captured using a second camera. Additionally, the non-transitory, computer-readable medium has instructions stored thereon that, when executed by the processor, cause the processor to determine a depth map of the scene. The depth map of the scene is determined based on the first image, the second image, and a position of the second camera relative to the first camera. Further, the non-transitory, computer-readable medium has instructions stored thereon that, when executed by the processor, cause the processor to generate, based on the position of the second camera relative to the first camera, an intermediate image. The intermediate image represents a transformation of the second image into the first perspective. In addition, the non-transitory, computer-readable medium has instructions stored thereon that, when executed by the processor, cause the processor to apply a machine-learned model to the first image, the intermediate image, and the depth map to generate a synthetic image of the scene. The synthetic image represents an image of the scene captured from the first perspective using a synthetic focus profile. The synthetic focus profile is different than the first focus profile

[0006] In yet another aspect, a method is provided. The method includes receiving, by a computing device, a training set usable to train a machine-learned model. The training set includes a plurality of groups of training images. Each group of training images includes a plurality of first training images of a training scene captured by a first training camera from a first training perspective. Each of the first training images in the plurality of first training images was captured using a different focus profile. Each group of training images also includes a second training image of the training scene captured by a second training camera from a second training perspective. Additionally, the method includes, for each group of training images, selecting, by the computing device, a reference image from the plurality of first training images of the group. Further, the method includes, for each group of training images, selecting, by the computing device, a target image from the plurality of first training images of the group. In addition, the method includes, for each group of training images, determining, by the computing device, a depth map of the scene. The depth map of the scene is determined based on the reference image or the target image, the second training image, and a position of the second training camera relative to the first training camera. Yet further, the method includes, for each group of training images, generating, by the computing device based on the position of the second training camera relative to the first training camera, an intermediate image. The intermediate image represents a transformation of the second training image into the first training perspective. Even further, the method includes, for each group of training images, determining, by the computing device, a reference defocus map of the scene based on the depth map, the focus profile used to capture the reference image, and the intermediate image. Still further, the method includes, for each group of training images, determining, by the computing device, a target defocus map of the scene based on the depth map, the focus profile used to capture the target image, and the intermediate image. Even still further, the method includes, for each group of training images, determining, by the computing device, a blending mask that can be applied to the reference image and the intermediate image in order to generate a synthetic image having the same focus profile as the target image. The blending mask is determined based on the reference defocus map and the target defocus map. Still yet further, the method includes, for each group of training images, revising, by the computing device, the machine-learned model based on the blending mask, the reference defocus map, and the target defocus map.

[0007] In still another aspect, a device is provided. The device includes a first cameraconfigured to capture a first image of a scene from a first perspective using a first focus profile. The device also includes a second camera configured to capture a second image of the scene from a second perspective using a second focus profile. Additionally, the device includes a computing device. The computing device is configured to determine a depth map of the scene. The depth map of the scene is determined based on the first image, the second image, and a position of the second camera relative to the first camera. The computing device is also configured to generate, based on the position of the second camera relative to the first camera, an intermediate image. The intermediate image represents a transformation of the second image into the first perspective. Further, the computing device is configured to apply a machine-learned model to the first image, the intermediate image, and the depth map to generate a synthetic image of the scene. The synthetic image represents an image of the scene captured from the first perspective using a synthetic focus profile. The synthetic focus profile is different than the first focus profile.

[0008] These as well as other aspects, advantages, and alternatives will become apparent to those of ordinary skill in the art by reading the following detailed description, with reference, where appropriate, to the accompanying drawings.BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 illustrates a computing device, according to example embodiments.

[0010] Figure 2 is a simplified block diagram of a computing device, according to example embodiments.

[0011] Figure 3 is a diagram illustrating training and inference phases of a machinelearning model, according to example embodiments.

[0012] Figure 4 illustrates a computing device capturing multiple images of a scene from multiple perspectives, according to example embodiments.

[0013] Figure 5A is a flowchart illustration of a method of generating a synthetic image of a scene having a synthetic focus profile, according to example embodiments.

[0014] Figure 5B illustrates multiple images and a depth map involved in the method illustrated in Figure 5A, according to example embodiments.

[0015] Figure 5C illustrates multiple images involved in the method illustrated in Figure 5A, according to example embodiments.

[0016] Figure 6 illustrates a training set, according to example embodiments.

[0017] Figure 7 illustrates a captured image and a generated synthetic image having a synthetic focus profile, according to example embodiments.

[0018] Figure 8 illustrates a captured image and a generated synthetic image having a synthetic focus profile, according to example embodiments.

[0019] Figure 9 illustrates a captured image and two generated synthetic images having synthetic focus profiles, according to example embodiments.

[0020] Figure 10 illustrates a captured image and a generated synthetic image having a synthetic focus profile, according to example embodiments.

[0021] Figure 11 is a flowchart illustration of a method, according to example embodiments.

[0022] Figure 12 is a flowchart illustration of a method, according to example embodiments.

[0023] Figure 13 A is a table that compares techniques described herein to alternati techniques, according to example embodiments.

[0024] Figure 13B is a table that compares techniques described herein to alternati techniques, according to example embodiments.

[0025] Figure 13C is a table that compares techniques described herein to alternatitechniques, according to example embodiments.DETAILED DESCRIPTION

[0026] Example methods, devices, and systems are contemplated herein. Any example embodiment or feature described herein is not necessarily to be construed as preferred or advantageous over other embodiments or features. Further, the example embodiments described herein are not meant to be limiting. It will be readily understood that certain aspects of the disclosed systems and methods can be arranged and combined in a wide variety of different configurations, all of which are contemplated herein. In addition, the particular arrangements shown in the figures should not be viewed as limiting. It should be understood that other embodiments might include more or less of each element shown in a given figure. Additionally, some of the illustrated elements may be combined or omitted. Yet further, an example embodiment may include elements that are not illustrated in the figures.

[0027] Throughout this disclosure, the term “focus profile” is meant to connote the combination of optics used to capture an image (e.g., by a camera of a smartphone). For example, a “focus profile” may include or be based on an aperture size, an aperture position, a lens size, a lens position, a focal length of a lens, an image sensor position, optical aberration, radial distortion, etc. The “focus profile” may be described using various metrics, such as a circle of confusion (e.g., a center of a circle of confusion within an image, a radius of a circle of confusion within an image, etc.), a depth of field, a focal length, a focal plane, etc.

[0028] Further, the term “synthetic image” is meant to connote an image that is generated and / or stored within a memory associated with a computing device, where the image was not actually captured using a camera. Instead, the image was produced algorithmically (e.g., using a machine-learned model). Such synthetic images may have been generated based on images that were actually captured using one or more cameras. Further, such synthetic images may have synthetic focus profiles (i.e., focus profiles corresponding to an aperture size, aperture position, lens size, etc. that are not physically present on the one or more cameras used to capture the images used to generate the synthetic images).

[0029] Additionally, the terms “wide camera” / “wide-angle camera” and “ultrawide camera” / “ultrawide-angle camera” may also be used herein. These terms are simply used to describe cameras that have different arrangements of lenses and image sensors than one another (e.g., a wide-angle lens vs. an ultra-wide angle lens). For example, an “ultrawide camera” may produce images with a wider field of view of a scene than a “wide camera.”Such “wide cameras” and “ultrawide cameras” may be provisioned on a device (e.g., a smartphone) that has multiple cameras, for example. In some embodiments, a “wide camera” may have a higher resolution sensor, longer focal length lens, and / or a shallower depth of field than the “ultrawide camera.”

[0030] Example embodiments described herein provide post-capture defocus control that leverages multi-camera systems (e.g., a multi-camera system associated with a smartphone). By using stereoscopic camera arrangements that include cameras with different focus profiles, images with improved synthetic focus and / or defocus may be generated.

[0031] The techniques described herein may include capturing multiple images of the same scene with cameras that have different focus profiles. For example, a first image of a scene may be captured from a first perspective using a wide-angle camera of a multi-camera system and a second image of the scene may be captured (e.g., substantially simultaneously with the first image of the scene) from a second perspective using an ultrawide-angle camera. These two images may then be provided as inputs to a computing device (e.g., a computing device implementing a machine-learned model). The machine-learned model may be trained to output a synthetic image having a synthetic focus profile (e.g., a focus profile that is different from the focus profile of the wide-angle camera and from the focus profile of the ultrawide-angle camera).

[0032] Upon receipt of the two (or more) images from the two (or more) cameras, the computing device may perform multiple image manipulation and / or transformation tasks in order to generate the synthetic image. For example, based on predetermined focus profiles used for each camera that captured the images and / or based on the relative positions of the cameras, the computing device may transform one of the images (e.g., the second image corresponding to the ultrawide-angle camera) into an intermediate image. The intermediate image may correspond to an image captured by the ultrawide-angle camera (e.g., having a focus profile corresponding to the ultrawide-angle lens) but transformed into a perspective corresponding to the wide-angle camera, for instance. In some embodiments, the computing device may perform this transformation based on a known separation between the ultrawide- angle camera and the wide-angle camera within a corresponding device (e.g., a smartphone). Such a known separation (e.g., along with other characteristics of the two cameras, such as focus profiles) may be used to determine additional quantities that can be fed into the machine-learned model, as well (e.g., a depth map of the captured scene, a defocus map ofthe captured scene, an occlusion mask of the captured scene, etc.).

[0033] After the transformation has been performed, the computing device may use the machine-learned model in order to output a synthetic image with a synthetic focus profile. In some embodiments, the machine-learned model may include an ensemble of machine- learned models. For example, the machine-learned model may include an ensemble of convolutional neural networks. Further, the machine-learned model may have been trained previously using a training set. The training set may include sets of images captured of various scenes using cameras having various focus profiles. For example, each set of images in the training set may include a group of images that was captured of a single scene using the wide-angle camera. This group of images may have exhibit a range of focus profiles (e.g., by sweeping through a range of focal lengths of a lens of the wide-angle camera, by sweeping through a range of aperture sizes and / or aperture-stop positions of the wide-angle camera, by sweeping through a range of focal planes of the wide-angle camera based on the separation between the image sensor and the lean within the wide-angle camera, etc.). Further, each set of images in the training set may include another image of the same scene captured using the ultrawide-angle camera.

[0034] The computing device may provide a defocus map (e.g., as determined previously based on the two captured images), the two (or more) captured images, and / or a target defocus map into the machine-learned model. Using these inputs, the machine-learned model may then output the synthetic image (e.g., which has the target defocus map, which may correspond to a synthetic focus profile). The synthetic image may be produced by attempting to remove all (or as much as possible) defocus blur from the wide-angle image (e.g., based on the enhanced depth of field of the ultrawide-angle image) and then selectively adding defocus blur to desired sections of the resulting image (e.g., based on regions indicated as requiring defocus within the target defocus map). In some embodiments, the target defocus map may be based on an object / region of interest within one of the images (e.g., as determined based on facial recognition or as indicated by a user-selection), an object / region of disinterest within one or more of the images (e.g., as indicated by a userselection), a user-selection of one or more features for the synthetic focus profile (e.g., a desired depth of field, a desired focal length, a desired center of a circle of confusion, a desired radius of a circle of confusion, etc.), and / or a desired artistic effect (e.g., tilt-shifting, bokeh, etc.). Further the target defocus map may correspond to enhanced focus (i.e.,sharpening) relative to one or more regions of the original focus map (e.g., relative to one or more regions of the image captured by the wide-angle camera and / or ultrawide-angle camera) and / or degraded focus (i.e., defocusing) relative to one or more regions of the original focus map (e.g., relative to one or more regions of the image captured by the wide-angle camera and / or ultrawide-angle camera).

[0035] The following description and accompanying drawings will elucidate features of various example embodiments. The embodiments provided are by way of example, and are not intended to be limiting. As such, the dimensions of the drawings are not necessarily to scale.

[0036] Figure 1 illustrates an example computing device 100. In examples described herein, computing device 100 may be a video capturing device. Computing device 100 is shown in the form factor of a mobile phone. However, computing device 100 may be alternatively implemented as a laptop computer, a tablet computer, and / or a wearable computing device, among other possibilities. Computing device 100 may include various elements, such as body 102, display 106, and buttons 108 and 110. Computing device 100 may further include one or more cameras, such as front-facing camera 104 and at least one rear-facing camera 112 (e.g., three rear-facing cameras 112). In examples with multiple rearfacing cameras such as illustrated in Figure 1, each of the rear-facing cameras may have a different field of view. For example, the rear-facing cameras may include an ultrawide-angle camera, a main camera (e.g., a wide-angle camera), and / or a telephoto camera. The ultrawide-angle camera may capture a larger portion of the environment compared to the main camera and the telephoto camera, and the telephoto camera may capture more detailed images of a smaller portion of the environment compared to the main camera and the wide angle camera. It is understood that the illustration of Figure 1 is provided solely as an example and that alternatives are possible and contemplated herein. For example, the arrangement and / or number of the at least one rear-facing camera 112 may be different than illustrated in Figure 1, in some embodiments. For instance, the at least one rear-facing camera 112 may be organized into a triangular arrangement. Additionally or alternatively, in some embodiments the ultrawide-angle camera may be the middle of the three rear-facing cameras 112, while in other embodiments, the main camera (e.g., the wide-angle camera) or the telephoto camera may be the middle camera. In still other embodiments, instead of three cameras 112, there may be two cameras, four cameras, five cameras, six cameras, etc. Stilleven further, in some embodiments, a multiple-camera arrangement may be front-facing (in addition to or instead of rear-facing). Yet further, in some embodiments, the at least one rearfacing camera 112 may include additional or alternative types of cameras (e.g., a camera with a fish-eye lens, a camera with a tilt-shift lens, a camera with an infrared lens, and / or a camera with a macro-lens).

[0037] Front-facing camera 104 may be positioned on a side of body 102 typically facing a user while in operation (e.g., on the same side as display 106). Rear-facing camera 112 may be positioned on a side of body 102 opposite front-facing camera 104. Referring to the cameras as front and rear facing is arbitrary, and computing device 100 may include multiple cameras positioned on various sides of body 102.

[0038] Display 106 could represent a cathode ray tube (CRT) display, a light emitting diode (LED) display, a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or any other type of display known in the art. In some examples, display 106 may display a digital representation of the current image being captured by front-facing camera 104 and / or rear-facing camera 112, an image that could be captured by one or more of these cameras, an image that was recently captured by one or more of these cameras, and / or a modified version of one or more of these images. Thus, display 106 may serve as a viewfinder for the cameras. Display 106 may also support touchscreen functions that may be able to adjust the settings and / or configuration of one or more aspects of computing device 100.

[0039] Front-facing camera 104 may include an image sensor and associated optical elements such as lenses. Front-facing camera 104 may offer zoom capabilities or could have a fixed focal length. In other examples, interchangeable lenses could be used with frontfacing camera 104. Front-facing camera 104 may have a variable mechanical aperture and a mechanical and / or electronic shutter. Front-facing camera 104 also could be configured to capture still images, video images, or both. Further, front-facing camera 104 could represent, for example, a monoscopic, stereoscopic, or multiscopic camera. Rear-facing camera 112 may be similarly or differently arranged. Additionally, one or more of front-facing camera 104 and / or rear-facing camera 112 may be an array of one or more cameras.

[0040] One or more of front-facing camera 104 and / or rear-facing camera 112 may include or be associated with an illumination component that provides a light field to illuminate a target object. For instance, an illumination component could provide flash orconstant illumination of the target object. An illumination component could also be configured to provide a light field that includes one or more of structured light, polarized light, and light with specific spectral content. Other types of light fields known and used to recover three-dimensional (3D) models from an object are possible within the context of the examples herein.

[0041] Computing device 100 may also include an ambient light sensor that may continuously or from time to time determine the ambient brightness of a scene that cameras 104 and / or 112 can capture. In some implementations, the ambient light sensor can be used to adjust the display brightness of display 106. Additionally, the ambient light sensor may be used to determine an exposure length of one or more of cameras 104 or 112, or to help in this determination.

[0042] Computing device 100 could be configured to use display 106 and front-facing camera 104 and / or rear-facing camera 112 to capture images of a target object. The captured images could be a plurality of still images or a video stream. The image capture could be triggered by activating button 108, pressing a softkey on display 106, or by some other mechanism. Depending upon the implementation, the images could be captured automatically at a specific time interval, for example, upon pressing button 108, upon appropriate lighting conditions of the target object, upon moving computing device 100 a predetermined distance, or according to a predetermined capture schedule.

[0043] Figure 2 is a simplified block diagram showing some of the components of an example computing device 200. The computing device 200 illustrated in Figure 2 may represent part of or the entirety of the computing device 100 illustrated in Figure 1, for example. By way of example and without limitation, computing device 200 may be a cellular mobile telephone (e.g., a smartphone), a computer (such as a desktop, notebook, tablet, server, or handheld computer), a home automation component, a digital video recorder (DVR), a digital television, a remote control, a wearable computing device, a gaming console, a robotic device, a vehicle, or some other type of device. Computing device 200 may represent, for example, aspects of computing device 100.

[0044] As shown in Figure 2, computing device 200 may include communication interface 202, user interface 204, processor 206, data storage 208, and camera components 224, all of which may be communicatively linked together by a system bus, network, or other connection mechanism 210. Computing device 200 may be equipped with at least someimage capture and / or image processing capabilities. It should be understood that computing device 200 may represent a physical image processing system, a particular physical hardware platform on which an image sensing and / or processing application operates in software, or other combinations of hardware and software that are configured to carry out image capture and / or processing functions.

[0045] Communication interface 202 may allow computing device 200 to communicate, using analog or digital modulation, with other devices, access networks, and / or transport networks. Thus, communication interface 202 may facilitate circuit-switched and / or packet-switched communication, such as plain old telephone service (POTS) communication and / or Internet protocol (IP) or other packetized communication. For instance, communication interface 202 may include a chipset and antenna arranged for wireless communication with a radio access network or an access point. Also, communication interface 202 may take the form of or include a wireline interface, such as an Ethernet, Universal Serial Bus (USB), or High-Definition Multimedia Interface (HDMI) port, among other possibilities. Communication interface 202 may also take the form of or include a wireless interface, such as a Wi-Fi, BLUETOOTH®, global positioning system (GPS), or wide-area wireless interface (e.g., WiMAX or 3GPP Long-Term Evolution (LTE)), among other possibilities. However, other forms of physical layer interfaces and other types of standard or proprietary communication protocols may be used over communication interface 202. Furthermore, communication interface 202 may comprise multiple physical communication interfaces (e.g., a Wi-Fi interface, a BLUETOOTH® interface, and a wide- area wireless interface).

[0046] User interface 204 may function to allow computing device 200 to interact with a human or non-human user, such as to receive input from a user and to provide output to the user. Thus, user interface 204 may include input components such as a keypad, keyboard, touch-sensitive panel, computer mouse, trackball joystick, microphone, and so on. User interface 204 may also include one or more output components such as a display screen, which, for example, may be combined with a touch-sensitive panel. The display screen may be based on CRT, LCD, LED, and / or OLED technologies, or other technologies now known or later developed. User interface 204 may also be configured to generate audible output(s), via a speaker, speaker jack, audio output port, audio output device, earphones, and / or other similar devices. User interface 204 may also be configured to receive and / or capture audibleutterance(s), noise(s), and / or signal(s) by way of a microphone and / or other similar devices.

[0047] In some examples, user interface 204 may include a display that serves as a viewfinder for still camera and / or video camera functions supported by computing device 200. Additionally, user interface 204 may include one or more buttons, switches, knobs, and / or dials that facilitate the configuration and focusing of a camera function and the capturing of images. It may be possible that some or all of these buttons, switches, knobs, and / or dials are implemented by way of a touch-sensitive panel.

[0048] Processor 206 may comprise one or more general purpose processors - e.g., microprocessors - and / or one or more special purpose processors - e.g., digital signal processors (DSPs), graphics processing units (GPUs), floating point units (FPUs), network processors, or application-specific integrated circuits (ASICs). In some instances, special purpose processors may be capable of image processing, image alignment, and merging images, among other possibilities. Data storage 208 may include one or more volatile and / or non-volatile storage components, such as magnetic, optical, flash, or organic storage, and may be integrated in whole or in part with processor 206. Data storage 208 may include removable and / or non-removable components.

[0049] Processor 206 may be capable of executing program instructions 218 (e.g., compiled or non-compiled program logic and / or machine code) stored in data storage 208 to carry out the various functions described herein. Therefore, data storage 208 may include a non-transitory computer-readable medium, having stored thereon program instructions that, upon execution by computing device 200, cause computing device 200 to carry out any of the methods, processes, or operations disclosed in this specification and / or the accompanying drawings. The execution of program instructions 218 by processor 206 may result in processor 206 using data 212.

[0050] By way of example, program instructions 218 may include an operating system 222 (e.g., an operating system kernel, device driver(s), and / or other modules) and one or more application programs 220 (e.g., camera functions, address book, email, web browsing, social networking, audio-to-text functions, text translation functions, and / or gaming applications) installed on computing device 200. Similarly, data 212 may include application data 214, operating system data 216, and / or one or more trained machine-learning models 217. Operating system data 216 and the one or more trained machine-learning models 217 may be accessible primarily to operating system 222 and application data 214 may beaccessible primarily to one or more of application programs 220. Application data 214 may be arranged in a file system that is visible to or hidden from a user of computing device 200.

[0051] Application programs 220 may communicate with operating system 222 through one or more application programming interfaces (APIs). These APIs may facilitate, for instance, application programs 220 reading and / or writing application data 214 and / or a trained machine-learning model 217, transmitting or receiving information via communication interface 202, receiving and / or displaying information on user interface 204, and so on.

[0052] In some cases, application programs 220 may be referred to as “apps” for short. Additionally, application programs 220 may be downloadable to computing device 200 through one or more online application stores or application markets. However, application programs can also be installed on computing device 200 in other ways, such as via a web browser or through a physical interface (e.g., a USB port) on computing device 200.

[0053] Camera components 224 may include, but are not limited to, an aperture, shutter, recording surface (e.g., photographic film and / or an image sensor), lens, shutter button, infrared projectors, and / or visible-light projectors. Camera components 224 may include components configured for capturing of images in the visible-light spectrum (e.g., electromagnetic radiation having a wavelength of 380 - 700 nanometers) and / or components configured for capturing of images in the infrared light spectrum (e.g., electromagnetic radiation having a wavelength of 701 nanometers - 1 millimeter), among other possibilities. Camera components 224 may be controlled at least in part by software executed by processor 206.

[0054] A machine-learned model as described herein may include, but is not limited to: an artificial neural network (e.g., a convolutional neural network, a recurrent neural network, a Bayesian network, a hidden Markov model, a Markov decision process, a logistic regression function, a suitable statistical machine-learning algorithm, and / or a heuristic machine-learning system), a support vector machine, a regression tree, an ensemble of regression trees (also referred to as a regression forest), a decision tree, an ensemble of decision trees (also referred to as a decision forest), or some other machine-learning model architecture or combination of architectures.

[0055] An artificial neural network (ANN) could be configured in a variety of ways. For example, the ANN could include two or more layers, could include units having linear,logarithmic, or otherwise-specified output functions, could include fully or otherwise- connected neurons, could include recurrent and / or feed-forward connections between neurons in different layers, could include filters or other elements to process input information and / or information passing between layers, or could be configured in some other way to facilitate the generation of predicted color palettes based on input images.

[0056] An ANN could include one or more filters that could be applied to the input and the outputs of such filters could then be applied to the inputs of one or more neurons of the ANN. For example, such an ANN could be or could include a convolutional neural network (CNN). Convolutional neural networks are a variety of ANNs that are configured to facilitate ANN-based classification or other processing based on images or other largedimensional inputs whose elements are organized within two or more dimensions. The organization of the ANN along these dimensions may be related to some structure in the input structure (e.g., as relative location within the two-dimensional space of an image can be related to similarity between pixels of the image).

[0057] In example embodiments, a CNN includes at least one two-dimensional (or higher-dimensional) filter that is applied to an input; the filtered input is then applied to neurons of the CNN (e.g., of a convolutional layer of the CNN). The convolution of such a filter and an input could represent the color values of a pixel or a group of pixels from the input, in embodiments where the input is an image. A set of neurons of a CNN could receive respective inputs that are determined by applying the same filter to an input. Additionally or alternatively, a set of neurons of a CNN could be associated with respective different filters and could receive respective inputs that are determined by applying the respective filter to the input. Such filters could be trained during training of the CNN or could be pre-specified. For example, such filters could represent wavelet filters, center- surround filters, biologically- inspired filter kernels (e.g., from studies of animal visual processing receptive fields), or some other pre-specified filter patterns.

[0058] A CNN or other variety of ANN could include multiple convolutional layers (e.g., corresponding to respective different filters and / or features), pooling layers, rectification layers, fully connected layers, or other types of layers. Convolutional layers of a CNN represent convolution of an input image, or of some other input (e.g., of a filtered, downsampled, or otherwise-processed version of an input image), with a filter. Pooling layers of a CNN apply non-linear downsampling to higher layers of the CNN, e.g., by applying amaximum, average, L2-norm, or other pooling function to a subset of neurons, outputs, or other features of the higher layer(s) of the CNN. Rectification layers of a CNN apply a rectifying nonlinear function (e.g., a non- saturating activation function, a sigmoid function) to outputs of a higher layer. Fully connected layers of a CNN receive inputs from many or all of the neurons in one or more higher layers of the CNN. The outputs of neurons of one or more fully connected layers (e.g., a final layer of an ANN or CNN) could be used to determine information about areas of an input image (e.g., for each of the pixels of an input image) or for the image as a whole.

[0059] Neurons in a CNN can be organized according to corresponding dimensions of the input. For example, where the input is an image (a two-dimensional input, or a three- dimensional input where the color channels of the image are arranged along a third dimension), neurons of the CNN (e.g., of an input layer of the CNN, of a pooling layer of the CNN) could correspond to locations in the two-dimensional input image. Connections between neurons and / or filters in different layers of the CNN could be related to such locations. For example, a neuron in a convolutional layer of the CNN could receive an input that is based on a convolution of a filter with a portion of the input image, or with a portion of some other layer of the CNN, that is at a location proximate to the location of the convolutional-layer neuron. In another example, a neuron in a pooling layer of the CNN could receive inputs from neurons, in a layer higher than the pooling layer (e.g., in a convolutional layer, in a higher pooling layer), that have locations that are proximate to the location of the pooling-layer neuron.

[0060] Figure 3 shows diagram 300 illustrating a training phase 302 and an inference phase 304 of trained machine-learning model(s) 332, in accordance with example embodiments. Some machine-learning techniques involve training one or more machinelearning algorithms, on an input set of training data to recognize patterns in the training data and provide output inferences and / or predictions about (patterns in the) training data. Such output could take the form of filtered or otherwise modified versions of the input (e.g., an input image could be modified by the machine-learning model to appear as though foreground content is in-focus while background content is out of focus). The resulting trained machine-learning algorithm can be termed as a trained machine-learning model or, simply, a machine-learned model. For example, Figure 3 shows training phase 302 where one or more machine-learning algorithms 320 are being trained on training data 310 to becometrained machine-learning model 332. Then, during inference phase 304, trained machinelearning model 332 can receive input data 330 and one or more inference / prediction requests 340 (e.g., as part of input data 330) and responsively provide as an output one or more inferences and / or predictions 350.

[0061] As such, trained machine-learning model(s) 332 can include one or more models of one or more machine-learning algorithms 320. Machine-learning algorithm(s) 320 may include, but are not limited to: an artificial neural network (e.g., a herein-described convolutional neural networks, a recurrent neural network, a Bayesian network, a hidden Markov model, a Markov decision process, a logistic regression function, a suitable statistical machine-learning algorithm, and / or a heuristic machine-learning system), a support vector machine, a regression tree, an ensemble of regression trees (also referred to as a regression forest), a decision tree, an ensemble of decision trees (also referred to as a decision forest), or some other machine-learning model architecture or combination of architectures. Machinelearning algorithm(s) 320 may be supervised or unsupervised, and may implement any suitable combination of online and offline learning.

[0062] In some examples, machine-learning algorithm(s) 320 and / or trained machinelearning model(s) 332 can be accelerated using on-device coprocessors, such as graphic processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), and / or application specific integrated circuits (ASICs). Such on-device coprocessors can be used to speed up machine-learning algorithm(s) 320 and / or trained machine-learning model(s) 332. In some examples, trained machine-learning model(s) 332 can execute to provide inferences on, be trained on, and / or reside on a particular computing device, and / or otherwise can make inferences for the particular computing device.

[0063] During training phase 302, machine-learning algorithm(s) 320 can be trained by providing at least training data 310 as training input using unsupervised, supervised, semisupervised, and / or reinforcement learning techniques. Unsupervised learning involves providing a portion (or all) of training data 310 to machine-learning algorithm(s) 320 and machine-learning algorithm(s) 320 determining one or more output inferences based on the provided portion (or all) of training data 310. Supervised learning involves providing a portion of training data 310 to machine-learning algorithm(s) 320, with machine-learning algorithm(s) 320 determining one or more output inferences based on the provided portion of training data 310, and the output inference(s) are either accepted or corrected based oncorrect results associated with training data 310. In some examples, supervised learning of machine-learning algorithm(s) 320 can be governed by a set of rules and / or a set of labels for the training input, and the set of rules and / or set of labels may be used to correct inferences of machine-learning algorithm(s) 320.

[0064] Semi-supervised learning involves having correct results for part, but not all, of training data 310. During semi-supervised learning, supervised learning is used for a portion of training data 310 having correct results, and unsupervised learning is used for a portion of training data 310 not having correct results. Reinforcement learning involves machine-learning algorithm(s) 320 receiving a reward signal regarding a prior inference, where the reward signal can be a numerical value. During reinforcement learning, machinelearning algorithm(s) 320 can output an inference and receive a reward signal in response, where machine-learning algorithm(s) 320 are configured to try to maximize the numerical value of the reward signal. In some examples, reinforcement learning also utilizes a value function that provides a numerical value representing an expected total of the numerical values provided by the reward signal over time. In some examples, machine-learning algorithm(s) 320 and / or trained machine-learning model(s) 332 can be trained using other machine-learning techniques, including but not limited to, incremental learning and curriculum learning.

[0065] In some examples, machine-learning algorithm(s) 320 and / or trained machinelearning model(s) 332 can use transfer-learning techniques. For example, transfer-learning techniques can involve trained machine-learning model(s) 332 being pre-trained on one set of data and additionally trained using training data 310. More particularly, machine-learning algorithm(s) 320 can be pre-trained on data from one or more computing devices and a resulting trained machine-learning model provided to computing device CD1, where CD1 is intended to execute the trained machine-learning model during inference phase 304. Then, during training phase 302, the pre-trained machine-learning model can be additionally trained using training data 310, where training data 310 can be derived from kernel and non-kernel data of computing device CD1. This further training of the machine-learning algorithm(s) 320 and / or the pre-trained machine-learning model using training data 310 of CDl’s data can be performed using either supervised or unsupervised learning. Once machine-learning algorithm(s) 320 and / or the pre-trained machine-learning model has been trained on at least training data 310, training phase 302 can be completed. The trained resulting machine-learning model can be utilized as at least one of trained machine-learning model(s) 332.

[0066] In particular, once training phase 302 has been completed, trained machinelearning model(s) 332 can be provided to a computing device, if not already on the computing device. Inference phase 304 can begin after trained machine-learning model(s) 332 are provided to computing device CD1.

[0067] During inference phase 304, trained machine-learning model(s) 332 can receive input data 330 and generate and output one or more corresponding inferences and / or predictions 350 about input data 330. As such, input data 330 can be used as an input to trained machine-learning model(s) 332 for providing corresponding inference(s) and / or prediction(s) 350 to kernel components and non-kernel components. For example, trained machine-learning model(s) 332 can generate inference(s) and / or prediction(s) 350 in response to one or more inference / prediction requests 340. In some examples, trained machinelearning model(s) 332 can be executed by a portion of other software. For example, trained machine-learning model(s) 332 can be executed by an inference or prediction daemon to be readily available to provide inferences and / or predictions upon request. Input data 330 can include data from computing device CD1 executing trained machine-learning model(s) 332 and / or input data from one or more computing devices other than CD1.

[0068] Input data 330 can include a collection of images provided by one or more sources. The collection of images can include video frames, images resident on computing device CD1, and / or other images. Other types of input data are possible as well.

[0069] Inference(s) and / or predict! on(s) 350 can include output images, output intermediate images, numerical values, and / or other output data produced by trained machine-learning model(s) 332 operating on input data 330 (and training data 310). In some examples, trained machine-learning model(s) 332 can use output inference(s) and / or prediction(s) 350 as input feedback 360. Trained machine-learning model(s) 332 can also rely on past inferences as inputs for generating new inferences.

[0070] Figure 4 illustrates a computing device (e.g., the computing device 100 shown and described with reference to Figure 1) capturing multiple images of a scene 400. As illustrated, the images may be captured using at least one rear-facing camera 112 of the computing device 100. For example, a first camera 402 (e.g., a wide-angle camera) of the computing device 100 may capture an image (i.e., a first image) of the scene 400 from a first perspective (e.g., based on the position of the computing device 100 and the location of thefirst camera 402 on the computing device 100). Further, a second camera 404 (e.g., an ultrawide-angle camera) of the computing device 100 may capture an image (i.e., a second image) of the scene 400 from a second perspective (e.g., based on the position of the computing device 100 and the location of the second camera 404 on the computing device 100). In some embodiments, the first image and the second image may be captured substantially simultaneously (e.g., within 1 second of one another, within 100 ms of one another, within 10 ms of one another, within 1 ms of one another, within 100 ps of one another, within 10 ps of one another, within 1 ps of one another, within 100 ns of one another, within 10 ns of one another, etc.).

[0071] In some embodiments, the first camera 402 may have different optical capabilities and / or components from the second camera 404. For example, the first camera 402 may have a focus profile that is based on an arrangement of a first image sensor, a first aperture stop, and / or a first lens arranged along an optical axis of the first image sensor. Likewise, the second camera 404 may have a focus profile that is based on an arrangement of a second image sensor, a second aperture stop, and / or a second lens arranged along an optical axis of the second image sensor. The first aperture stop and / or the second aperture stop may be defined by a physical aperture (e.g., positioned in front of a lens of the respective camera) and / or based on the full physical size of the respective lens (e.g., the first lens and / or the second lens), itself (e.g., in the case where no physical aperture is present). Additionally or alternatively, the first image sensor may have a higher resolution (e.g., a greater number of megapixels) than the second image sensor. Still further, in some embodiments, the first lens may have a longer focal length than the second lens. Lastly, in some embodiments, the focus profile of the first camera 402 may correspond to a shallower depth of field than the second camera 404. It is understood that the specific optical components (and the respective depths of field) described above are provided solely as an example and that other embodiments are also possible and are contemplated herein.

[0072] Based on the first perspective and / or the optical capabilities of the first camera 402 (e.g., the focus profile associated with the first camera 402), the first image captured by the first camera 402 may have a first field of view 412 of the scene 400. Likewise, based on the second perspective and / or the optical capabilities of the second camera 404 (e.g., the focus profile associated with the second camera 404), the second image captured by the second camera may have a second field of view 414 of the scene. As illustrated, the secondfield of view 414 of the scene may encompass a larger portion of the scene 400 than the first field of view 412. In some embodiments, the second field of view 414 may encompass the entirety of the first field of view 412.

[0073] As also illustrated, the first camera 402 and the second camera 404 may be separated from one another (e.g., on a rear face of the computing device 100) by a separation distance 422 (e.g., as measured between an aperture stop associated with the first camera 402 and an aperture stop associated with the second camera 404). This separation distance 422 (e.g., which may be predetermined based on the manufacturing specifications of the computing device 100), the optical capabilities of the first camera 402 (e.g., the focus profile associated with the first camera 402), and / or the optical capabilities of the second camera 404 (e.g., the focus profile associated with the second camera 404) may be used to transform images captured by one of the cameras (e.g., the second camera 404) into perspectives captured by another camera (e.g., the first camera 402). For example, the separation distance 422 (e.g., based on the three-dimensional information resulting from stereo vision associated with images captured from the first perspective and the second perspective) may be used to determine a depth map of the scene 400. The depth map of the scene 400 may indicate the relative distance (e.g., from the computing device 100) to different regions of the scene 400 captured within the image.

[0074] As described herein, transforming images into another perspective may involve taking an initial image captured by one camera and applying a geometric transformation to the image to generate an additional image, where the additional image represents how the initial image would have appeared if the initial image had instead been captured at a different perspective (e.g., using alternative optical capabilities, such as a different aperture size and / or a different focal length). For example, a second image captured by the second camera 404 from the second perspective may be transformed into the first perspective of the first camera 402 (e.g., based at least in part on the separation distance 422). This transformation may yield an image that corresponds to the first field of view 412, but if an image of the first field of view 412 had been captured by the second camera 404 positioned at the first perspective. Such a transformation is provided solely as an example. It is understood that other examples are also possible and are contemplated herein.

[0075] Although not illustrated in Figure 4, in some embodiments, a third camera (e.g., of the rear-facing cameras 112) may also capture an image (i.e., a third image) of thescene 400 (e.g., from a third perspective). The third camera may have different optical capabilities (e.g., a different focus profile) than the first camera 402 and / or the second camera 404. For example, the third camera may have a telephoto lens (e.g., a lens with a longer focal length than the lenses of the first camera 402 and / or the second camera 404) and / or a different associated depth of field than the first camera 402 and / or the second camera 404. In some embodiments, the third camera may capture the third image of the scene 400 substantially simultaneously with the first camera 402 capturing the first image of the scene 400 and / or the second camera 404 capturing the second image of the scene 400. The third image of the scene could also be used (e.g., along with the first image and / or second image) to determine a depth map of the scene 400 (e.g., based on a position of the third camera relative to the first camera 402 and / or the second camera 404). Further, like the second image, the third image could also be transformed (e.g., based on the location of the third camera relative to the first camera 402) into the first perspective.

[0076] It is understood that the illustration of Figure 4 is provided solely as an example and that other embodiments are also possible and are contemplated herein. For example, in some embodiments, the computing device 100 may have fewer than three rearfacing cameras 112 (e.g., two cameras) or greater than three rear-facing cameras 112 (e.g., four cameras, five cameras, six cameras, etc.). Further, such rear-facing cameras 112 may have different optical capabilities / components than the cameras described above. Additionally or alternatively, the rear-facing cameras 112 may be positioned at different locations than those illustrated in Figure 4. Still further, in some embodiments, one or more images may be captured by the rear-facing cameras 112 at different times than one another. For example, the first camera 402 may capture the first image of the scene at a different time (e.g., greater than 1 second apart from) the second camera 404 capturing the second image of the scene. In addition, the first camera 402 and / or the second camera 404 may capture multiple images of the scene. For example, the first camera 402 may capture a first image of the scene substantially simultaneously with the second camera 404 capturing a second image of the scene. Then, subsequently, the first camera 402 or the second camera 404 may capture a third image of the scene. Each of the images may then be used to perform the focus-altering techniques described herein.

[0077] Figure 5A is a flowchart illustration of a method 500. The method 500 may be performed to generate a synthetic image of a scene (e.g., a synthetic image of a scene havinga synthetic focus profile). For example, the method 500 may take a first image 512 (e.g., as captured by the first camera 402 as shown and described with reference to Figure 4) and a second image 514 (e.g., as captured by the second camera 404 as shown and described with reference to Figure 4) as inputs and produce an output image 560 (e.g., a synthetic image having a different focus profile than the first focus profile associated with the first camera 402 and the second focus profile associated with the second camera 404). In some embodiments, for instance, the output image 560 may be a synthetic image that represents an image of the scene 400 captured from the first perspective of the first camera 402 with enhanced and / or degraded focus (e.g., enhanced in some regions of the image and degraded in other regions of the image) relative to the first image 512. The method 500 may be performed by a computing device (e.g., the computing device 100), in some embodiments. For example, a processor (e.g., the processor 206) may execute program instructions (e.g., the program instructions 218) stored within a non-transitory, computer-readable medium (e.g., the data storage 208) to generate a synthetic image based on images captured using cameras (e.g., camera components 224) using one or more machine-learned models (e.g., the trained models 217). It is understood that the illustration in Figure 5 A is provided solely as an example and that other steps and / or images may be involved in alternate embodiments (each of which is contemplated herein).

[0078] The method 500 may include two primary phases: a preprocessing phase 502 and a machine-learning phase 504. As illustrated in Figure 5A, the preprocessing phase 502 may include receiving a first image 512 and a second image 514 (e.g., as .PNG files, .JPEG files, .TIFF files, .BMP files, .GIF files, .PDF files, .RAW files, .EPS files, etc.). The first image 512 and the second image 514 may be received from the first camera 402 and the second camera 404, respectively, upon the first camera 402 and the second camera 404 capturing the first image 512 and the second image 512. Alternatively (e.g., where the computing device is a server device), the preprocessing phase 502 may include receiving the first image 512 and the second image 514 from a repository (e.g., from a memory and / or a cloud storage). As shown, the first image 512 may be passed directly from the preprocessing phase 502 to the machine-learning phase 504. Additionally, upon receiving the second image 514, the preprocessing phase 502 may involve generating an intermediate image 520 that represents a transformation of the second image 514 into a perspective of the first image 512 (e.g., into a first perspective used by the first camera 402 to capture the first image 512). Thistransformation may be performed based on the relative positions of the cameras that captured the first image 512 and the second image 514 (e.g., as stored within the storage 208). This is indicated in Figure 5 A by the arrow from the second image 514 to the intermediate image 520 and from the first image 512 to the intermediate image 520. The relative positions of the cameras may be predetermined and stored within a memory and / or may be determined by analyzing the first image 512 and the second image 514, themselves.

[0079] In some embodiments (e.g., as illustrated in Figure 5A), upon generating the intermediate image, the preprocessing phase 502 may include generating a depth map 530. The depth map 530 may be a representation of the relative distance to various points in the scene from a given perspective (e.g., from the perspective of the first camera 402, which may correspond to the perspective of the first image 512, as well as the generated intermediate image). In addition, the depth map 530 may be generated based on a stereo depth determination to each point in the scene based on the first image 512 and the second image 514 (which, indirectly, is based on the relative perspectives and positions of the first camera 402 and the second camera 404). Further, the depth map 530 may be stored as a separate image (e.g., using color and / or intensity to represent depth) and / or as a series of data (e.g., within a spreadsheet file or a .CSV file).

[0080] Although not shown in Figure 5A, in some embodiments, the preprocessing phase 502 may further include determining an occlusion mask (e.g., in addition to the depth map 530). The occlusion mask may represent portions of the scene 400 that are occluded within one of the images (e.g., within the intermediate image). Despite performing a transformation of the second image 514 to generate the intermediate image (e.g., corresponding to the first perspective), because the second image 514 was nevertheless captured at the second perspective, it is possible that one or more portions of the scene that would be viewable from the first perspective are not viewable from the second perspective (e.g., because of one or more objects in the scene occluding that portion of the scene when viewed from the second perspective). Therefore, such portions of the scene may potentially be misaligned in the intermediate image. Downstream, the intermediate image may be used to perform additional calculations (e.g., during the machine-learning phase 504). In some embodiments, another component that may be fed into the calculations may be the occlusion mask (e.g., to assist in determining which portions of the generated intermediate image may be less reliable and / or unknown). Given this, in some embodiments, the occlusion mask maybe generated in the preprocessing phase 502 and passed to the machine-learning phase 504 for use in generating the output image 560.

[0081] Additionally or alternatively, in some embodiments, the preprocessing phase 502 may include generating a defocus map. The defocus map may represent the focal properties (e.g., the amount of focus) for different portions of the first image 512. Such a defocus map may be calculated based on the depth map 530 and / or the first focus profile of the first camera 402 used to capture the first image 512 (e.g., where the first focus profile is predetermined based on optical characteristics of the first camera 402 at the time of capturing the first image 512 and stored within the data storage 208). To compute the defocus map, the following formula for the circle of confusion at the image plane (diameter c) may be used:where A is the aperture of the associated camera (e.g., the first camera 402), Si is the focus distance of the associated camera (e.g., the distance to a plane from the first camera 402 at which every point would appear in focus), & is the pixel depth (e.g., based on the corresponding pixel location in the depth map 530), and / is the focal length of the associated camera (e.g., of a lens of the first camera 402). Further, like the depth map 530, the defocus map may be stored as a separate image (e.g., using color and / or intensity to represent depth) and / or as a series of data (e.g., within a spreadsheet file or a .CSV file). In addition, in some embodiments, the defocus map may be provided to the machine-learning phase 504 and used to generate the output image 560.

[0082] Figure 5B illustrates example images and a depth map associated with the preprocessing phase 502 shown and described with reference to Figure 5A. As illustrated, an example first image 512 (e.g., captured by a wide-angle camera at a first perspective) and an example second image 514 (e.g., captured by an ultrawide-angle camera at a second perspective) may be provided to the preprocessing phase 502. As illustrated, the first image 512 may be captured from a first perspective, correspond to a shallower depth of field than the second image 514, and / or correspond to a narrower field of view than the second image 514. Similarly, the second image 514 may be captured from a second perspective, correspond to a deeper depth of field than the first image 512, and / or correspond to a wider field of view than the first image 512. During the preprocessing phase 502, a depth map 530 (shown in grayscale with white being low depth and black being high depth) and an intermediate image520 (e.g., resulting from a transformation of the second image 514 into the first perspective) may be produced. Although not shown, as described above, in some embodiments the preprocessing phase 502 may also include generating an occlusion mask (e.g., which may also be stored as a grayscale image from the first perspective).

[0083] As also illustrated in Figure 5A and as noted above, the method 500 of generating the output image 560 (e.g., the synthetic image having a synthetic focus profile) may also include the machine-learning phase 504. The machine-learning phase 504 may include applying one or more machine-learning models (e.g., the machine-learning model 332 shown and described with reference to Figure 3) to data that was output by the preprocessing phase 502 to generate the output image 560. For example, the one more machine-learned models may be applied to the first image 512, the second image 514, the intermediate image 520, the depth map 530, an occlusion mask, a defocus map, etc. in order to generate a synthetic image. The machine-learned models may, for instance, make use of the first image 512 (e.g., the wide-angle image) as a base image and make use of the second image 514 (e.g., the ultrawide-angle image) and / or the intermediate image 520 as an image for providing high-frequency details, where desired.

[0084] In some embodiments, the machine-learning model 332 may include an ensemble of models (e.g., an ensemble of convolutional neural networks). For example, as illustrated in Figure 5A, the machine-learning model 332 may include a fusion network with two refinement models: (i) a first refinement model 542 (e.g., a first convolutional neural network) used to refine the first image 512, sometimes referred to as a “wide refinement model,” and (ii) a second refinement model 544 (e.g., a first convolutional neural network) used to refine the intermediate image 520 (and / or, in some embodiments, the second image 514), sometimes referred to as an “ultrawide refinement model.” The outputs of these refinement models may, as illustrated in Figure 5A, be combined with one another using a fusion model 550 (e.g., a third convolutional neural network) to generate the output image 560. Each of the first refinement model 542 and the second refinement model 544 may exhibit multi-scale refinements and / or be based on a Dynamic Residual Blocks Network (DRBNet) architecture (as described in “Learning to deblur using light field generated and real defocus images;” Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, 2022; Lingyan Ruan, et al.). Further, the fusion model 550 may include a sequence of atrous convolutions (e.g., such Atrous Spatial Pyramid Pooling convolutionsblocks, which may increase receptive field) and / or may predict a blending mask for each scale of the multi-scale refinements associated with the first refinement model 542 and the second refinement model 544. The blending mask may be used to blend the refined first image from the first refinement model 542 and the refined intermediate image from the second refinement model 544 to generate the output image 560 (e.g., the synthetic image with synthetic focus profile), for example. Further, the blending mask may be determined based on a defocus map of the scene and a target defocus map of the scene, in some embodiments. Additionally or alternatively, to preserve high-frequency details in a blending mask used to generate the output image 560, upsampling layers and / or residual connections may be included in the machine-learning model 332 to be used when predicting the blending mask at larger scales.

[0085] In some embodiments, the fusion model 550 may also incorporate other data when fusing the outputs of the first path 542 and the second path 544. For example, as illustrated in Figure 5A, the fusion model 550 may also incorporate the depth map 530 calculated during the preprocessing phase 502. Additionally or alternatively, the fusion model 550 may generate the output image 560 based on an occlusion mask, a defocus map (e.g., a defocus map associated with the first image 512), and / or a target defocus map (e.g., a defocus map that represents the defocus desired for each pixel in the resulting output image 560). For example, when combining the outputs of the first refinement model 542 and the second refinement model 544 to generate the output image 560, the fusion model 550 may receive an occlusion mask. Based on the occlusion mask, the fusion model 550 may be used to determine portions of the scene that are potentially occluded and / or misaligned in the second image 514 and / or the intermediate image 520 and, therefore, reduce the probability of representing that portion of the scene in the output image 560 based on corresponding portions of the scene in the second image 514 and / or the intermediate image 520 (and, consequently, increase the probability of representing that portion of the scene in the output image 560 based on the corresponding portion of the scene in the first image 512).

[0086] It is understood that other types of machine-learning models are also possible and are contemplated herein. For example, instead of three machine-learning models in the ensemble of the machine-learning model 332, other numbers of machine-learning models could be used (e.g., one, two, four, five, etc.). Additionally or alternatively, other types of machine-learning models (e.g., besides neural networks) could be used.

[0087] Figure 5C illustrates example images associated with the machine-learning phase 504 shown and described with reference to Figure 5A. As illustrated, an example first image 512 (e.g., captured by a wide-angle camera at a first perspective) and an example intermediate image 520 (e.g., a transformation of the second image captured by the ultrawide- angle camera into the first perspective as generated during the preprocessing phase 502) may be provided to the machine-learning phase 504. Upon analyzing the first image 512 and the intermediate image 520 using the machine-learning models 332 (e.g., the first refinement model 542, the second refinement model 544, and the fusion model 550), the output image 560 may be generated. Though not illustrated in Figure 5C, and as shown and described with reference to Figure 5A, in some embodiments, a depth map 530 may also be generated during the preprocessing phase 502 provided to the machine-learning phase 504, and used (e.g., by the fusion model 550) to generate the output image 560. As illustrated in Figure 5C, the output image 560 may be a synthetic image representing an image of the scene captured from the first perspective using a focus profile (e.g., a synthetic focus profile) different from the focus profile of the first camera 402 (e.g., and different from the focus profile of the second camera 404). It is understood that this is provided only as an example and that other possible output images are also possible and are contemplated herein. For example, a synthetic image captured from the second perspective could instead be generated.

[0088] Regardless of what type of machine-learning model(s) are applied during the machine-learning phase 504 of Figure 5 A, the machine-learning model(s) may have been trained prior to being used to generate the output image 560. Training the machine-learning models may include collecting training data (e.g., within one or more training datasets) and then performing training (e.g., as described above with reference to Figure 3) using the training data to produce a trained machine-learning model 332.

[0089] Figure 6 illustrates a training set 600 that could be used to train the machinelearning model 332 (e.g., the ensemble of convolutional neural networks) used in the machine-learning phase 504 of Figure 5 A. As illustrated, the training set 600 includes groups of training images (e.g., a first training group 602, a second training group 604, a third training group 606, and a fourth training group 608). Each training group 602, 604, 606, 608 may include a plurality of first training images captured of a training scene and a second training image captured of the same training scene. The first training images may each be captured from the same training perspective (e.g., the first training perspective associatedwith the first camera 402, such as a wide-angle camera, of a computing device 100). However, each of the first training images may have been captured using a different focus profile (e.g., a different aperture size, a different lens position, a different lens focal length, a different depth of field, etc.). Given this, the first training images in each training group 602, 604, 606, 608 may be captured by sweeping the focal plane of the first camera across a variety of positions (e.g., be adjusting the position of the first camera lens or the first camera image sensor) and capturing a training image at each position. The second training image in each training group 602, 604, 606, 608, on the other hand, may have been captured using a second camera 404 (e.g., the ultrawide-angle camera of a computing device 100) from a different training perspective than the first camera. Further, the second training image in each training group 602, 604, 606, 608 may have been captured using a focus profile that was not captured in any of the first training images in the corresponding training group 602, 604, 606, 608. For example, the second training image in each training group 602, 604, 606, 608 may have a deeper depth of field and a wider field of view than any of the first training images in the same training group 602, 604, 606, 608. Additionally or alternatively, in order to provide a comprehensive training set 600, in some embodiments, the training scenes captured in each respective training group 602, 604, 606, 608 may be different from one another. For example, the training scene captured in the first training group 602 may be a scene of a meadow, the training scene captured in the second training group 604 may be a scene of buildings in an urban setting, the third training group 606 may be a scene of a person and an animal, and the fourth training group 608 may be an underwater scene.

[0090] As described above, in some embodiments, the training set 600 may have been captured using two training cameras (e.g., a wide-angle camera of a smartphone and an ultrawide-angle camera of a smartphone). In some cases, the training cameras capturing the training set may be the same physical cameras (e.g., on the same physical smartphone) that will ultimately be used to capture images used to generate synthetic images. Alternatively, in some embodiments, the training cameras capturing the training set may be the same make and model as the cameras that will ultimately be used to capture images used to generate synthetic images, but not the same physical cameras. In still other embodiments, training cameras with different optical characteristics from the cameras that will be used to capture images used to generate synthetic images may be used to capture the training set. In such embodiments, although not necessarily required, certain principles of transfer learning maybe employed to ensure that the machine-learning models trained using the training set can be equally applied to ultimately generate synthetic images.

[0091] It is understood that the training set 600 illustrated in Figure 6 is provided solely as an example and that other training sets are also possible and are contemplated herein. For example, a training set may include more than four training groups (e.g., five training groups, six training groups, seven training groups, etc.), additional or fewer training images captured from the first training perspective in each of the training groups (e.g., one training image from the first training perspective, two training images from the first training perspective, three training images from the first training perspective, four training images from the first training perspective, six training images from the first training perspective, seven training images from the first training perspective, eight training images from the first training perspective, etc.), additional training images captured from the second training perspective in each of the training groups (e.g., two training images from the second training perspective, three training images from the second training perspective, four training images from the second training perspective, five training images from the second training perspective, etc.), different numbers of training images captured from one or both training perspectives among the training groups (e.g., a training set including a first training group with five training images from the first training perspective and two training images from the second training perspective and a second training group with seven training images from the first training perspective and one training image from the second training perspective), and / or different focus profiles used for training images captured among the training groups.Additionally or alternatively, in some embodiments, one or more of the training groups in the training set (e.g., each of the training groups in the training set) may include training images of a training scene captured by a third training camera. Such training images captured by the third training camera may be captured from a third training perspective and / or have a different focus profile from the focus profiles used by the first training camera and / or the second training camera to capture training images.

[0092] Once captured, the training set may be used to train a machine-learning model (e.g., the machine-learning model 332 shown and described with reference to Figure 3 and / or the ensemble of machine-learning models 542, 544, 550 shown and described with reference to Figure 5A). Training the machine-learning model may include selecting (e.g., pseudo- randomly) one of the training images captured from a first perspective from a training groupas a staring image and selecting another of the training images captured from the first perspective of the same training group as a target image (i.e., a target output image). Then, using a second training image captured from the second perspective in the same training group, an intermediate image (e.g., corresponding to the second training image transformed into the first perspective), a depth map, and a defocus map may be determined (e.g., as well as an occlusion mask, in some embodiments). Using these determined images / maps, as well as the starting image and the target image, the machine-learning model may be updated / revised.

[0093] In some embodiments, the machine-learning model may be trained using cropped patches from one or more of the training images (e.g., cropped patches having a size of 256 pixels2). Further, the training of the machine-learning model may be performed using a reconstruction loss that is a combination of a loss (Li) on pixels and gradient magnitudes, structural similarity index measure (SSIM) loss, and perceptual loss (LVGG). For example, for a target image W and a model output y, the total loss (Ltotai) may be represented by: totai=^i(^ y) + L1VW, Vy) + LSSIM(W,y) + LVGG(W, y)

[0094] As described above (e.g., with reference to Figure 5A), embodiments disclosed herein may be used to generate a synthetic image (e.g., with a synthetic focus profile) based on two or more images captured by a two or more cameras (e.g., one image captured by an ultrawide-angle camera of a smartphone and a second image captured by a wide-angle camera of a smartphone). In some embodiments, the synthetic image may be generated based on a target focus profile. For example, the target focus profile may correspond to an adjusted focus in one or more portions of the scene relative to one of the captured images (e.g., relative to the first image captured from the first perspective by the first camera). For instance, the target focus profile may include sharpening one or more portions of the captured scene and / or defocusing one or more portions of the captured scene (e.g., to generate a bokeh effect).

[0095] The target focus profile may be generated in various ways. For example, as illustrated in Figure 7, a target object 712 (i.e., object of interest) may be identified within a first captured image 702 (e.g., captured by a wide-angle camera from a first perspective). The target object 712 may be selected based on a user input (e.g., at a user interface of a computing device). Additionally or alternatively, the target object 712 may be identified using image processing techniques (e.g., by applying a machine-learning model trained toidentify one or more objects of interest, such as people, faces, animals, moving objects, etc.). As illustrated, the generated synthetic image 704 may have a synthetic focus profile that corresponds to the target object 712 (e.g., along with any objects in the scene at the same relative depth with respect to the first camera) having an enhanced focus (e.g., reduced blur) and other objects in the scene (e.g., at different depths than the target object 712) having a reduced focus (e.g., increased blur).

[0096] In some embodiments, as illustrated in Figure 8, multiple target objects may be identified in a first captured image 802. For example, a first target object 812 (e.g., a person) and a second target object 814 (e.g., a dog) may be identified (e.g., selected based on a user input at a user interface). The generated synthetic image 804 may have a synthetic focus profile that corresponds to enhanced focus (e.g., reduced blur) of the first target object 812 and the second target object 814 and a reduced focus (e.g., increased blur) for other objects in the scene.

[0097] In other embodiments, rather than identifying one or more target objects / objects of interest, the synthetic image may be generated based on one or more objects of disinterest (e.g., based on a user input to a user interface of a computing device). The objects of disinterest may have their focus reduced (e.g., increased blur) in the synthetic focus profile of the generated synthetic image, whereas the remaining objects in the scene may have their focus enhanced (e.g., reduced blur) in the synthetic profile of the generated synthetic image.

[0098] In addition to or instead of generating the synthetic image based on target objects, in some embodiments, the synthetic image may have a synthetic focus profile (e.g., generated based on a target defocus map) that corresponds to a modified depth of field. For example, a first image 902 may be captured (e.g., by a wide-angle camera of a smartphone). The first image 902 may then be displayed (e.g., on a user interface) along with a slider 920. The slider may be set to a level that indicates the depth of field of the image (e.g., based on a predetermined focus profile associated with the camera used to capture the first image 902). A user may then adjust the slider 920 to provide a desired depth of field in the synthetic focus profile of the resulting synthetic image (e.g., and a synthetic image may be generated accordingly based on the slider 920 position). For example, as the slider 920 is moved up, a first synthetic image 912 having a deeper depth of field (e.g., smaller circle of confusion at a given distance) in its synthetic focus profile may be generated and displayed. Likewise, as the slider 920 is moved down, a second synthetic image 914 having a shallower depth of field(e.g., larger circle of confusion at a given distance) in its synthetic focus profile may be generated and displayed. Other ways of determining the desired depth of field for the synthetic focus profile (e.g., other than based on a user selection) are also possible and contemplated herein.

[0099] In addition to or instead of selecting the desired depth of field (e.g., using a slider) for the synthetic focus profile, in some embodiments, a slider could be used to select a desired focal length of a lens associated with the synthetic focus profile of the synthetic image. The desired focal length of the lens associated with the synthetic focus profile may be different from the actual focal length of the lens used to capture the first image of the scene (e.g., by the wide-angle camera) that is used to generate the synthetic image, for example. Additionally or alternatively, a desired center location of a circle of confusion and / or a desired radius length of a circle of confusion associated with a depth of field of the synthetic focus profile may also be used to generate the synthetic image. Further, the desired center location of the circle of confusion and / or desired radius length of the circle of confusion associated with the synthetic focus profile may be different from the actual center location of the circle of confusion and actual radius length of the circle of confusion, respectively, of the focus profile associated with the first image of the scene (e.g., as captured by the wide-angle camera) that is used to generate the synthetic image. A desired focal length of a lens associated with the synthetic focus profile, a desired center location of a circle of confusion, and / or a desired radius length of a circle of confusion may all be determined algorithmically (e.g., by applying one or more machine-learned models) and / or based on one or more user inputs, in various embodiments.

[0100] In some embodiments, rather than identifying objects of interest, objects of disinterest, desired focal lengths associated with a synthetic focus profile, or desired circle of confusion characteristics associated with a synthetic focus profile, a defocus map (e.g., calculated for the first image captured by a wide-angle camera of a computing device) may be redefined to achieve one or more desired effects (e.g., desired artistic effects, such as bokeh). For example, as illustrated in Figure 10, a tilt-shift effect may be used to make larger objects appear as miniatures. In Figure 10, the defocus map associated with a first image 1002 (e.g., associated with a focus profile related to the first image 1002) has been modified based on a target defocus map associated with the synthetic image 1004 (e.g., associated with a desired synthetic focus profile related to the synthetic image 1004). As shown, reducedfocus (e.g., blurring) has been applied in the upper-left comer and bottom-right comer of the synthetic image 1004. Further, a diagonal across a center portion of the synthetic image 1004 (e.g., from the bottom-left corner to the upper-right corner) remains in-focus. This results in objects in the synthetic scene of the synthetic image 1004 appearing to be miniaturized. Other target defocus maps and / or synthetic focus profiles corresponding to other artistic effects are also possible and are contemplated herein.

[0101] Figure 11 is a flowchart diagram of a method 1100, according to example embodiments. In some embodiments, the method 1100 may be performed by a computing device (e.g., the computing device 100 shown and described with reference to Figure 1 and / or the computing device 200 shown and described with reference to Figure 2). The method 1100 may be performed to generate a synthetic image with a synthetic focus profile, for example.

[0102] At block 1110, the method 1100 may include receiving, by a computing device, a first image of a scene captured from a first perspective using a first focus profile. The first image may have been captured using a first camera.

[0103] At block 1120, the method 1100 may include receiving, by the computing device, a second image of the scene captured from a second perspective using a second focus profile. The second image may have been captured using a second camera.

[0104] At block 1130, the method 1100 may include determining, by the computing device, a depth map of the scene. The depth map of the scene may be determined based on the first image, the second image, and a position of the second camera relative to the first camera.

[0105] At block 1140, the method 1100 may include generating, by the computing device based on the position of the second camera relative to the first camera, an intermediate image. The intermediate image may represent a transformation of the second image into the first perspective.

[0106] At block 1150, the method 1100 may include applying, by the computing device, a machine-learned model to the first image, the intermediate image, and the depth map to generate a synthetic image of the scene. The synthetic image may represent an image of the scene captured from the first perspective using a synthetic focus profile. The synthetic focus profile may be different than the first focus profile.

[0107] In some embodiments of the method 1100, the first camera may include a first image sensor, a first aperture stop, and a first lens arranged along an optical axis of the firstimage sensor. Additionally, the second camera may include a second image sensor, a second aperture stop, and a second lens arranged along an optical axis of the second image sensor. The first image sensor may have a higher resolution than the second image sensor. The first lens may have a longer focal length than the second lens. The arrangement of the first image sensor, the first aperture stop, and the first lens may result in the first focus profile. The arrangement of the second image sensor, the second aperture stop, and the second lens may result in the second focus profile. The first focus profile may have a shallower depth of field than the second focus profile.

[0108] Further, in some embodiments of the method 1100, the first camera may be a wide camera of a smartphone. The second camera may be an ultrawide camera of the smartphone.

[0109] In some embodiments of the method 1100, the machine-learned model may have been trained using a training set. The training set may include a series of training images. The series of training images may include images captured by the first camera and images captured by the second camera.

[0110] In some embodiments of the method 1100, the machine-learned model may have been trained using a training set. The training set may include a plurality of groups of training images. Each group of training images may include a plurality of first training images of a training scene captured by a wide camera of a device from a first training perspective. Each of the first training images in the plurality of first training images may have been captured using a different focus profile. The training set may also include a second training image of the training scene captured by an ultrawide camera of the device from a second training perspective.

[0111] Further, in some embodiments of the method 1100, the plurality of first training images may have been captured by a data-gathering method. The data-gathering method may have included capturing one of the plurality of first training images of the training scene. The data-gathering method may have also included adjusting a lens position of the wide camera. Additionally, the data-gathering method may have included capturing another of the plurality of first training images of the training scene.

[0112] Additionally or alternatively, in some embodiments of the method 1100, the training images of a first group of the plurality of groups of training images may have been captured of a first training scene. The training images of a second group of the plurality ofgroups of training images may have been captured of a second training scene. The first training scene may be different from the second training scene.

[0113] In some embodiments of the method 1100, determining the depth map of the scene based on the position of the second camera relative to the first camera may include determining the depth map of the scene based on a predetermined separation between an aperture stop of the first camera and an aperture stop of the second camera.

[0114] In some embodiments, the method 1100 may also include determining, by the computing device, an occlusion mask. The occlusion mask may show portions of the intermediate image that are potentially misaligned with respect to the first image. The machine-learned model may be further applied to the occlusion mask to generate the synthetic image of the scene.

[0115] In some embodiments of the method 1100, the machine-learned model may include an ensemble of convolutional neural networks.

[0116] Additionally, in some embodiments, the method 1100 may also include determining, by the computing device, a defocus map of the scene based on the depth map of the scene and the first focus profile. The ensemble of convolutional neural networks includes a first convolutional neural network configured to refine the first image. The ensemble of convolutional neural networks also includes a second convolutional neural network configured to refine the intermediate image. Further, the ensemble of convolutional neural networks includes a third convolutional neural network configured to determine a blending mask used to blend the refined first image and the refined intermediate image to generate the synthetic image. The blending mask may be determined based on the defocus map and a target defocus map of the scene.

[0117] Further, in some embodiments, the method 1100 may include displaying, by the computing device, a slider on a user interface. The slider may be usable to select a desired depth of field or a desired focal length for the synthetic image. The method 1100 may also include determining, by the computing device, the target defocus map based on a user input to the slider.

[0118] Yet further, in some embodiments, the method 1100 may include displaying, by the computing device, the first image on a user interface. The method 1100 may also include receiving, at the computing device via the user interface, a selection of: a desired center location of a circle of confusion associated with a depth of field of the synthetic focusprofile; or a desired radius length of the circle of confusion associated with the depth of field of the synthetic focus profile. The method 1100 may further include generating the target defocus map based on the selection.

[0119] Even further, in some embodiments, the method 1100 may include determining, by the computing device, a desired object of interest within the scene. Additionally, the method 1100 may include generating, by the computing device, the target defocus map based on the desired object of interest. Relative to the defocus map, the target defocus map may have decreased blur in regions corresponding to the desired object of interest. Relative to the defocus map, the target defocus map may have increased blur in regions other than the regions corresponding to the desired object of interest.

[0120] Still further, in some embodiments, the method 1100 may include displaying, by the computing device, the first image on a user interface. The method 1100 may also include receiving, by the computing device via the user interface, a selection indicating the desired object of interest within the scene. The desired object of interest may be determined by the computing device based on the selection.

[0121] Even still further, in some embodiments, the method 1100 may include displaying, by the computing device, the first image on a user interface. The method 1100 may also include receiving, by the computing device via the user interface, a selection indicating a desired object of disinterest within the scene. The desired object of interest may be determined by the computing device based on the selection.

[0122] In some embodiments of the method 1100, a center location of a circle of confusion associated with a depth of field of the synthetic focus profile may be in a different location relative to the scene than a center location of a circle of confusion associated with a depth of field of the first focus profile, a radius length of the circle of confusion associated with the depth of field of the synthetic focus profile may be different than a radius length of the circle of confusion associated with the depth of field of the first focus profile, or a focal length associated with the synthetic focus profile may be different than a focal length associated with the first focus profile.

[0123] In some embodiments of the method 1100, the machine-learned model may have been trained using a training set. The training set may include a plurality of groups of training images. Each group of training images may include a first training image of a training scene captured by a first training camera from a first training perspective. Each groupof training images may also include a second training image of the training scene captured by a second training camera from a second training perspective. Additionally, each group of training images may include a third training image of the training scene captured by a third training camera from a third training perspective. The first training camera, the second training camera, and the third training camera may each have different focus profiles.

[0124] In some embodiments, the method 1100 may include receiving, by the computing device, a third image of the scene captured from a third perspective. The third image may have been captured using a third camera. The depth map of the scene may be determined based on the third image and a position of the third camera relative to the first camera. The method 1100 may also include generating, by the computing device based on the position of the third camera relative to the first camera, an additional intermediate image. The additional intermediate image may represent a transformation of this image into the first perspective. Further, the method 1100 may include applying, by the computing device, the machine-learned model to the third image to generate the synthetic image of the scene.

[0125] In some embodiments, the method 1100 may include receiving, by the computing device, a third image of the scene captured from the first perspective. The third image of the scene may have been captured using the first camera. The depth map of the scene may be determined based on the third image. The method 1100 may also include applying, by the computing device, the machine-learned model to the third image to generate the synthetic image of the scene.

[0126] Figure 12 is a flowchart diagram of a method 1200, according to example embodiments. In some embodiments, the method 1200 may be performed by a computing device (e.g., the computing device 100 shown and described with reference to Figure 1, the computing device 200 shown and described with reference to Figure 2, a server computing device, etc.). Further the method 1200 may be performed to train a machine-learned model (e.g., the machine-learning model 332 shown and described with reference to Figures 3 and 5A).

[0127] At block 1210, the method 1200 may include receiving by a computing device, a training set usable to train a machine-learned model. The training set may include a plurality of groups of training images. Each group of training images may include a plurality of first training images of a training scene captured by a first training camera from a first training perspective. Each of the first training images in the plurality of first training imagesmay have been captured using a different focus profile. Each group of training images may also include a second training image of the training scene captured by a second training camera from a second training perspective.

[0128] At block 1220, the method 1200 may include, for each group of training images, selecting, by the computing device, a reference image from the plurality of first training images of the group.

[0129] At block 1230, the method 1200 may include, for each group of training images, selecting, by the computing device, a target image from the plurality of first training images of the group.

[0130] At block 1240, the method 1200 may include, for each group of training images, determining, by the computing device, a depth map of the scene. The depth map of the scene may be determined based on the reference image or the target image, the second training image, and a position of the second training camera relative to the first training camera.

[0131] At block 1250, the method 1200 may include, for each group of training images, generating, by the computing device based on the position of the second training camera relative to the first training camera, an intermediate image. The intermediate image may represent a transformation of the second training image into the first training perspective.

[0132] At block 1260, the method 1200 may include, for each group of training images, determining, by the computing device, a reference defocus map of the scene based on the depth map, the focus profile used to capture the reference image, and the intermediate image.

[0133] At block 1270, the method 1200 may include, for each group of training images, determining, by the computing device, a target defocus map of the scene based on the depth map, the focus profile used to capture the target image, and the intermediate image.

[0134] At block 1280, the method 1200 may include, for each group of training images, determining, by the computing device, a blending mask that can be applied to the reference image and the intermediate image in order to generate a synthetic image having the same focus profile as the target image. The blending mask may be determined based on the reference defocus map and the target defocus map.

[0135] At block 1290, the method 1200 may include, for each group of trainingimages, revising, by the computing device, the machine-learned model based on the blending mask, the reference defocus map, and the target defocus map.

[0136] The techniques described herein perform deblurring, shallow depth of field rendering (e.g., selectively enhanced blurring, such as to produce the bokeh effect), and image refocus (e.g., re-synthesizing of a focus plane given an input with a different focus plane) impressively when compared to alternative techniques. This has been studied using common signal processing metrics, such as peak signal-to-noise ratio (PSNR), SSIM, and learned perceptual image patch similarity (LPIPS).

[0137] For the task of deblurring, the techniques described herein have been compared with the following deblurring methods: DRBNet (as described in “Learning to deblur using light field generated and real defocus images;” Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, 2022; Lingyan Ruan, et al.), Multitask DP (MDP) network (as described in “Improving single-image defocus deblurring: How dual-pixel images help through multi-task learning;” Proceedings of the IEEE / CVF Winter Conference on Applications of Computer Vision, 2022; Abdullah Abuolaim, et al.), and Iterative Filter Adaptive Network (IF AN) (as described in “Iterative filter adaptive network for single image defocus deblurring;” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021; Junyong Lee, et al.). In order to compare the techniques described herein to those alternative techniques, a task of setting a target defocus map associated with a target synthetic focus profile to all zeros (e.g., corresponding to every portion of the synthetic image being maximally in focus) was performed on a test image and the resulting synthetic image was compared to images generated by the alternative techniques. The results are displayed in the table of Figure 13 A, with the numbers in bold font corresponding to the best values of a given metric within the table. As illustrated in Figure 13 A, the techniques described herein performed better across all metrics than the alternative techniques.

[0138] For the task of shallow depth of field rendering, the techniques described herein have been compared with the following methods: the entire BokehMe depth of field synthesis technique, the classic blur synthesis techniques, and the neural rendering techniques within “Bokehme: When neural rendering meets classical rendering;” Proceedings of the IEEE / CVF International Conference on Computer Vision and Patter Recognition (CVPR), 2022; Juewen Peng, et al. In order to compare the techniques described herein to thosealternative techniques, a task of generating multiple synthetic images (e.g., having shallower depths of field) from a first image (e.g., captured by a wide-angle camera) and a second image (e.g., an image captured by an ultrawide-angle camera) was performed. This task involved collecting a number of first images using a first camera (e.g., a wide-angle camera), where the images included a variety of focus profiles having different depths of field, as well as a second image (e.g., captured by an ultrawide-angle camera). The first images and the second image image may have been captured using a similar technique to that shown and described above with reference to Figure 6 to capture one or more training groups 602, 604, 606, 608 within the training set 600. Then, the task may involve selecting one of the first images, determining the defocus map for each of the other first images, and attempting to synthetically reproduce each of the other first images (e.g., having shallower depths of field than the selected first image) based on the selected first image, the second image, and the respective defocus maps. The results are displayed in the table of Figure 13B, with the numbers in bold font corresponding to the best values of a given metric within the table. As illustrated in Figure 13B, the techniques described herein performed better across all metrics than the alternative techniques.

[0139] For the task of image refocus, the techniques described herein have been compared with the following methods: a direct blurring of a second image captured (e.g., an ultrawide-angle image inherently having a deep depth of field) using BokehMe (as described in “Bokehme: When neural rendering meets classical rendering;” Proceedings of the IEEE / CVF International Conference on Computer Vision and Patter Recognition (CVPR), 2022; Juewen Peng, et al.), as well as a combination of first blurring a captured image using DRBNet (as described in “Learning to deblur using light field generated and real defocus images;” Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, 2022; Lingyan Ruan, et al.) then reblurring using BokehMe (as described in “Bokehme: When neural rendering meets classical rendering;” Proceedings of the IEEE / CVF International Conference on Computer Vision and Pattern Recognition (CVPR), 2022; Juewen Peng, et al.). In order to compare the techniques described herein to those alternative techniques, a task of generating a synthetic image from a captured image (e.g., captured by a wide-angle camera) was performed. This task involved collecting a number of first images using a first camera (e.g., a wide-angle camera), where the images included a variety of focus profiles having different focal plane positions, as well as a second image (e.g., captured by anultrawide-angle camera). The first images and the second image may have been captured using a similar technique to that shown and described above with reference to Figure 6 to capture one or more training groups 602, 604, 606, 608 within the training set 600. Then, the task may involve selecting a reference image from among the first images, selecting a target image from among the remaining first images, and attempting to synthetically reproduce the target image using the reference image, the known focus profile information about the target image (e.g., based on the optical characteristics of the camera that were recorded at the time of capturing the target image), and the second image. The results are displayed in the table of Figure 13C, with the numbers in bold font corresponding to the best values of a given metric within the table. As illustrated in Figure 13C, the techniques described herein performed better across all metrics than the alternative techniques.

[0140] The present disclosure is not to be limited in terms of the particular embodiments described in this application, which are intended as illustrations of various aspects. Many modifications and variations can be made without departing from its spirit and scope, as will be apparent to those skilled in the art. Functionally equivalent methods and apparatuses within the scope of the disclosure, in addition to those enumerated herein, will be apparent to those skilled in the art from the foregoing descriptions. Such modifications and variations are intended to fall within the scope of the appended claims.

[0141] The above detailed description describes various features and functions of the disclosed systems, devices, and methods with reference to the accompanying figures. In the figures, similar symbols typically identify similar components, unless context dictates otherwise. The example embodiments described herein and in the figures are not meant to be limiting. Other embodiments can be utilized, and other changes can be made, without departing from the scope of the subject matter presented herein. It will be readily understood that the aspects of the present disclosure, as generally described herein, and illustrated in the figures, can be arranged, substituted, combined, separated, and designed in a wide variety of different configurations, all of which are explicitly contemplated herein.

[0142] With respect to any or all of the message flow diagrams, scenarios, and flow charts in the figures and as discussed herein, each step, block, operation, and / or communication can represent a processing of information and / or a transmission of information in accordance with example embodiments. Alternative embodiments are included within the scope of these example embodiments. In these alternative embodiments, forexample, operations described as steps, blocks, transmissions, communications, requests, responses, and / or messages can be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved. Further, more or fewer blocks and / or operations can be used with any of the message flow diagrams, scenarios, and flow charts discussed herein, and these message flow diagrams, scenarios, and flow charts can be combined with one another, in part or in whole.

[0143] A step, block, or operation that represents a processing of information can correspond to circuitry that can be configured to perform the specific logical functions of a herein-described method or technique. Alternatively or additionally, a step or block that represents a processing of information can correspond to a module, a segment, or a portion of program code (including related data). The program code can include one or more instructions executable by a processor for implementing specific logical operations or actions in the method or technique. The program code and / or related data can be stored on any type of computer-readable medium such as a storage device including RAM, a disk drive, a solid state drive, or another storage medium.

[0144] Moreover, a step, block, or operation that represents one or more information transmissions can correspond to information transmissions between software and / or hardware modules in the same physical device. However, other information transmissions can be between software modules and / or hardware modules in different physical devices.

[0145] The particular arrangements shown in the figures should not be viewed as limiting. It should be understood that other embodiments can include more or less of each element shown in a given figure. Further, some of the illustrated elements can be combined or omitted. Yet further, an example embodiment can include elements that are not illustrated in the figures.

[0146] While various aspects and embodiments have been disclosed herein, other aspects and embodiments will be apparent to those skilled in the art. The various aspects and embodiments disclosed herein are for purposes of illustration and are not intended to be limiting, with the true scope being indicated by the following claims.

Claims

CLAIMSWhat is claimed is:

1. A method compri sing : receiving, by a computing device, a first image of a scene captured from a first perspective using a first focus profile, wherein the first image was captured using a first camera; receiving, by the computing device, a second image of the scene captured from a second perspective using a second focus profile, wherein the second image was captured using a second camera; determining, by the computing device, a depth map of the scene, wherein the depth map of the scene is determined based on the first image, the second image, and a position of the second camera relative to the first camera; generating, by the computing device based on the position of the second camera relative to the first camera, an intermediate image, wherein the intermediate image represents a transformation of the second image into the first perspective; and applying, by the computing device, a machine-learned model to the first image, the intermediate image, and the depth map to generate a synthetic image of the scene, wherein the synthetic image represents an image of the scene captured from the first perspective using a synthetic focus profile, and wherein the synthetic focus profile is different than the first focus profile.

2. The method of claim 1, wherein the first camera comprises: a first image sensor; a first aperture stop; and a first lens arranged along an optical axis of the first image sensor, wherein the second camera comprises: a second image sensor; a second aperture stop; and a second lens arranged along an optical axis of the second image sensor, wherein the first image sensor has a higher resolution than the second image sensor, wherein the first lens has a longer focal length than the second lens,wherein the arrangement of the first image sensor, the first aperture stop, and the first lens results in the first focus profile, wherein the arrangement of the second image sensor, the second aperture stop, and the second lens results in the second focus profile, and wherein the first focus profile has a shallower depth of field than the second focus profile.

3. The method of claim 1, wherein the machine-learned model was trained using a training set, wherein the training set comprises a series of training images, and wherein the series of training images comprises images captured by the first camera and images captured by the second camera.

4. The method of claim 1, wherein the machine-learned model was trained using a training set, wherein the training set comprises a plurality of groups of training images, and wherein each group of training images comprises: a plurality of first training images of a training scene captured by a wide camera of a device from a first training perspective, wherein each of the first training images in the plurality of first training images was captured using a different focus profile; and a second training image of the training scene captured by an ultrawide camera of the device from a second training perspective.

5. The method of claim 4, wherein the plurality of first training images was captured by a data-gathering method comprising: capturing one of the plurality of first training images of the training scene; adjusting a lens position of the wide camera; and capturing another of the plurality of first training images of the training scene.

6. The method of claim 4, wherein the training images of a first group of the plurality of groups of training images were captured of a first training scene, wherein the training images of a second group of the plurality of groups of training images were captured of a second training scene, and wherein the first training scene is different from the second training scene.

7. The method of claim 1, wherein determining the depth map of the scene based on the position of the second camera relative to the first camera comprises determining the depth map of the scene based on a predetermined separation between an aperture stop of the first camera and an aperture stop of the second camera.

8. The method of claim 1, further comprising determining, by the computing device, an occlusion mask, wherein the occlusion mask shows portions of the intermediate image that are potentially misaligned with respect to the first image, and wherein the machine-learned model is further applied to the occlusion mask to generate the synthetic image of the scene.

9. The method of claim 1, further comprising determining, by the computing device, a defocus map of the scene based on the depth map of the scene and the first focus profile, wherein the machine-learned model comprises an ensemble of convolutional neural networks, wherein the ensemble of convolutional neural networks comprises: a first convolutional neural network configured to refine the first image; a second convolutional neural network configured to refine the intermediate image; and a third convolutional neural network configured to determine a blending mask used to blend the refined first image and the refined intermediate image to generate the synthetic image, and wherein the blending mask is determined based on the defocus map and a target defocus map of the scene.

10. The method of claim 9, further comprising: displaying, by the computing device, a slider on a user interface, wherein the slider is usable to select a desired depth of field or a desired focal length for the synthetic image; and determining, by the computing device, the target defocus map based on a user input to the slider.

11. The method of claim 9, further comprising: displaying, by the computing device, the first image on a user interface; receiving, at the computing device via the user interface, a selection of: a desired center location of a circle of confusion associated with a depth of field of the synthetic focus profile; or a desired radius length of the circle of confusion associated with the depth of field of the synthetic focus profile; and generating the target defocus map based on the selection.

12. The method of claim 9, further comprising: determining, by the computing device, a desired object of interest within the scene; and generating, by the computing device, the target defocus map based on the desired object of interest, wherein, relative to the defocus map, the target defocus map has decreased blur in regions corresponding to the desired object of interest, and wherein, relative to the defocus map, the target defocus map has increased blur in regions other than the regions corresponding to the desired object of interest.

13. The method of claim 12, further comprising: displaying, by the computing device, the first image on a user interface; and receiving, by the computing device via the user interface, a selection indicating the desired object of interest within the scene, wherein the desired object of interest is determined by the computing device based on the selection.

14. The method of claim 12, further comprising: displaying, by the computing device, the first image on a user interface; and receiving, by the computing device via the user interface, a selection indicating a desired object of disinterest within the scene, wherein the desired object of interest is determined by the computing device based on the selection.

15. The method of claim 1, wherein: a center location of a circle of confusion associated with a depth of field of the synthetic focus profile is in a different location relative to the scene than a center location of a circle of confusion associated with a depth of field of the first focus profile; a radius length of the circle of confusion associated with the depth of field of the synthetic focus profile is different than a radius length of the circle of confusion associated with the depth of field of the first focus profile; or a focal length associated with the synthetic focus profile is different than a focal length associated with the first focus profile.

16. The method of claim 1, wherein the machine-learned model was trained using a training set, wherein the training set comprises a plurality of groups of training images, and wherein each group of training images comprises: a first training image of a training scene captured by a first training camera from a first training perspective; a second training image of the training scene captured by a second training camera from a second training perspective; and a third training image of the training scene captured by a third training camera from a third training perspective, and wherein the first training camera, the second training camera, and the third training camera each have different focus profiles.

17. The method of claim 1, further comprising: receiving, by the computing device, a third image of the scene captured from a third perspective, wherein the third image was captured using a third camera, and wherein the depth map of the scene is determined based on the third image and a position of the third camera relative to the first camera; generating, by the computing device based on the position of the third camera relative to the first camera, an additional intermediate image, wherein the additional intermediate image represents a transformation of the third image into the first perspective; andapplying, by the computing device, the machine-learned model to the third image to generate the synthetic image of the scene.

18. The method of claim 1, further comprising: receiving, by the computing device, a third image of the scene captured from the first perspective, wherein the third image of the scene was captured using the first camera, and wherein the depth map of the scene is determined based on the third image; and applying, by the computing device, the machine-learned model to the third image to generate the synthetic image of the scene.

19. A non-transitory, computer-readable medium having instructions stored thereon, wherein the instructions, when executed by a processor, cause the processor to: receive a first image of a scene captured from a first perspective using a first focus profile, wherein the first image was captured using a first camera; receive a second image of the scene captured from a second perspective using a second focus profile, wherein the second image was captured using a second camera; determine a depth map of the scene, wherein the depth map of the scene is determined based on the first image, the second image, and a position of the second camera relative to the first camera; generate, based on the position of the second camera relative to the first camera, an intermediate image, wherein the intermediate image represents a transformation of the second image into the first perspective; and apply a machine-learned model to the first image, the intermediate image, and the depth map to generate a synthetic image of the scene, wherein the synthetic image represents an image of the scene captured from the first perspective using a synthetic focus profile, and wherein the synthetic focus profile is different than the first focus profile.

20. A method comprising: receiving, by a computing device, a training set usable to train a machine-learned model, wherein the training set comprises a plurality of groups of training images, and wherein each group of training images comprises: a plurality of first training images of a training scene captured by a firsttraining camera from a first training perspective, wherein each of the first training images in the plurality of first training images was captured using a different focus profile; and a second training image of the training scene captured by a second training camera from a second training perspective; and for each group of training images: selecting, by the computing device, a reference image from the plurality of first training images of the group; selecting, by the computing device, a target image from the plurality of first training images of the group; determining, by the computing device, a depth map of the scene, wherein the depth map of the scene is determined based on the reference image or the target image, the second training image, and a position of the second training camera relative to the first training camera; generating, by the computing device based on the position of the second training camera relative to the first training camera, an intermediate image, wherein the intermediate image represents a transformation of the second training image into the first training perspective; determining, by the computing device, a reference defocus map of the scene based on the depth map, the focus profile used to capture the reference image, and the intermediate image; determining, by the computing device, a target defocus map of the scene based on the depth map, the focus profile used to capture the target image, and the intermediate image; determining, by the computing device, a blending mask that can be applied to the reference image and the intermediate image in order to generate a synthetic image having the same focus profile as the target image, wherein the blending mask is determined based on the reference defocus map and the target defocus map; and revising, by the computing device, the machine-learned model based on the blending mask, the reference defocus map, and the target defocus map.

21. A device comprising: a first camera configured to capture a first image of a scene from a first perspective using a first focus profile; a second camera configured to capture a second image of the scene from a second perspective using a second focus profile; and a computing device configured to: determine a depth map of the scene, wherein the depth map of the scene is determined based on the first image, the second image, and a position of the second camera relative to the first camera; generate, based on the position of the second camera relative to the first camera, an intermediate image, wherein the intermediate image represents a transformation of the second image into the first perspective; and apply a machine-learned model to the first image, the intermediate image, and the depth map to generate a synthetic image of the scene, wherein the synthetic image represents an image of the scene captured from the first perspective using a synthetic focus profile, and wherein the synthetic focus profile is different than the first focus profile.

Citation Information

Patent Citations

  • Method and apparatus for generating high depth of field image, and apparatus for training high depth of field image generation model using stereo image

    US20230005155A1