Local histogram matching with global regularization and motion exclusion for multi-exposure image fusion

The local histogram matching method through global regularization and motion exclusion solves the problems of brightness inconsistency and color distortion in multi-exposure image fusion, reduces motion blur and image artifacts, and improves the quality of image fusion.

CN112351212BActive Publication Date: 2024-09-17SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010786127.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-08-04
Filing Date
2020-08-06
Publication Date
2024-09-17
Estimated Expiration
2040-08-06

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively process image frames under different exposure settings in multi-exposure image fusion, resulting in inconsistent brightness and color distortion. In particular, it is difficult to find reliable histogram matching when processing local image content, resulting in the generation of image artifacts.

Method used

The local histogram matching method with global regularization and motion exclusion is used to calculate the local histogram matching map to adjust the image data by excluding pixels associated with motion in the image frame and dividing the image frame into multiple parts or tiles. Make it closer to the histogram of the reference image frame, and generate a histogram-matched image frame.

Benefits of technology

Motion blur in the final image is reduced, adaptability to different types of local image content is improved, image artifacts in over- and under-exposed areas are significantly reduced, and the quality of image fusion is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112351212B_ABST
    Figure CN112351212B_ABST
Patent Text Reader

Abstract

A method includes acquiring a plurality of image frames of a scene. The plurality of image frames include a first image frame and a second image frame captured using different exposures. The method also includes excluding pixels in the first image frame and the second image frame based on a motion map identifying motion. The method also includes generating a plurality of local histogram matching maps based on different portions of the first image frame and the second image frame. Additionally, the method includes generating a histogram matched image frame using the local histogram matching map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates generally to image capture systems and more particularly to local histogram matching with global regularization and motion rejection for multi-exposure image fusion. Background Art

[0002] Multi-frame blending algorithms are used in various applications to "fuse" or combine multiple image frames of a scene in order to generate a final image of the scene. For example, multiple image frames can be fused to perform high dynamic range (HDR) imaging or to perform motion blur reduction (MBR). In some applications, the image frames being fused are captured using different exposure settings (e.g., different ISO settings and / or different exposure times). Unfortunately, image frames captured using different exposure settings typically have different brightness levels and typically capture different amounts of motion in the scene. As a result, it is often difficult to fuse image frames captured using different exposure settings. Summary of the invention

[0003] The present disclosure provides local histogram matching with global regularization and motion rejection for multi-exposure image fusion.

[0004] In a first embodiment, a method includes acquiring a plurality of image frames of a scene. The plurality of image frames include a first image frame and a second image frame captured using different exposures. The method also includes excluding pixels in the first image frame and the second image frame based on a motion map. The method also includes generating a plurality of local histogram matching maps based on different portions of the first image frame and the second image frame. In addition, the method includes generating a histogram matched image frame using the local histogram matching map.

[0005] In a second embodiment, an electronic device includes at least one image sensor and at least one processor operably connected to the at least one image sensor. The at least one processor is configured to acquire multiple image frames of a scene from the at least one image sensor. The multiple image frames include a first image frame and a second image frame captured using different exposures. The at least one processor is also configured to exclude pixels in the first image frame and the second image frame based on a motion map. The at least one processor is also configured to generate multiple local histogram matching maps based on different parts of the first image frame and the second image frame. In addition, the at least one processor is configured to generate a histogram-matched image frame using the local histogram matching map.

[0006] In a third embodiment, a non-transitory machine-readable medium comprising instructions, which when executed causes at least one processor of an electronic device to acquire multiple image frames of a scene using at least one sensor of the electronic device. The multiple image frames include a first image frame and a second image frame captured using different exposures. The medium also comprises instructions that, when executed, causes the at least one processor to exclude pixels in the first image frame and the second image frame based on a motion map. The medium also comprises instructions that, when executed, causes the at least one processor to generate multiple local histogram matching maps based on different portions of the first image frame and the second image frame. In addition, the medium comprises instructions that, when executed, causes the at least one processor to generate a histogram-matched image frame using the local histogram matching map.

[0007] Other technical features will be apparent to those skilled in the art from the following drawings, description and claims.

[0008] In the fusion of multi-exposure images, one embodiment of the present disclosure performs local histogram matching with global regularization and motion rejection to prevent noticeable color or brightness distortion.

[0009] Before proceeding to the following detailed description, it may be advantageous to set forth the definitions of certain words and phrases used throughout this patent document. The terms "send," "receive," and "communicate," and their derivatives, cover both direct and indirect communications. The terms "include," "comprise," and their derivatives, mean including, but not limited to. The term "or" is inclusive, meaning and / or. The phrase "associated with..." and its derivatives mean including, included within, interconnected with, including, contained within, connected to or connected with, coupled to or coupled with, communicable with, collaborate with, alternate, juxtapose, near, bound to or bound with, have, have the nature of, be related to or with, etc.

[0010] In addition, the various functions described below can be implemented or supported by one or more computer programs, each of which is formed by a computer-readable program code and embodied in a computer-readable medium. The terms "application" and "program" refer to one or more computer programs, software components, instruction sets, processes, functions, objects, classes, instances, related data or a part thereof suitable for being implemented in a suitable computer-readable program code. The phrase "computer-readable program code" includes any type of computer code, including source code, object code and executable code. The phrase "computer-readable medium" includes any type of medium that can be accessed by a computer, such as a read-only memory (ROM), a random access memory (RAM), a hard drive, a compact disk (CD), a digital video disk (DVD) or any other type of memory. "Non-transitory" computer-readable media does not include wired, wireless, optical or other communication links that transmit temporary electrical signals or other signals. Non-transitory computer-readable media include media that can permanently store data and media that can store data and are subsequently overwritten (e.g., rewritable optical disks or erasable storage devices).

[0011] As used herein, terms and phrases such as "having", "may have", "include" or "may include" a feature (such as a number, function, operation or component such as a part) indicate the presence of the feature without excluding the presence of other features. Moreover, as used herein, the phrases "A or B", "at least one of A and / or B" or "one or more of A and / or B" may include all possible combinations of A and B. For example, "A or B", "at least one of A and B" and "at least one of A or B" may indicate all of the following: (1) including at least one A; (2) including at least one B; or (3) including at least one A and at least one B. In addition, as used herein, the terms "first" and "second" may modify various components regardless of their importance and do not limit these components. These terms are only used to distinguish one component from another. For example, a first user device and a second user device may indicate user devices that are different from each other, regardless of the order or importance of the devices. Without departing from the scope of the present disclosure, a first component may be represented as a second component, and vice versa.

[0012] It will be understood that when an element (e.g., a first element) is referred to as being (operably or communicatively) "coupled with" / "coupled to" another element (e.g., a second element) or "connected with" / "connected to" another element, it may be coupled or connected with / coupled or connected to another element directly or through a third element. Conversely, it will be understood that when an element (e.g., a first element) is referred to as being "directly coupled with" / "directly coupled to" another element (e.g., a second element) or "directly connected with" / "directly connected to" another element, no other element (e.g., a third element) is interposed between the element and the other element.

[0013] As used herein, the phrase "configured (or set) to" may be used interchangeably with the phrases "suitable for," "capable of," "designed to," "adapted to," "manufactured to," or "capable of," depending on the circumstances. The phrase "configured (or set) to" does not essentially mean "designed specifically in hardware to." On the contrary, the phrase "configured to" may mean that a device may perform an operation together with another device or component. For example, the phrase "a processor configured (or set) to perform A, B, and C" may mean a general-purpose processor (e.g., a CPU or application processor) that can perform these operations by executing one or more software programs stored in a storage device, or a dedicated processor (e.g., an embedded processor) for performing these operations.

