Patent ID: 12231780

DETAILED DESCRIPTION

FIGS.1through13, discussed below, and the various embodiments of this disclosure are described with reference to the accompanying drawings. However, it should be appreciated that this disclosure is not limited to these embodiments and all changes and/or equivalents or replacements thereto also belong to the scope of this disclosure.

As discussed above, many mobile electronic devices, such as smartphones and tablet computers, include cameras that can be used to capture still and video images. While convenient, cameras on mobile electronic devices typically suffer from a number of shortcomings. For example, cameras on mobile electronic devices often capture multiple image frames at different exposure values (EVs). EV-0 has a restricted exposure time that avoids flicker artifacts caused by light flickers (such as sinusoidal manifestations of 50 Hz or 60 Hz AC-power light fluctuations due to a rolling shutter). However, short frames (such as frames captured at EV-4, EV-2, etc.) can be susceptible to flicker artifacts. Flicker artifacts can manifest as stain artifacts and/or regions of varying illumination in images.

Flicker can be difficult to control or avoid in various circumstances. For example, the frequency of the flicker can depend on (i) the AC power frequency of a lighting source (such as either 50 Hz or 60 Hz) and (ii) the rolling shutter frequency of a device capturing image frames. Hence, it is difficult to determine the frequency of the flicker that is present in an image. Moreover, the flicker may not be uniform across some image frames, such as when only part of an image frame is illuminated by an AC lighting source while other parts are not. As mentioned above, EV-0 is flicker-free. However, EV-0 cannot address the issue of saturated ghosts and thus is not good for high dynamic range (HDR) recovery. Conversely, short reference frames (such as frames captured at EV-4, EV-2, etc.), although prone to flicker artifacts, are useful in addressing saturated ghosts. As a result, it may be necessary or desirable to avoid using short frames (such as EV-4, EV-2, etc.) as reference frames when flicker is detected while still using the short frames as reference frames whenever possible (such as when no flicker is detected) for high-quality HDR recovery.

This disclosure provides various techniques for flicker avoidance in multi-frame multi-exposure image captures. As described in more detail below, the disclosed systems and methods obtain asymmetrical image pairs from multiple image frames, obtain features based on the image pairs, and determine whether or not one of the image frames in each pair contains flicker. If an image frame contains flicker, that image frame may not be considered as a reference candidate. If an image frame does not contain flicker, that image frame may be considered as a reference candidate. In this way, the disclosed embodiments enable image processing techniques to avoid staining artifacts or other artifacts that can occur due to flicker in reference frames. This results in sharper resulting images, thereby enhancing user experience. Note that while some of the embodiments discussed below are described in the context of use in consumer electronic devices (such as smartphones), this is merely one example. It will be understood that the principles of this disclosure may be implemented in any number of other suitable contexts and may use any suitable devices.

FIG.1illustrates an example network configuration100including an electronic device according to this disclosure. The embodiment of the network configuration100shown inFIG.1is for illustration only. Other embodiments of the network configuration100could be used without departing from the scope of this disclosure.

According to embodiments of this disclosure, an electronic device101is included in the network configuration100. The electronic device101can include at least one of a bus110, a processor120, a memory130, an input/output (I/O) interface150, a display160, a communication interface170, or a sensor180. In some embodiments, the electronic device101may exclude at least one of these components or may add at least one other component. The bus110includes a circuit for connecting the components120-180with one another and for transferring communications (such as control messages and/or data) between the components.

The processor120includes one or more processing devices, such as one or more microprocessors, microcontrollers, digital signal processors (DSPs), application specific integrated circuits (ASICs), or field programmable gate arrays (FPGAs). In some embodiments, the processor120includes one or more of a central processing unit (CPU), an application processor (AP), a communication processor (CP), or a graphics processor unit (GPU). The processor120is able to perform control on at least one of the other components of the electronic device101and/or perform an operation or data processing relating to communication or other functions. As described in more detail below, the processor120may perform one or more operations for flicker avoidance in multi-frame multi-exposure image captures.

The memory130can include a volatile and/or non-volatile memory. For example, the memory130can store commands or data related to at least one other component of the electronic device101. According to embodiments of this disclosure, the memory130can store software and/or a program140. The program140includes, for example, a kernel141, middleware143, an application programming interface (API)145, and/or an application program (or “application”)147. At least a portion of the kernel141, middleware143, or API145may be denoted an operating system (OS).

