CONTEXT-AWARE LIGHTING SYSTEM

A method and system causing presentation of a camera view user interface (UI) on a computing device. The camera view UI includes an output of a digital image sensor of a camera. The system detects a face in an image corresponding to the output of the digital image sensor of the camera. The system generates a ring light including a non-opaque portion and a portion of a color with a predetermined lightness. The non-opaque portion includes a ring shape with a ring size and a position determined based on an image portion including the detected face. The system computes RGBA color values for ring light pixels, each value comprising a RGB component computed using a base color and an opacity value computed using an inner radius, center offset coordinates, and/or a radial gradient computation. The system causes display of the ring light over the camera view UI.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of priority to Indian Patent Application Serial No. 202311001343, filed on Jan. 6, 2023, which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The disclosed subject matter relates generally to the technical field of lighting systems and, in one specific example, to a context-aware lighting system.

BACKGROUND

Many applications executing at a computing device provide a user interface (UI) that allows users to use a front-facing camera to see themselves, capture a photo of themselves, or potentially share the captured photo to other devices. Users are interested in using their cameras for such purposes in a variety of lighting conditions, and in a variety of scenarios involving one or more users and one or more user positions in photos.

DETAILED DESCRIPTION

Many applications executing at a computing device provide a user interface (UI) that allows users to use a front-facing camera to see themselves, capture a photo of themselves, share the captured photo with other devices, or include it in a messages or conversations with friends or connections. Such uses can take place in a variety of lighting conditions, and in a variety of scenarios involving one or more users and one or more user positions in photos.

Photos taken in low light or dark conditions can be of poor quality, which results in discarded photos, or abandoned user sessions. Furthermore, a photo can include one or more users, who may or may not be centrally located. Previous example solutions for enhancing the quality of images captured by a camera in low light conditions have involved automatically increasing the brightness of the display subsequent to detecting low light conditions or subsequent to a request from the user, the use of a front flash view or the use of a ring light or ring flash that adds illuminating borders to the viewfinder of a camera, and other solutions. However, these solutions have limitations. For example, a ring light that adds illuminating borders to the viewfinder of a camera can result in the user's face being partially or completely occluded if the face is not centrally located. When multiple users are present within the field of view, one or more faces will likely be occluded.

Examples in the disclosure herein refer to a context-aware lighting system that addresses these technical problems by using context provided by face detection and/or tracking functionality to automatically configure lighting or illumination to surround and/or not occlude the faces of the one or more users in the frame. The context-aware lighting system generates a ring light (or ring flash) displayed in, or over, the viewfinder of a camera such as a front-facing camera. By dynamically adjusting the ring light based on real-time face detection, lighting conditions can be set automatically before or during image capture, thus enhancing the user experience and/or image quality without the need for external equipment or post-processing.

In some examples, the ring light has a non-opaque portion. In some examples, the non-opaque portion is fully or almost fully transparent. In some examples, the ring light includes a portion with a color of a predetermined lightness (e.g., an illuminating border or illuminating portion) displayed over an area of the camera view UI, such as along the perimeter, surrounding the non-opaque portion, and/or in other areas of the camera view UI. The ring light can be configured based on the output of a face detection and/or tracking module that detects one or more faces in the image corresponding to the output of the digital image sensor of the camera (see, e.g.,FIG.12). By using face detection and/or tracking context, the context-aware lighting system can ensure that the detected faces are not occluded by the ring light.

In some examples, the non-opaque portion of the ring light includes a ring shape with an associated ring size. The ring size can be automatically determined based on characteristics of an image portion corresponding to a detected face, thus ensuring that the detected face is not occluded by the ring light. The ring size can be determined based on an inner radius computed based on coordinates of automatically detected facial landmarks corresponding to the detected face. The ring size can be further computed using one or more scale factors. In some examples, the non-opaque portion of the ring light is centered using a set of coordinates (e.g., a set of center offset coordinates) determined based on the coordinates of the automatically detected facial landmarks.

In some examples, the ring light includes a portion of a color with a predetermined lightness or brightness (see at leastFIG.5for details). Lightness defines a range from dark (0% or fully shaded) to fully illuminated (100% or fully tinted). The ring light can be configured to have pixels with varying lightness levels and/or varying colors.

In some examples, generating the ring light can include computing a RGBA color value for multiple ring light pixels, the RGBA color value for each pixel comprising a RGB component value and an opacity value. The RGB component value can be computed using a supplied base color. The opacity value can be computed using at least one of an inner radius, the set of center offset coordinates, or a radial gradient computation. Therefore, the ring light can be configured to have pixels with varying opacity levels.

In some examples, a second face is detected in the image corresponding to the digital image sensor of the camera. The ring light comprises a second non-opaque portion and/or a second portion of a second color with a second pre-determined lightness. The second non-opaque portion includes a second ring shape with an associated second ring size and/or position. The second ring size and/or position can be automatically determined based on characteristics of a second image portion corresponding to the second detected face.

In some examples, the ring light is enabled to be configurable by a user via by the selection of one or more parameters. Example parameters include a base color, a ring size, a ring shape, a scale factor, a texture type, and so forth. In some examples, a ring light can be automatically generated and/or presented in the camera view UI when the digital sensor of a front-facing camera detects a low light indication based on the intensity of incident light detected by the digital image sensor of the camera. In some examples, when the digital sensor of a front-facing camera detects a low light indication, a user-selectable element, such as a night-mode selectable element, is presented in the camera view UI. A user can activate a ring light by engaging the night-mode selectable element.

In some examples, the ring light can be implemented and/or rendered using the camera of a computing device. For example, the ring light can be constructed as a single view overlaid over the camera view UI that displays the output of a digital image sensor of a camera. In some examples, the ring light can be constructed using multiple views, such as one for each side of the camera view UI, where each view is overlaid over a respective area along the perimeter of the camera view UI. In some examples, the ring light can be implemented using AR components and/or experiences and/or AR tools or functionality. For example, the ring light can be implemented as a customizable ring light lens. In some examples, the ring light can be implemented and/or rendered using a mix of camera-related functionality and AR functionality.

Networked Computing Environment

FIG.1is a block diagram showing an example interaction system100for facilitating interactions (e.g., exchanging text messages, conducting text audio and video calls, or playing games) over a network. The interaction system100includes multiple user systems102, each of which hosts multiple applications, including an interaction client104and other applications106. Each interaction client104is communicatively coupled, via one or more communication networks including a network108(e.g., the Internet), to other instances of the interaction client104(e.g., hosted on respective other user systems102), an interaction server system110and third-party servers112). An interaction client104can also communicate with locally hosted applications106using Applications Program Interfaces (APIs).

Each user system102may include multiple computing devices or user devices, such as a mobile device114, head-wearable apparatus116, and a computer client device118that are communicatively connected to exchange data and messages.

An interaction client104interacts with other interaction clients104and with the interaction server system110via the network108. The data exchanged between the interaction clients104(e.g., interactions120) and between the interaction clients104and the interaction server system110includes functions (e.g., commands to invoke functions) and payload data (e.g., text, audio, video, or other multimedia data).

The interaction server system110provides server-side functionality via the network108to the interaction clients104. While certain functions of the interaction system100are described herein as being performed by either an interaction client104or by the interaction server system110, the location of certain functionality either within the interaction client104or the interaction server system110may be a design choice. For example, it may be technically preferable to initially deploy particular technology and functionality within the interaction server system110but to later migrate this technology and functionality to the interaction client104where a user system102has sufficient processing capacity.

The interaction server system110supports various services and operations that are provided to the interaction clients104. Such operations include transmitting data to, receiving data from, and processing data generated by the interaction clients104. This data may include message content, client device information, geolocation information, media augmentation and overlays, message content persistence conditions, social network information, and live event information. Data exchanges within the interaction system100are invoked and controlled through functions available via user interfaces (UIs) of the interaction clients104.

Turning now specifically to the interaction server system110, an Application Program Interface (API) server122is coupled to and provides programmatic interfaces to interaction servers124, making the functions of the interaction servers124accessible to interaction clients104, other applications106and third-party server112. The interaction servers124are communicatively coupled to a database server126, facilitating access to a database128that stores data associated with interactions processed by the interaction servers124. Similarly, a web server130is coupled to the interaction servers124and provides web-based interfaces to the interaction servers124. To this end, the web server130processes incoming network requests over the Hypertext Transfer Protocol (HTTP) and several other related protocols.

The Application Program Interface (API) server122receives and transmits interaction data (e.g., commands and message payloads) between the interaction servers124and the user systems102(and, for example, interaction clients104and other application106) and the third-party server112. Specifically, the Application Program Interface (API) server122provides a set of interfaces (e.g., routines and protocols) that can be called or queried by the interaction client104and other applications106to invoke functionality of the interaction servers124. The Application Program Interface (API) server122exposes various functions supported by the interaction servers124, including account registration; login functionality; the sending of interaction data, via the interaction servers124, from a particular interaction client104to another interaction client104; the communication of media files (e.g., images or video) from an interaction client104to the interaction servers124; the settings of a collection of media data (e.g., a story); the retrieval of a list of friends of a user of a user system102; the retrieval of messages and content; the addition and deletion of entities (e.g., friends) to an entity graph (e.g., a social graph); the location of friends within a social graph; and opening an application event (e.g., relating to the interaction client104).