[0014] The terms and phrases used herein are only used to describe some embodiments of the present disclosure, rather than to limit the scope of other embodiments of the present disclosure. It should be understood that the singular forms "one", "an" and "the" include plural references unless the context clearly indicates otherwise. All terms and phrases used herein (including technical and scientific terms and phrases) have the same meaning as the meaning generally understood by those of ordinary skill in the art to which the embodiments of the present disclosure belong. It will also be understood that terms and phrases such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and unless clearly defined herein, they will not be interpreted in an idealized or overly formal sense. In some cases, the terms and phrases defined herein may be interpreted as excluding embodiments of the present disclosure.

[0015] Examples of "electronic devices" according to embodiments of the present disclosure may include at least one of a smart phone, a tablet personal computer (PC), a mobile phone, a video phone, an e-book reader, a desktop PC, a laptop computer, a netbook computer, a workstation, a personal digital assistant (PDA), a portable multimedia player (PMP), an MP3 player, a mobile medical device, a camera, or a wearable device (e.g., smart glasses, a head mounted device (HMD), electronic clothing, an electronic bracelet, an electronic necklace, an electronic accessory, an electronic tattoo, a smart mirror, or a smart watch). Other examples of electronic devices include smart home appliances. Examples of smart home appliances may include a television, a digital video disc (DVD) player, an audio player, a refrigerator, an air conditioner, a cleaner, an oven, a microwave, a washing machine, a dryer, an air purifier, a set-top box, a home automation control panel, a security control panel, a TV box (e.g., SAMSUNG HOMESYNC, APPLE TV, or GOOGLE TV), a smart speaker or a speaker with an integrated digital assistant (e.g., SAMSUNG GALAXY HOME, APPLE HOMEPOD, or AMAZON ECHO), a game console (e.g., XBOX, PLAYSTATION, or NINTENDO), an electronic dictionary, an electronic key, a portable camcorder, or at least one of an electronic photo frame. Other examples of electronic devices include various medical devices (e.g., various portable medical measuring devices (such as blood sugar measuring devices, heart rate measuring devices, or body temperature measuring devices), magnetic resonance angiography (MRA) devices, magnetic resonance imaging (MRI) devices, computed tomography (CT) devices, imaging devices, or ultrasound devices), navigation devices, global positioning system (GPS) receivers, event data recorders (EDRs), flight data recorders (FDRs), car infotainment devices, navigation electronic devices (e.g., navigation navigation devices or gyrocompasses), avionics equipment, security equipment, car audio, industrial or home robots, automated teller machines (ATMs), point-of-sale (POS) devices, or Internet of Things (IoT) devices (e.g., light bulbs, various sensors, electric or gas meters, sprinklers, fire alarms, thermostats, street lights, toasters, fitness equipment, hot water tanks, heaters, or boilers). Other examples of electronic devices include at least a part of a piece of furniture or a building / structure, an electronic board, an electronic signature receiving device, a projector, or various measuring devices (e.g., devices for measuring water, electricity, gas, or electromagnetic waves). Note that according to various embodiments of the present disclosure, the electronic device may be one of the devices listed above or a combination thereof. According to some embodiments of the present disclosure, the electronic device may be a flexible electronic device. The electronic device disclosed herein is not limited to the devices listed above, and may include new electronic devices according to the development of technology.

[0016] In the following description, according to various embodiments of the present disclosure, an electronic device is described with reference to the accompanying drawings. As used herein, the term "user" may refer to a person using an electronic device or another device (eg, an artificial intelligence electronic device).

[0017] Definitions for certain additional words and phrases may be provided throughout this patent document. Those of ordinary skill in the art should understand that in many, if not most instances, such definitions apply to prior, as well as future uses of such defined words and phrases.

[0018] Any description in this application should not be construed as implying that any particular element, step, or function is an essential element that must be included in the claims scope. The scope of the patented subject matter is limited solely by the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] For a more complete understanding of the present disclosure and its advantages, reference is now made to the following description taken in conjunction with the accompanying drawings, wherein like reference numerals represent like parts:

[0020] Figure 1 An example network configuration including electronic devices according to an embodiment of the present disclosure is shown;

[0021] Figure 2 An example process for multi-frame fusion according to an embodiment of the present disclosure is shown;

[0022] Figure 3 The method for executing the embodiment according to the present disclosure is shown. Figure 2 An example process of image histogram matching in the process;

[0023] Figure 4A and Figure 4B An example reference image frame, an example non-reference image frame, and an example motion map are shown according to an embodiment of the present disclosure;

[0024] Figure 5A and Figure 5B An example image frame divided into a plurality of tiles and a local histogram matching map of each tile relative to a global histogram matching map according to an embodiment of the present disclosure are shown;

[0025] Fig. 6A and Figure 6B An example local histogram matching graph of an image frame having a large overexposed area and an example histogram matched image frame according to an embodiment of the present disclosure are shown;

[0026] Figure 7 shows an example local histogram matching graph of an image frame having large underexposed areas according to an embodiment of the present disclosure;

[0027] Fig. 8A , Figure 8B and Figure 8C An example application of local histogram matching according to an embodiment of the present disclosure is shown;

[0028] Fig. 9 An example method for multi-exposure image fusion using local histogram matching with global regularization and motion exclusion according to an embodiment of the present disclosure is shown; and

[0029] Fig. 10A , Fig. 10B and Fig. 10C An example of an image frame divided into a plurality of irregular tiles according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0030] The following discussion will be described with reference to the accompanying drawings. Figures 1 to 10C As well as various embodiments of the present disclosure. However, it should be understood that the present disclosure is not limited to these embodiments, and all changes and / or equivalents or replacements thereto also belong to the scope of the present disclosure. Throughout the specification and the drawings, the same or similar reference numerals may be used to refer to the same or similar elements.

[0031] As described above, multi-frame blending algorithms are used in various applications to "fuse" or combine multiple image frames of a scene to produce a final image of the scene, such as in high dynamic range (HDR) imaging or motion blur reduction (MBR). In some applications, the image frames being fused are captured using different exposure settings (e.g., different ISO settings and / or different exposure times). Unfortunately, image frames captured using different exposure settings typically have different brightness levels and typically capture different amounts of motion in the scene. A global image histogram matching algorithm can be used to adjust the brightness of one or more image frames so that the image frames can be more easily fused. However, a global histogram matching algorithm may result in various image artifacts, such as inconsistent brightness and color distortion. One problem with global image histogram matching is that it is not suitable for local image content, which may result in failure to find a reliable histogram match for certain types of image regions of the scene (e.g., sky, trees, and human hair in an image frame). As a result, it is generally difficult to fuse image frames captured using different exposure settings.

[0032] The present disclosure provides various techniques for applying local histogram matching with global regularization and motion exclusion to multi-exposure image fusion. As described in more detail below, multiple image frames of a scene are captured using different exposure settings, for example, when different image frames are captured using different exposure lengths. Pixels associated with motion in the scene are excluded from the image frame, and the image frame is divided into multiple parts or "tiles". In some cases, an image frame is identified as a reference image frame, and one or more other image frames are identified as one or more non-reference image frames and each is divided into tiles. A local histogram matching map is calculated for each tile of the non-reference image frame, wherein the local histogram matching map identifies how to adjust the image data from the tile so that its histogram more closely matches the histogram of the image data in the corresponding tile of the reference image frame. One or more local histogram matching maps can be regularized based on the global histogram matching map of the image frame. For example, part or all of the local histogram matching map of an image tile can be replaced by part or all of the global histogram matching map of the image frame containing the tile. The local histogram matching map can then be used to generate the final image of the scene.