The kernel141can control or manage system resources (such as the bus110, processor120, or memory130) used to perform operations or functions implemented in other programs (such as the middleware143, API145, or application147). The kernel141provides an interface that allows the middleware143, the API145, or the application147to access the individual components of the electronic device101to control or manage the system resources. The application147may support one or more functions for flicker avoidance in multi-frame multi-exposure image captures as discussed below. These functions can be performed by a single application or by multiple applications that each carry out one or more of these functions. The middleware143can function as a relay to allow the API145or the application147to communicate data with the kernel141, for instance. A plurality of applications147can be provided. The middleware143is able to control work requests received from the applications147, such as by allocating the priority of using the system resources of the electronic device101(like the bus110, the processor120, or the memory130) to at least one of the plurality of applications147. The API145is an interface allowing the application147to control functions provided from the kernel141or the middleware143. For example, the API145includes at least one interface or function (such as a command) for filing control, window control, image processing, or text control.

The I/O interface150serves as an interface that can, for example, transfer commands or data input from a user or other external devices to other component(s) of the electronic device101. The I/O interface150can also output commands or data received from other component(s) of the electronic device101to the user or the other external device.

The display160includes, for example, a liquid crystal display (LCD), a light emitting diode (LED) display, an organic light emitting diode (OLED) display, a quantum-dot light emitting diode (QLED) display, a microelectromechanical systems (MEMS) display, or an electronic paper display. The display160can also be a depth-aware display, such as a multi-focal display. The display160is able to display, for example, various contents (such as text, images, videos, icons, or symbols) to the user. The display160can include a touchscreen and may receive, for example, a touch, gesture, proximity, or hovering input using an electronic pen or a body portion of the user.

The communication interface170, for example, is able to set up communication between the electronic device101and an external electronic device (such as a first electronic device102, a second electronic device104, or a server106). For example, the communication interface170can be connected with a network162or164through wireless or wired communication to communicate with the external electronic device. The communication interface170can be a wired or wireless transceiver or any other component for transmitting and receiving signals.

The wireless communication is able to use at least one of, for example, long term evolution (LTE), long term evolution-advanced (LTE-A), 5th generation wireless system (5G), millimeter-wave or 60 GHz wireless communication, Wireless USB, code division multiple access (CDMA), wideband code division multiple access (WCDMA), universal mobile telecommunication system (UMTS), wireless broadband (WiBro), or global system for mobile communication (GSM), as a cellular communication protocol. The wired connection can include, for example, at least one of a universal serial bus (USB), high definition multimedia interface (HDMI), recommended standard 232 (RS-232), or plain old telephone service (POTS). The network162or164includes at least one communication network, such as a computer network (like a local area network (LAN) or wide area network (WAN)), Internet, or a telephone network.

The electronic device101further includes one or more sensors180that can meter a physical quantity or detect an activation state of the electronic device101and convert metered or detected information into an electrical signal. For example, one or more sensors180include one or more cameras or other imaging sensors for capturing images of scenes. The sensor(s)180can also include one or more buttons for touch input, a gesture sensor, a gyroscope or gyro sensor, an air pressure sensor, a magnetic sensor or magnetometer, an acceleration sensor or accelerometer, a grip sensor, a proximity sensor, a color sensor (such as a red green blue (RGB) sensor), a bio-physical sensor, a temperature sensor, a humidity sensor, an illumination sensor, an ultraviolet (UV) sensor, an electromyography (EMG) sensor, an electroencephalogram (EEG) sensor, an electrocardiogram (ECG) sensor, an infrared (IR) sensor, an ultrasound sensor, an iris sensor, or a fingerprint sensor. The sensor(s)180can further include an inertial measurement unit, which can include one or more accelerometers, gyroscopes, and other components. In addition, the sensor(s)180can include a control circuit for controlling at least one of the sensors included here. Any of these sensor(s)180can be located within the electronic device101.

