US11223792B2 - Summing-up video frames to enhance image brightness - Google Patents

Summing-up video frames to enhance image brightness Download PDF

Info

Publication number
US11223792B2
US11223792B2 US16/712,715 US201916712715A US11223792B2 US 11223792 B2 US11223792 B2 US 11223792B2 US 201916712715 A US201916712715 A US 201916712715A US 11223792 B2 US11223792 B2 US 11223792B2
Authority
US
United States
Prior art keywords
brightness
video
video frame
pixels
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active, expires
Application number
US16/712,715
Other versions
US20210185271A1 (en
Inventor
Sami Kalliomäki
Niklas Blum
Stefan Ekerfelt
Peter Hanspers
Magnus Jedvert
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Google LLC
Original Assignee
Google LLC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Google LLC filed Critical Google LLC
Priority to US16/712,715 priority Critical patent/US11223792B2/en
Assigned to GOOGLE LLC reassignment GOOGLE LLC ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: KALLIOMÄKI, SAMI, HANSPERS, Peter, EKERFELT, Stefan, JEDVERT, Magnus, BLUM, NIKLAS
Priority to EP20758062.2A priority patent/EP3900325A1/en
Priority to PCT/US2020/045254 priority patent/WO2021118650A1/en
Priority to CN202310099102.2A priority patent/CN116074632A/en
Priority to CN202080077751.7A priority patent/CN114762321B/en
Publication of US20210185271A1 publication Critical patent/US20210185271A1/en
Priority to US17/552,136 priority patent/US11671557B2/en
Publication of US11223792B2 publication Critical patent/US11223792B2/en
Application granted granted Critical
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone
    • H04N7/147Communication arrangements, e.g. identifying the communication as a video-communication, intermediate storage of the signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/44Receiver circuitry for the reception of television signals according to analogue transmission standards
    • H04N5/57Control of contrast or brightness
    • H04N5/58Control of contrast or brightness in dependence upon ambient light
    • G06T5/009
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/72Combination of two or more compensation controls
    • H04N5/2351
    • H04N5/2352
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/28Indexing scheme for image data processing or generation, in general involving image processing hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20072Graph-based image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20216Image averaging

Definitions

  • Video calling in dark environments may result in videos with low lighting where it is difficult to see the subject in the video.
  • Manually increasing the exposure of the display may result in a subject's face looking overexposed.
  • Correcting the brightness using hardware or software solutions that are computationally expensive can result in a reduced framerate of the streaming video due to the computational burden.
  • Embodiments generally relate to a method to enhance brightness in video frames of a video during streaming.
  • the method includes determining, by a processor, that a first video frame has low light.
  • the method further includes applying, by the processor, a linear correction to provide a first brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value.
  • the method further includes downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor, transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor, and generating, by the processor, a histogram of brightness of the downscaled first video frame, wherein the linear correction is applied to the first video frame by the GPU.
  • a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame.
  • the first video frame is determined to have low light based on at least one of an ambient light sensor value failing to meet a first threshold value or an exponential moving average frame brightness fails to meet a second threshold value.
  • the first brightness enhancement of the first video frame is averaged with a set of brightness enhancements corresponding to previous video frames to generate a modified video.
  • the video frames are captured by a camera coupled to the processor and the method further includes determining, by the processor, whether the modified video meets a brightness threshold, responsive to determining that the modified video does not meet the brightness threshold, changing, by the processor, one or more camera settings, and responsive to determining that the modified video does meet the brightness threshold, displaying the modified video.
  • changing the one or more camera settings includes at least one of increasing an exposure time or modifying a sensitivity of an image sensor.
  • the method further includes applying contrast limited adaptive histogram equalization (CLAHE) to the first video frame.
  • CLAHE contrast limited adaptive histogram equalization
  • applying the CLAHE to the first video frame includes: (a) applying CLAHE to a luma channel of the first video frame, (b) applying CLAHE to each chroma channel of the first video frame, and (c) blending results from (a) and (b).
  • the method further includes determining a total brightness of the first video frame by calculating a square root of a summation of an average brightness of a set of frames where each frame in the set of frames is squared, determining a multiplier that is 0.5 divided by the total brightness, and determining a final output value by multiplying the multiplier by a square root of a summation of an input value for the first video frame squared.
  • determining the total brightness includes determining that a first total brightness exceeds a threshold value, responsive to the first total brightness exceeding the threshold value, removing a second frame from the set of frames, and calculating a second total brightness.
  • a non-transitory computer-readable medium may include instructions stored thereon that, when executed by one or more computers, cause the one or more computers to perform operations, the operations comprising: determining that a first video frame has low light and applying a linear correction to provide a first brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value.
  • the operations further comprise downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor, transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor, and generating, by the processor, a histogram of brightness of the downscaled first video frame, wherein the linear correction is applied to the first video frame by the GPU.
  • a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame.
  • the first video frame is determined to have low light based on at least one of an ambient light sensor value failing to meet a first threshold value or an exponential moving average frame brightness fails to meet a second threshold value.
  • the operations further include averaging the first brightness enhancement of the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video
  • a system may comprise one or more processors; and a memory that stores instructions executed by the one or more processors, the instructions comprising: determining that a first video frame has low light and applying a linear correction to provide a first brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value.
  • the instructions further comprise downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor, transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor, and generating, by the processor, a histogram of brightness of the downscaled first video frame, wherein the linear correction is applied to the first video frame by the GPU.
  • a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame.
  • the first video frame is determined to have low light based on at least one of an ambient light sensor value failing to meet a first threshold value or an exponential moving average frame brightness fails to meet a second threshold value.
  • the instructions further include averaging the first brightness enhancement of the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video.
  • FIG. 1 illustrates a block diagram of an example environment in which a brightness of video frames is enhanced according to some embodiments.
  • FIG. 2 illustrates a block diagram of an example computing device that enhances the brightness of video frames according to some embodiments.
  • FIG. 3A illustrates an example user interface to enable a low-light mode according to some embodiments.
  • FIG. 3B illustrates an example of a user interface once the low-light mode is enabled according to some embodiments.
  • FIG. 4A illustrates a flowchart of an example method to apply a contrast limited adaptive histogram equalization (CLAHE) according to some embodiments.
  • CLAHE contrast limited adaptive histogram equalization
  • FIG. 4B illustrates a corresponding video frame that is altered using the CLAHE correction described in FIG. 4A according to some embodiments.
  • FIG. 5 illustrates a flowchart of an example method to enhance a brightness of a video frame according to some embodiments.
  • FIG. 6 illustrates a flowchart of an example method to obtain user consent to enable low-light mode according to some embodiments.
  • a user consented to light-light mode it is determined whether a user consented to light-light mode. If the user did not consent to low-light mode, the method waits until user consent is provided, if at all. If the user did consent to low-light mode, the video application analyzes video frames to determine that a first video frame has low light. A correction is performed on the first video frame to generate a modified video. For example, a linear correction, a contrast limited adaptive histogram equalization correction, or a total brightness determination is applied to provide a brightness enhancement in the first video frame.
  • the video application determines whether the modified video satisfies a brightness threshold. If the modified video satisfies a brightness threshold, subsequent video frames are analyzed to determine if they have low light. If the modified video fails to satisfy the brightness threshold, one or more camera settings are changed.
  • the brightness enhancement avoids overexposure of a subject in the video or lowering of the frame rate by analyzing the distribution of brightness values instead of using an average brightness value.
  • the technique described below includes an averaging of a first brightness enhancement associated with a first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video with reduced noise created from amplification that occurs during enhancement of the video frames.
  • FIG. 1 illustrates a block diagram of an example environment 100 in which a brightness of video frames is enhanced.
  • the illustrated environment 100 includes a video server 101 , user devices 115 a , 115 n , and a network 105 . Users 125 a , 125 n may be associated with respective user devices 115 a , 115 n .
  • the environment 100 may include other servers or devices not shown in FIG. 1 or the video server 101 may not be included.
  • a letter after a reference number e.g., “ 115 a ,” represents a reference to the element having that particular reference number.
  • a reference number in the text without a following letter, e.g., “ 115 ,” represents a general reference to embodiments of the element bearing that reference number.
  • the video server 101 may include a processor, a memory, and network communication hardware.
  • the video server 101 is a hardware server.
  • the video server 101 is communicatively coupled to the network 105 via signal line 102 .
  • Signal line 102 may be a wired connection, such as Ethernet, coaxial cable, fiber-optic cable, etc., or a wireless connection, such as Wi-Fi®, Bluetooth®, or other wireless technology.
  • the video server 101 sends and receives data to and from one or more of the user devices 115 a , 115 n via the network 105 .
  • the video server 101 may include a video application 103 a and a database 199 .
  • the video application 103 a may include code and routines operable to enhance brightness of video frames and/or transmit modified video to another user device 115 n .
  • the video application 103 a may be implemented using hardware including a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), any other type of processor, or a combination thereof.
  • the video application 103 a may be implemented using a combination of hardware and software.
  • the database 199 may store video including the modified video received from user devices 115 .
  • Video is stored when the user associated with the client device that generates the modified video provides permission to store the video.
  • the database 199 may store videos that are indexed and associated with identities of the users 125 of the mobile devices 115 .
  • a video may be indexed in association with metadata that describes the user 125 as a member of a social network including a link to a profile of the member of the social network.
  • the database 199 may also store social network data associated with users 125 , user preferences for the users 125 , etc.
  • the video application 103 may perform facial recognition on the video frames.
  • the systems and methods discussed herein may collect or use personal information about users (e.g., user data, information about a user's social network, storage and analysis of video by the video application 103 , etc.)
  • users are provided with opportunities to control whether personal information is collected, whether the personal information is stored, whether the personal information is used, whether the images or videos are analyzed, and how information about the user is collected, stored, and used. That is, the systems and methods discussed herein may collect, store, and/or use user personal information only upon receiving explicit authorization from the relevant users to do so. For example, a user is provided with control over whether programs or features collect user information about that particular user or other users relevant to the program or feature.
  • Each user for which personal information is to be collected is presented with one or more options to allow control over the information collection relevant to that user, to provide permission or authorization as to whether the information is collected and as to which portions of the information are to be collected.
  • users can be provided with one or more such control options over a communication network.
  • certain data may be treated in one or more ways before it is stored or used so that personally identifiable information is removed.
  • the user device 115 may be a computing device that includes a memory and a hardware processor.
  • the user device 115 may include a desktop computer, a mobile device, a tablet computer, a mobile telephone, a wearable device, a head-mounted display, a mobile email device, a portable game player, a portable music player, a reader device, or another electronic device capable of accessing a network 105 .
  • user device 115 a is coupled to the network 105 via signal line 108 and user device 115 n is coupled to the network 105 via signal line 110 .
  • Signal lines 108 and 110 may be wired connections, such as Ethernet, coaxial cable, fiber-optic cable, etc., or wireless connections, such as Wi-Fi®, Bluetooth®, or other wireless technology.
  • User devices 115 a , 115 n are accessed by users 125 a , 125 n , respectively.
  • the user devices 115 a , 115 n in FIG. 1 are used by way of example. While FIG. 1 illustrates two user devices, 115 a and 115 n , the disclosure applies to a system architecture having one or more user devices 115 .
  • the user device 115 can be a wearable device worn by the user 125 .
  • the user device 115 a is included as part of a clip (e.g., a wristband), part of jewelry, or part of a pair of glasses.
  • the user device 115 a can be a smart watch.
  • the video application 103 b may generate video frames with enhanced brightness that are streamed from the user device 115 a.
  • the user device 115 a may include a video application 103 b that generates video frames with enhanced brightness for a video call.
  • the video application 103 b may determine that a first video frame has low light, apply a correction to the first video frame that enhances the brightness, averages the brightness enhancement for the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video, and transmits the modified video with enhanced brightness to the user device 115 .
  • the video application 103 b may repeat this process for additional frames from a series of video frames, e.g., captured by user device 115 a during a video call.
  • the user device 115 a may transmit a video stream, e.g., that includes the set of video frames, during the video call over network 105 directly to the user device 115 n or via the video server 101 .
  • the user device 115 n may include a video application 103 c that displays the video stream.
  • the entities of the environment 100 are communicatively coupled via a network 105 .
  • the network 105 may be a conventional type, wired or wireless, and may have numerous different configurations including a star configuration, token ring configuration or other configurations.
  • the network 105 may include a local area network (LAN), a wide area network (WAN) (e.g., the Internet), and/or other interconnected data paths across which multiple devices may communicate.
  • the network 105 may be a peer-to-peer network.
  • the network 105 may also be coupled to or include portions of a telecommunications network for sending data in a variety of different communication protocols.
  • the network 105 includes Bluetooth® communication networks, WiFi®, wireless local area network (WLAN) computer communication specified by IEEE 902.11, or a cellular communications network for sending and receiving data including via short messaging service (SMS), multimedia messaging service (MMS), hypertext transfer protocol (HTTP), direct data connection, email, etc.
  • SMS short messaging service
  • MMS multimedia messaging service
  • HTTP hypertext transfer protocol
  • FIG. 1 illustrates one network 105 coupled to the user devices 115 and the video server 101 , in practice one or more networks 105 may be coupled to these entities.
  • FIG. 2 illustrates a block diagram of an example computing device 200 that enhances the brightness of video frames.
  • the computing device 200 may be a user device 115 or a video server 101 .
  • the computing device 200 may include a processor 235 , a memory 237 , a graphics processing unit (GPU) 239 , a communication unit 241 , a camera 243 , a display 245 , and a storage device 247 . Additional components may be present or some of the previous components may be omitted depending on the type of computing device 200 .
  • a video application 103 may be stored in the memory 237 .
  • the computing device 200 may include other components not listed here, such as a battery, etc.
  • the components of the computing device 200 may be communicatively coupled by a bus 218 .
  • Bus 218 may be a communication bus that carries signals between various parts of computing device 200 .
  • the processor 235 includes an arithmetic logic unit, a microprocessor, a general-purpose controller, or some other processor array to perform computations and provide instructions to a display device.
  • Processor 235 processes data and may include various computing architectures including a complex instruction set computer (CISC) architecture, a reduced instruction set computer (RISC) architecture, or an architecture implementing a combination of instruction sets.
  • FIG. 2 illustrates a single processor 235 , multiple processors 235 may be included.
  • processor 235 may be a single-core processor or a multicore processor.
  • Other processors e.g., graphics processing units), operating systems, sensors, displays, and/or physical configurations may be part of the computing device 200 .
  • the processor 235 is coupled to the bus 220 for communication with the other components via signal line 222 .
  • the memory 237 stores instructions that may be executed by the processor 235 and/or data.
  • the instructions may include code and/or routines for performing the techniques described herein.
  • the memory 237 may be a dynamic random access memory (DRAM) device, a static RAM, or some other memory device.
  • the memory 237 also includes a non-volatile memory, such as a static random access memory (SRAM) device or flash memory, or similar permanent storage device and media including a hard disk drive, a compact disc read only memory (CD-ROM) device, a DVD-ROM device, a DVD-RAM device, a DVD-RW device, a flash memory device, or some other mass storage device for storing information on a more permanent basis.
  • the memory 237 includes code and routines operable to execute the video application 103 , which is described in greater detail below.
  • the memory 237 is coupled to the bus 220 for communication with the other components via signal line 224 .
  • the graphics processing unit (GPU) 239 may include hardware operable to downscale video frames.
  • the GPU 239 includes a GPU memory, such as a frame buffer, that stores instructions that may be executed by the GPU 239 and/or data.
  • the instructions may include code and/or routines to downscale video frames.
  • the GPU 239 generates the downsampled video frame by sampling single pixels in the video frame.
  • an original video frame and the corresponding downscaled video frame is stored in the memory of the GPU 239 .
  • GPU 239 may transfer the downscaled video frame to the memory 237 associated with the processor 239 .
  • GPU 239 may include a large number of processing cores, e.g., 256 cores, 1000 cores, etc. that can perform operations in parallel. For example, downscaling a video frame may be performed by partitioning the video frame into a plurality of regions and downscaling each region using a separate core of the GPU. Such operation can provide a downscaled video frame at a rate that can allow processing streaming video, e.g., video that is captured, modified, and streamed from a client device that includes GPU 239 to other devices over a network.
  • GPU 239 may be coupled to processor 235 via a dedicated communication channel and may be isolated from other components of device 200 .
  • GPU 239 may be coupled to the bus 220 for communication with the other components via signal line 220 .
  • the communication unit 241 transmits data to and receives data from at least one of the user devices 115 and the video server 101 depending upon where the video application 103 may be executed.
  • the communication unit 241 includes a wireless transceiver for exchanging data with the user device 115 , video server 101 , or other communication channels using one or more wireless communication methods, including IEEE 802.11, IEEE 802.16, Bluetooth® or another suitable wireless communication method.
  • the communication unit 241 is coupled to the bus 220 for communication with the other components via signal line 226 .
  • the communication unit 241 includes a cellular communications transceiver for sending and receiving data over a cellular communications network including via short messaging service (SMS), multimedia messaging service (MMS), hypertext transfer protocol (HTTP), direct data connection, e-mail or another suitable type of electronic communication.
  • SMS short messaging service
  • MMS multimedia messaging service
  • HTTP hypertext transfer protocol
  • the communication unit 241 includes a wired port and/or a wireless transceiver.
  • the communication unit 241 also provides other conventional connections to the network 105 for distribution of files and/or media objects using standard network protocols including, but not limited to, user datagram protocol (UDP), TCP/IP, HTTP, HTTP secure (HTTPS), simple mail transfer protocol (SMTP), SPDY, quick UDP internet connections (QUIC), etc.
  • the camera 243 may include hardware operable to capture video frames.
  • the camera 243 may receive instructions from the user interface module 206 to start capturing video frames for a video call.
  • the camera 243 may include one or more ambient light sensors, image sensors, e.g., CMOS sensors, depth sensors (e.g., infrared sensor, time-of-flight sensor, etc.), and/or other types of sensors.
  • the ambient light sensor may be a photodetector that is used to sense the amount of ambient light present in the environment.
  • camera 243 may include a plurality of lenses or other image capture units. Depth sensors may capture depth data that indicates a depth (distance) from the camera of one or more pixels of a captured image or video.
  • the camera 243 may receive instructions from the video application 103 to perform at least one of increasing an exposure time or modifying a sensitivity of an image sensor. For example, the camera 243 may modify the image sensor by modifying an ISO setting.
  • the camera 243 is coupled to the bus 220 for communication with the other components via signal line 228 .
  • the display 245 may include hardware operable to display graphical data received from the video application 103 .
  • the display 245 may render graphics to display video frames for a video.
  • Display 245 may be any type of display, e.g., a liquid crystal display (LCD), OLED, etc.
  • display 245 may be a projected screen.
  • display 245 may be a stereoscopic display.
  • the display 245 is coupled to the bus 220 for communication with the other components via signal line 230 .
  • the storage device 247 may be a non-transitory computer-readable storage medium that stores data that provides the functionality described herein.
  • the storage device 247 may include the database 199 in FIG. 1 .
  • the storage device 247 may be a DRAM device, a SRAM device, flash memory or some other memory device.
  • the storage device 247 also includes a non-volatile memory or similar permanent storage device and media including a hard disk drive, a CD-ROM device, a DVD-ROM device, a DVD-RAM device, a DVD-RW device, a flash memory device, or some other mass storage device for storing information on a permanent basis.
  • the storage device 247 is coupled to the bus 220 for communication with the other components via signal line 232 .
  • the video application 103 may include a user interface module 202 , a detection module 204 , and a brightness module 204 .
  • the user interface module 202 generates graphical data to display a user interface.
  • the user interface module 202 includes a set of instructions executable by the processor 235 to generate the graphical data.
  • the user interface module 202 is stored in the memory 237 of the computing device 200 and can be accessible and executable by the processor 235 .
  • the user interface module 202 generates graphical data to display a user interface with options to initiate a video call and to modify settings associated with the call.
  • the settings may include options for a low-light mode that, when enabled, enhances a brightness of the video frames of a video.
  • a default setting may be for the low-light mode to be disabled.
  • a user may enable the low-light mode as a setting to be applied to all video calls.
  • the low-light mode may be a setting that can be enabled during a particular video call.
  • an example user interface 300 is illustrated that includes a low-light mode option 305 that can be enabled by selecting the “enable” option or the low-light mode option 305 may be dismissed by selecting the “dismiss” option.
  • the low-light mode option 305 is made available before the video call is activated, but other options are possible.
  • the user interface module 202 may display a settings page with different video application options that include enabling the low-light mode.
  • the low-light mode cannot be automatically turned off to avoid the low-light mode going between on and off too many times.
  • FIG. 3B an example of a user interface 350 is illustrated once the low-light mode is enabled.
  • the low-light mode option 355 informs the user that the low-light mode is enabled. The user may change the low-light mode by going to the settings.
  • the detection module 204 determines whether a video frame in a video has low light.
  • the detection module 204 includes a set of instructions executable by the processor 235 to determine low light in the video.
  • the detection module 204 is stored in the memory 237 of the computing device 200 and can be accessible and executable by the processor 235 .
  • the detection module 204 may check that the user provided user consent before determining that a video frame in a video has low light. In some embodiments where the low-light mode is not enabled, the detection module 204 may determine that the video frame in the video has low light and instruct the user interface module 202 to provide a notification to the user that the video has low light and suggest that the user enable low-light mode. In some embodiments, if the user dismisses the notification, the user interface module 202 may increase an exponential backoff where the user interface module 202 displays the notification after low light is detected an increasing number of days as the user continues to not enable low-light mode. For example, if the user does not enable low-light mode, the user interface module 202 waits one day to display the notification again, then 5 days, 25 days, 125 days, etc.
  • the detection module 204 may determine that a video frame in the video has low light based on one or more of an ambient light sensor value received from an ambient light sensor associated with the camera 243 or an exponential moving average frame brightness failing to meet a threshold value. In some embodiments, the detections module 204 may determine that the video frame has low light if both the ambient light sensor value fails to meet a first threshold value and the average frame brightness fails to meet a second threshold value.
  • the average frame brightness is defined as the average luminance of pixels in the frame. For example, the detection module 204 may determine that the video is in low light if the ambient sensor value is less than 1 lux ambient light sensor value and the average frame brightness is less than 30%.
  • the detection module 204 does not analyze every frame of the video in order to conserve power and/or battery life. Instead the detection module 204 may analyze every predetermined number of video frames, such as every 30 th frame. In instances where the frame brightness is measured for every 30 th frame, the detection module 204 is detecting the exponential moving average of every 30 th frame brightness. In some embodiments, once low light is detected the detection module 204 may start analyzing the frame brightness of every frame.
  • the detection module 204 determines whether the user has provided consent to automatically provide a brightness enhancement or whether additional consent is required. For example, if additional consent is required the detection module 204 may instruct the user interface module 202 to generate a notification to display to the user to obtain user confirmation to instruct the brightness module 206 to provide the brightness enhancement.
  • the brightness module 206 provides a brightness enhancement to video frames to generate a modified video.
  • the brightness module 206 includes a set of instructions executable by the processor 235 to provide brightness enhancement of the video frames.
  • the brightness module 206 is stored in the memory 237 of the computing device 200 and can be accessible and executable by the processor 235 .
  • the brightness module 206 may one implement or more corrections to a video frame once the detection module 204 determines that the video frame has low light.
  • the brightness module 206 may apply a linear correction, a contrast limited adaptive histogram, or a total brightness formula (square root formula).
  • the brightness module 206 may receive a downscaled video frame from the memory 237 that the GPU 239 transferred to the memory 237 .
  • the GPU 239 performed the downscaling of the video frame and stored the first video frame in the GPU memory.
  • the GPU memory is not accessible by the processor 235 .
  • the brightness module 206 may generate a histogram of brightness of the downscaled video frame that is used to calculate statistics about the downsampled video frame, such as a distribution of brightness values within the downscaled video frame.
  • the brightness module 206 may identify the regions of the downscaled video frame that are excessively bright or excessively dark. For example, the brightness module 206 may identify a darkest fifth percentile of the downscaled video frame and transfer the statistics to the GPU 239 , which applies the linear correction to the original video frame to correct the darkest fifth percentile to have a brightness of less than 20%.
  • the brightness module 206 may also identify a brightest fifth percentile of the downscaled video frame.
  • the brightness module 206 may transfer the statistics to the GPU 239 , which applies the linear correction to the original video frame to correct the brightest fifth percentile to have a brightness of greater than 80%.
  • the GPU 239 may apply a linear correction to provide a brightness enhancement in the video frame that modifies a first brightness of a predetermined darkest percentage of pixels (e.g., darkest 5%) to be less than a darkness threshold value (e.g., greater than 20%) and a second brightness of a predetermined lightest percentage of the pixels (e.g., lightest 5%) to be greater than a lightness threshold value (e.g., greater than 80%).
  • a predetermined darkest percentage of pixels e.g., darkest 5%
  • a darkness threshold value e.g., greater than 20%
  • a second brightness of a predetermined lightest percentage of the pixels e.g., lightest 5%
  • the brightness module 206 may average multiple frames together to reduce noise caused by amplification.
  • a number of frames selected for averaging is based on at least one of a frame speed (frame rate) of the video or an average original brightness of the video frames.
  • the brightness module 206 uses a lower of the number of frames and the frame speed to determine how to ensure that the sum of the average frame brightness is at least 30% of the brightness.
  • one frame is used where there are 0-10 frames per second (FPS); and for faster frame rates a maximum number of frames averaged may be two frames averaged where there are 10-15 FPS; three frames averaged where there are 15-20 FPS; and four frames averaged where there are greater than 20 FPS.
  • the brightness module 206 keeps an exponential moving average frame brightness for the averaged frames greater than 30%. In some embodiments, the brightness module 206 keeps the exponential moving average frame brightness between 30% and 70%.
  • the brightness module 206 uses a CLAHE correction to artificially increase a dynamic range of the first video frame.
  • the CLAHE correction is a full-frame histogram equalization technique that brings out details in dark areas of the image even when parts of the image are well lit.
  • the brightness module 206 may use the CLAHE correction instead of the linear correction, or as a supplemental correction.
  • the brightness module 206 may blend the results of applying CLAHE to the luma channel and the chroma channels. For example, the brightness module 206 may apply the CLAHE to the video frame by: (a) applying CLAHE to a luma channel of the first video frame, (b) applying CLAHE to each chroma channel of the images, and (c) blending results from (a) and (b).
  • FIG. 4A illustrates a flowchart 400 of an example method to apply the CLAHE correction.
  • FIG. 4B illustrates corresponding stages 450 of the video frame that is altered using the CLAHE correction.
  • a video frame is split into YCbCr channels where Y is the luma channel, Cb is the blue-difference chroma channel, and Cr is the red-difference chroma channel.
  • 455 is the original video frame. Splitting the original video frame 455 into YCbCr channels results in the luma channel (Y) 460 , the chroma blue channel (Cb) 465 , and the chroma red channel (Cr) 470 .
  • the brightness module 206 applies CLAHE to the luma channel. This corresponds to the CLAHE applied luma channel 475 in FIG. 4B .
  • the brightness module 206 applies CLAHE to the chroma blue channel. This corresponds to the CLAHE applied chroma blue channel 480 in FIG. 4B .
  • the brightness module 206 applied CLAHE to the chroma red channel. This corresponds to the CLAHE applied chroma red channel 485 in FIG. 4B .
  • the brightness module 206 merges the CLAHE applied luma channel 475 in FIG. 4B with the chroma blue channel 465 and the chroma red channel 470 in FIG. 4B to form a post-CbCr merged luma channel 490 .
  • the brightness module 206 merges the images derived from CLAHE being applied to all channels to form a CLAHE all channel. Specifically, in FIG. 4B the CLAHE applied luma channel 475 , the CLAHE applied chroma blue channel 480 , and the CLAHE applied chroma red channel 485 are merged to form the CLAHE all channel 495 in FIG. 4B .
  • the brightness module 206 blends the post-CbCr merged luma channel 490 with the CLAHE all channel 495 to obtain a video frame with enhanced brightness.
  • the brightness module 206 applies a 50/50 blend, which corresponds to the blended video frame 499 in FIG. 4B .
  • Other blends are possible, such as a range from 10-90% of the CLAHE luma channel 490 with the remaining portion being the CLAHE all channel 495 .
  • the brightness module 206 simulates longer exposure time by summing up multiple frames. Because the relationship between an amount of photons hitting the camera sensor and the value obtained in red green blue (RGB) is not linear, to get to a linear space, the brightness module raises the values to the power of 2.2 (assuming the camera 243 uses standard gamma). Then to get back to encoded space, which is subsequently decoded by a display of the receiving user device (for example user device 115 n in FIG. 1 ), the brightness module 206 raises to the power 1/2.2. For simplicity and reduced computational complexity, a power of 2 and square-root of 2 may be used instead of 2.2.
  • the brightness module 206 makes calculations to achieve a brightness level of at least 0.3, which is an average brightness for each frame between 0 and 1. If a first total brightness exceeds a threshold brightness value (e.g., 0.7), the brightness module 206 removes a frame from a set of frames even if that would result in a total brightness level lower than 0.3. The brightness module 206 then uses a second total brightness calculated from the smaller set of frames.
  • the set of frames does not include frames older than 0.1 seconds as compared to the first frame because they may result in excessive ghosting if the camera framerate is low.
  • the brightness module 206 calculates a multiplier that is equal to 0.5/total brightness.
  • the multiplier may smooth out any fluctuations in the number of frames used by targeting a brightness level of 0.5. Other values may be used to obtain a different output brightness where a higher value results in a higher output brightness.
  • the brightness module 206 For each pixel in the video frame and each red green blue (RGB)-color channel, the brightness module 206 calculates a final output value.
  • the input value may be individual values for RGB color channels. Because each frame has multiple inputs and outputs, there may be one input value for each color channel for each pixel in the frame.
  • the brightness module 206 may use the total brightness to enhance the brightness of a video frame instead of the GPU 239 applying the linear correction or the brightness module 206 applying the CLAHE correction. In some embodiments, the brightness module 206 uses the total brightness in addition to another correction method.
  • the brightness module 206 determines whether the brightness of the modified video (e.g., a first video frame, a set of video frames, etc.) meets a threshold brightness. If the modified video fails to meet the threshold brightness, the brightness module 206 may change one or more of the camera settings. For example, the brightness module 206 may instruct the camera 243 to perform at least one of increasing an exposure time or modifying a sensitivity of an image sensor. The brightness module 206 may modify the image sensor by instructing the camera 243 to modify an ISO setting.
  • the brightness of the modified video e.g., a first video frame, a set of video frames, etc.
  • FIG. 5 illustrates a flowchart of an example method 500 to enhance a brightness of a video frame.
  • the method 500 is performed by a video application 103 stored on a computing device 200 , such as a user device 115 , a video server 101 , or in part a user device 115 and in part a video server 101 .
  • a user consented to low-light mode it is determined whether a user consented to low-light mode. If the user did not consent to low-light mode, the method 500 proceeds to step 602 in FIG. 6 . If the user consented to low-light mode, at block 504 , it is determined that a first video frame has low light.
  • a linear correction is applied to provide a brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value. Other correction methods may be used instead or in addition, such as the CLAHE correction.
  • the first brightness enhancement of the first video frame is averaged with a set of brightness enhancements corresponding to previous video frames to generate a modified video.
  • the method 500 proceeds with the next video frame.
  • the video application 103 may also transmit the modified video to user device 115 n and/or display the modified video in the display 245 of the user device 115 a .
  • the brightness module 206 may analyze every 30 th video frame. If the modified video fails to satisfy the brightness threshold, the method 500 proceeds to block 512 and one or more camera settings are changed.
  • FIG. 6 illustrates a flowchart of an example method 600 to obtain user consent to enable low-light mode according to some embodiments.
  • it is determined that there is low light in a video frame.
  • it is determined whether notifications can be shown 604 . If notifications cannot be shown, the method 600 returns to block 602 . If notifications can be shown, at block 606 a notification is shown.
  • the notification may include a message, such as “Low light has been detected. Would you like to enable low-light mode?”
  • low-light mode it is determined whether low-light mode is enabled. If low-light mode is not enabled, the method 600 proceeds to block 610 where an exponential backoff is increased. For example, if the user does not want to enable low-light mode, the next notification is not shown for another day, five days, 25 days, 125 days, etc. If low-light mode is enabled, the method 600 proceeds to block 612 .
  • low-light mode is enabled.
  • low light is determined in the video frame.
  • brightness enhancement is performed and the method 600 continues to block 608 .
  • the embodiments of the specification can also relate to a processor for performing one or more steps of the methods described above.
  • the processor may be a special-purpose processor selectively activated or reconfigured by a computer program stored in the computer.
  • a computer program may be stored in a non-transitory computer-readable storage medium, including, but not limited to, any type of disk including optical disks, ROMs, CD-ROMs, magnetic disks, RAMs, EPROMs, EEPROMs, magnetic or optical cards, flash memories including USB keys with non-volatile memory, or any type of media suitable for storing electronic instructions, each coupled to a computer system bus.
  • the specification can take the form of some entirely hardware embodiments, some entirely software embodiments or some embodiments containing both hardware and software elements.
  • the specification is implemented in software, which includes, but is not limited to, firmware, resident software, microcode, etc.
  • a computer-usable or computer-readable medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
  • a data processing system suitable for storing or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus.
  • the memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