[0033] By excluding pixels associated with motion in the captured image frames, the techniques described in this patent document help reduce motion blur in the final image of the scene. In addition, by using the local histogram matching map, the techniques described in this patent document can be more easily adapted to different types of local image content in the captured image frames. In addition, by regularizing the local histogram matching map based on the global histogram matching map, certain specific types of local image content (e.g., overexposed and underexposed areas) in one or more image frames can be more effectively processed, thereby significantly reducing image artifacts in those areas.

[0034] Figure 1 An example network configuration 100 including electronic devices according to the present disclosure is shown. Figure 1 The embodiment of the network configuration 100 shown is for illustration only. Other embodiments of the network configuration 100 may be used without departing from the scope of the present disclosure.

[0035] According to an embodiment of the present disclosure, the electronic device 101 is included in the network configuration 100. The electronic device 101 may include at least one of a bus 110, a processor 120, a memory 130, an input / output (I / O) interface 150, a display 160, a communication interface 170, or a sensor 180. In some embodiments, the electronic device 101 may not include at least one of these components, or may add at least one other component.

[0036] Bus 110 includes circuitry for connecting components 120 - 180 to each other and for transmitting communications (eg, control messages and / or data) between the components.

[0037] The processor 120 includes one or more of a central processing unit (CPU), an application processor (AP), or a communication processor (CP). The processor 120 is capable of controlling at least one of the other components of the electronic device 101 and / or performing communication-related operations or data processing. In some embodiments, the processor 120 may be a graphics processor unit (GPU). For example, the processor 120 may receive image data and process the image data (as discussed in more detail below) to support multi-exposure image fusion using local histogram matching with global regularization and motion exclusion.

[0038] The memory 130 may include volatile and / or non-volatile memory. For example, the memory 130 may store commands or data related to at least one other component of the electronic device 101. According to an embodiment of the present disclosure, the memory 130 may store software and / or program 140.

[0039] Program 140 includes, for example, kernel 141, middleware 143, application programming interface (API) 145, and / or application program (or "app") 147. At least a portion of kernel 141, middleware 143, or API 145 may be represented as an operating system (OS).

[0040] The kernel 141 may control or manage system resources (e.g., bus 110, processor 120, or memory 130) for executing operations or functions implemented in other programs (e.g., middleware 143, API 145, or application 147). The kernel 141 provides an interface that allows the middleware 143, API 145, or application 147 to access various components of the electronic device 101 to control or manage system resources.

[0041] Application 147 includes one or more applications for image capture and image processing as discussed below. These functions can be performed by a single application or by multiple applications, each of which performs one or more of these functions. Middleware 143 can be used as a repeater, for example, to allow API 145 or application 147 to transmit data with kernel 141. Multiple applications 147 can be provided. Middleware 143 is capable of controlling work requests received from application 147, for example, by assigning a priority of using system resources (e.g., bus 110, processor 120, or memory 130) of electronic device 101 to at least one of multiple applications 147. API 145 is an interface that allows application 147 to control functions provided from kernel 141 or middleware 143. For example, API 145 includes at least one interface or function (e.g., command) for filing control, window control, image processing, or text control.

[0042] The I / O interface 150 serves as an interface that can transmit commands or data input from a user or other external devices to other components of the electronic device 101, for example. The I / O interface 150 can also output commands or data received from other components of the electronic device 101 to the user or other external devices.

[0043] The display 160 includes, 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 micro-electromechanical system (MEMS) display, or an electronic paper display. The display 160 may also be a depth perception display, such as a multi-focal display. The display 160 is capable of displaying, for example, various contents (e.g., text, images, videos, icons, or symbols) to the user. The display 160 may include a touch screen, and may receive touch, gesture, proximity, or hover input, for example, using an electronic pen or a body part of the user.

[0044] For example, the communication interface 170 can establish communication between the electronic device 101 and an external electronic device (e.g., the first electronic device 102, the second electronic device 104, or the server 106). For example, the communication interface 170 can be connected to the network 162 or 164 through wireless or wired communication to communicate with the external electronic device. The communication interface 170 can be a wired or wireless transceiver or any other component for sending and receiving signals such as images.

[0045] Wireless communication can use, for example, long term evolution (LTE), advanced long term evolution (LTE-A), fifth generation wireless system (5G), millimeter wave or 60GHz wireless communication, wireless USB, code division multiple access (CDMA), wideband code division multiple access (WCDMA), universal mobile telecommunications system (UMTS), wireless broadband (WiBro) or global system for mobile communications (GSM) as at least one of the cellular communication protocol. Wired connection can include, for example, at least one of universal serial bus (USB), high definition multimedia interface (HDMI), recommended standard 232 (RS-232) or plain old telephone service (POTS). Network 162 or 164 includes at least one communication network, such as a computer network (such as a local area network (LAN) or a wide area network (WAN)), the Internet or a telephone network.

[0046] The electronic device 101 also includes one or more sensors 180, which can measure physical quantities or detect the activation state of the electronic device 101 and convert the measured or detected information into electrical signals. For example, one or more sensors 180 include one or more cameras or other imaging sensors for capturing scene images. The sensor 180 may also include one or more buttons for touch input, gesture sensors, gyroscopes or gyroscope sensors, air pressure sensors, magnetic sensors or magnetometers, acceleration sensors or accelerometers, grip sensors, proximity sensors, color sensors (e.g., red, green, and blue (RGB) sensors), biophysical sensors, temperature sensors, humidity sensors, illumination sensors, ultraviolet (UV) sensors, electromyography (EMG) sensors, electroencephalography (EEG) sensors, electrocardiography (ECG) sensors, infrared (IR) sensors, ultrasonic sensors, iris sensors, or fingerprint sensors. The sensor 180 may also include an inertial measurement unit, which may include one or more accelerometers, gyroscopes, and other components. In addition, the sensor 180 may include a control circuit for controlling at least one of the sensors included here. Any of these sensors 180 may be located within the electronic device 101 .

[0047] The first external electronic device 102 or the second external electronic device 104 may be a wearable device or a wearable device (e.g., HMD) in which the electronic device can be installed. When the electronic device 101 is installed in the electronic device 102 (e.g., HMD), the electronic device 101 may communicate with the electronic device 102 through the communication interface 170. The electronic device 101 may be directly connected to the electronic device 102 to communicate with the electronic device 102 without involving a separate network. The electronic device 101 may also be an augmented reality wearable device including one or more cameras, such as glasses.

[0048] The first external electronic device 102 and the second external electronic device 104 and the server 106 may each be a device of the same or different type as the electronic device 101. According to certain embodiments of the present disclosure, the server 106 includes a group consisting of one or more servers. In addition, according to certain embodiments of the present disclosure, all or some operations performed on the electronic device 101 may be performed on another or more other electronic devices (e.g., electronic devices 102 and 104 or server 106). In addition, according to certain embodiments of the present disclosure, when the electronic device 101 should automatically or upon request perform a certain function or service, instead of performing the function or service itself or in addition to performing the function or service itself, the electronic device 101 may request another device (e.g., electronic devices 102 and 104 or server 106) to perform at least some functions associated therewith. Another electronic device (e.g., electronic devices 102 and 104 or server 106) is capable of performing the requested function or additional function and transmitting the execution result to the electronic device 101. The electronic device 101 may provide the requested function or service by processing the received result as is or otherwise. To this end, for example, cloud computing, distributed computing, or client-server computing techniques may be used. Figure 1 The electronic device 101 is shown to include a communication interface 170 to communicate with an external electronic device 104 or a server 106 via a network 162 or 164 , but according to some embodiments of the present disclosure, the electronic device 101 may operate independently without a separate communication function.