The first external electronic device102or the second external electronic device104can be a wearable device or an electronic device-mountable wearable device (such as an HMD). When the electronic device101is mounted in the electronic device102(such as the HMD), the electronic device101can communicate with the electronic device102through the communication interface170. The electronic device101can be directly connected with the electronic device102to communicate with the electronic device102without involving with a separate network. The electronic device101can also be an augmented reality wearable device, such as eyeglasses, that include one or more imaging sensors.

The first and second external electronic devices102and104and the server106each can be a device of the same or a different type from the electronic device101. According to certain embodiments of this disclosure, the server106includes a group of one or more servers. Also, according to certain embodiments of this disclosure, all or some of the operations executed on the electronic device101can be executed on another or multiple other electronic devices (such as the electronic devices102and104or server106). Further, according to certain embodiments of this disclosure, when the electronic device101should perform some function or service automatically or at a request, the electronic device101, instead of executing the function or service on its own or additionally, can request another device (such as electronic devices102and104or server106) to perform at least some functions associated therewith. The other electronic device (such as electronic devices102and104or server106) is able to execute the requested functions or additional functions and transfer a result of the execution to the electronic device101. The electronic device101can provide a requested function or service by processing the received result as it is or additionally. To that end, a cloud computing, distributed computing, or client-server computing technique may be used, for example. WhileFIG.1shows that the electronic device101includes the communication interface170to communicate with the external electronic device104or server106via the network162or164, the electronic device101may be independently operated without a separate communication function according to some embodiments of this disclosure.

The server106can include the same or similar components110-180as the electronic device101(or a suitable subset thereof). The server106can support to drive the electronic device101by performing at least one of operations (or functions) implemented on the electronic device101. For example, the server106can include a processing module or processor that may support the processor120implemented in the electronic device101. As described in more detail below, the server106may perform one or more operations to support techniques for flicker avoidance in multi-frame multi-exposure image captures.

AlthoughFIG.1illustrates one example of a network configuration100including an electronic device101, various changes may be made toFIG.1. For example, the network configuration100could include any number of each component in any suitable arrangement. In general, computing and communication systems come in a wide variety of configurations, andFIG.1does not limit the scope of this disclosure to any particular configuration. Also, whileFIG.1illustrates one operational environment in which various features disclosed in this patent document can be used, these features could be used in any other suitable system.

FIG.2illustrates an example process200for flicker avoidance in multi-frame multi-exposure image captures according to this disclosure. The flicker avoidance process200is based on examination of asymmetrical image frame pairs, where (i) each pair includes a first image frame and a second image frame and (ii) the first image frame has a shorter exposure than the second image frame. For ease of explanation, the process200is described as being performed using the electronic device101in the network configuration100ofFIG.1. However, this is merely one example, and the process200could be performed using any other suitable device(s) and in any other suitable system(s), such as when performed using the electronic device102or104or the server106.

As shown inFIG.2, the electronic device101obtains multiple image frames201-203at different exposures. In some embodiments, the image frames201-203can represent images captured by the electronic device101in a capture burst using one or more image sensors180(such as cameras). In the process200, the image frames201-203include an image frame201at the EV-0 exposure, an image frame202at the EV-2 exposure, and an image frame203at the EV-4 exposure. These exposures are representative examples, and the process200can include other or additional image frames at other or additional exposures. The EV-2 image frame202and the EV-4 image frame203are considered the short exposure frames, and the EV-0 image frame201is considered the regular exposure frame. It is assumed that the EV-0 image frame201is flicker-free due to its well-conditioned exposure time.

At operation205, the electronic device101determines whether there is flicker in the EV-4 image frame203based on an image frame pair containing the EV-4 image frame203and the EV-0 image frame201. There are multiple suitable techniques for detecting flicker in the short frames202and203, and the electronic device101can use any of these suitable techniques for detecting flicker in the EV-4 image frame203. Several example techniques are described in greater detail below. If flicker is not detected in the EV-4 image frame203, at operation210, the electronic device101enables the EV-4 image frame203as a reference candidate. If flicker is detected in the EV-4 image frame203, at operation215, the electronic device101disables the EV-4 image frame203as a reference candidate.