The interaction servers124host multiple systems and subsystems, described below with reference toFIG.2.

Linked Applications

Returning to the interaction client104, features and functions of an external resource (e.g., a linked application106or applet) are made available to a user via an interface of the interaction client104. In this context, “external” refers to the fact that the application106or applet is external to the interaction client104. The external resource is often provided by a third party but may also be provided by the creator or provider of the interaction client104. The interaction client104receives a user selection of an option to launch or access features of such an external resource. The external resource may be the application106installed on the user system102(e.g., a “native app”), or a small-scale version of the application (e.g., an “applet”) that is hosted on the user system102or remote of the user system102(e.g., on third-party servers112). The small-scale version of the application includes a subset of features and functions of the application (e.g., the full-scale, native version of the application) and is implemented using a markup-language document. In some examples, the small-scale version of the application (e.g., an “applet”) is a web-based, markup-language version of the application and is embedded in the interaction client104. In addition to using markup-language documents (e.g., a .*ml file), an applet may incorporate a scripting language (e.g., a .*js file or a .json file) and a style sheet (e.g., a .*ss file).

In response to receiving a user selection of the option to launch or access features of the external resource, the interaction client104determines whether the selected external resource is a web-based external resource or a locally-installed application106. In some cases, applications106that are locally installed on the user system102can be launched independently of and separately from the interaction client104, such as by selecting an icon corresponding to the application106on a home screen of the user system102. Small-scale versions of such applications can be launched or accessed via the interaction client104and, in some examples, no or limited portions of the small-scale application can be accessed outside of the interaction client104. The small-scale application can be launched by the interaction client104receiving, from a third-party server112for example, a markup-language document associated with the small-scale application and processing such a document.

In response to determining that the external resource is a locally-installed application106, the interaction client104instructs the user system102to launch the external resource by executing locally-stored code corresponding to the external resource. In response to determining that the external resource is a web-based resource, the interaction client104communicates with the third-party servers112(for example) to obtain a markup-language document corresponding to the selected external resource. The interaction client104then processes the obtained markup-language document to present the web-based external resource within a user interface of the interaction client104.

The interaction client104can notify a user of the user system102, or other users related to such a user (e.g., “friends”), of activity taking place in one or more external resources. For example, the interaction client104can provide participants in a conversation (e.g., a chat session) in the interaction client104with notifications relating to the current or recent use of an external resource by one or more members of a group of users. One or more users can be invited to join in an active external resource or to launch a recently-used but currently inactive (in the group of friends) external resource. The external resource can provide participants in a conversation, each using respective interaction clients104, with the ability to share an item, status, state, or location in an external resource in a chat session with one or more members of a group of users. The shared item may be an interactive chat card with which members of the chat can interact, for example, to launch the corresponding external resource, view specific information within the external resource, or take the member of the chat to a specific location or state within the external resource. Within a given external resource, response messages can be sent to users on the interaction client104. The external resource can selectively include different media items in the responses, based on a current context of the external resource.

The interaction client104can present a list of the available external resources (e.g., applications106or applets) to a user to launch or access a given external resource. This list can be presented in a context-sensitive menu. For example, the icons representing different ones of the application106(or applets) can vary based on how the menu is launched by the user (e.g., from a conversation interface or from a non-conversation interface).

System Architecture

FIG.2is a block diagram illustrating further details regarding the interaction system100, according to some examples. Specifically, the interaction system100is shown to comprise the interaction client104and the interaction servers124. The interaction system100embodies multiple subsystems, which are supported on the client-side by the interaction client104and on the server-side by the interaction servers124. Example subsystems are discussed below.

The camera view UI system226is configured to cause presentation of a camera view UI, which displays the output of a digital image sensor of a camera provided with an associated computing device such as a client device, as well as user selectable elements that permit users to invoke various functionality related to the operation of the camera. For example, the camera view UI system may generate user selectable elements that can be engaged to capture the output of the digital image sensor of a camera as an image, to start and stop a video recording, to switch between a rear camera and a front facing camera, as well as other user selectable elements.

The lighting system228, which can be included in or incorporated in the camera view UI system226, can be configured to receive or generate an image corresponding to the output of a digital image sensor of a camera provided with an associated computing device. The lighting system228generates and/or customizes lighting by generating, for example, a ring light or ring flash. In some examples, the lightning system228is a context-aware lighting system. The examples in the disclosure herein refer to examples of such a context-aware lighting system228and/or examples of corresponding generated ring lights.

An image processing system202provides various functions that enable a user to capture and augment (e.g., annotate or otherwise modify or edit) media content associated with a message.

A camera system204includes control software (e.g., in a camera application) that interacts with and controls hardware camera hardware (e.g., directly or via operating system controls) of the user system102to modify and augment real-time images captured and displayed via the interaction client104.

The augmentation system206provides functions related to the generation and publishing of augmentations (e.g., media overlays) for images captured in real-time by cameras of the user system102or retrieved from memory of the user system102. For example, the augmentation system206operatively selects, presents, and displays media overlays (e.g., an image filter or an image lens) to the interaction client104for the augmentation of real-time images received via the camera system204or stored images retrieved from a memory of a user system102. These augmentations are selected by the augmentation system206and presented to a user of an interaction client104, based on a number of inputs and data, such as for example:Geolocation of the user system102; andSocial network information of the user of the user system102.

An augmentation may include audio and visual content and visual effects. Examples of audio and visual content include pictures, texts, logos, animations, and sound effects. An example of a visual effect includes color overlaying. The audio and visual content or the visual effects can be applied to a media content item (e.g., a photo or video) at user system102for communication in a message, or applied to video content, such as a video content stream or feed transmitted from an interaction client104. As such, the image processing system202may interact with, and support, the various subsystems of the communication system208, such as the messaging system210and the video communication system212.

A media overlay may include text or image data that can be overlaid on top of a photograph taken by the user system102or a video stream produced by the user system102. In some examples, the media overlay may be a location overlay (e.g., Venice beach), a name of a live event, or a name of a merchant overlay (e.g., Beach Coffee House). In further examples, the image processing system202uses the geolocation of the user system102to identify a media overlay that includes the name of a merchant at the geolocation of the user system102. The media overlay may include other indicia associated with the merchant. The media overlays may be stored in the databases128and accessed through the database server126.

In some examples, the augmentation system206is configured to provide access to AR components that can be implemented using a programming language suitable for application development, such as, e.g., JavaScript or Java and that are identified in the messaging server system by respective AR component identifiers. An AR component may include or reference various image processing operations corresponding to an image modification, filter, media overlay, transformation, and the like. These image processing operations can provide an interactive experience of a real-world environment, where objects, surfaces, backgrounds, lighting etc., captured by a digital image sensor or a camera, are enhanced by computer-generated perceptual information. In this context an AR component comprises the collection of data, parameters, and other assets needed to apply a selected augmented reality experience to an image or a video feed.

In some embodiments, an AR component includes modules configured to modify or transform image data presented within a graphical user interface (GUI) of a client device in some way. For example, complex additions or transformations to the content images may be performed using AR component data, such as adding rabbit ears to the head of a person in a video clip, adding floating hearts with background coloring to a video clip, altering the proportions of a person's features within a video clip, or many numerous other such transformations. This includes both real-time modifications that modify an image as it is captured using a camera associated with a client device and then displayed on a screen of the client device with the AR component modifications, as well as modifications to stored content, such as video clips in a gallery that may be modified using AR components.

Various augmented reality functionality that may be provided by an AR component include detection of objects (e.g. faces, hands, bodies, cats, dogs, surfaces, objects, etc.), tracking of such objects as they leave, enter, and move around the field of view in video frames, and the modification or transformation of such objects as they are tracked. In various embodiments, different methods for achieving such transformations may be used. For example, some embodiments may involve generating a 3D mesh model of the object or objects, and using transformations and animated textures of the model within the video to achieve the transformation. In other embodiments, tracking of points on an object may be used to place an image or texture, which may be two dimensional or three dimensional, at the tracked position. In still further embodiments, neural network analysis of video frames may be used to place images, models, or textures in content (e.g. images or frames of video). AR component data thus refers to both to the images, models, and textures used to create transformations in content, as well as to additional modeling and analysis information needed to achieve such transformations with object detection, tracking, and placement.

The image processing system202provides a user-based publication platform that enables users to select a geolocation on a map and upload content associated with the selected geolocation. The user may also specify circumstances under which a particular media overlay should be offered to other users. The image processing system202generates a media overlay that includes the uploaded content and associates the uploaded content with the selected geolocation.

The augmentation creation system214supports augmented reality developer platforms and includes an application for content creators (e.g., artists and developers) to create and publish augmentations (e.g., augmented reality experiences) of the interaction client104. The augmentation creation system214provides a library of built-in features and tools to content creators including, for example custom shaders, tracking technology, and templates.

In some examples, the augmentation creation system214provides a merchant-based publication platform that enables merchants to select a particular augmentation associated with a geolocation via a bidding process. For example, the augmentation creation system214associates a media overlay of the highest bidding merchant with a corresponding geolocation for a predefined amount of time.