[0049] The server 106 may include components 110-180 (or a suitable subset thereof) that are the same or similar to the electronic device 101. The server 106 may support driving the electronic device 101 by performing at least one of the operations (or functions) implemented on the electronic device 101. For example, the server 106 may include a processing module or processor that may support the processor 120 implemented in the electronic device 101.

[0050] although Figure 1 An example of a network configuration 100 including an electronic device 101 is shown, but the Figure 1 Various changes may be made. For example, network configuration 100 may include any number of each component in any suitable arrangement. In general, computing and communication systems have a wide variety of configurations, and Figure 1 The scope of the present disclosure is not limited to any particular configuration. Figure 1 One operating environment is shown in which the various features disclosed in this patent document may be used, but these features may also be used in any other suitable system.

[0051] Figure 2FIG. 2 shows an example process 200 for multi-frame fusion according to an embodiment of the present disclosure. Figure 2 The process 200 shown is described as using Figure 1 The electronic device 101 shown is used for execution. However, Figure 2 The illustrated process 200 may be used with any other suitable electronic device and may be used in any suitable system.

[0052] In general, process 200 is used to capture or otherwise acquire a plurality of image frames 205 of a scene and process the image frames to generate a fused output image 255. The fused output image 255 is generated by combining or fusing the image data contained in the image frames 205. At least two of the image frames 205 are captured using different exposure settings (e.g., different exposure lengths). In some embodiments, process 200 may receive two image frames 205 captured using different exposure settings. In other embodiments, process 200 may receive three or more image frames 205, wherein at least two of the image frames 205 are captured using different exposure settings.

[0053] The image frames 205 may be captured using any suitable exposure setting. In some embodiments, at least one image frame 205 may be captured using an automatic exposure (referred to as "auto-exposure") or other longer exposure, and at least one other image frame 205 may be captured using a shorter exposure relative to the auto-exposure or longer exposure. Auto-exposure generally refers to an exposure that is automatically determined by a camera or other device, typically with little or no user input. For example, in some cases, a user is allowed to specify an exposure mode (e.g., portrait, landscape, sports, or other mode), and an auto-exposure may be generated based on the selected exposure mode without any other user input. Each exposure setting is typically associated with a different setting of the camera (e.g., a different aperture, shutter speed, and camera sensor sensitivity). Compared to the auto-exposure or other longer exposure image frames, the shorter exposure image frames are typically darker, lack image detail, and have more noise. As a result, the shorter exposure image frames may include one or more underexposed areas, while the auto-exposure or other longer exposure image frames may include one or more overexposed areas. Note that while often described below as involving the use of at least one automatically exposed image frame and at least one shorter exposed image frame, the techniques described in this patent document can be used with any suitable combination of image frames captured using different exposures.

[0054] In some instances, during a capture operation, the processor 120 may control a camera or other image sensor 180 of the electronic device 101 so that the image frames 205 are captured quickly, such as in a burst mode. Alternatively, if the electronic device 101 includes multiple cameras or other image sensors 180, the image frames 205 may be captured simultaneously or in an overlapping manner. The capture request that triggers the capture of the image frames 205 represents any suitable command or input indicating a need or desire to capture an image of a scene using the electronic device 101. For example, a capture request may be initiated in response to a user pressing a "soft" button presented on the display 160 or a user pressing a "hard" button. In some instances described below, it may be assumed that two image frames 205 are captured in response to the capture request, although more than two image frames may be captured here.

[0055] During processing operations within process 200, one image frame 205 may be used as a reference image frame and another image frame 205 may be used as a non-reference image frame. Depending on the circumstances, the reference image frame may represent an auto-exposed or other longer-exposed image frame, or the reference image frame may represent a shorter-exposed image frame. In some embodiments, an auto-exposed or other longer-exposed image frame may be used as a reference image frame by default, as this generally allows image frames with more image detail to be used more frequently when generating a composite image or final image of a scene.

[0056] like Figure 2 As shown, pre-processing operation 210 receives image frame 205 and pre-processes image frame 205 in a desired manner. Any suitable pre-processing functions may be performed as part of pre-processing operation 210. For example, pre-processing operation 210 may perform a white balance function to change or correct the color balance in one or more image frames 205. As another example, pre-processing operation 210 may perform a function of reconstructing a full color image frame from incomplete color samples contained in the original image frame using a mask (e.g., a CFA mask).

[0057] The pre-processed image frame 205 is provided to an image alignment operation 220, which is generally used to align the image frame 205 and produce an aligned image frame. For example, the image alignment operation 220 can modify the non-reference image frame so that specific features in the non-reference image frame are aligned with corresponding features in the reference image frame. Alignment may be required to compensate for misalignment caused by the electronic device 101 moving or rotating between image captures, which may cause objects in the image frame 205 to move or rotate slightly (which is common for handheld devices). The image frame 205 can be aligned both geometrically and photometrically. In some embodiments, the image alignment operation 220 can use global oriented rapid rotation briefing (ORB) features and local features in a block search to align the image frames, but other implementations of the image registration operation can also be used. Note that here, the reference image frame may or may not be modified during alignment, and the non-reference image frame may represent the only image frame that is modified during alignment. As part of the image alignment operation 220, a motion map is generated and may include a coarse motion map, wherein the motion map (coarse motion map) reflects one or more regions in the aligned image frames where motion exists.

[0058] The aligned image frame 205 is provided to an image histogram matching operation 230, which is generally used to modify the non-reference image frame so that the histogram of the non-reference image frame more closely matches the histogram of the reference image frame. Among other things, the image histogram matching operation 230 can be used to make the brightness levels of both the reference image frame and the non-reference image frame approximately equal and to make the colors in the reference image frame and the non-reference image frame more closely match. The image histogram matching operation 230 outputs a histogram-matched image frame. Note that here, the reference image frame may or may not be modified during the histogram matching, and the non-reference image frame may represent the only image frame that is modified during the histogram matching. According to an embodiment of the present disclosure, local histogram matching may be performed by dividing the reference image frame and the non-reference image frame into tiles and performing histogram matching on a per-tile basis. The following is combined with Figure 3 More details regarding the histogram matching operation 230 are described.

[0059] The histogram matched image frames are provided to an image blending operation 240, which blends or otherwise combines pixels from the image frames to produce at least one blended image of the scene. Each blended image typically represents a fusion of image frames of different exposures, wherein each pixel in the blended image is extracted from a reference image frame or a non-reference image frame, or is a combination of pixels from both a reference image frame and a non-reference image frame. During blending, the histogram matched frames are used to provide accurate motion analysis and generate a blended motion map. The blended motion map is then used to guide the blending of image frames of different exposures. Various techniques can be used to blend image frames.

[0060] At least one of the blended images is provided to a post-processing operation 250. The post-processing operation 250 may perform any suitable post-processing on the blended image to produce a fused output image 255. For example, the post-processing operation 250 may perform tone mapping or sharpening.

[0061] The various operations of process 200 may be implemented in any suitable manner. For example, each operation of process 200 may be implemented or supported using one or more software applications or other software instructions executed by at least one processor 120 of electronic device 101. In other embodiments, at least some operations of process 200 may be implemented or supported using dedicated hardware components. In general, the operations of process 200 may be performed using any suitable hardware or any suitable combination of hardware and software / firmware instructions.

[0062] although Figure 2 An example of a process 200 for multi-frame fusion is shown, but may be used for Figure 2 Various changes may be made. For example, electronic device 101 may perform any other desired functions as part of process 200 or as part of a larger image processing algorithm. As a specific example, image frame 205 may undergo other suitable pre-processing and post-processing operations.