At operation220, the electronic device101determines whether there is flicker in the EV-2 image frame202based on the image frame pair containing the EV-2 image frame202and the EV-0 image frame201. To detect flicker in the EV-2 image frame202, the electronic device101can use the same flicker detection technique used in operation205or another suitable detection technique, such as one of the other techniques described in greater detail below. If flicker is not detected in the EV-2 image frame202, at operation225, the electronic device101enables the EV-2 image frame202as a reference candidate. If flicker is detected in the EV-2 image frame202, at operation230, the electronic device101disables the EV-2 image frame202as a reference candidate. At operation235, the electronic device101enables the EV-0 image frame201as a reference candidate, since the EV-0 image frame201is assumed to be flicker-free.

As shown inFIG.2, in the process200, the EV-0 image frame201is always enabled as a reference candidate. The EV-4 image frame203and the EV-2 image frame202can also be enabled as reference candidates depending on whether or not these short frames contain flicker. If both the EV-4 image frame203and the EV-2 image frame202contain flicker, only EV-0 is used as a reference candidate. By allowing for more than one reference candidate, the process200provides more choices for a subsequent reference selector in a downstream image processing technique.

AlthoughFIG.2illustrates one example of a process200for flicker avoidance in multi-frame multi-exposure image captures, various changes may be made toFIG.2. For example, while described as involving a specific sequence of operations, various operations of the techniques described with respect toFIG.2could overlap, occur in parallel, occur in a different order, or occur any number of times (including zero times). As a particular example, the detection of flicker in the EV-2 image frame202could occur before or in parallel with the detection of flicker in the EV-4 image frame203. Also, the exposure levels of the short frames202and203could include exposure levels other than or in addition to EV-2 and EV-4. In addition, the specific operations shown inFIG.2are examples only, and other techniques could be used to perform each of the operations shown inFIG.2.

FIGS.3through6illustrate example processes300,400,500,600for detecting flicker in multi-frame multi-exposure image captures according to this disclosure. Each of the processes300,400,500,600may be used for flicker detection in the process200, such as in operations205and220. As described in greater detail below, the process300uses maximum likelihood (ML) estimates for both unknown flicker frequency and spatial location. The process400uses maximum a posteriori (MAP) estimates for both unknown flicker frequency and spatial location. The process500uses heuristic or ad-hoc estimates for both unknown flicker frequency and spatial location. The process600uses machine learning techniques for both unknown flicker frequency and spatial location. The flicker detection processes300,400,500,600are based on examination of asymmetrical image frame pairs, where (i) each pair includes a first image frame and a second image frame and (ii) the first image frame has a shorter exposure than the second image frame. For example, the first image frame may represent the EV-4 image frame203or the EV-2 image frame202, and the second image frame may represent the EV-0 image frame201. For ease of explanation, each of the processes300,400,500,600is described as being performed using the electronic device101in the network configuration100ofFIG.1. However, this is merely one example, and each of the processes300,400,500,600could be performed using any other suitable device(s) and in any other suitable system(s), such as when performed using the electronic device102or104or the server106.

As shown inFIG.3, the process300uses ML estimates for both unknown flicker frequency and spatial location. At operation305, the electronic device101obtains an asymmetrical image pair including two image frames having different exposures, such as the EV-4 image frame203and the EV-0 image frame201or the EV-2 image frame202and the EV-0 image frame201. At operation310, the electronic device101equalizes and converts the image frames of the image pair into a luma-chroma (YUV) domain before registration of the image pair. The equalization and conversion to the YUV domain represent basic image pre-processing techniques to prepare the image pair for analysis. Any suitable techniques for equalization and conversion to the YUV domain (including those currently known and those that are developed in the future) or other domain can be used in the operation310.

At operation315, the electronic device101determines an absolute difference image between the image frames. In some embodiments, the difference image is computed using a pixel-wise subtraction between the pre-processed image frames and taking the absolute value of each pixel difference. The computation of the difference image provides a baseline that reveals any sinusoidal flicker artifacts in the shorter exposure frame.FIG.7illustrates an example difference image700according to this disclosure. Here, the difference image700was computed based on a difference between a shorter exposure frame (such as the EV-4 image frame203or the EV-2 image frame202) and a longer exposure frame (such as the EV-0 image frame201). As shown inFIG.7, the difference image700can be arranged in rows and columns that correspond to the rows and columns of the image frames.