A communication system208is responsible for enabling and processing multiple forms of communication and interaction within the interaction system100and includes a messaging system210, an audio communication system216, and a video communication system212. The messaging system210is responsible for enforcing the temporary or time-limited access to content by the interaction clients104. The messaging system210incorporates multiple timers (e.g., within an ephemeral timer system218) that, based on duration and display parameters associated with a message or collection of messages (e.g., a story), selectively enable access (e.g., for presentation and display) to messages and associated content via the interaction client104. Further details regarding the operation of the ephemeral timer system218are provided below. The audio communication system216enables and supports audio communications (e.g., real-time audio chat) between multiple interaction clients104. Similarly, the video communication system212enables and supports video communications (e.g., real-time video chat) between multiple interaction clients104.

A user management system220is operationally responsible for the management of user data and profiles, and includes a social network system222that maintains information regarding relationships between users of the interaction system100.

A collection management system224is operationally responsible for managing sets or collections of media (e.g., collections of text, image video, and audio data). A collection of content (e.g., messages, including images, video, text, and audio) may be organized into an “event gallery” or an “event story.” Such a collection may be made available for a specified time period, such as the duration of an event to which the content relates. For example, content relating to a music concert may be made available as a “story” for the duration of that music concert. The collection management system224may also be responsible for publishing an icon that provides notification of a particular collection to the user interface of the interaction client104. The collection management system224includes a curation function that allows a collection manager to manage and curate a particular collection of content. For example, the curation interface enables an event organizer to curate a collection of content relating to a specific event (e.g., delete inappropriate content or redundant messages). Additionally, the collection management system224employs machine vision (or image recognition technology) and content rules to curate a content collection automatically. In certain examples, compensation may be paid to a user to include user-generated content into a collection. In such cases, the collection management system224operates to automatically make payments to such users to use their content.

An external resource system230provides an interface for the interaction client104to communicate with remote servers (e.g., third-party servers112) to launch or access external resources, i.e., applications or applets. Each third-party server112hosts, for example, a markup language (e.g., HTML5) based application or a small-scale version of an application (e.g., game, utility, payment, or ride-sharing application). The interaction client104may launch a web-based resource (e.g., application) by accessing the HTML5 file from the third-party servers112associated with the web-based resource. Applications hosted by third-party servers112are programmed in JavaScript leveraging a Software Development Kit (SDK) provided by the interaction servers124. The SDK includes Application Programming Interfaces (APIs) with functions that can be called or invoked by the web-based application. The interaction servers124host a JavaScript library that provides a given external resource access to specific user data of the interaction client104. HTML5 is an example of technology for programming games, but applications and resources programmed based on other technologies can be used.

To integrate the functions of the SDK into the web-based resource, the SDK is downloaded by the third-party server112from the interaction servers124or is otherwise received by the third-party server112. Once downloaded or received, the SDK is included as part of the application code of a web-based external resource. The code of the web-based resource can then call or invoke certain functions of the SDK to integrate features of the interaction client104into the web-based resource.

The SDK stored on the interaction server system110effectively provides the bridge between an external resource (e.g., applications106or applets) and the interaction client104. This gives the user a seamless experience of communicating with other users on the interaction client104while also preserving the look and feel of the interaction client104. To bridge communications between an external resource and an interaction client104, the SDK facilitates communication between third-party servers112and the interaction client104. A WebViewJavaScriptBridge running on a user system102establishes two one-way communication channels between an external resource and the interaction client104. Messages are sent between the external resource and the interaction client104via these communication channels asynchronously. Each SDK function invocation is sent as a message and callback. Each SDK function is implemented by constructing a unique callback identifier and sending a message with that callback identifier.

By using the SDK, not all information from the interaction client104is shared with third-party servers112. The SDK limits which information is shared based on the needs of the external resource. Each third-party server112provides an HTML5 file corresponding to the web-based external resource to interaction servers124. The interaction servers124can add a visual representation (such as a box art or other graphic) of the web-based external resource in the interaction client104. Once the user selects the visual representation or instructs the interaction client104through a GUI of the interaction client104to access features of the web-based external resource, the interaction client104obtains the HTML5 file and instantiates the resources to access the features of the web-based external resource.

The interaction client104presents a graphical user interface (e.g., a landing page or title screen) for an external resource. During, before, or after presenting the landing page or title screen, the interaction client104determines whether the launched external resource has been previously authorized to access user data of the interaction client104. In response to determining that the launched external resource has been previously authorized to access user data of the interaction client104, the interaction client104presents another graphical user interface of the external resource that includes functions and features of the external resource. In response to determining that the launched external resource has not been previously authorized to access user data of the interaction client104, after a threshold period of time (e.g., 3 seconds) of displaying the landing page or title screen of the external resource, the interaction client104slides up (e.g., animates a menu as surfacing from a bottom of the screen to a middle or other portion of the screen) a menu for authorizing the external resource to access the user data. The menu identifies the type of user data that the external resource will be authorized to use. In response to receiving a user selection of an accept option, the interaction client104adds the external resource to a list of authorized external resources and allows the external resource to access user data from the interaction client104. The external resource is authorized by the interaction client104to access the user data under an OAuth2framework.

The interaction client104controls the type of user data that is shared with external resources based on the type of external resource being authorized. For example, external resources that include full-scale applications (e.g., an application106) are provided with access to a first type of user data (e.g., two-dimensional avatars of users with or without different avatar characteristics). As another example, external resources that include small-scale versions of applications (e.g., web-based versions of applications) are provided with access to a second type of user data (e.g., payment information, two-dimensional avatars of users, three-dimensional avatars of users, and avatars with various avatar characteristics). Avatar characteristics include different ways to customize a look and feel of an avatar, such as different poses, facial features, clothing, and so forth.

Data Architecture

FIG.3is a schematic diagram illustrating data structures300, which may be stored in the database304of the interaction server system110, according to certain examples. While the content of the database304is shown to comprise multiple tables, it will be appreciated that the data could be stored in other types of data structures (e.g., as an object-oriented database).

The database304includes message data stored within a message table306. This message data includes, for any particular message, at least message sender data, message recipient (or receiver) data, and a payload. Further details regarding information that may be included in a message, and included within the message data stored in the message table306, are described below with reference toFIG.3.

An entity table308stores entity data, and is linked (e.g., referentially) to an entity graph310and profile data302. Entities for which records are maintained within the entity table308may include individuals, corporate entities, organizations, objects, places, events, and so forth. Regardless of entity type, any entity regarding which the interaction server system110stores data may be a recognized entity. Each entity is provided with a unique identifier, as well as an entity type identifier (not shown).

The entity graph310stores information regarding relationships and associations between entities. Such relationships may be social, professional (e.g., work at a common corporation or organization), interest-based, or activity-based, merely for example. Certain relationships between entities may be unidirectional, such as a subscription by an individual user to digital content of a commercial or publishing user (e.g., a newspaper or other digital media outlet, or a brand). Other relationships may be bidirectional, such as a “friend” relationship between individual users of the interaction system100.

Certain permissions and relationships may be attached to each relationship, and also to each direction of a relationship. For example, a bidirectional relationship (e.g., a friend relationship between individual users) may include authorization for the publication of digital content items between the individual users, but may impose certain restrictions or filters on the publication of such digital content items (e.g., based on content characteristics, location data or time of day data). Similarly, a subscription relationship between an individual user and a commercial user may impose different degrees of restrictions on the publication of digital content from the commercial user to the individual user, and may significantly restrict or block the publication of digital content from the individual user to the commercial user. A particular user, as an example of an entity, may record certain restrictions (e.g., by way of privacy settings) in a record for that entity within the entity table308. Such privacy settings may be applied to all types of relationships within the context of the interaction system100, or may selectively be applied to certain types of relationships.

The profile data302stores multiple types of profile data about a particular entity. The profile data302may be selectively used and presented to other users of the interaction system100based on privacy settings specified by a particular entity. Where the entity is an individual, the profile data302includes, for example, a user name, telephone number, address, settings (e.g., notification and privacy settings), as well as a user-selected avatar representation (or collection of such avatar representations). A particular user may then selectively include one or more of these avatar representations within the content of messages communicated via the interaction system100, and on map interfaces displayed by interaction clients104to other users. The collection of avatar representations may include “status avatars,” which present a graphical representation of a status or activity that the user may select to communicate at a particular time.

The database304also stores augmentation data, such as overlays or filters, in an augmentation table312. The augmentation data is associated with and applied to videos (for which data is stored in a video table314) and images (for which data is stored in an image table316).

Another type of filter is a data filter, which may be selectively presented to a sending user by the interaction client104based on other inputs or information gathered by the user system102during the message creation process. Examples of data filters include current temperature at a specific location, a current speed at which a sending user is traveling, battery life for a user system102, or the current time.

Other augmentation data that may be stored within the image table316includes augmented reality content items (e.g., corresponding to applying “lenses” or augmented reality experiences). An augmented reality content item may be a real-time special effect and sound that may be added to an image or a video). In some examples, the augmentation data is used by various AR components, including the AR component. An example of augmentation data is a target media content object, which may be associated with an AR component and used to generate an AR experience for a user, as described above.