[0063] Figure 3 The method for executing the embodiment according to the present disclosure is shown. Figure 2 An example process 300 of image histogram matching in the process 200 is provided. Specifically, Figure 3 The process 300 shown may be used as Figure 2 The image histogram matching operation 230 in the process 200 shown in FIG. 200 may be performed in part or in whole. For ease of explanation, Figure 3 The process 300 shown is described as using Figure 1 The electronic device 101 shown is used for execution. However, Figure 3 The illustrated process 300 may be used with any other suitable electronic device and may be used in any suitable system.

[0064] like Figure 3 As shown, process 300 receives various inputs from image alignment operation 220, such as a rough motion map (or motion map) 305 and image frames 310 and 315. Image frame 310 here represents a reference image frame, while image frame 315 here represents a non-reference image frame. As described above, image frames 310 and 315 here have been pre-processed and aligned. In some embodiments, image frame 310 represents an image frame of auto-exposure or other longer exposure, while image frame 315 represents an image frame of shorter exposure, but this is not required. In addition, although two image frames 310 and 315 are received here, more than two image frames can be acquired.

[0065] The image frames 310 and 315 are provided to a motion exclusion operation 320, which is generally used to identify regions of one or more image frames 310 and 315 that contain motion based on the coarse motion map 305 and exclude those regions from further processing. For example, the motion exclusion operation 320 can generate a mask containing values ​​indicating whether motion is detected in the image frames 310 and 315 based on the coarse motion map 305, and can exclude image data associated with the motion regions in the image frames 310 and 315 from further processing based on the mask. Alternatively, the image frames 310 and 315 can be modified by removing the image data associated with the motion.

[0066] The image frames 310 and 315 (or modified versions of the image frames 310 and 315) are provided to a tile-based histogram matching operation 330. According to an embodiment of the present disclosure, the image frames 310, 315 (or modified versions thereof) are divided into a plurality of tiles, and a local histogram matching map is generated for each tile of the image frame 315. Each local histogram matching map identifies how the image data in the tile of the image frame 315 can be modified so that the histogram of the image data more closely matches the histogram of the corresponding tile in the image frame 310. The tile-based histogram matching operation 330 can divide each image frame into tiles using any suitable technique, and the tile-based histogram matching operation 330 can calculate a local histogram matching map for the image data in each tile of the image frame using any suitable technique. The tile-based histogram matching operation 330 may also calculate a global histogram matching map for the image frame 315 as a whole, and the tile-based histogram matching operation 330 may calculate a global histogram matching map for the image data of the image frame using any suitable technique.

[0067] The global regularization operation 340 receives the local histogram matching map and the global histogram matching map. The global regularization operation 340 typically uses the global histogram matching map of the image frame to optionally regularize one or more local histogram matching maps of the image frame's tiles. For example, part or all of the local histogram matching map can be replaced by part or all of the global histogram matching map to illustrate matters such as overexposed areas and underexposed areas, or interpolated values ​​based at least in part on the global histogram matching map can be determined and used in the local histogram matching map. Depending on the scene being imaged, the global regularization operation 340 can modify one or more local histogram matching maps of the image frame (or the local histogram matching map of a particular image frame may not be modified). This generates a final local histogram matching map that will be used to generate the final image of the scene.

[0068] The histogram matching operation 350 uses the final local histogram matching map (and possibly the global histogram matching map) to modify one or more image frames 310, 315. In some embodiments, only the non-reference image frame 315 is modified, but in other embodiments both image frames 310, 315 may be modified. The histogram matching operation 350 may modify at least one image frame using any suitable technique. An example of the type of operation that may be performed by the histogram matching operation 350 is provided below with reference to FIG. 8. At a minimum, the histogram matching operation 350 may output a histogram-matched non-reference image frame 355, which may be provided to the image blending operation 240. If the image frame 310 is modified, the histogram matching operation 350 may output a plurality of histogram-matched image frames.

[0069] The various operations of process 300 may be implemented in any suitable manner. For example, each operation of process 300 may be implemented or supported using one or more software applications or other software instructions executed by at least one processor 120 of electronic device 101. In other embodiments, dedicated hardware components may be used to implement or support at least some operations of process 300. In general, the operations of process 300 may be performed using any suitable hardware or any suitable combination of hardware and software / firmware instructions.

[0070] although Figure 3 Shown is the method for executing Figure 2 The process 300 of image histogram matching in the process 200 is an example, but it can be used for Figure 3 Various changes are made. For example, electronic device 101 may perform any other desired functions as part of process 300 or as part of a larger image processing algorithm.

[0071] Figure 4A and Figure 4BAn example reference image frame 410, an example non-reference image frame 415, and an example motion map 405 are shown according to an embodiment of the present disclosure. In these images, the faces of people are covered for privacy purposes. Figure 4A As can be seen in , reference image frame 410 is captured using a longer exposure than non-reference image frame 415. For example, reference image frame 410 may be captured using an EV+0 exposure, and non-reference image frame 415 may be captured using an EV-1, EV-2, or EV-3 exposure. As a result, reference image frame 410 is brighter and contains more image details, but reference image frame 410 suffers from greater motion blur or saturation. For example, saturation (or oversaturation) may indicate a phenomenon in which the saturation of a frame excessively contains light due to overexposure, thereby approaching an achromatic color. In contrast, non-reference image frame 415 is darker and contains less image details, but non-reference image frame 415 suffers little or no motion blur or saturation.

[0072] As in Figure 4B As can be seen in FIG. 4 , motion map 405 identifies pixels associated with image frame 410 or 415 in which motion occurs. Figure 2 A motion map 405 is identified during the image alignment operation 220 in FIG. 4 . In one embodiment, the value of the motion map 405 may be determined based on the motion vectors between the reference image frame 410 and the non-reference image frame 415. For example, the motion map 405 may be a map having a range of [0, 255] and a size of 2016×1512. The smaller the value of the motion map 405, the higher the likelihood of motion that may be present. In one embodiment, when the value of the motion map 405 of a particular pixel is less than a preset threshold, the corresponding pixel may be determined as a moving pixel. For example, the preset threshold may be determined from a generally predicted motion vector. As a result, the motion map 405 may identify those areas of the image frames 410, 415 where significant differences continue to exist between the image frames 410, 415 even after alignment.

[0073] In one embodiment, the motion map 405 can be modified into a binary motion map. In the binary motion map, a value of 1 can represent a moving pixel that contains motion, while a value of 0 can represent a static pixel that does not contain motion. The value of the binary motion map can be determined by comparing the value of the motion map 405 with a preset threshold. For example, the binary motion map can be generated as follows: if the value of the determined motion map is less than or equal to the preset threshold, the value is replaced with 1, and if the value of the determined motion map is greater than the preset threshold, the value is replaced with 0. The binary motion map can be used as a mask to exclude moving pixels from subsequent histogram matching operations.

[0074] In this particular example, a person is waving his hands, and pixels associated with region 425 of the image containing the person's arms and hands show significant motion (meaning motion that exceeds a certain threshold.) As a result, pixels in region 425 may be excluded from subsequent histogram matching operations, because significant motion tends to cause histogram mismatches between image frames.

[0075] although Figure 4A and Figure 4B An example of a reference image frame 410, a non-reference image frame 415, and a motion map 405 is shown, but the Figure 4A and Figure 4B Various changes may be made. For example, the image frames and motion graphs here are only examples, and the images of a scene and its associated motion graph may be very different.