At operation320, the electronic device101divides the difference image into overlapping patches in order to search across unknown spatial locations.FIG.8illustrates an example difference image800(which can represent the difference image700) divided into multiple sets of patches according to this disclosure. As shown inFIG.8, the difference image800has been divided into three sets801-803of image patches804, although other numbers of sets of image patches can be selected. In this example, each set801-803includes sixteen image patches804arranged in a 4×4 grid configuration, although other numbers of sets and numbers of image patches may be used. The image patches804in one set801-803are together the same size as the difference image800. Thus, if the difference image800is a 2,000 pixel by 1,500 pixel image, each image patch804may have a size of 500 pixels by 375 pixels. The size of each image patch804can be determined based on the size of the difference image800and can be predetermined. As another example, in some embodiments, the size of each image patch804is 50 pixels wide by one half of the height of the difference image800. This size has been determined in some experiments as being a good compromise between a patch that is too small (resulting in a low signal-to-noise ratio) and a patch that is too large (which would fail to localize the flicker signal).

Each set801-803is offset from other sets801-803such that the image patches804of different sets801-803may overlap. That is, one image patch804in the set801overlaps with an image patch804in at least one of the other sets802-803. Some sets801-803may be offset in the X direction from another set801-803, such as where the set801is offset from the set802in the X direction. Also, some sets801-803may be offset in the Y direction from another set801-803. Further, some sets801-803may be offset in both the X and Y directions from another set801-803, such as where the set803is offset from the sets801and802in both the X and Y directions. The size(s) of the offset between the sets801-803can be set in any suitable manner In some cases, the size(s) of the offset may be predetermined based on the size of each image patch804. In some embodiments, the offset is determined such that there is 50% overlap between the sets of image patches804. Any suitable technique can be used for dividing the difference image800into multiple sets801-803of image patches804. WhileFIG.8shows three overlapping sets801-803, other numbers of sets are possible. Also, different numbers of image patches in each set and different sizes of image patches are possible.

At operation325, the electronic device101performs FFT-based analysis on each patch of the difference image to search across the frequencies of each patch. For example, the electronic device101may perform the analysis to obtain the dominant frequency (and its associated normalized energy) for each patch. As a particular example, in a rolling camera shutter, the sensor fills in rows of the image turn-by turn. Therefore, the electronic device101may average each patch across the columns to obtain a one-dimensional (1D) signal that represents an average brightness across rows of the patch. Once the 1D signal is obtained, the electronic device101can perform the FFT analysis of the 1D signal to determine the dominant frequency.

FIGS.9A and9Billustrate an example construction of a 1D signal according to this disclosure. InFIG.9A, an image patch901is shown, which can represent one of the image patches804. The image patch901is arranged in rows and columns. The electronic device101averages the image patch901across the columns to obtain a 1D signal902(shown inFIG.9B) that represents an average brightness across rows of the image patch901. Patches that have a strong presence of flicker will show a strong sinusoidal component in their 1D signal. This is evident in the case of the image patch901. The flicker present in the image patch901is reflected in the sinusoidal shape of the 1D signal902.FIGS.10A and10Billustrate an example determination of an FFT frequency signal from a 1D signal to determine a dominant frequency according to this disclosure.FIG.10Ashows the 1D signal902obtained in conjunction withFIG.9B.FIG.10Bshows an FFT frequency signal1001of the 1D signal902. From the FFT frequency signal1001, the electronic device101can determine the dominant frequency in the 1D signal902.

Once the FFT frequency signal1001is obtained for each patch, the electronic device101selects the frequency and patch with maximum normalized energy at operation330. The electronic device101also compares this maximum normalized energy value with a preset or other specified threshold for flicker detection. Here, normalized energy is a 2D function of frequency and patch location. In particular, the electronic device101detects the dominant frequency across each patch based on the FFT frequency signal1001. The electronic device101searches the dominant frequencies across all patches for a largest normalized energy (En1) and compares the largest normalized energy to a preset or other specified threshold (Th1). If En1>Th1, the electronic device101determines that flicker is present in the shorter exposure frame. Otherwise, if En1<Th1, the electronic device101determines that flicker is not present in the shorter exposure frame. In some embodiments, the threshold Th1 is set to minimize false alarms and a miss detection rate using a dataset with both flicker present and absent.