A method enhances brightness in video frames of a video during streams. The method includes determining, by a processor, that a first video frame has low light. The method further includes applying, by the processor, a linear correction to provide a first brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value. The method further includes averaging, by the processor, the first brightness enhancement of the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video.

Description

BACKGROUND
Video calling in dark environments may result in videos with low lighting where it is difficult to see the subject in the video. Manually increasing the exposure of the display may result in a subject's face looking overexposed. Correcting the brightness using hardware or software solutions that are computationally expensive can result in a reduced framerate of the streaming video due to the computational burden.
The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent it is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
SUMMARY
Embodiments generally relate to a method to enhance brightness in video frames of a video during streaming. The method includes determining, by a processor, that a first video frame has low light. The method further includes applying, by the processor, a linear correction to provide a first brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value.
In some embodiments, the method further includes downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor, transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor, and generating, by the processor, a histogram of brightness of the downscaled first video frame, wherein the linear correction is applied to the first video frame by the GPU. In some embodiments, a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame. In some embodiments, the first video frame is determined to have low light based on at least one of an ambient light sensor value failing to meet a first threshold value or an exponential moving average frame brightness fails to meet a second threshold value. In some embodiments, the first brightness enhancement of the first video frame is averaged with a set of brightness enhancements corresponding to previous video frames to generate a modified video. In some embodiments the video frames are captured by a camera coupled to the processor and the method further includes determining, by the processor, whether the modified video meets a brightness threshold, responsive to determining that the modified video does not meet the brightness threshold, changing, by the processor, one or more camera settings, and responsive to determining that the modified video does meet the brightness threshold, displaying the modified video. In some embodiments, changing the one or more camera settings includes at least one of increasing an exposure time or modifying a sensitivity of an image sensor. In some embodiments, the method further includes applying contrast limited adaptive histogram equalization (CLAHE) to the first video frame. In some embodiments, applying the CLAHE to the first video frame includes: (a) applying CLAHE to a luma channel of the first video frame, (b) applying CLAHE to each chroma channel of the first video frame, and (c) blending results from (a) and (b). In some embodiments, the method further includes determining a total brightness of the first video frame by calculating a square root of a summation of an average brightness of a set of frames where each frame in the set of frames is squared, determining a multiplier that is 0.5 divided by the total brightness, and determining a final output value by multiplying the multiplier by a square root of a summation of an input value for the first video frame squared. In some embodiments, determining the total brightness includes determining that a first total brightness exceeds a threshold value, responsive to the first total brightness exceeding the threshold value, removing a second frame from the set of frames, and calculating a second total brightness.
A non-transitory computer-readable medium may include instructions stored thereon that, when executed by one or more computers, cause the one or more computers to perform operations, the operations comprising: determining that a first video frame has low light and applying a linear correction to provide a first brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value.
In some embodiments, the operations further comprise downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor, transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor, and generating, by the processor, a histogram of brightness of the downscaled first video frame, wherein the linear correction is applied to the first video frame by the GPU. In some embodiments, a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame. In some embodiments, the first video frame is determined to have low light based on at least one of an ambient light sensor value failing to meet a first threshold value or an exponential moving average frame brightness fails to meet a second threshold value. In some embodiments, the operations further include averaging the first brightness enhancement of the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video
A system may comprise one or more processors; and a memory that stores instructions executed by the one or more processors, the instructions comprising: determining that a first video frame has low light and applying a linear correction to provide a first brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value.
In some embodiments, the instructions further comprise downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor, transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor, and generating, by the processor, a histogram of brightness of the downscaled first video frame, wherein the linear correction is applied to the first video frame by the GPU. In some embodiments, a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame. In some embodiments, the first video frame is determined to have low light based on at least one of an ambient light sensor value failing to meet a first threshold value or an exponential moving average frame brightness fails to meet a second threshold value. In some embodiments, the instructions further include averaging the first brightness enhancement of the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video.
BRIEF DESCRIPTION OF THE DRAWINGS
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
The disclosure is illustrated by way of example, and not by way of limitation in the figures of the accompanying drawings in which like reference numerals are used to refer to similar elements.
FIG. 1 illustrates a block diagram of an example environment in which a brightness of video frames is enhanced according to some embodiments.
FIG. 2 illustrates a block diagram of an example computing device that enhances the brightness of video frames according to some embodiments.
FIG. 3A illustrates an example user interface to enable a low-light mode according to some embodiments.
FIG. 3B illustrates an example of a user interface once the low-light mode is enabled according to some embodiments.
FIG. 4A illustrates a flowchart of an example method to apply a contrast limited adaptive histogram equalization (CLAHE) according to some embodiments.
FIG. 4B illustrates a corresponding video frame that is altered using the CLAHE correction described in FIG. 4A according to some embodiments.
FIG. 5 illustrates a flowchart of an example method to enhance a brightness of a video frame according to some embodiments.
FIG. 6 illustrates a flowchart of an example method to obtain user consent to enable low-light mode according to some embodiments.
DETAILED DESCRIPTION
To solve the problem of providing high-quality video in low-light settings, techniques are described herein to enhance brightness of a video frame. First, it is determined whether a user consented to light-light mode. If the user did not consent to low-light mode, the method waits until user consent is provided, if at all. If the user did consent to low-light mode, the video application analyzes video frames to determine that a first video frame has low light. A correction is performed on the first video frame to generate a modified video. For example, a linear correction, a contrast limited adaptive histogram equalization correction, or a total brightness determination is applied to provide a brightness enhancement in the first video frame.
The video application determines whether the modified video satisfies a brightness threshold. If the modified video satisfies a brightness threshold, subsequent video frames are analyzed to determine if they have low light. If the modified video fails to satisfy the brightness threshold, one or more camera settings are changed.
The various embodiments described below have several advantages. First, the brightness enhancement avoids overexposure of a subject in the video or lowering of the frame rate by analyzing the distribution of brightness values instead of using an average brightness value. Second, the technique described below includes an averaging of a first brightness enhancement associated with a first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video with reduced noise created from amplification that occurs during enhancement of the video frames.
Example Environment
FIG. 1 illustrates a block diagram of an example environment 100 in which a brightness of video frames is enhanced. The illustrated environment 100 includes a video server 101, user devices 115 a, 115 n, and a network 105. Users 125 a, 125 n may be associated with respective user devices 115 a, 115 n. In some embodiments, the environment 100 may include other servers or devices not shown in FIG. 1 or the video server 101 may not be included. In FIG. 1 and the remaining figures, a letter after a reference number, e.g., “115 a,” represents a reference to the element having that particular reference number. A reference number in the text without a following letter, e.g., “115,” represents a general reference to embodiments of the element bearing that reference number.
The video server 101 may include a processor, a memory, and network communication hardware. In some embodiments, the video server 101 is a hardware server. The video server 101 is communicatively coupled to the network 105 via signal line 102. Signal line 102 may be a wired connection, such as Ethernet, coaxial cable, fiber-optic cable, etc., or a wireless connection, such as Wi-Fi®, Bluetooth®, or other wireless technology. In some embodiments, the video server 101 sends and receives data to and from one or more of the user devices 115 a, 115 n via the network 105. The video server 101 may include a video application 103 a and a database 199.
The video application 103 a may include code and routines operable to enhance brightness of video frames and/or transmit modified video to another user device 115 n. In some embodiments, the video application 103 a may be implemented using hardware including a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), any other type of processor, or a combination thereof. In some embodiments, the video application 103 a may be implemented using a combination of hardware and software.
The database 199 may store video including the modified video received from user devices 115. Video is stored when the user associated with the client device that generates the modified video provides permission to store the video. The database 199 may store videos that are indexed and associated with identities of the users 125 of the mobile devices 115. For example, a video may be indexed in association with metadata that describes the user 125 as a member of a social network including a link to a profile of the member of the social network. The database 199 may also store social network data associated with users 125, user preferences for the users 125, etc.
In some embodiments, the video application 103 may perform facial recognition on the video frames. In situations in which the systems and methods discussed herein may collect or use personal information about users (e.g., user data, information about a user's social network, storage and analysis of video by the video application 103, etc.), users are provided with opportunities to control whether personal information is collected, whether the personal information is stored, whether the personal information is used, whether the images or videos are analyzed, and how information about the user is collected, stored, and used. That is, the systems and methods discussed herein may collect, store, and/or use user personal information only upon receiving explicit authorization from the relevant users to do so. For example, a user is provided with control over whether programs or features collect user information about that particular user or other users relevant to the program or feature. Each user for which personal information is to be collected is presented with one or more options to allow control over the information collection relevant to that user, to provide permission or authorization as to whether the information is collected and as to which portions of the information are to be collected. For example, users can be provided with one or more such control options over a communication network. In addition, certain data may be treated in one or more ways before it is stored or used so that personally identifiable information is removed.
The user device 115 may be a computing device that includes a memory and a hardware processor. For example, the user device 115 may include a desktop computer, a mobile device, a tablet computer, a mobile telephone, a wearable device, a head-mounted display, a mobile email device, a portable game player, a portable music player, a reader device, or another electronic device capable of accessing a network 105.
In the illustrated implementation, user device 115 a is coupled to the network 105 via signal line 108 and user device 115 n is coupled to the network 105 via signal line 110. Signal lines 108 and 110 may be wired connections, such as Ethernet, coaxial cable, fiber-optic cable, etc., or wireless connections, such as Wi-Fi®, Bluetooth®, or other wireless technology. User devices 115 a, 115 n are accessed by users 125 a, 125 n, respectively. The user devices 115 a, 115 n in FIG. 1 are used by way of example. While FIG. 1 illustrates two user devices, 115 a and 115 n, the disclosure applies to a system architecture having one or more user devices 115.
In some embodiments, the user device 115 can be a wearable device worn by the user 125. For example, the user device 115 a is included as part of a clip (e.g., a wristband), part of jewelry, or part of a pair of glasses. In another example, the user device 115 a can be a smart watch. The video application 103 b may generate video frames with enhanced brightness that are streamed from the user device 115 a.
In some embodiments, the user device 115 a may include a video application 103 b that generates video frames with enhanced brightness for a video call. The video application 103 b may determine that a first video frame has low light, apply a correction to the first video frame that enhances the brightness, averages the brightness enhancement for the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video, and transmits the modified video with enhanced brightness to the user device 115. The video application 103 b may repeat this process for additional frames from a series of video frames, e.g., captured by user device 115 a during a video call.
The user device 115 a may transmit a video stream, e.g., that includes the set of video frames, during the video call over network 105 directly to the user device 115 n or via the video server 101. The user device 115 n may include a video application 103 c that displays the video stream.
In the illustrated implementation, the entities of the environment 100 are communicatively coupled via a network 105. The network 105 may be a conventional type, wired or wireless, and may have numerous different configurations including a star configuration, token ring configuration or other configurations. Furthermore, the network 105 may include a local area network (LAN), a wide area network (WAN) (e.g., the Internet), and/or other interconnected data paths across which multiple devices may communicate. In some embodiments, the network 105 may be a peer-to-peer network. The network 105 may also be coupled to or include portions of a telecommunications network for sending data in a variety of different communication protocols. In some embodiments, the network 105 includes Bluetooth® communication networks, WiFi®, wireless local area network (WLAN) computer communication specified by IEEE 902.11, or a cellular communications network for sending and receiving data including via short messaging service (SMS), multimedia messaging service (MMS), hypertext transfer protocol (HTTP), direct data connection, email, etc. Although FIG. 1 illustrates one network 105 coupled to the user devices 115 and the video server 101, in practice one or more networks 105 may be coupled to these entities.
Example Computing Device
FIG. 2 illustrates a block diagram of an example computing device 200 that enhances the brightness of video frames. The computing device 200 may be a user device 115 or a video server 101. The computing device 200 may include a processor 235, a memory 237, a graphics processing unit (GPU) 239, a communication unit 241, a camera 243, a display 245, and a storage device 247. Additional components may be present or some of the previous components may be omitted depending on the type of computing device 200. A video application 103 may be stored in the memory 237. In some embodiments, the computing device 200 may include other components not listed here, such as a battery, etc. The components of the computing device 200 may be communicatively coupled by a bus 218. Bus 218 may be a communication bus that carries signals between various parts of computing device 200.
The processor 235 includes an arithmetic logic unit, a microprocessor, a general-purpose controller, or some other processor array to perform computations and provide instructions to a display device. Processor 235 processes data and may include various computing architectures including a complex instruction set computer (CISC) architecture, a reduced instruction set computer (RISC) architecture, or an architecture implementing a combination of instruction sets. Although FIG. 2 illustrates a single processor 235, multiple processors 235 may be included. In different embodiments, processor 235 may be a single-core processor or a multicore processor. Other processors (e.g., graphics processing units), operating systems, sensors, displays, and/or physical configurations may be part of the computing device 200. The processor 235 is coupled to the bus 220 for communication with the other components via signal line 222.
The memory 237 stores instructions that may be executed by the processor 235 and/or data. The instructions may include code and/or routines for performing the techniques described herein. The memory 237 may be a dynamic random access memory (DRAM) device, a static RAM, or some other memory device. In some embodiments, the memory 237 also includes a non-volatile memory, such as a static random access memory (SRAM) device or flash memory, or similar permanent storage device and media including a hard disk drive, a compact disc read only memory (CD-ROM) device, a DVD-ROM device, a DVD-RAM device, a DVD-RW device, a flash memory device, or some other mass storage device for storing information on a more permanent basis. The memory 237 includes code and routines operable to execute the video application 103, which is described in greater detail below. The memory 237 is coupled to the bus 220 for communication with the other components via signal line 224.
The graphics processing unit (GPU) 239 may include hardware operable to downscale video frames. In some embodiments, the GPU 239 includes a GPU memory, such as a frame buffer, that stores instructions that may be executed by the GPU 239 and/or data. The instructions may include code and/or routines to downscale video frames. In some embodiments, the GPU 239 generates the downsampled video frame by sampling single pixels in the video frame. In some embodiments, an original video frame and the corresponding downscaled video frame is stored in the memory of the GPU 239. GPU 239 may transfer the downscaled video frame to the memory 237 associated with the processor 239. In some implementations, GPU 239 may include a large number of processing cores, e.g., 256 cores, 1000 cores, etc. that can perform operations in parallel. For example, downscaling a video frame may be performed by partitioning the video frame into a plurality of regions and downscaling each region using a separate core of the GPU. Such operation can provide a downscaled video frame at a rate that can allow processing streaming video, e.g., video that is captured, modified, and streamed from a client device that includes GPU 239 to other devices over a network. In some implementations, GPU 239 may be coupled to processor 235 via a dedicated communication channel and may be isolated from other components of device 200. In some implementations, GPU 239 may be coupled to the bus 220 for communication with the other components via signal line 220.
The communication unit 241 transmits data to and receives data from at least one of the user devices 115 and the video server 101 depending upon where the video application 103 may be executed. In some embodiments, the communication unit 241 includes a wireless transceiver for exchanging data with the user device 115, video server 101, or other communication channels using one or more wireless communication methods, including IEEE 802.11, IEEE 802.16, Bluetooth® or another suitable wireless communication method. The communication unit 241 is coupled to the bus 220 for communication with the other components via signal line 226.
In some embodiments, the communication unit 241 includes a cellular communications transceiver for sending and receiving data over a cellular communications network including via short messaging service (SMS), multimedia messaging service (MMS), hypertext transfer protocol (HTTP), direct data connection, e-mail or another suitable type of electronic communication. In some embodiments, the communication unit 241 includes a wired port and/or a wireless transceiver. The communication unit 241 also provides other conventional connections to the network 105 for distribution of files and/or media objects using standard network protocols including, but not limited to, user datagram protocol (UDP), TCP/IP, HTTP, HTTP secure (HTTPS), simple mail transfer protocol (SMTP), SPDY, quick UDP internet connections (QUIC), etc.
The camera 243 may include hardware operable to capture video frames. For example, the camera 243 may receive instructions from the user interface module 206 to start capturing video frames for a video call. The camera 243 may include one or more ambient light sensors, image sensors, e.g., CMOS sensors, depth sensors (e.g., infrared sensor, time-of-flight sensor, etc.), and/or other types of sensors. The ambient light sensor may be a photodetector that is used to sense the amount of ambient light present in the environment. In some implementations, camera 243 may include a plurality of lenses or other image capture units. Depth sensors may capture depth data that indicates a depth (distance) from the camera of one or more pixels of a captured image or video. The camera 243 may receive instructions from the video application 103 to perform at least one of increasing an exposure time or modifying a sensitivity of an image sensor. For example, the camera 243 may modify the image sensor by modifying an ISO setting. The camera 243 is coupled to the bus 220 for communication with the other components via signal line 228.
The display 245 may include hardware operable to display graphical data received from the video application 103. For example, the display 245 may render graphics to display video frames for a video. Display 245 may be any type of display, e.g., a liquid crystal display (LCD), OLED, etc. In some embodiments, display 245 may be a projected screen. In some embodiments, e.g., when device 243 is an augmented reality device, display 245 may be a stereoscopic display. The display 245 is coupled to the bus 220 for communication with the other components via signal line 230.
The storage device 247 may be a non-transitory computer-readable storage medium that stores data that provides the functionality described herein. In embodiments where the computing device 200 is the video server 101, the storage device 247 may include the database 199 in FIG. 1. The storage device 247 may be a DRAM device, a SRAM device, flash memory or some other memory device. In some embodiments, the storage device 247 also includes a non-volatile memory or similar permanent storage device and media including a hard disk drive, a CD-ROM device, a DVD-ROM device, a DVD-RAM device, a DVD-RW device, a flash memory device, or some other mass storage device for storing information on a permanent basis. The storage device 247 is coupled to the bus 220 for communication with the other components via signal line 232.
The video application 103 may include a user interface module 202, a detection module 204, and a brightness module 204.
The user interface module 202 generates graphical data to display a user interface. In some embodiments, the user interface module 202 includes a set of instructions executable by the processor 235 to generate the graphical data. In some embodiments, the user interface module 202 is stored in the memory 237 of the computing device 200 and can be accessible and executable by the processor 235.
In some embodiments, the user interface module 202 generates graphical data to display a user interface with options to initiate a video call and to modify settings associated with the call. The settings may include options for a low-light mode that, when enabled, enhances a brightness of the video frames of a video. A default setting may be for the low-light mode to be disabled. In some embodiments, a user may enable the low-light mode as a setting to be applied to all video calls. In some embodiments, the low-light mode may be a setting that can be enabled during a particular video call.
Turning to FIG. 3A, an example user interface 300 is illustrated that includes a low-light mode option 305 that can be enabled by selecting the “enable” option or the low-light mode option 305 may be dismissed by selecting the “dismiss” option. In this example, the low-light mode option 305 is made available before the video call is activated, but other options are possible. For example, the user interface module 202 may display a settings page with different video application options that include enabling the low-light mode. In some embodiments, once a video call has begun and the low-light mode is enabled, the low-light mode cannot be automatically turned off to avoid the low-light mode going between on and off too many times.
Turning to FIG. 3B, an example of a user interface 350 is illustrated once the low-light mode is enabled. In this example, the low-light mode option 355 informs the user that the low-light mode is enabled. The user may change the low-light mode by going to the settings.
The detection module 204 determines whether a video frame in a video has low light. In some embodiments, the detection module 204 includes a set of instructions executable by the processor 235 to determine low light in the video. In some embodiments, the detection module 204 is stored in the memory 237 of the computing device 200 and can be accessible and executable by the processor 235.
In some embodiments, the detection module 204 may check that the user provided user consent before determining that a video frame in a video has low light. In some embodiments where the low-light mode is not enabled, the detection module 204 may determine that the video frame in the video has low light and instruct the user interface module 202 to provide a notification to the user that the video has low light and suggest that the user enable low-light mode. In some embodiments, if the user dismisses the notification, the user interface module 202 may increase an exponential backoff where the user interface module 202 displays the notification after low light is detected an increasing number of days as the user continues to not enable low-light mode. For example, if the user does not enable low-light mode, the user interface module 202 waits one day to display the notification again, then 5 days, 25 days, 125 days, etc.
The detection module 204 may determine that a video frame in the video has low light based on one or more of an ambient light sensor value received from an ambient light sensor associated with the camera 243 or an exponential moving average frame brightness failing to meet a threshold value. In some embodiments, the detections module 204 may determine that the video frame has low light if both the ambient light sensor value fails to meet a first threshold value and the average frame brightness fails to meet a second threshold value. The average frame brightness is defined as the average luminance of pixels in the frame. For example, the detection module 204 may determine that the video is in low light if the ambient sensor value is less than 1 lux ambient light sensor value and the average frame brightness is less than 30%.
In some embodiments, the detection module 204 does not analyze every frame of the video in order to conserve power and/or battery life. Instead the detection module 204 may analyze every predetermined number of video frames, such as every 30th frame. In instances where the frame brightness is measured for every 30th frame, the detection module 204 is detecting the exponential moving average of every 30th frame brightness. In some embodiments, once low light is detected the detection module 204 may start analyzing the frame brightness of every frame.
In some embodiments, once the detection module 204 determines that the video frame has low light, the detection module 204 determines whether the user has provided consent to automatically provide a brightness enhancement or whether additional consent is required. For example, if additional consent is required the detection module 204 may instruct the user interface module 202 to generate a notification to display to the user to obtain user confirmation to instruct the brightness module 206 to provide the brightness enhancement.
The brightness module 206 provides a brightness enhancement to video frames to generate a modified video. In some embodiments, the brightness module 206 includes a set of instructions executable by the processor 235 to provide brightness enhancement of the video frames. In some embodiments, the brightness module 206 is stored in the memory 237 of the computing device 200 and can be accessible and executable by the processor 235.
In some embodiments, the brightness module 206 may one implement or more corrections to a video frame once the detection module 204 determines that the video frame has low light. For example, the brightness module 206 may apply a linear correction, a contrast limited adaptive histogram, or a total brightness formula (square root formula).
Example Linear Correction
In instances where the background of a video frame is dark, but a person in the video frame is well illuminated, some attempts to correct the brightness may include using a single average brightness value. This may result in the person looking overexposed. The linear correction solves this problem by looking at a distribution of brightness values and correcting sections with different levels of brightness.
In instances where a linear correction is performed, the brightness module 206 may receive a downscaled video frame from the memory 237 that the GPU 239 transferred to the memory 237. The GPU 239 performed the downscaling of the video frame and stored the first video frame in the GPU memory. In some embodiments, the GPU memory is not accessible by the processor 235.
The brightness module 206 may generate a histogram of brightness of the downscaled video frame that is used to calculate statistics about the downsampled video frame, such as a distribution of brightness values within the downscaled video frame. The brightness module 206 may identify the regions of the downscaled video frame that are excessively bright or excessively dark. For example, the brightness module 206 may identify a darkest fifth percentile of the downscaled video frame and transfer the statistics to the GPU 239, which applies the linear correction to the original video frame to correct the darkest fifth percentile to have a brightness of less than 20%. The brightness module 206 may also identify a brightest fifth percentile of the downscaled video frame. The brightness module 206 may transfer the statistics to the GPU 239, which applies the linear correction to the original video frame to correct the brightest fifth percentile to have a brightness of greater than 80%.
The GPU 239 may apply a linear correction to provide a brightness enhancement in the video frame that modifies a first brightness of a predetermined darkest percentage of pixels (e.g., darkest 5%) to be less than a darkness threshold value (e.g., greater than 20%) and a second brightness of a predetermined lightest percentage of the pixels (e.g., lightest 5%) to be greater than a lightness threshold value (e.g., greater than 80%).
The brightness module 206 may average multiple frames together to reduce noise caused by amplification. In some embodiments, a number of frames selected for averaging is based on at least one of a frame speed (frame rate) of the video or an average original brightness of the video frames. In some embodiments, the brightness module 206 uses a lower of the number of frames and the frame speed to determine how to ensure that the sum of the average frame brightness is at least 30% of the brightness. In some embodiments one frame is used where there are 0-10 frames per second (FPS); and for faster frame rates a maximum number of frames averaged may be two frames averaged where there are 10-15 FPS; three frames averaged where there are 15-20 FPS; and four frames averaged where there are greater than 20 FPS. In some embodiments, the brightness module 206 keeps an exponential moving average frame brightness for the averaged frames greater than 30%. In some embodiments, the brightness module 206 keeps the exponential moving average frame brightness between 30% and 70%.
Example Contrast Limited Adaptive Histogram Equalization (CLAHE) Correction
In some embodiments, the brightness module 206 uses a CLAHE correction to artificially increase a dynamic range of the first video frame. The CLAHE correction is a full-frame histogram equalization technique that brings out details in dark areas of the image even when parts of the image are well lit. The brightness module 206 may use the CLAHE correction instead of the linear correction, or as a supplemental correction.
Applying a CLAHE correction to the luma channel produces a brighter image, but the resultant frame may have less saturated colors than the original video frame. Applying the CLAHE correction to the chroma channels individually may increase saturation, but may also product color artifacts. As a result, to keep the color boosting within reasonable bounds, the brightness module 206 may blend the results of applying CLAHE to the luma channel and the chroma channels. For example, the brightness module 206 may apply the CLAHE to the video frame by: (a) applying CLAHE to a luma channel of the first video frame, (b) applying CLAHE to each chroma channel of the images, and (c) blending results from (a) and (b).
FIGS. 4A and 4B will be discussed together. FIG. 4A illustrates a flowchart 400 of an example method to apply the CLAHE correction. FIG. 4B illustrates corresponding stages 450 of the video frame that is altered using the CLAHE correction. At block 402 in FIG. 4A, a video frame is split into YCbCr channels where Y is the luma channel, Cb is the blue-difference chroma channel, and Cr is the red-difference chroma channel. In FIG. 4B, 455 is the original video frame. Splitting the original video frame 455 into YCbCr channels results in the luma channel (Y) 460, the chroma blue channel (Cb) 465, and the chroma red channel (Cr) 470.
At block 404 in FIG. 4A, the brightness module 206 applies CLAHE to the luma channel. This corresponds to the CLAHE applied luma channel 475 in FIG. 4B. At block 406 in FIG. 4A, the brightness module 206 applies CLAHE to the chroma blue channel. This corresponds to the CLAHE applied chroma blue channel 480 in FIG. 4B. At block 408 in FIG. 4A, the brightness module 206 applied CLAHE to the chroma red channel. This corresponds to the CLAHE applied chroma red channel 485 in FIG. 4B.
At block 410, the brightness module 206 merges the CLAHE applied luma channel 475 in FIG. 4B with the chroma blue channel 465 and the chroma red channel 470 in FIG. 4B to form a post-CbCr merged luma channel 490. At block 412, the brightness module 206 merges the images derived from CLAHE being applied to all channels to form a CLAHE all channel. Specifically, in FIG. 4B the CLAHE applied luma channel 475, the CLAHE applied chroma blue channel 480, and the CLAHE applied chroma red channel 485 are merged to form the CLAHE all channel 495 in FIG. 4B.
At block 414, the brightness module 206 blends the post-CbCr merged luma channel 490 with the CLAHE all channel 495 to obtain a video frame with enhanced brightness. In some embodiments, the brightness module 206 applies a 50/50 blend, which corresponds to the blended video frame 499 in FIG. 4B. Other blends are possible, such as a range from 10-90% of the CLAHE luma channel 490 with the remaining portion being the CLAHE all channel 495.
Example Total Brightness
In some embodiments, the brightness module 206 simulates longer exposure time by summing up multiple frames. Because the relationship between an amount of photons hitting the camera sensor and the value obtained in red green blue (RGB) is not linear, to get to a linear space, the brightness module raises the values to the power of 2.2 (assuming the camera 243 uses standard gamma). Then to get back to encoded space, which is subsequently decoded by a display of the receiving user device (for example user device 115 n in FIG. 1), the brightness module 206 raises to the power 1/2.2. For simplicity and reduced computational complexity, a power of 2 and square-root of 2 may be used instead of 2.2.
The brightness module 206 may determine a total brightness of the frame by calculating a square root of a summation of an average brightness of a set of frames where each frame in the set of frames is squared. In some embodiments, for each video frame, the brightness module 206 uses previous video frames to determine the total brightness using the following formula:
Total brightness=√{square root over (Σi=1 n b i 2)}  (1)
where b1 is the average brightness of the frame i and n is the number of frames.
In some implementations, the brightness module 206 makes calculations to achieve a brightness level of at least 0.3, which is an average brightness for each frame between 0 and 1. If a first total brightness exceeds a threshold brightness value (e.g., 0.7), the brightness module 206 removes a frame from a set of frames even if that would result in a total brightness level lower than 0.3. The brightness module 206 then uses a second total brightness calculated from the smaller set of frames. In some embodiments, the set of frames does not include frames older than 0.1 seconds as compared to the first frame because they may result in excessive ghosting if the camera framerate is low.
After the brightness module 206 determines a number of frames for the set of frames, the brightness module 206 calculates a multiplier that is equal to 0.5/total brightness. The multiplier may smooth out any fluctuations in the number of frames used by targeting a brightness level of 0.5. Other values may be used to obtain a different output brightness where a higher value results in a higher output brightness.
For each pixel in the video frame and each red green blue (RGB)-color channel, the brightness module 206 calculates a final output value. The brightness module 206 may use the following equation:
c r=multiplier*√{square root over (Σi=1 n c i 2)}  (2)
where Cr is the final output, and ci is the input value for frame i. The input value may be individual values for RGB color channels. Because each frame has multiple inputs and outputs, there may be one input value for each color channel for each pixel in the frame.
The brightness module 206 may use the total brightness to enhance the brightness of a video frame instead of the GPU 239 applying the linear correction or the brightness module 206 applying the CLAHE correction. In some embodiments, the brightness module 206 uses the total brightness in addition to another correction method.
In some embodiments, once the brightness module 206 implements the corrections to a video frame, the brightness module 206 determines whether the brightness of the modified video (e.g., a first video frame, a set of video frames, etc.) meets a threshold brightness. If the modified video fails to meet the threshold brightness, the brightness module 206 may change one or more of the camera settings. For example, the brightness module 206 may instruct the camera 243 to perform at least one of increasing an exposure time or modifying a sensitivity of an image sensor. The brightness module 206 may modify the image sensor by instructing the camera 243 to modify an ISO setting.
Example Method
FIG. 5 illustrates a flowchart of an example method 500 to enhance a brightness of a video frame. The method 500 is performed by a video application 103 stored on a computing device 200, such as a user device 115, a video server 101, or in part a user device 115 and in part a video server 101.
At block 502, it is determined whether a user consented to low-light mode. If the user did not consent to low-light mode, the method 500 proceeds to step 602 in FIG. 6. If the user consented to low-light mode, at block 504, it is determined that a first video frame has low light. At block 506, a linear correction is applied to provide a brightness enhancement in the first video frame that modifies a first brightness of a predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of a predetermined lightest percentage of the pixels to be greater than a lightness threshold value. Other correction methods may be used instead or in addition, such as the CLAHE correction. At block 508, the first brightness enhancement of the first video frame is averaged with a set of brightness enhancements corresponding to previous video frames to generate a modified video.
At block 510, it is determined whether the modified video satisfies a brightness threshold. If the modified video satisfies a brightness threshold, the method 500 proceeds with the next video frame. The video application 103 may also transmit the modified video to user device 115 n and/or display the modified video in the display 245 of the user device 115 a. For example, the brightness module 206 may analyze every 30th video frame. If the modified video fails to satisfy the brightness threshold, the method 500 proceeds to block 512 and one or more camera settings are changed.
FIG. 6 illustrates a flowchart of an example method 600 to obtain user consent to enable low-light mode according to some embodiments. At block 602, it is determined that there is low light in a video frame. At block 604, it is determined whether notifications can be shown 604. If notifications cannot be shown, the method 600 returns to block 602. If notifications can be shown, at block 606 a notification is shown. The notification may include a message, such as “Low light has been detected. Would you like to enable low-light mode?”
At block 608, it is determined whether low-light mode is enabled. If low-light mode is not enabled, the method 600 proceeds to block 610 where an exponential backoff is increased. For example, if the user does not want to enable low-light mode, the next notification is not shown for another day, five days, 25 days, 125 days, etc. If low-light mode is enabled, the method 600 proceeds to block 612.
At block 612, low-light mode is enabled. At block 614, low light is determined in the video frame. At block 616, brightness enhancement is performed and the method 600 continues to block 608.
In the above description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the specification. It will be apparent, however, to one skilled in the art that the disclosure can be practiced without these specific details. In some instances, structures and devices are shown in block diagram form in order to avoid obscuring the description. For example, the embodiments can be described above primarily with reference to user interfaces and particular hardware. However, the embodiments can apply to any type of computing device that can receive data and commands, and any peripheral devices providing services.
Reference in the specification to “some embodiments” or “some instances” means that a particular feature, structure, or characteristic described in connection with the embodiments or instances can be included in at least one implementation of the description. The appearances of the phrase “in some embodiments” in various places in the specification are not necessarily all referring to the same embodiments.
Some portions of the detailed descriptions above are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic data capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these data as bits, values, elements, symbols, characters, terms, numbers, or the like.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms including “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission, or display devices.
The embodiments of the specification can also relate to a processor for performing one or more steps of the methods described above. The processor may be a special-purpose processor selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a non-transitory computer-readable storage medium, including, but not limited to, any type of disk including optical disks, ROMs, CD-ROMs, magnetic disks, RAMs, EPROMs, EEPROMs, magnetic or optical cards, flash memories including USB keys with non-volatile memory, or any type of media suitable for storing electronic instructions, each coupled to a computer system bus.
The specification can take the form of some entirely hardware embodiments, some entirely software embodiments or some embodiments containing both hardware and software elements. In some embodiments, the specification is implemented in software, which includes, but is not limited to, firmware, resident software, microcode, etc.
Furthermore, the description can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer-usable or computer-readable medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
A data processing system suitable for storing or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.

Claims (20)

What is claimed is:
1. A method to enhance brightness in video frames of a video during streaming, the method comprising:
determining, by a processor, that a first video frame has low light;
determining a total brightness of the first video frame by calculating a square root of a summation of an average brightness of a set of video frames where each frame in the set of video frames is squared;
determining a multiplier that is a particular value divided by the total brightness; and
determining a final output value by multiplying the multiplier by a square root of a summation of an input value for the first video frame squared.
2. The method of claim 1, further comprising:
downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor;
transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor;
generating, by the processor, a histogram of brightness of the downscaled first video frame;
determining corresponding pixels that match a predetermined darkest percentage of pixels and corresponding pixels that match a predetermined lightest percentage of pixels, wherein the histogram of brightness is used to determine corresponding pixels that match the predetermined darkest percentage of pixels and corresponding pixels that match the predetermined lightest percentage of pixels; and
applying, by the GPU, a linear correction to the first video frame to provide a first brightness enhancement that modifies a first brightness of the predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of the predetermined lightest percentage of the pixels to be greater than a lightness threshold value.
3. The method of claim 2, wherein a brightness of a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame.
4. The method of claim 2, further comprising:
averaging, by the processor, the first brightness enhancement of the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video.
5. The method of claim 4, wherein the video frames are captured by a camera coupled to the processor, the method further comprising:
determining, by the processor, whether the modified video meets a brightness threshold;
responsive to determining that the modified video does not meet the brightness threshold, changing, by the processor, one or more camera settings; and
responsive to determining that the modified video does meet the brightness threshold, displaying the modified video.
6. The method of claim 5, wherein changing the one or more camera settings includes at least one of increasing an exposure time or modifying a sensitivity of an image sensor.
7. The method of claim 1, wherein the first video frame is determined to have low light based on at least one of an ambient light sensor value failing to meet a first threshold value or an exponential moving average frame brightness fails to meet a second threshold value.
8. The method of claim 1, further comprising:
applying contrast limited adaptive histogram equalization (CLAHE) to the first video frame.
9. The method of claim 8, wherein applying the CLAHE to the first video frame includes: (a) applying CLAHE to a luma channel of the first video frame, (b) applying CLAHE to each chroma channel of the first video frame, and (c) blending results from (a) and (b).
10. The method of claim 1, wherein the multiplier is 0.5.
11. The method of claim 1, wherein determining the total brightness includes:
determining that a first total brightness of the set of video frames exceeds a threshold value;
responsive to the first total brightness exceeding the threshold value, removing a second frame from the set of video frames; and
calculating a second total brightness.
12. A non-transitory computer-readable medium to enhance brightness in video frames of a video with instructions that, when executed by one or more processors, cause the one or more processors to perform operations, the operations comprising:
determining that a first video frame has low light; and
applying contrast limited adaptive histogram equalization (CLARE) to the first video frame by:
(a) applying CLAHE to a luma channel of the first video frame;
(b) applying CLAHE to each chroma channel of the first video frame; and
(c) blending results from (a) and (b).
13. The computer-readable medium of claim 12, wherein the operations further comprise:
downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor;
transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor;
generating, by the processor, a histogram of brightness of the downscaled first video frame,
determining corresponding pixels that match a predetermined darkest percentage of pixels and corresponding pixels that match a predetermined lightest percentage of pixels, wherein the histogram of brightness is used to determine corresponding pixels that match the predetermined darkest percentage of pixels and corresponding pixels that match the predetermined lightest percentage of pixels; and
applying, by the GPU, a linear correction to the first video frame to provide a first brightness enhancement that modifies a first brightness of the predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of the predetermined lightest percentage of the pixels to be greater than a lightness threshold value.
14. The computer-readable medium of claim 13, wherein a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame.
15. The computer-readable medium of claim 13, wherein the first video frame is determined to have low light based on at least one of an ambient light sensor value failing to meet a first threshold value or an exponential moving average frame brightness fails to meet a second threshold value.
16. The computer-readable medium of claim 13, wherein the operations further include:
averaging the first brightness enhancement of the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video.
17. A system comprising:
one or more processors; and
a memory that stores instructions executed by the one or more processors, the instructions comprising:
determining that a first video frame has low light;
determining a total brightness of the first video frame by calculating a square root of a summation of an average brightness of a set of video frames where each frame in the set of video frames is squared;
determining a multiplier that is a particular value divided by the total brightness; and
determining a final output value by multiplying the multiplier by a square root of a summation of an input value for the first video frame squared.
18. The system of claim 17, wherein the instructions further comprise:
downscaling, by a graphics processing unit (GPU) distinct from the processor, the first video frame, wherein the first video frame is stored in a GPU memory of the GPU and wherein the GPU memory is not accessible by the processor;
transferring, by the GPU, the downscaled first video frame to a computer processing memory accessible by the processor;
generating, by the processor, a histogram of brightness of the downscaled first video frame
determining corresponding pixels that match a predetermined darkest percentage of pixels and corresponding pixels that match a predetermined lightest percentage of pixels;
applying, by the GPU, a linear correction to the first video frame to provide a first brightness enhancement that modifies a first brightness of the predetermined darkest percentage of pixels to be less than a darkness threshold value or a second brightness of the predetermined lightest percentage of the pixels to be greater than a lightness threshold value;
wherein the histogram of brightness is used to determine corresponding pixels that match the predetermined darkest percentage of pixels and corresponding pixels that match the predetermined lightest percentage of pixels.
19. The system of claim 18, wherein a number of video frames in the set of video frames that are averaged is based on at least one of a frame speed of the video or an input brightness of the first video frame.
20. The system of claim 18, wherein the instructions further comprise:
averaging the first brightness enhancement of the first video frame with a set of brightness enhancements corresponding to previous video frames to generate a modified video.
US16/712,715 2019-12-12 2019-12-12 Summing-up video frames to enhance image brightness Active 2040-02-29 US11223792B2 (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
US16/712,715 US11223792B2 (en) 2019-12-12 2019-12-12 Summing-up video frames to enhance image brightness
CN202080077751.7A CN114762321B (en) 2019-12-12 2020-08-06 Superimposing video frames to enhance image brightness
PCT/US2020/045254 WO2021118650A1 (en) 2019-12-12 2020-08-06 Summing-up video frames to enhance image brightness
CN202310099102.2A CN116074632A (en) 2019-12-12 2020-08-06 Superimposing video frames to enhance image brightness
EP20758062.2A EP3900325A1 (en) 2019-12-12 2020-08-06 Summing-up video frames to enhance image brightness
US17/552,136 US11671557B2 (en) 2019-12-12 2021-12-15 Summing-up video frames to enhance image brightness

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US16/712,715 US11223792B2 (en) 2019-12-12 2019-12-12 Summing-up video frames to enhance image brightness

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/552,136 Continuation US11671557B2 (en) 2019-12-12 2021-12-15 Summing-up video frames to enhance image brightness

Publications (2)

Publication Number Publication Date
US20210185271A1 US20210185271A1 (en) 2021-06-17
US11223792B2 true US11223792B2 (en) 2022-01-11

Family

ID=72145527

Family Applications (2)

Application Number Title Priority Date Filing Date
US16/712,715 Active 2040-02-29 US11223792B2 (en) 2019-12-12 2019-12-12 Summing-up video frames to enhance image brightness
US17/552,136 Active US11671557B2 (en) 2019-12-12 2021-12-15 Summing-up video frames to enhance image brightness

Family Applications After (1)

Application Number Title Priority Date Filing Date
US17/552,136 Active US11671557B2 (en) 2019-12-12 2021-12-15 Summing-up video frames to enhance image brightness

Country Status (4)

Country Link
US (2) US11223792B2 (en)
EP (1) EP3900325A1 (en)
CN (2) CN114762321B (en)
WO (1) WO2021118650A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220109804A1 (en) * 2019-12-12 2022-04-07 Google Llc Summing-up video frames to enhance image brightness

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11348470B1 (en) * 2021-01-07 2022-05-31 Rockwell Collins, Inc. Apparent video brightness control and metric
CN116309203B (en) * 2023-05-19 2023-08-01 中国人民解放军国防科技大学 Unmanned platform motion estimation method and device with polarization vision self-adaptation enhancement

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7003153B1 (en) * 2000-09-29 2006-02-21 Sharp Laboratories Of America, Inc. Video contrast enhancement through partial histogram equalization
US20140253764A1 (en) * 2013-03-06 2014-09-11 International Business Machines Corporation Frame to frame persistent shadow reduction within an image
US20160189354A1 (en) * 2014-12-26 2016-06-30 Ricoh Company, Ltd. Image processing system, image processing device, and image processing method
CN106412383A (en) 2015-07-31 2017-02-15 阿里巴巴集团控股有限公司 Processing method and apparatus of video image
US20180005359A1 (en) 2015-11-18 2018-01-04 Tencent Technology (Shenzhen) Company Limited Group management method, terminal, and storage medium
US10277829B1 (en) * 2016-08-12 2019-04-30 Apple Inc. Video capture in low-light conditions
US20190253623A1 (en) * 2016-09-08 2019-08-15 Lg Innotek Co., Ltd. Image processing method and device supporting multiple modes, image conversion or stitching unit, and computer readable recording medium realizing the image processing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6288721B1 (en) * 1999-07-07 2001-09-11 Litton Systems, Inc. Rendering process and method for digital map illumination intensity shading
CN1770254A (en) * 2004-10-15 2006-05-10 创世纪微芯片公司 Method of generating transfer curves for adaptive contrast enhancement
US20070053587A1 (en) * 2005-08-24 2007-03-08 Ali Walid S Techniques to improve contrast enhancement using a luminance histogram
CN106303361A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 Image processing method, device, system and graphic process unit in video calling
US11223792B2 (en) * 2019-12-12 2022-01-11 Google Llc Summing-up video frames to enhance image brightness

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7003153B1 (en) * 2000-09-29 2006-02-21 Sharp Laboratories Of America, Inc. Video contrast enhancement through partial histogram equalization
US20140253764A1 (en) * 2013-03-06 2014-09-11 International Business Machines Corporation Frame to frame persistent shadow reduction within an image
US20160189354A1 (en) * 2014-12-26 2016-06-30 Ricoh Company, Ltd. Image processing system, image processing device, and image processing method
CN106412383A (en) 2015-07-31 2017-02-15 阿里巴巴集团控股有限公司 Processing method and apparatus of video image
US20180005359A1 (en) 2015-11-18 2018-01-04 Tencent Technology (Shenzhen) Company Limited Group management method, terminal, and storage medium
US10277829B1 (en) * 2016-08-12 2019-04-30 Apple Inc. Video capture in low-light conditions
US20190253623A1 (en) * 2016-09-08 2019-08-15 Lg Innotek Co., Ltd. Image processing method and device supporting multiple modes, image conversion or stitching unit, and computer readable recording medium realizing the image processing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WIPO, International Search Report for International Patent Application No. PCT/US2020/045254, dated Oct. 8, 2020, 4 pages.
WIPO, Written Opinion for International Patent Application No. PCT/US2020/045254, dated Oct. 8, 2020, 10 pages.

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220109804A1 (en) * 2019-12-12 2022-04-07 Google Llc Summing-up video frames to enhance image brightness
US11671557B2 (en) * 2019-12-12 2023-06-06 Google Llc Summing-up video frames to enhance image brightness

Also Published As

Publication number Publication date
US20220109804A1 (en) 2022-04-07
US20210185271A1 (en) 2021-06-17
CN114762321B (en) 2023-03-10
EP3900325A1 (en) 2021-10-27
CN114762321A (en) 2022-07-15
US11671557B2 (en) 2023-06-06
CN116074632A (en) 2023-05-05
WO2021118650A1 (en) 2021-06-17

Similar Documents

Publication Publication Date Title
US11671557B2 (en) Summing-up video frames to enhance image brightness
US11100613B2 (en) Systems and methods for enhancing edges in images
US20160094824A1 (en) Image processing method, image processing apparatus and electronic device
EP2987134B1 (en) Generation of ghost-free high dynamic range images
US8405736B2 (en) Face detection using orientation sensor data
US9195880B1 (en) Interactive viewer for image stacks
US9704227B2 (en) Method and apparatus for image enhancement
EP3707895B1 (en) Static video recognition
TW202032425A (en) Method, apparatus and electronic device for image processing and storage medium
US20170091557A1 (en) Systems And Methods For Post Processing Time-lapse Videos
US20190313005A1 (en) Tone mapping for high-dynamic-range images
WO2022111269A1 (en) Method and device for enhancing video details, mobile terminal, and storage medium
US11418766B2 (en) Apparatus and method for chroma processing for multi-frame fusion
US8537175B1 (en) Video enhancement for large scale applications
CN114298935A (en) Image enhancement method, device and computer readable storage medium
US20170278229A1 (en) Image Processing Method, Computer Storage Medium, Apparatus and Terminal
FR2947082A1 (en) METHOD AND DEVICE FOR PROCESSING A DIGITAL IMAGE TO LIGHTEN THIS IMAGE.
CN114841904B (en) Image fusion method, electronic equipment and storage device
US11989913B2 (en) Dynamic calibration correction in multi-frame, multi-exposure capture
CN116721038A (en) Color correction method, electronic device, and storage medium
WO2016046664A1 (en) Image processing method, image processing apparatus and electronic device

Legal Events

Date Code Title Description
FEPP Fee payment procedure

Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

AS Assignment

Owner name: GOOGLE LLC, CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:KALLIOMAEKI, SAMI;BLUM, NIKLAS;EKERFELT, STEFAN;AND OTHERS;SIGNING DATES FROM 20191217 TO 20200107;REEL/FRAME:051436/0449

FEPP Fee payment procedure

Free format text: PETITION RELATED TO MAINTENANCE FEES GRANTED (ORIGINAL EVENT CODE: PTGR); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS

STPP Information on status: patent application and granting procedure in general

Free format text: AWAITING TC RESP., ISSUE FEE NOT PAID

STPP Information on status: patent application and granting procedure in general

Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT RECEIVED

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED

STCF Information on status: patent grant

Free format text: PATENTED CASE