[0076] Figure 5A and Figure 5B An example image frame 500 divided into a plurality of tiles 505a-530a and local histogram matching graphs 505b-530b of each tile relative to a global histogram matching graph 535 according to an embodiment of the present disclosure are shown. Figure 5A As shown, the image frame 500 has been divided into a 2×3 array of tiles 505a-530a. Note that the number and arrangement of tiles 505a-530a here are for illustration only, and the image frame can be divided into any other suitable number and arrangement of tiles. In addition, in this example, each of the tiles 505a-530a can generally contain substantially the same amount of space in the image frame 500, but this is not necessarily the case as described below. In some embodiments, the tile-based histogram matching operation 330 can divide different image frames into different numbers and arrangements of tiles based on various factors such as the size of the image frame, the orientation of the image frame, and the content of the image frame.

[0077] The histogram matching operation 330 based on the picture block calculates the local histogram matching graph 505b-530b and the global histogram matching graph 535 of the image frame 500. Each local histogram matching graph 505b-530b is based on the image content of the corresponding picture block 505a-530a (and the corresponding picture block of another image frame), and the global histogram matching graph 535 is based on the image content of all picture blocks 505a-530a (and another image frame). In this example, each local histogram matching graph 505b-530b is defined by the solid line in the associated curve graph, and the global histogram matching graph 535 is defined by the dotted line in these curve graphs. In each curve graph, multiple solid lines and dotted lines are displayed to define curves for different color channels (e.g., three different solid line curves and three different dotted line curves for RGB channels). As described in more detail below, the global histogram matching map 535 may be used in various circumstances to modify or replace at least a portion of one or more local histogram matching maps 505b-530b in order to improve the quality of the final image of the scene (a process known as regularization).

[0078] As noted above, histogram matching generally matches the brightness and color of non-reference image frame 315 with the brightness and color of reference image frame 310. This may be accomplished by computing a global histogram matching map and a local histogram matching map for non-reference image frame 315, regularizing any of the local histogram matching maps based on the global histogram matching map (if necessary), and modifying at least the image data in non-reference image frame 315 so that the modified image data has a histogram that more closely matches the histogram of the image data in reference image frame 310. In some cases, only the image data in non-reference image frame 315 may be modified to produce a histogram-matched non-reference image frame 355.

[0079] The image frame may be modified in any suitable manner based on the local histogram matching map (or a regularized version thereof). For example, the lookup table may map the original luminance and / or chrominance pixel values ​​of the non-reference image frame 315 to new luminance and / or chrominance pixel values ​​of the histogram-matched non-reference image frame 355. Ideally, the resulting histogram-matched non-reference image frame 355 has a histogram that more closely matches the histogram of the reference image frame 310, thereby facilitating a closer match to the luminance and color of the reference image frame 310.

[0080] The use of tile-based local histogram matching improves the overall quality of the histogram matching operation 230. That is, the histogram matching operation 230 is able to take into account local image content in different regions of the image frame 500 and can more closely match those different regions to corresponding regions in another image frame. Figure 5BAs shown, the curve of the global histogram matching graph 535 deviates from the curves of several local histogram matching graphs 505b-530b. Therefore, performing only global histogram matching across all tiles 505a-530a may result in artifacts such as inconsistent brightness and color distortion. Dividing the image frame into tiles can better reflect the image content corresponding to the tiles, thereby achieving better matching performance compared to global matching.

[0081] although Figure 5A and Figure 5B An example of an image frame 500 divided into a plurality of tiles 505a-530a and local histogram matching graphs 505b-530b of each tile relative to a global histogram matching graph 535 is shown, but the local histogram matching graphs 505b-530b of each tile may be used. Figure 5A and Figure 5B Various changes may be made. For example, the number of tiles used to divide the image frame may be increased or decreased, and the tiles do not have to be of uniform size or shape. As specific examples, the image frame may be divided into 3×3 tiles, 4×2 tiles, or 2×4 tiles, and different numbers and arrangements of tiles may be used with different resolutions (e.g., 3×3 tiles for a 1440×1440 image, or 2×4 or 4×2 tiles for a 2288×1080 image).

[0082] Fig. 6A and Figure 6B FIG. 6 shows an example local histogram matching graph of an image frame 601 having a large overexposed area and an example histogram-matched image frame 602 according to an embodiment of the present disclosure. Fig. 6A As shown, the image frame 601 has been divided into blocks 605a-620a, and local histogram matching graphs 605b-620b have been generated for each block 605a-620a. In addition, a global histogram matching graph 635 has been generated for the image 601, and the global histogram matching graph 635 has been drawn relative to each local histogram matching graph 605b-620b.

[0083] In this example, local histogram matching graphs 605b, 615b, 620b follow the global histogram matching graph 635 relatively well. However, the local histogram matching graph 610b associated with block 610a does not. This is because block 610a corresponds to a high saturation region in image frame 601 (e.g., a high light saturation region close to achromatic colors with low saturation). As a result, as shown in ellipse 650, local histogram matching graph 610b includes the following RGB curve, which reflects zero values ​​on most of the curve until the curve jumps to its maximum value subsequently. This is due to the high saturation points in image frame 601. Attempting to apply histogram matching using local histogram matching graph 610b will therefore likely cause brightness or color mismatches at least in block 610a and possibly in adjacent blocks. To help compensate for this, the global regularization operation 340 may replace the values ​​in the local histogram matching map 610b with values ​​in the global histogram matching map 635 (or values ​​based on the global histogram matching map 635) for use during subsequent histogram matching operations involving the tile 610a. The resulting image frame 602 produced in this manner is Figure 6B , and may more accurately reflect the image data contained in the original image frame 601.

[0084] In some embodiments, the operation can be expressed as follows. In order to alleviate the problems caused by high saturation areas in non-reference image frames, the local histogram matching graph 610b is changed by a global regularization process that replaces zero values ​​in the local histogram matching graph 610b with corresponding values ​​in the global histogram matching graph 635. Moreover, for non-zero values ​​in the local histogram matching graph 610b, the global regularization process can interpolate between the local curve and the global curve to improve matching performance. For example, the following function can be applied to the curve in the local histogram matching graph 610b, where w is a scaling weight calculated based on the amount of saturation in the tile:

[0085]

[0086] although Fig. 6A and Figure 6B 6 shows an example of local histogram matching graphs 605b-620b of an image frame 601 having a large overexposed area and an example of a histogram matched image frame 602, but may be used for Fig. 6A and Figure 6B Various changes may be made. For example, these images are intended only to illustrate how local histogram matching maps of saturated regions of an image frame may be processed. Other image frames will have other image content and histograms, but the same type of techniques may be applied therein.

[0087] Figure 7An example local histogram matching map of an image frame 701 having large underexposed areas according to an embodiment of the present disclosure is shown. Similar to the problem presented by image frames having large overexposed (oversaturated) areas, images having dark (underexposed) areas may also fail to provide reliable local histogram matching maps for use during histogram matching. Consider Figure 7 The illustrated example shows an image frame 701 divided into tiles 705a-710a, local histogram matching maps 705b-710b associated with each tile 705a-710a, and a global histogram matching map 735 associated with all tiles 705a-710a.

[0088] In this example, the local histogram matching graph 705b follows the global histogram matching graph 735 relatively well. However, the local histogram matching graph 710b associated with the block 710a does not. This is because the block 710a corresponds to the dark area of ​​the image frame 701. As a result, as shown in the ellipse 750, the local histogram matching graph 710b includes the following RGB curve, which initially increases and then flattens with a constant value on most of the RGB curve. Attempting to apply the histogram matching using the local histogram matching graph 710b will therefore likely cause brightness or color mismatches at least in the block 710a and possibly in the adjacent blocks. In order to help compensate for this, the global regularization operation 340 can replace the local histogram matching graph 710b with the global histogram matching graph 735 and use the global histogram matching graph 735 during the subsequent histogram matching operation involving the block 710a. The resulting image frame generated in this way can more accurately reflect the image data contained in the original image frame 701.