Turning toFIG.4, the process400for detecting flicker in multi-frame multi-exposure image captures will now be described in greater detail. As shown inFIG.4, the process400uses MAP estimates for both unknown flicker frequency and spatial location. The process400includes a number of operations that are the same as or similar to corresponding operations in the process300. For example, operations405-425may be the same as or similar to operations305-325in the process300. At operation405, the electronic device101obtains an asymmetrical image pair including two image frames having different exposures, such as the EV-4 image frame203and the EV-0 image frame201or the EV-2 image frame202and the EV-0 image frame201. At operation410, the electronic device101equalizes and converts the image frames of the image pair into the YUV domain. At operation415, the electronic device101computes an absolute difference image (such as the difference image700) between the image frames. At operation420, the electronic device101divides the difference image into overlapping patches (such as the image patches804). At operation425, the electronic device101performs FFT-based analysis on each patch of the difference image to search across the frequencies of each patch. This can include obtaining a 1D signal representing an average brightness across rows of the patch and computing the FFT frequency signal from the 1D signal.

Once the FFT frequency signal1001is obtained for each patch, the electronic device101computes the weighted average of normalized energy across frequencies and patches at operation430. The electronic device101also compares the weighted average energy value with a preset or other specified threshold for flicker detection. The electronic device101determines a weighted average of normalized energy (En2) across frequencies and patches. Here, normalized energy is a 2D function of frequency and patch location. To incorporate prior knowledge about the flicker signal (such as knowledge that lower frequency bins and center patches are more likely to contain the flicker signals than others), the electronic device101aggregates the energy function across frequencies and patches, weighted by a prior function on each of the frequencies and patches. This decision rule maximizes the a posteriori probability of unknown components. The electronic device101compares the weighted average of normalized energy (En2) to a preset or other specified threshold (Th2). If En2>Th2, the electronic device101determines that flicker is present in the shorter exposure frame. Otherwise, if En2<Th2, the electronic device101determines that flicker is not present in the shorter exposure frame. In some embodiments, the threshold Th2 is set to minimize false alarms and a miss detection rate using a dataset with both flicker present and absent.

Turning toFIG.5, the process500for detecting flicker in multi-frame multi-exposure image captures will now be described in greater detail. As shown inFIG.5, the process500uses heuristic or ad-hoc estimates for both unknown flicker frequency and spatial location. The process500includes a number of operations that are the same as or similar to corresponding operations in the process500. For example, operations505-515may be the same as or similar to operations305-325in the process300. At operation505, the electronic device101obtains an asymmetrical image pair including two image frames having different exposures, such as the EV-4 image frame203and the EV-0 image frame201or the EV-2 image frame202and the EV-0 image frame201. At operation505, the electronic device101also equalizes and converts the image frames of the image pair into the YUV domain and determines an absolute difference image (such as the difference image700) between the image frames. At operation510, the electronic device101divides the difference image into overlapping patches (such as the image patches804). At operation515, the electronic device101performs FFT-based analysis on each patch of the difference image to search across the frequencies and obtain the dominant frequency (and its associated normalized energy) for each patch. This can include obtaining a 1D signal representing an average brightness across rows of the patch and computing the FFT frequency signal from the 1D signal.

At operation520, the electronic device101counts the number of patches in the difference image with flicker present. In some embodiments, the electronic device101uses the FFT frequency signal of the 1D signal to determine whether there is flicker in a given patch.FIG.11illustrates example pseudocode1100representing detection logic of a patch, which can be used by the electronic device101to determine whether there is flicker in the patch. InFIG.11, it is assumed that the flicker frequency will manifest in Y(1) or Y(2). InFIG.11, the parameters T1and T2are predetermined or other specified threshold values. Examples of the threshold values are T1=0.1 and T2=0.1. Of course, other suitable values are possible. The parameters T1and T2can be selected using various techniques, such as heuristic estimates based on empirical observation of an absolute FFT histogram. In some embodiments, the heuristic estimates can be determined by studying the histogram of absolute values of FFT parameters for patches containing flicker and no flicker and studying the scale of the FFT parameters for the two cases.

Instead of setting the parameters T1and T2, a full regression analysis of the FFT spectrum across training data patches can be performed. In this technique, a linear (or non-linear) model of flicker detection is constructed as a function of FFT coefficients, such as represented by the following equation.