Another example of augmentation data is augmented reality (AR) tools that can be used in AR components to effectuate image transformations. Image transformations include real-time modifications, which modify an image (e.g., a video frame) as it is captured using a digital image sensor of a client device. The modified image is displayed on a screen of the client device with the modifications. AR tools may also be used to apply modifications to stored content, such as video clips or still images stored in a gallery. In a client device with access to multiple AR tools, a user can apply different AR tools (e.g., by engaging different AR components configured to utilize different AR tools) to a single video clip to see how the different AR tools would modify the same video clip. For example, multiple AR tools that apply different pseudorandom movement models can be applied to the same captured content by selecting different AR tools for the same captured content. Similarly, real-time video capture may be used with an illustrated modification to show how video images currently being captured by a digital image sensor of a camera provided with a client device would modify the captured data. Such data may simply be displayed as part of a preview feature (e.g., displayed on the screen and not stored in memory), or the content captured by digital image sensor may be recorded and stored in memory with or without the modifications (or both). A messaging client can be configured to include a preview feature that can show how modifications produced by different AR tools will look, within different windows in a display at the same time. This can, for example, permit a user to view multiple windows with different pseudorandom animations presented on a display at the same time.

A collection may also constitute a “live story,” which is a collection of content from multiple users that is created manually, automatically, or using a combination of manual and automatic techniques. For example, a “live story” may constitute a curated stream of user-submitted content from various locations and events. Users whose client devices have location services enabled and are at a common location event at a particular time may, for example, be presented with an option, via a user interface of the interaction client104, to contribute content to a particular live story. The live story may be identified to the user by the interaction client104, based on his or her location. The end result is a “live story” told from a community perspective.

As mentioned above, the video table314stores video data that, in some examples, is associated with messages for which records are maintained within the message table306. Similarly, the image table316stores image data associated with messages for which message data is stored in the entity table308. The entity table308may associate various augmentations from the augmentation table312with various images and videos stored in the image table316and the video table314.

Data Communications Architecture

FIG.4is a schematic diagram illustrating a structure of a message400, according to some examples, generated by an interaction client104for communication to a further interaction client104via the interaction servers124. The content of a particular message400is used to populate the message table306stored within the database304, accessible by the interaction servers124. Similarly, the content of a message400is stored in memory as “in-transit” or “in-flight” data of the user system102or the interaction servers124. A message400is shown to include the following example components:Message identifier402: a unique identifier that identifies the message400.Message text payload404: text, to be generated by a user via a user interface of the user system102, and that is included in the message400.Message image payload406: image data, captured by a camera component of a user system102or retrieved from a memory component of a user system102, and that is included in the message400. Image data for a sent or received message400may be stored in the image table316.Message video payload408: video data, captured by a camera component or retrieved from a memory component of the user system102, and that is included in the message400. Video data for a sent or received message400may be stored in the image table316.Message audio payload410: audio data, captured by a microphone or retrieved from a memory component of the user system102, and that is included in the message400.Message augmentation data412: augmentation data (e.g., filters, stickers, or other annotations or enhancements) that represents augmentations to be applied to message image payload406, message video payload408, or message audio payload410of the message400. Augmentation data for a sent or received message400may be stored in the augmentation table312.Message duration parameter414: parameter value indicating, in seconds, the amount of time for which content of the message (e.g., the message image payload406, message video payload408, message audio payload410) is to be presented or made accessible to a user via the interaction client104.Message geolocation parameter416: geolocation data (e.g., latitudinal and longitudinal coordinates) associated with the content payload of the message. Multiple message geolocation parameter416values may be included in the payload, each of these parameter values being associated with respect to content items included in the content (e.g., a specific image within the message image payload406, or a specific video in the message video payload408).Message story identifier418: identifier values identifying one or more content collections (e.g., “stories” identified in the story table318) with which a particular content item in the message image payload406of the message400is associated. For example, multiple images within the message image payload406may each be associated with multiple content collections using identifier values.Message tag420: each message400may be tagged with multiple tags, each of which is indicative of the subject matter of content included in the message payload. For example, where a particular image included in the message image payload406depicts an animal (e.g., a lion), a tag value may be included within the message tag420that is indicative of the relevant animal. Tag values may be generated manually, based on user input, or may be automatically generated using, for example, image recognition.Message sender identifier422: an identifier (e.g., a messaging system identifier, email address, or device identifier) indicative of a user of the user system102on which the message400was generated and from which the message400was sent.Message receiver identifier424: an identifier (e.g., a messaging system identifier, email address, or device identifier) indicative of a user of the user system102to which the message400is addressed.

The contents (e.g., values) of the various components of message400may be pointers to locations in tables within which content data values are stored. For example, an image value in the message image payload406may be a pointer to (or address of) a location within an image table316. Similarly, values within the message video payload408may point to data stored within an image table316, values stored within the message augmentation data412may point to data stored in an augmentation table312, values stored within the message story identifier418may point to data stored in a story table318, and values stored within the message sender identifier422and the message receiver identifier424may point to user records stored within an entity table308.

Process Flow and User Interfaces

FIG.5is a flowchart of a method500as implemented by a context-aware lighting system228, according to some examples. In some examples, method500improves an image quality for an image previewed or captured by a camera of a computing device. The method500can be performed by processing logic that comprises hardware (e.g., dedicated logic, programmable logic, microcode, etc.), software, or a combination of both. Although the described flowchart shows operations as a sequential process, many of the operations can be performed in parallel or concurrently. In addition, the order of the operations may be re-arranged. The operations of methods can be performed in whole or in part, can be performed in conjunction with some or all of the operations in other methods, and can be performed by any number of different systems, such as the systems described herein, or any portion thereof, such as a processor included in any of the systems.

At operation502, a computing device causes presentation of a camera view UI on a display device, or on the computing device (e.g., using the camera view UI system226ofFIG.2). The camera view UI comprises an output of a digital image sensor of a camera. In some examples, the camera view UI detects that the camera is a front-facing camera. In some examples, the camera view UI comprises a shutter element that can be selected by a user to capture the output of the digital image sensor of the camera.

At operation504, the computing device analyzes the image corresponding to the output of the digital image sensor of the camera to detect a face. In some examples, the computing device uses a generic face detector to detect the face in the image. In some examples, the computing device uses a platform-specific face detector to detect the face in the image. The platform-specific face detector can be developed and/or customized for a specific platform. For example, a platform-specific face detector can be a vendor-provided face detector customized depending on the requirements of the platform. Examples of vendor-provided face detectors include those available from Google Mobile Services (GMS), Huawei Mobile Services (HMS), ML Kit, or other vendors. Such face detectors can automatically detect faces and/or corresponding bounding boxes while analyzing camera frames at an acceptable rate. In some examples, the computing device uses a generic face tracking module, or a platform-specific face tracking module. The platform-specific face tracking module can be developed and/or customized for a specific platform. The face detector module and the face tracking module can be provided by the same vendor or by different vendors. For example, the computing device can use a HMS face detector and a face tracking module available from Snap's Lens Studio. While operation504refers to a face detection operation, the computing device can use detection and/or tracking modules to detect and/or track other entities to be illuminated, such as an animal (e.g., a dog or a cat), a book, a utensil, a cosmetic product, and so forth.

At operation506, the computing device generates a ring light that includes a non-opaque portion and/or a portion of a color with a predetermined lightness. The non-opaque portion includes a ring shape with an associated ring size and/or position. Illustrative examples in the disclosure herein refer to circle ring shapes or ellipse ring shapes, but “ring” refers, without loss of generality, to other shapes such as a circle, a ellipse, square, triangle, rectangle, star, diamond, or other shapes. In some examples, the ring shape with the associated ring size corresponds to an inner ring shape included in the non-opaque portion which can extend farther in one or more directions. In some examples, the non-opaque portion can have an inner ring shape and/or an outer ring shape of the same or different shape types.

In some examples, the ring size and/or position of the ring shape can be selected or adjusted by the user via a composer widget or ring light widget. In some examples, the ring size and/or position of ring shape are determined based on characteristics of an image portion that includes the detected face. Example characteristics include facial landmarks automatically detected by the face detection and/or tracking module (e.g., shown as numbered points inFIG.11), or a bounding box for the detected face. The bounding box can be determined based on the automatically detected landmarks, as described at least inFIG.11andFIG.13. The computing device can use the automatically detected facial landmarks and/or the dimensions of the bounding box to compute an inner radius that determines the ring size of the ring shape (see at leastFIG.6andFIG.13for details).

The position of the ring shape can refer to a center position of the ring shape that is determined, as mentioned above, based on the image portion including the detected face. Automatically detected facial landmarks can be used to determine a set of center offset coordinates with respect to the center of the image and/or screen. The center offset coordinates indicate the center position of the ring shape. If the computing device does not detect a face, or if the face detection and/or tracking are deactivated, the center position is set to the center of the image or center of the screen. If the ring light, for example via the ring shape, had already been positioned and/or centered, but needs to be re-centered towards the center of the image or the screen (e.g., due to the deactivation of face detection and/or tracking), the ring light can be re-centered with a predetermined delay (e.g., a 100 milliseconds delay), in order to create a smoother experience for the user.

In some examples, the non-opaque portion of the ring light can be fully transparent, semi-transparent, have a maximum opacity level (over all the corresponding pixels) lower than a predetermined threshold, and so forth. In some examples, the non-opaque portion of the ring light has pixels with the same opacity levels or with varying opacity levels (seeFIG.6for more details).