[0089] In some embodiments, the operation can be expressed as follows. To alleviate the problem caused by dark areas in non-reference image frames, by comparing the above reference image frames to Fig. 6A and Figure 6B The local histogram matching map 710b is modified by a global regularization process similar to the process described for highly saturated areas. However, instead of replacing zero values ​​in the local histogram matching map 710b and interpolating non-zero values ​​based on the amount of saturation, the global regularization for dark areas can replace the value of the local histogram matching map with the value of the corresponding global histogram matching map if the difference between the two values ​​exceeds a predetermined threshold. For example, the following function can be applied to the curve in the local histogram matching map 710b, where T_th represents the predetermined threshold and f 1 [k] can be determined from the above equation:

[0090]

[0091] although Figure 7An example of a local histogram matching graph of an image frame 701 having large underexposed areas is shown, but Figure 7 Various changes may be made. For example, this image is intended only to illustrate how a local histogram matching map of a darker region of an image frame may be processed. Other image frames will have other image content and histograms, but the same type of techniques may be applied therein.

[0092] Fig. 8A , Figure 8B and Figure 8C An example application of local histogram matching according to an embodiment of the present disclosure is shown. For example, Fig. 8A , Figure 8B and Figure 8C The illustrated applications may each represent one way in which the above-described histogram matching operation 350 may perform local histogram matching. However, it is noted that the histogram matching operation 350 may perform any other suitable operation to provide local histogram matching.

[0093] like Fig. 8A As shown, an image frame 800 and its tiles 805a-830a and local histogram matching maps 805b-830b are being processed. To process the image frame 800, each pixel 801 of the image frame 800 is modified pixel by pixel. In some embodiments, this can be done simply by applying each local histogram matching map 805b-830b to the pixel values ​​of its corresponding tile 805a-830a.

[0094] In other embodiments, the value of each pixel 801 in a tile is interpolated based on multiple local histogram matching maps of its nearest neighboring tiles (e.g., its four nearest neighboring tiles). This can help provide smoothness in the histogram matching operation (at the boundaries of each tile) and avoid discontinuities around tile boundaries. As a specific example, the value of each pixel 801 in a tile can be interpolated based on a weighted average of the pixel values ​​defined by the local histogram matching maps of its nearest neighboring tiles (e.g., its four nearest neighboring tiles). For example, the following function can be applied to the weighted average of the local histogram matching maps of its four nearest neighboring tiles:

[0095] f(x,y)[k]=prod0*(1-weightY)+prod1*weighty,

[0096] in,

[0097] Where (x, y) is the pixel coordinate, weightX is x / tileWidth, weightY is y / tileHeight, and f_tile1[k], f_tile2[k], f_tile3[k], and f_tile4[k] represent the values ​​of the local histogram matching maps of the four nearest neighboring tiles of the pixel at the (x, y) coordinate.

[0098] for Fig. 8A For the particular pixel 801 shown, the pixel 801 in the tile 810a can be based on the values ​​from the local histogram matching maps 805b, 810b, 815b and 820b. The weight applied to each value from the local histogram matching map of the neighboring tile can be based on the distance between the pixel 801 and the neighboring tile.

[0099] for Figure 8B , pixel 802 in tile 830a can be based on values ​​from local histogram matching graphs 815b, 820b, 825b, and 830b. The weight applied to each value from the local histogram matching graph of an adjacent tile can be based on the distance between pixel 802 and the adjacent tile. For example, pixel 802 can have the highest weight reflecting the value of the local histogram matching graph 830b of the nearest tile. In addition, the amount of the values ​​of the local histogram matching graphs 815b, 820b, 825b, and 830b of the histogram matching applied to pixel 802 can vary according to weightX and weightY, respectively, where weightX is determined according to the position of the pixel relative to the width of the tile on the x-axis, and weightY is determined according to the position of the pixel relative to the height of the tile on the y-axis.

[0100] like Figure 8C As shown, a specific pixel 803 in tile 805a and a specific pixel 804 in tile 830a may have only two adjacent tiles. For pixel 803, a final local histogram matching value may be applied, wherein the local histogram matching graphs 805b and 810b of the two adjacent tiles are reflected twice, respectively. Similarly, for pixel 804, a final local histogram matching value may be applied, wherein the local histogram matching graphs 825b and 830b of the two adjacent tiles are reflected twice, respectively. The weight applied to each value of the local histogram matching graph from the adjacent tiles may be based on the distance between the pixel 803 or 804 and each adjacent tile.

[0101] although Fig. 8A , Figure 8B and Figure 8C Each shows an example of the application of local histogram matching, but can be applied to Fig. 8A , Figure 8B and Figure 8CVarious changes may be made. For example, the local histogram matching map may be applied to the pixel values ​​of the image blocks in one or more image frames in any other suitable manner.

[0102] Fig. 9 An example method 900 for multi-exposure image fusion using local histogram matching with global regularization and motion exclusion according to an embodiment of the present disclosure is shown. For ease of illustration, Fig. 9 The method 900 is described as using Figure 1 The electronic device 101 shown is used for execution. However, Fig. 9 The illustrated method 900 may be used with any other suitable electronic device and may be used in any suitable system.