t=log⁢p1-p=b0+b1⁢Y1+b2⁢Y2+…+bn⁢Yn
Here, p is the probability that a patch contains flicker. This equation can be used to train a multi-variable logistic regression model, such as by way of minimizing a cross-entropy loss function, to estimate the parameters [b0, b1, . . . , bn]. Once estimated, the parameters [b0, b1, . . . , bn] can be used to estimate the probability of flicker in a patch as follows.

p=11+e-(b0+b1⁢Y1+b2⁢Y2+…+bn⁢Yn).

At operation525, the electronic device101determines if the number of patches with flicker is greater than a threshold value T3. In some embodiments, the threshold value T3may be set as a predetermined or other specified percentage of the overall number of patches in the difference image. In other embodiments, the threshold T3can be chosen to arrive at a trade-off between false positives and false negatives (such as T3=0.20). Of course, other suitable values may be used for the threshold value. If the electronic device101determines that the number of patches with flicker is greater than the threshold value (such as greater than a specific percentage), at operation530, the electronic device101determines that flicker is detected in the shorter exposure frame. If the electronic device101determines that the number of patches with flicker is not greater than the threshold value, at operation535, the electronic device101determines that flicker is not detected in the shorter exposure frame.

Turning toFIG.6, the process600for detecting flicker in multi-frame multi-exposure image captures will now be described in greater detail. As shown inFIG.6, the process600uses machine learning techniques to determine the presence of flicker in the shorter exposure frame. In the process600, the electronic device101obtains test data605and provides the test data605as inputs to a machine learning model610. The test data605can include feature vectors that are determined for the machine learning model610. For example, the feature vectors can include one or more FFT frequency signals of image differences (such as the FFT frequency signal1001). The machine learning model610operates on the test data605and outputs a determination615, which is a prediction of whether flicker is present or not present in the short exposure frame. The machine learning model610can represent any suitable machine learning model for predicting flicker. In some embodiments, the machine learning model610can be a supervised learning model (such as a linear regression model, a support vector machine (SVM), and the like) or an unsupervised learning model (such as a convolutional neural network or other deep neural network).

FIGS.12A and12Billustrate example processes that can be performed to train the machine learning model610according to this disclosure. In particular,FIG.12Ashows a process1200for training a supervised learning model, andFIG.12Bshows a process1250for training an unsupervised learning model. For ease of explanation, the processes1200and1250are described as being performed using the server106in the network configuration100ofFIG.1. However, this is merely one example, and the processes1200and1250could be performed using any other suitable device(s) and in any other suitable system(s), such as when performed using the electronic device101,102, or104.

As shown inFIG.12A, the server106obtains training data1202and computes multiple feature vectors1204from the training data1202. The training data1202can be real, synthetic, or a combination of these and can include one or more difference image patches, such as the image patches804. Each of the training image patches can be associated with one or more labels, such as “Flicker Present” or “Flicker Absent.” The computed feature vectors1204can include one or more FFT frequency signals of image differences (such as the FFT frequency signal1001). In some embodiments, the feature vectors1204can include pairs of FFT frequency signals, where each pair of FFT frequency signals includes a flicker-free frequency signal and a corresponding frequency signal containing flicker.

The training of the machine learning model610is performed iteratively in rounds, where a loss calculation1210(such as one using a cross-entropy loss function) is performed in each round. The loss calculation1210represents a difference between the flicker predicted by the machine learning model610and a ground truth value of flicker for the training data1202. In some embodiments, the training of the machine learning model610can be performed using a machine learning toolbox, such as MATLAB. However, other suitable methods and tools for training can be used. Once trained, the machine learning model610can be used to predict presence of flicker in a patch given an absolute FFT frequency signal (such as the FFT frequency signal1001).