In some examples, the ring light includes a portion of a color of a certain or predetermined lightness, which helps illuminate an object (e.g., a face) detected in the output of the digital image sensor of the camera. Lightness defines a range from dark (0% or fully shaded) to fully illuminated (100% or fully tinted). The portion of a color with a predetermined lightness can cover a predetermined area along the perimeter of the camera view UI (e.g., corresponding to a background area for the ring light), can have a ring shape, can surround, overlap with, or include the non-opaque portion. In some examples, the portion of a color with a predetermined lightness can include multiple lightness levels, which can be automatically selected and/or selected and/or adjusted via a user-selectable UI element. In some examples, the portion of a color with a predetermined lightness can include one or more opaque or almost opaque portions, such as an opaque area along the perimeter of the camera view UI, or an opaque ring shape. The portion of a color with a predetermined lightness can surround, partially or completely, the non-opaque portion, it can be adjacent to the non-opaque portion, and so forth (see, e.g.,FIG.9).

In some examples, the ring light is configured using at least one base color parameter. A base color can correspond to a color of one or more ring light portions, such as a non-opaque portion or a fragment thereof, a portion of a color of predetermined lightness or a fragment thereof, and so forth. Multiple base colors with one or more levels of predetermined lightness can be used for different portions or fragments of the ring light—furthermore, the portions or fragments can have one or more opacity (or transparency) levels. Base color(s) can be preselected, or customized by a user using a UI element such as a slider, color picker, composer widget, ring light widget or other user-actionable UI elements (e.g., seeFIG.6for additional details).

At operation508, the computing device causes the display of the ring light over the camera view UI. This operation includes displaying the non-opaque portion including the ring shape with determined ring size and/or centered at a position determined based on characteristics of the image portion including the detected face. In some examples, this operation includes displaying the portion of a color of a predetermined lightness. In some examples, this operation includes displaying additional aspects of the ring light determined as described in the disclosure herein (see, e.g.,FIG.6below).

The context-aware lighting system228can operate independently of several data types not directly pertinent to its function of adjusting the ring size of the ring light. For example, environmental factors like temperature or humidity are not required for ring size control, and neither are the physical orientation and/or position of the device and/or settings related to external lighting equipment. Additionally, the system can be self-contained and not depend on the device's network connectivity or GPS location, or camera settings such as those for video recording or audio capture. The context-aware lighting system228can dynamically adjust the virtual ring light based on real-time image analysis that includes the detection of faces within the image and/or their characteristics to optimize photo quality, without the need for external inputs or user-configured settings. Alternatively, one or more of the several data types listed above or additional data types can be used to further configure the ring light. For example, settings predetermined by the user or automatically derived based on user feedback can help personalize the ring size associated with a ring light for a specific user. The context-aware lighting system228can elicit, receive, save and/or use custom lighting profiles that can be quickly applied to different scenarios or preferences (e.g., night-time vs. day-time, indoors versus outdoors, formal or informal scenario, etc.). In some examples. The context-aware lighting system228can use mood lighting presets that can evoke certain emotions or atmospheres, such as warm tones for a cozy feel or cool tones for a professional look.

In some examples, the system can automatically analyze not just a user face but also background objects by identifying their object type, shapes, sizes and/or colors. The system can further adjust the ring size and/or shape based on the additional identified objects. In some examples, the system can recommend adjustments to a base color based on identified color(s) of the background objects (to match or contrast the identified color(s)).

FIG.6is a diagrammatic representation of a view of a context-aware lighting system228, according to some examples. The context-aware lighting system228includes all or some of the depicted components, arranged in the same ways or in a different order. In some examples, the context-aware lighting system228includes additional components.

In some examples, the context-aware lighting system228uses AR components or experiences (e.g., a “lens”) and/or AR tools such as custom pixel shaders, face detection and/or face tracking to create a customizable ring light lens that implements a customizable ring light. The used AR components and/or AR tools can be provided, for example, by augmentation system206or augmentation creation system214inFIG.2.