[0103] In step 905, the electronic device 101 uses at least one sensor (e.g., Figure 1 One or more sensors 180 in the image processing apparatus 100 capture multiple image frames 205 of a scene. The multiple image frames 205 may include reference image frames 310 captured using a longer exposure time and non-reference image frames 315 captured using a shorter exposure time. When compared to the reference image frames 310, the non-reference image frames 315 may appear underexposed.

[0104] In step 910, pixels are excluded from the plurality of image frames based on the motion map 305. The motion map 305 may be generated during a preprocessing or alignment operation of the multi-frame fusion algorithm. The pixels to be excluded correspond to at least one region of the plurality of image frames 205 that contains a large amount of motion.

[0105] In step 915, a plurality of local histogram matching maps are generated. For example, each image frame 205 may be divided into a plurality of tiles. Local histogram matching maps may then be generated based on a comparison of tiles in the reference image frame 310 with corresponding tiles in the non-reference image frame 315 (across all tiles of the image frames 310, 315). In step 920, a global histogram matching map is generated. A global histogram matching map may be generated based on a comparison of the entire reference image frame 310 with the entire non-reference image frame 315.

[0106] In step 925, global regularization may be applied to one or more of the local histogram matching maps. For example, global regularization may be applied to local histogram matching maps associated with highly saturated or darker regions of the non-reference image frame 315. Example methods of replacing portions of a local histogram matching map with (or based on) portions of a global histogram matching map are provided above.

[0107] In step 930, a histogram-matched image frame is generated and output. For example, a histogram-matched non-reference image frame 355 may be generated based on local histogram matching maps (at least one of which may have been regularized based on a global histogram matching map). The resulting histogram-matched non-reference image frame 355 may closely match the reference image frame 310 in terms of brightness and color.

[0108] In step 935, a final image of the scene is generated. For example, a blending operation may occur. During blending, the histogram-matched frames are used to provide accurate motion analysis and generate a blended motion map. The blended motion map is used to guide the blending of image frames 310 and 315. The resulting image may then undergo a post-processing operation to generate a fused output image 255. The fused output image 255 may be stored, output, or used in any suitable manner. For example, the fused output image 255 may be displayed on the display 160 of the electronic device 101, saved to a camera roll stored in the memory 130 of the electronic device 101, or attached to a text message, email, or other communication to be sent from the electronic device 101. Of course, the final image of the scene may be used in any other or additional manner.

[0109] although Fig. 9 An example of a method 900 for multi-exposure image fusion using local histogram matching with global regularization and motion rejection is shown, but may be used for Fig. 9 For example, although shown as a series of steps, Fig. 9 The steps in can overlap, occur in parallel, occur in a different order, or occur any number of times.

[0110] It should be noted that although the tiles in the image frame are shown and described above as uniform tiles with regular shapes and arrangements, other methods can be used to define the tiles in the image frame. For example, the tile-based histogram matching operation 330 can divide different image frames into different numbers and arrangements of tiles based on various factors such as the size of the image frame, the orientation of the image frame, and the actual content of the image frame.

[0111] Fig. 10A , Fig. 10B and Fig. 10C 1001, 1002, 1003 are divided into a plurality of irregular blocks according to an embodiment of the present disclosure. Fig. 10A In the example of FIG. 1 , image frame 1001 includes tiles defined based on the presence of sky detected in image frame 1001 and based on the outlines of one or more objects within the scene. The tiles are created to segment the building into tiles separate from the sky. Note that tiles may be created to segment other objects in the scene from each other and from the sky.

[0112] exist Fig. 10B , image frame 1002 includes a tile defined around a person in the foreground of the scene and one or more tiles defining the background of the scene. Note that one or more tiles may be similarly created around one or more objects in the foreground of the scene. It should also be noted that, depending on the background of the scene, one or more tiles may be similarly created to contain the background.

[0113] exist Fig. 10C In the example, the image frame 1003 includes irregularly shaped tiles based on features or objects in the image frame 1003. In this example, the tiles are defined by the skyline in the scene, which provides a natural break to divide the upper and lower tiles. Similarly, the mountains in the scene provide a natural break to divide the left and right tiles.

[0114] In some embodiments, tiles of an image frame may be identified by first performing a foreground / background segmentation process that identifies different areas in the foreground and background of a scene. Various methods for foreground / background segmentation may be used here. For one or more background areas, local histogram matching may be performed on each background area in multiple image frames using the above methods. During these operations, the foreground area may be excluded from consideration. For one or more foreground areas, local histogram matching may also be performed on each foreground area in multiple image frames using the above methods. During those operations, the background area may be excluded from consideration.

[0115] Among other things, the method can also improve the histogram matching process, especially in the foreground area. This can be beneficial for various scenarios, such as when the foreground area of ​​the image frame includes the skin and hair of one or more people (which are often prone to color shift and motion during image processing). This also still allows the background area of ​​the scene to be processed and the benefits of local histogram matching to be obtained.

[0116] although Fig. 10A , Fig. 10B and Fig. 10C Examples of image frames 1001, 1002, 1003 divided into tiles are shown, but various changes may be made to these figures. For example, these figures are intended only to illustrate example ways in which image frames may be divided into tiles based on the content of the image frames. The number of tiles used to divide the image frames may be increased or decreased, and the arrangement of the tiles may vary as needed or desired.

[0117] Although the present disclosure has been described with reference to various exemplary embodiments, various changes and modifications may be suggested to one skilled in the art. The present disclosure is intended to encompass such changes and modifications as fall within the scope of the appended claims.

Claims

1. A method, include: acquiring a plurality of image frames of a scene, the plurality of image frames comprising a first image frame and a second image frame captured using different exposures; excluding pixels associated with motion in the first image frame and the second image frame based on a motion map identifying motion; generating a plurality of local histogram matching maps based on a plurality of image blocks of the first image frame and the second image frame excluding pixels associated with motion; as well as An image of the scene is generated using the local histogram matching map.

2. The method according to claim 1, in, The motion map comprises a binary motion map, The binary motion map is generated by the following operations: determining a value of a motion map based on a motion vector between the first image frame and the second image frame; Replacing the values ​​in the determined motion map that are less than or equal to a preset threshold with a value of 1; and The values ​​in the determined motion map that are greater than a preset threshold are replaced with a value of 0.

3. The method according to claim 1, further comprising: include: generating a global histogram matching graph based on the first image frame and the second image frame; as well as Based on the global histogram matching graph, modify at least one of the local histogram matching graphs, Wherein, using the local histogram matching map to generate the image of the scene includes: using a modified local histogram matching map to generate the image of the scene.

4. The method according to claim 3, in, Modifying at least one of the local histogram matching graphs comprises: Replacing zero values ​​in a specified local histogram matching map with corresponding values ​​in the global histogram matching map; and The non-zero values ​​in the specified local histogram matching map are replaced with values ​​interpolated between the specified local histogram matching map and the global histogram matching map.

5. The method according to claim 4, in, Values ​​interpolated between the specified local histogram matching map and the global histogram matching map are weighted based on exposure in a corresponding tile of one of the plurality of image frames.

6. The method according to claim 4, in, Modifying at least one of the local histogram matching graphs further comprises: When the difference between a value in a specified local histogram matching map and a corresponding value in the global histogram matching map exceeds a predetermined threshold, the value in the specified local histogram matching map is replaced with the corresponding value in the global histogram matching map.

7. The method according to claim 1, in, Generating an image of the scene using the local histogram matching graph includes: Corresponding pixel values ​​of the first image frame or the second image frame are interpolated based on four local histogram matching maps corresponding to four image blocks adjacent to a specific pixel.

8. An electronic device, include: at least one image sensor, acquiring image frames; as well as at least one processor operably connected to the at least one image sensor, the at least one processor configured to: acquiring a plurality of image frames of a scene from the at least one image sensor, the plurality of image frames comprising a first image frame and a second image frame captured using different exposures; excluding pixels associated with motion in the first image frame and the second image frame based on a motion map identifying motion; generating a plurality of local histogram matching maps based on a plurality of image blocks of the first image frame and the second image frame excluding pixels associated with motion; as well as An image of the scene is generated using the local histogram matching map.

9. The electronic device according to claim 8, in, The motion map comprises a binary motion map, The binary motion map is generated by the following operations: determining a value of a motion map based on a motion vector between the first image frame and the second image frame; Replacing the values ​​in the determined motion map that are less than or equal to a preset threshold with a value of 1; and The values ​​in the determined motion map that are greater than a preset threshold are replaced with a value of 0.

10. The electronic device according to claim 8, in, The at least one processor is further configured to: generating a global histogram matching map based on the first image frame and the second image frame; and Based on the global histogram matching graph, modify at least one of the local histogram matching graphs, Wherein, the at least one processor is further configured to: generate an image of the scene using the modified local histogram matching map.

11. The electronic device according to claim 10, in, To modify at least one of the local histogram matching maps, the at least one processor is configured to: Replacing zero values ​​in a specified local histogram matching map with corresponding values ​​in the global histogram matching map; and The non-zero values ​​in the specified local histogram matching map are replaced with values ​​interpolated between the specified local histogram matching map and the global histogram matching map.

12. The electronic device according to claim 11, in, Values ​​interpolated between the specified local histogram matching map and the global histogram matching map are weighted based on exposure in a corresponding tile of one of the plurality of image frames.

13. The electronic device according to claim 11, in, To modify at least one of the local histogram matching maps, the at least one processor is further configured to: When the difference between a value in a specified local histogram matching map and a corresponding value in the global histogram matching map exceeds a predetermined threshold, the value in the specified local histogram matching map is replaced with the corresponding value in the global histogram matching map.

14. The electronic device according to claim 8, in, The at least one processor is further configured to: Corresponding pixel values ​​of the first image frame or the second image frame are interpolated based on four local histogram matching maps corresponding to four image blocks adjacent to a specific pixel, so as to generate an image of the scene using the local histogram matching maps.

15. A machine-readable medium comprising instructions which, when executed, cause at least one processor of an electronic device to perform the method of any one of claims 1 to 7.