As shown inFIG.12B, in the process1250, the server106obtains training data1202, which can be real, synthetic, or a combination of these and can include one or more difference image patches, such as the image patches804. The training data1202can additionally or alternatively include reference image training patches and shorter frame training patches. Each of the training image patches can be associated with one or more labels, such as “Flicker Present” or “Flicker Absent.” The training data1202is provided as input to the machine learning model610, which inFIG.12Bcan be a deep learning network, such as a convolutional neural network. The training of the machine learning model610is performed iteratively in rounds, where a loss calculation1210(such as one using a cross-entropy loss function) is performed in each round. The loss calculation1210represents a difference between the flicker predicted by the machine learning model610and a ground truth value of flicker for the training data1202. In some embodiments, the training of the machine learning model610can be performed to predict the probability of flicker in the input image. In particular embodiments, the training of the machine learning model610can be performed using a standard deep learning library, such as PYTORCH or TENSORFLOW.

AlthoughFIGS.3through12Billustrate example processes for detecting flicker in multi-frame multi-exposure image captures and related details, various changes may be made toFIGS.3through12B. For example, while described as involving a specific sequence of operations, various operations of the techniques described with respect toFIGS.3through12Bcould overlap, occur in parallel, occur in a different order, or occur any number of times (including zero times). In addition, the specific operations shown inFIGS.3through12Bare examples only, and other techniques could be used to perform each of the operations shown inFIGS.3through12B.

Note that the operations and functions shown in or described with respect toFIGS.2through12Bcan be implemented in an electronic device101, server106, or other device(s) in any suitable manner. For example, in some embodiments, the operations and functions shown in or described with respect toFIGS.2through12Bcan be implemented or supported using one or more software applications or other software instructions that are executed by the processor120of the electronic device101, server106, or other device(s). In other embodiments, at least some of the operations and functions shown in or described with respect toFIGS.2through12Bcan be implemented or supported using dedicated hardware components. In general, the operations and functions shown in or described with respect toFIGS.2through12Bcan be performed using any suitable hardware or any suitable combination of hardware and software/firmware instructions.

FIG.13illustrates an example method1300for flicker avoidance in multi-frame multi-exposure image captures according to this disclosure. For ease of explanation, the method1300shown inFIG.13is described as being performed using the electronic device101and involving one or more of the processes200,300,400,500,600shown inFIGS.2through6. However, the method1300shown inFIG.13could be used with any other suitable device(s) and in any other suitable system(s) and involve any other suitable process(es).

As shown inFIG.13, multiple image frames are obtained at step1301. This could include, for example, the electronic device101capturing or otherwise obtaining the image frames201-203. An asymmetrical image pair is selected from the multiple image frames at step1303. The asymmetrical image pair includes a first image frame and a second image frame, where the first image frame has a shorter exposure than the second image frame. This could include, for example, the electronic device101selecting either the EV-2 image frame202and the EV-0 image frame201as an image pair or selecting the EV-4 image frame203and the EV-0 image frame201as an image pair.

One or more features are obtained based on the asymmetrical image pair at step1305. This could include, for example, the electronic device101performing operations of one of the processes300,400,500,600(such as the operations315-325) to determine one or more FFT frequency signals1001, which are representative of frequency components in a signal representing the average brightness across an image patch. A determination is made whether the first image frame contains flicker based on the one or more features at step1307. This could include, for example, the electronic device101performing operation205or220to detect flicker in the EV-2 image frame202or the EV-4 image frame203. More specifically, this could include the electronic device101performing one or more operations of the process300,400,500,600to determine whether the EV-2 image frame202or the EV-4 image frame203contains flicker.

If it is determined that the first image frame contains flicker, the first image frame is disabled as a reference candidate at step1309. This could include, for example, the electronic device101performing operation215to disable the EV-4 image frame203as a reference candidate or performing operation230to disable the EV-2 image frame202as a reference candidate. If it is determined that the first image frame does not contain flicker, the first image frame is enabled as a reference candidate at step1311. This could include, for example, the electronic device101performing operation210to enable the EV-4 image frame203as a reference candidate or performing operation225to enable the EV-2 image frame202as a reference candidate.

AlthoughFIG.13illustrates one example of a method1300for flicker avoidance in multi-frame multi-exposure image captures, various changes may be made toFIG.13. For example, while shown as a series of steps, various steps inFIG.13could overlap, occur in parallel, occur in a different order, or occur any number of times.

Although this disclosure has been described with reference to various example embodiments, various changes and modifications may be suggested to one skilled in the art. It is intended that this disclosure encompass such changes and modifications as fall within the scope of the appended claims.