In some examples, the context-aware lighting system228configures color and/or opacity levels of a ring light by determining a RGBA color for pixels in the ring light. The RGBA color for a pixel has an RGB component indicating the color, and an alpha value, or opacity value, indicating the opacity of the pixel. In some examples, the context-aware lighting system228uses pixel shader612to determine and/or output the final RGBA color for ring light pixels. The pixel shader612receives a RGB component value from a base color module606, and/or an alpha value (or opacity value) from an opacity computation module608. The base color module606receives a base color that determines the RGB component value from a ring light widget602. The opacity computation module608uses a radial gradient module610to compute an opacity value by using at least a scale factor (e.g., received from a ring light widget602), an inner radius, and/or a set of center offset coordinates determined based on a set of facial landmark coordinates (e.g., received from a face detection and/or tracking module604). As further detailed below, the context-aware lighting system228thus uses the opacity computation module608to generate a non-opaque portion of the ring light including a ring shape whose ring size and/or center position are determined based on characteristics of the image portion corresponding to the detected face. The context-aware lighting system228can use the pixel shader612, the base color module606, and/or a brightness (or lightness) setting functionality (e.g., the brightness sub-graph functionality available from the Materials library in Snap's Lens Studio) to generate a portion of the ring light with a color of a predetermined lightness.

Pixel RGB Value

In some examples, the base color module606uses at least one input base color to determine the RGB component value supplied to the pixel shader612. The at least one input base color can be set to one of a number of default base colors, or be chosen or updated by a user by means of a user-selectable UI element such as a slider, a tone picker, or a color picker that is part of ring light widget602.

Given the at least one input base color, the base color module606can perform color-related transformations to determine the RGB component value. The color-related transformations can include blending multiple supplied base colors, or blending a base color with an additional tone or color. For example, the base color module606can use a tone parameter with values such as “cold”, “warm”, or “neutral” to modify one of a set of base colors. Tones, or colors included in a set for the user to select amongst can be configured, ranked or recommended to compliment a particular user's skin tone, or a wide variety of user skin tones.

In some examples, the base color module606and/or pixel shader612can automatically adjust the lightness or brightness of a pixel's RGB component value. In some examples, this can be done by automatically modifying (increasing, reducing, multiplying or dividing) the R, G, B values by a pre-determined constant or percentage. In some examples, the base color module606and/or pixel shader612can convert the RGB component to the HSL (Hue, Saturation, Lightness) color space, directly modify the lightness value and convert back to the RGB space. By adjusting the lightness or brightness of pixels' RGB component values, the context-aware lighting system228can generate one or more portions of the ring light with a color of a pre-determined lightness.

Pixel Opacity

In some examples, the opacity computation module608configures the appearance of the ring light by determining or adjusting opacity values for one or more of the ring light pixels. The opacity computation module608takes as input a scale factor from the ring light widget602. The opacity computation module608takes as input a set of facial landmark coordinates from face detection and/or tracking module604(see, e.g.,FIG.11for example facial landmarks). The opacity computation module608determines the opacity values using a radial gradient module610that uses a radial gradient computation to adjust the opacity value (the alpha value) of pixels. Opacity value computation for a given pixel uses one or more of a first opacity value, a second opacity value, an inner radius, a set of center offset coordinates, a scale factor, a softness value, or other parameters.

Radial gradient computations are graphical computations that can interpolate values (e.g., color values and/or opacity values) between two circles, from an inner circle boundary associated with an inner radius to an outer circle boundary associated with an outer radius. The inner and outer circles can be concentric. In some examples, additional concentric circles can be used. A radial gradient computation can take as input a sequence of values, including at least a first value corresponding to the inner circle and a second value corresponding to the outer circle. In some examples, additional values in the sequence correspond to additional circles. The radial gradient computation calculates a value for a pixel based on at least the first value, the second value and/or the relative distance of the pixel from the center of the two circles. In some examples, radial gradient computations can also take as input an inner radius, a first value, a second value, and/or other parameters controlling the rate of change from the first value to the second value (e.g., a softness value, etc.). In some examples, the inner radius is a value between 0 and 1. In some examples, an outer radius can be a value between 0 and 1. In some examples, the outer radius can be set to 1, allowing for the inner radius to control the start of the color transition or opacity transition. In some examples, the outer radius can be automatically determined based on the inner radius, and/or omitted. In some examples, radial gradient computations can result in one or more ellipse shapes rather than circle shapes. For examples, the radial gradient computation can take inputs associated with an ellipse width and/or ellipse height. In some examples, the radial gradient computation can automatically use a specified inner radius and a selected “ellipse” setting to derive a height and width for an ellipse (e.g., by constructing a second radius via multiplication by a pre-set factor, etc.).

In the context of the ring light's appearance, the radial gradient module610enables a transition from the first opacity value to the second opacity value along a direction of increasing distance from a point given by the center offset coordinates (e.g., the center offset point). In some examples, the inner radius controls the start of the transition; for example, the first opacity value can be the same from the center offset point to the end of inner radius (in every direction). An example first opacity value is 0%, corresponding to complete transparency or lack of opacity. Alternatively, a first opacity value can correspond to a high degree of transparency (e.g., indicated by a 2%, 3%, 4%/etc. opacity value). An example second opacity value can be 100%, corresponding to complete opacity, or lack of transparency. Therefore, the radial gradient module610can generate a non-opaque portion of a ring light including a ring shape whose ring size is determined based on an inner radius (see, e.g.,FIG.10, for two examples of ring lights based on different inner radius values). In some examples, the non-opaque portion can overlap with or be surrounded by a portion of a color of a predetermined lightness (e.g., see above for computing RGB component values and/or determining color lightness). As mentioned above, the ring shape can be a circle, an ellipse, or another shape. In some examples, the context-aware lighting228can modify a shape produced using a radial gradient computation in one or more post-processing operations to resize it, or to impose a different pre-selected shape such as a triangle, rectangle, star, diamond, and so forth.

In some examples, the softness value parameter controls the smoothness/sharpness of the transition from the first opacity value to the second opacity value. For example, the lower the softness value, the sharper or more abrupt the transition will be.

In some examples, the center offset coordinates and/or inner radius are automatically determined based on characteristics of an image portion including the detected face, such as the facial landmark coordinates illustrated inFIG.11. For example, the center offset coordinates can be chosen to be those of landmark no. 27, or those of landmark no. 30. In some examples, the inner radius is computed based on an automatically determined face radius computed based on the facial landmark coordinates as further detailed inFIG.13.

In some examples, the ring size of the ring shape can be further based on a scale factor parameter that multiplies the inner radius parameter. The scale factor parameter can be pre-set, or selected and/or adjusted by means of a user-selectable element such as a scale factor slider (e.g. in ring light widget602). The scale factor value can be inversely proportional to the value of the inner radius. The scale factor value can be a value between 0.0 and 1.0.

In some examples, the radial gradient module610uses the Radial-Gradient computation in the Sub-graph Library in Snap's Lens Studio. In some examples, the radial gradient module610can use additional radial gradient computation, such as the RadialGradient class from the android.graphics library, radial gradient classes from System. Windows. Media, and so forth.

In some examples, the context-aware lighting system228can use multiple pixel shaders, each determining and outputting RGBA colors for different or overlapping subsets of pixels in the ring light. Multiple base color modules and/or opacity computation modules can be used, each of multiple pixel shaders receiving RGB component and, respectively, opacity value inputs from additional base color modules and/or opacity computation modules. RGBA color(s) for one or more pixels in the ring light can be computed by one or more multiple pixel shaders, whose outputs are combined using one more combination function(s) (e.g., MIN, AVG, and other combination functions).

In some examples, the radial gradient can be adjusted based on detected ambient light or environmental factors, ensuring that the lighting enhancement remains of good quality in varying conditions. In some examples, the context-aware lighting system228enables the user to control the gradient directly within the UI—for example, users can customize the lighting effects according to their preferences, making the camera UI more user-friendly and/or personalized. In some examples, the lighting system228incorporates blending modes, allowing the radial gradient to interact with the content in various ways, such as softening the light or creating dramatic effects.

Single and/or Multiple Face Detection

As seen above, the facial landmark coordinates used by opacity computation module608can be supplied by a face detection and/or tracking module604. The face detection and/or tracking module604detects a face in an image corresponding to the output of a digital sensor of a camera, and/or computes characteristics of the image portion including the detected face. The face detection and/or tracking module604can be one or multiple modules (e.g., a module responsible for face detection, a module responsible for face tracking, a module performing both functions, etc.). The face detection and/or tracking module604can use functionality provided by an augmentation system206, such as face tracking functionality. The face detection and/or tracking functionality detects and/or tracks a face, but, for privacy purposes, does not perform face recognition to recognize or track a specific user.

In some examples, the context-aware lighting system228can detect a second face in the image corresponding to the output of digital sensor of a camera. If a second face is detected, the opacity computation module608uses a second radial gradient module (not shown) with a second set of parameters, including a second center offset point and a second inner radius value. The second inner radius and/or second center offset point can be derived based on the second image portion including the second detected face as described above for the inner radius and/or center offset point in the context of the first detected face. Thus, a second non-opaque portion with a second ring size and a second position can be configured as part of the same ring light or as part of a second ring light. A second portion of a second color with a second predetermined lightness can also be configured, as part of the same ring light, or as part of the second ring light. In some examples the second color and/or second predetermined lightness are the same as the color and/or predetermined lightness for the initial portion. The second portion of the second color with the second predetermined lightness can have properties similar to the first portion—for example, it can be adjacent to, or partially or completely surround the second non-opaque portion, it can be partially or completely opaque, and so forth.

The second radial gradient module can operate independently of or in conjunction with the first radial gradient module.

When using two (or more) radial gradient modules, the opacity computation module608can determine the opacity value of a given pixel based on a combination function that uses the opacity values computed by the multiple radial gradient modules. Example combination functions include MIN, AVG, or other combination functions.

By using additional radial gradient modules, the context-aware lighting system228configures additional ring lights and/or additional or enlarged non-opaque portions of the ring light based on additional image portions including additional detected faces.FIG.12shows an example of when two faces are detected, and a ring light is appropriately configured to not occlude either of the two faces.

In some examples, a ring light implemented, created and/or customized via a ring light lens and/or the use of AR functionality can be configured to have additional texture, aspect and/or motion effects made possible by AR content, effects and/or tools. For example, a ring light lens can include AR effects such as a fog light effect, a shimmering effect, a moving particle effect, or other effects. AR effects could be used to add virtual objects or effects that interact with the lighting, such as reflections or shadows, to create a more immersive experience. In some examples, AR modifications and/or AR content items resulting from applying a ring light lens to a digital image sensor output of a camera can be displayed as part of a preview feature. Such a preview feature corresponds to the AR modifications and/or content items being displayed on a screen of a computing device, but not stored in memory. In some examples, the content captured by digital image sensor, with or without the AR modifications and/or AR content items, can be recorded and/or stored in memory.

In some examples, a ring light can be generated and/or activated via a flash icon or an equivalent user selectable UI element presented in the camera view UI. In the case of a ring light lens, user selection (e.g., via touching of the flash icon), will result in the download and activation of the ring light lens on a computing device as soon as the lens is available. In some examples, the lens-based ring light is displayed in the camera view UI, overlaid for example on top of an image visible in a camera viewfinder or as part of the camera view UI. If the ring light lens is unavailable, a backup ring light can be generated at the camera level and/or presented in the camera view UI.

In some examples, a context-aware lighting system228can use a hybrid implementation that combines camera functionality with AR experiences. Such an implementation can use an “empty” lens corresponding to a lens AR experience that does not add any image or sound effects to an image, but is used to access face detection and/or tracking functionality provided by an augmentation system206or augmentation creation system214(e.g., provided by Snap's Lens Core). The context-aware lighting system228uses the results of the face detection and/or tracking to determine an appropriate ring size ensuring that the ring light is not opaque over the detected face or faces. The configured ring light can be rendered directly in the camera. Therefore, a hybrid context-aware lighting system can use a combination of an AR experience as a means of accessing facial awareness-related AR tools, and the camera as a means of rendering the ring light.

FIG.7is an illustration of lighting system outputs, according to some examples. A first example ring light is not face-aware, and thus shows an amount of occlusion of the face present in the image. For example, part of the forehead is occluded. A second example ring light is face-aware, and the face is not occluded.

FIG.8is an illustration of lighting system outputs, according to some examples. A first panel shows an example of a ring light not benefitting from face detection, and therefore showing occlusion of a present face. A second panel shows a context-aware ring light, the context being the detected face in the image corresponding to the output of the digital image sensor of the camera. As illustrated, the detected face is not occluded by the ring light.FIG.8also illustrates the context-aware lighting system228accommodating a detected face that is not centrally located.

FIG.9is an illustration of lighting system outputs with different base colors, according to some examples. The illustrated ring lights can exhibit not just different base colors, but different textures, materials, patterns, or other.

FIG.10is an illustration of lighting system outputs with different ring sizes, according to some examples. A first ring light has a non-opaque portion including an inner ring shape whose size is based on an inner radius of 0.2. A second ring light has a non-opaque portion including an inner ring shape whose size is based on an inner radius of 0.7.

FIG.11is an illustration of an output of a face detection and/or tracking module, according to some examples.FIG.11illustrates facial landmarks automatically detected during or after the detection of a face in an image. The facial landmarks are indicated by the numbers in the illustration. Context-aware lighting system228can use landmark27, landmark30, or other landmarks to determine a set of center offset coordinates. The context-aware lighting system228can determine the bounding box of the detected face as being indicated by landmarks {0, 16, 8, 71}. As seen inFIG.13, facial landmarks and/or bounding box information can be used to determine an inner radius that determines the ring size associated with the ring shape in the non-opaque portion of the ring light.

FIG.12is an illustration of lighting system outputs, according to some examples.FIG.12illustrates ring lights generated in three cases: a case where no face is detected, a case in which one face is detected, and a case in which two faces are detected.

In the first case, the illustrated ring light includes a non-opaque portion centered around the center of the image, The ring light is not context-aware (e.g., facially-aware), as no face was detected.

In the second case, the illustrated ring light is configured based on the characteristics of a detected face. The center position for the ring light's non-opaque portion is determined based on the detected face. The ring light does not occlude the detected face.

In the third case, the illustrated ring light accommodates an additional detected face by configuring an additional non-opaque portion corresponding to the additional image area including the additional detected face. The additional non-opaque portion is centered around an additional center position determined based on characteristics of the additional detected face. In some examples, more than two faces are detected, and the ring light is configured accordingly.

FIG.13illustrates examples of different ring sizes in the context of a detected face, according to some examples.FIG.13shows how the output of the face detection and/or tracking module can be used to determine the ring size of the ring shape included in the non-opaque portion of a ring light. During or after the detection of a face by the face detection and/or tracking module604, a set of facial landmarks and their coordinates are detected (see, e.g.,FIG.11). A bounding box for the detected face can be computed (see, e.g.,FIG.11for details). Given the bounding box, the context-aware lighting system228computes the value of a face radius as a function of the horizontal length and vertical length corresponding to the bounding box (e.g., using an average, a weighted average, or other functions). The context-aware lighting system228computes an inner radius by multiplying the face radius value using a scale factor (e.g., Rminor Rmax.). The scale factor can be pre-set and/or received via a user selection. In some examples, the scale factor can be automatically interpolated between two values Rminand Rmax(see the illustration inFIG.13). Multiplying the face radius by the scale factor can create a margin from the user's face (seeFIG.13).

In some examples, more than one scale factor can be used—for example, a first scale factor can be used to compute the inner radius while a second scale factor can be received via user selection and be used to further adjust the ring size. Thus, the inner radius and/or one or more scale factors are used by the context-aware lighting system228to determine or adjust a ring size (e.g., a circle size, an ellipse size) for a ring shape in the non-opaque portion of a ring light. For example, the system can set the opacity value for each pixel within the inner radius in each direction to 0% (or another low opacity value such as 1%, 2%, etc.). In some examples, the inner radius is used by the opacity computation module608, as described inFIG.6, to configure the ring light by varying pixel opacity values, with the inner radius and/or a scale factor being used to control the ring size of a ring shape included in the non-opaque portion.

Time-Based Access Architecture

FIG.14is a schematic diagram illustrating an access-limiting process, in terms of which access to content (e.g., an ephemeral message1402and associated multimedia payload of data) or a content collection (e.g., an ephemeral message group1404) may be time-limited (e.g., made ephemeral).

An ephemeral message1402is shown to be associated with a message duration parameter1406, the value of which determines the amount of time that the ephemeral message1402will be displayed to a receiving user of the ephemeral message1402by the interaction client104. In some examples, an ephemeral message1402is viewable by a receiving user for up to a maximum of 10 seconds, depending on the amount of time that the sending user specifies using the message duration parameter1406.

The message duration parameter1406and the message receiver identifier1408are shown to be inputs to a message timer1410, which is responsible for determining the amount of time that the ephemeral message1402is shown to a particular receiving user identified by the message receiver identifier1408. In particular, the ephemeral message1402will be shown to the relevant receiving user for a time period determined by the value of the message duration parameter1406. The message timer1410is shown to provide output to a more generalized messaging system1412, which is responsible for the overall timing of display of content (e.g., an ephemeral message1402) to a receiving user.

The ephemeral message1402is shown inFIG.14to be included within an ephemeral message group1404(e.g., a collection of messages in a personal story, or an event story). The ephemeral message group1404has an associated group duration parameter1414, a value of which determines a time duration for which the ephemeral message group1404is presented and accessible to users of the interaction system100. The group duration parameter1414, for example, may be the duration of a music concert, where the ephemeral message group1404is a collection of content pertaining to that concert. Alternatively, a user (either the owning user or a curator user) may specify the value for the group duration parameter1414when performing the setup and creation of the ephemeral message group1404.

Additionally, each ephemeral message1402within the ephemeral message group1404has an associated group participation parameter1416, a value of which determines the duration of time for which the ephemeral message1402will be accessible within the context of the ephemeral message group1404. Accordingly, a particular ephemeral message group1404may “expire” and become inaccessible within the context of the ephemeral message group1404prior to the ephemeral message group timer itself expiring in terms of the group duration parameter. The group duration parameter1414, group participation parameter1416and message receiver identifier1408each provide input to a group timer1418, which operationally determines, firstly, whether a particular ephemeral message1402of the ephemeral message group1404will be displayed to a particular receiving user and, if so, for how long. Note that the ephemeral message group1404is also aware of the identity of the particular receiving user as a result of the message receiver identifier1408.

Accordingly, the group timer1418operationally controls the overall lifespan of an associated ephemeral message group1404as well as an individual ephemeral message1402included in the ephemeral message group1404. In some examples, each and every ephemeral message1402within the ephemeral message group1404remains viewable and accessible for a time period specified by the group duration parameter1414. In a further example, a certain ephemeral message1402may expire within the context of ephemeral message group1404based on a group participation parameter1416. Note that a message duration parameter1406may still determine the duration of time for which a particular ephemeral message1402is displayed to a receiving user, even within the context of the ephemeral message group1404. Accordingly, the message duration parameter1406determines the duration of time that a particular ephemeral message1402is displayed to a receiving user regardless of whether the receiving user is viewing that ephemeral message1402inside or outside the context of an ephemeral message group1404.

The messaging system1412may furthermore operationally remove a particular ephemeral message1402from the ephemeral message group1404based on a determination that it has exceeded an associated group participation parameter1416. For example, when a sending user has established a group participation parameter1416of 24 hours from posting, the messaging system1412will remove the relevant ephemeral message1402from the ephemeral message group1404after the specified 24 hours. The messaging system1412also operates to remove an ephemeral message group1404when either the group participation parameter1416for each and every ephemeral message1402within the ephemeral message group1404has expired, or when the ephemeral message group1404itself has expired in terms of the group duration parameter1414.

Responsive to the messaging system1412determining that an ephemeral message group1404has expired (e.g., is no longer accessible), the messaging system1412communicates with the interaction system100(and, for example, specifically the interaction client104) to cause an indicium (e.g., an icon) associated with the relevant ephemeral message group1404to no longer be displayed within a user interface of the interaction client104. Similarly, when the messaging system1412determines that the message duration parameter1406for a particular ephemeral message1402has expired, the messaging system1412causes the interaction client104to no longer display an indicium (e.g., an icon or textual identification) associated with the ephemeral message1402.

Machine Architecture

FIG.15is a diagrammatic representation of the machine1500within which instructions1502(e.g., software, a program, an application, an applet, an app, or other executable code) for causing the machine1500to perform any one or more of the methodologies discussed herein may be executed. For example, the instructions1502may cause the machine1500to execute any one or more of the methods described herein. The instructions1502transform the general, non-programmed machine1500into a particular machine1500programmed to carry out the described and illustrated functions in the manner described. The machine1500may operate as a standalone device or may be coupled (e.g., networked) to other machines. In a networked deployment, the machine1500may operate in the capacity of a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. The machine1500may comprise, but not be limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a laptop computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular telephone, a smartphone, a mobile device, a wearable device (e.g., a smartwatch), a smart home device (e.g., a smart appliance), other smart devices, a web appliance, a network router, a network switch, a network bridge, or any machine capable of executing the instructions1502, sequentially or otherwise, that specify actions to be taken by the machine1500. Further, while a single machine1500is illustrated, the term “machine” shall also be taken to include a collection of machines that individually or jointly execute the instructions1502to perform any one or more of the methodologies discussed herein. The machine1500, for example, may comprise the user system102or any one of multiple server devices forming part of the interaction server system110. In some examples, the machine1500may also comprise both client and server systems, with certain operations of a particular method or algorithm being performed on the server-side and with certain operations of the particular method or algorithm being performed on the client-side.

The machine1500may include processors1504, memory1506, and input/output I/O components1508, which may be configured to communicate with each other via a bus1510. In an example, the processors1504(e.g., a Central Processing Unit (CPU), a Reduced Instruction Set Computing (RISC) Processor, a Complex Instruction Set Computing (CISC) Processor, a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Radio-Frequency Integrated Circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, a processor1512and a processor1514that execute the instructions1502. The term “processor” is intended to include multi-core processors that may comprise two or more independent processors (sometimes referred to as “cores”) that may execute instructions contemporaneously. AlthoughFIG.15shows multiple processors1504, the machine1500may include a single processor with a single-core, a single processor with multiple cores (e.g., a multi-core processor), multiple processors with a single core, multiple processors with multiples cores, or any combination thereof.

The memory1506includes a main memory1516, a static memory1518, and a storage unit1520, both accessible to the processors1504via the bus1510. The main memory1506, the static memory1518, and storage unit1520store the instructions1502embodying any one or more of the methodologies or functions described herein. The instructions1502may also reside, completely or partially, within the main memory1516, within the static memory1518, within machine-readable medium1522within the storage unit1520, within at least one of the processors1504(e.g., within the processor's cache memory), or any suitable combination thereof, during execution thereof by the machine1500.

In further examples, the I/O components1508may include biometric components1528, motion components1530, environmental components1532, or position components1534, among a wide array of other components. For example, the biometric components1528include components to detect expressions (e.g., hand expressions, facial expressions, vocal expressions, body gestures, or eye-tracking), measure biosignals (e.g., blood pressure, heart rate, body temperature, perspiration, or brain waves), identify a person (e.g., voice identification, retinal identification, facial identification, fingerprint identification, or electroencephalogram-based identification), and the like. The motion components1530include acceleration sensor components (e.g., accelerometer), gravitation sensor components, rotation sensor components (e.g., gyroscope).

With respect to cameras, the user system102may have a camera system comprising, for example, front cameras on a front surface of the user system102and rear cameras on a rear surface of the user system102. The front cameras may, for example, be used to capture still images and video of a user of the user system102(e.g., “selfies”), which may then be augmented with augmentation data (e.g., filters) described above. The rear cameras may, for example, be used to capture still images and videos in a more traditional camera mode, with these images similarly being augmented with augmentation data. In addition to front and rear cameras, the user system102may also include a 360° camera for capturing 360° photographs and videos.

Further, the camera system of the user system102may include dual rear cameras (e.g., a primary camera as well as a depth-sensing camera), or even triple, quad or penta rear camera configurations on the front and rear sides of the user system102. These multiple cameras systems may include a wide camera, an ultra-wide camera, a telephoto camera, a macro camera, and a depth sensor, for example.

Communication may be implemented using a wide variety of technologies. The I/O components1508further include communication components1536operable to couple the machine1500to a network1538or devices1540via respective coupling or connections. For example, the communication components1536may include a network interface component or another suitable device to interface with the network1538. In further examples, the communication components1536may include wired communication components, wireless communication components, cellular communication components, Near Field Communication (NFC) components, Bluetooth® components (e.g., Bluetooth Low Energy), Wi-Fix components, and other communication components to provide communication via other modalities. The devices1540may be another machine or any of a wide variety of peripheral devices (e.g., a peripheral device coupled via a USB).

The various memories (e.g., main memory1516, static memory1518, and memory of the processors1504) and storage unit1520may store one or more sets of instructions and data structures (e.g., software) embodying or used by any one or more of the methodologies or functions described herein. These instructions (e.g., the instructions1502), when executed by processors1504, cause various operations to implement the disclosed examples.

The instructions1502may be transmitted or received over the network1538, using a transmission medium, via a network interface device (e.g., a network interface component included in the communication components1536) and using any one of several well-known transfer protocols (e.g., hypertext transfer protocol (HTTP)). Similarly, the instructions1502may be transmitted or received using a transmission medium via a coupling (e.g., a peer-to-peer coupling) to the devices1540.

Software Architecture

FIG.16is a block diagram1600illustrating a software architecture1602, which can be installed on any one or more of the devices described herein. The software architecture1602is supported by hardware such as a machine1604that includes processors1606, memory1608, and I/O components1610. In this example, the software architecture1602can be conceptualized as a stack of layers, where each layer provides a particular functionality. The software architecture1602includes layers such as an operating system1612, libraries1614, frameworks1616, and applications1618. Operationally, the applications1618invoke API calls1620through the software stack and receive messages1622in response to the API calls1620.

The operating system1612manages hardware resources and provides common services. The operating system1612includes, for example, a kernel1624, services1626, and drivers1628. The kernel1624acts as an abstraction layer between the hardware and the other software layers. For example, the kernel1624provides memory management, processor management (e.g., scheduling), component management, networking, and security settings, among other functionalities. The services1626can provide other common services for the other software layers. The drivers1628are responsible for controlling or interfacing with the underlying hardware. For instance, the drivers1628can include display drivers, camera drivers, BLUETOOTH® or BLUETOOTH® Low Energy drivers, flash memory drivers, serial communication drivers (e.g., USB drivers), WI-FI® drivers, audio drivers, power management drivers, and so forth.

The libraries1614provide a common low-level infrastructure used by the applications1618. The libraries1614can include system libraries1630(e.g., C standard library) that provide functions such as memory allocation functions, string manipulation functions, mathematic functions, and the like. In addition, the libraries1614can include API libraries1632such as media libraries (e.g., libraries to support presentation and manipulation of various media formats such as Moving Picture Experts Group-4 (MPEG4), Advanced Video Coding (H.264 or AVC), Moving Picture Experts Group Layer-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Photographic Experts Group (JPEG or JPG), or Portable Network Graphics (PNG)), graphics libraries (e.g., an OpenGL framework used to render in two dimensions (2D) and three dimensions (3D) in a graphic content on a display), database libraries (e.g., SQLite to provide various relational database functions), web libraries (e.g., WebKit to provide web browsing functionality), and the like. The libraries1614can also include a wide variety of other libraries1634to provide many other APIs to the applications1618.

The frameworks1616provide a common high-level infrastructure that is used by the applications1618. For example, the frameworks1616provide various graphical user interface (GUI) functions, high-level resource management, and high-level location services. The frameworks1616can provide a broad spectrum of other APIs that can be used by the applications1618, some of which may be specific to a particular operating system or platform.

In an example, the applications1618may include a home application1636, a contacts application1638, a browser application1640, a book reader application1642, a location application1644, a media application1646, a messaging application1648, a game application1650, and a broad assortment of other applications such as a third-party application1652. The applications1618are programs that execute functions defined in the programs. Various programming languages can be employed to create one or more of the applications1618, structured in a variety of manners, such as object-oriented programming languages (e.g., Objective-C, Java, or C++) or procedural programming languages (e.g., C or assembly language). In a specific example, the third-party application1652(e.g., an application developed using the ANDROID™ or IOS™ software development kit (SDK) by an entity other than the vendor of the particular platform) may be mobile software running on a mobile operating system such as IOS™, ANDROID™, WINDOWS® Phone, or another mobile operating system. In this example, the third-party application1652can invoke the API calls1620provided by the operating system1612to facilitate functionalities described herein.

Examples

Example 1 is a computer-implemented method comprising: causing presentation of a camera view user interface (UI) on a computing device, the camera view UI comprising an output of a digital image sensor of a camera; detecting a face in an image corresponding to the output of the digital image sensor of the camera; in response to detecting the face, generating a ring light comprising: a non-opaque portion comprising a ring shape with a ring size and a position determined based on an image portion comprising the detected face; and a portion of a color with a predetermined lightness; and causing display, on the computing device, of the ring light over the camera view UI.

In Example 2, the subject matter of Example 1 includes, wherein generating the ring light further comprises configuring at least one of the non-opaque portion and the portion of the color of the predetermined lightness using a base color.

In Example 3, the subject matter of Example 2 includes, computing coordinates of facial landmarks based on the detected face, and wherein determining the ring size of the ring shape uses an inner radius computed based on the coordinates of the facial landmarks.

In Example 4, the subject matter of Example 3 includes, generating a set of center offset coordinates based on the coordinates of facial landmarks, and wherein determining the position of the ring shape is further based on the set of center offset coordinates.

In Example 5, the subject matter of Examples 3-4 includes, wherein computing the inner radius is further based on a value selected via a scale factor slider displayed on the computing device.

In Example 6, the subject matter of Examples 2-5 includes, displaying user selectable elements actionable to select the base color or the ring size.

In Example 7, the subject matter of Examples 3-6 includes, wherein computing the inner radius further comprises: determining a scale factor value by interpolating between a predetermined maximum value and a predetermined minimum value; determining a face radius based on the coordinates of facial landmarks; computing the inner radius by multiplying the scale factor value and the face radius.

In Example 8, the subject matter of Examples 1-7 includes, wherein the portion of the color with the predetermined lightness is opaque along a perimeter of the camera view UI.

In Example 9, the subject matter of Examples 1-8 includes, wherein the portion of the color with the predetermined lightness is nearly adjacent to the non-opaque portion or surrounds the non-opaque portion.

In Example 10, the subject matter of Examples 4-9 includes, wherein generating the ring light further comprises computing a RGBA color value for each of a plurality of pixels of the ring light, and wherein: the RGBA color value for each pixel comprises a RGB component value and an opacity value; the RGB component value is computed using the base color; and the opacity value is computed using at least one of the inner radius, the set of center offset coordinates, or a radial gradient computation.

In Example 11, the subject matter of Examples 1-10 includes, detecting a second face in the image corresponding to the output of the digital image sensor of the camera; configuring the ring light to further include: a second non-opaque portion comprising a second ring shape with a second ring size and a second position determined based on a second image portion comprising the second face; and a second portion of a second color with a second predetermined lightness; and causing display, on the computing device, of the ring light over the camera view UI.

In Example 12, the subject matter of Example 11 includes, wherein the second portion of the second color with the second predetermined lightness is nearly adjacent to the second non-opaque portion.

In Example 13, the subject matter of Examples 7-12 includes, wherein determining the face radius further comprises: generating a bounding box based on the coordinates of computed facial landmarks; computing the face radius based on a length and a width of the bounding box.

Example 14 is at least one machine-readable medium including instructions that, when executed by processing circuitry, cause the processing circuitry to perform operations to implement of any of Examples 1-13.

Example 15 is an apparatus comprising means to implement of any of Examples 1-13.

Example 16 is a system to implement of any of Examples 1-13.

Glossary

“Carrier signal” refers, for example, to any intangible medium that is capable of storing, encoding, or carrying instructions for execution by the machine and includes digital or analog communications signals or other intangible media to facilitate communication of such instructions. Instructions may be transmitted or received over a network using a transmission medium via a network interface device.

“Non-transitory computer-readable storage medium” refers, for example, to a tangible medium that is capable of storing, encoding, or carrying the instructions for execution by a machine.

“User device” refers, for example, to a device accessed, controlled or owned by a user and with which the user interacts perform an action, or an interaction with other users or computer systems.