Method and electronic device for image processing

By introducing weighted masking between lens shadow correction and automatic white balance processing, the problem of extended processing time caused by changes in lighting or sensors is solved, enabling rapid determination of correlated color temperature and improving image processing speed.

CN117201951BActive Publication Date: 2026-11-20SAMSUNG SEMICON CHINA RES & DEV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311227530.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2026-11-20
Estimated Expiration
2043-09-22

AI Technical Summary

Technical Problem

In existing image processing technologies, when lighting changes or sensor variations occur, the interdependence between lens shadow correction and automatic white balance processing leads to prolonged processing time, making it difficult to quickly obtain a stable correlated color temperature.

Method used

By introducing a weighted masking process between lens shading correction and automatic white balance processing, the pixel weights are adjusted using a weighted mask to quickly determine the stable state of the image and calculate the correlated color temperature.

Benefits of technology

When the light source changes or the sensor changes, the converged correlated color temperature can be obtained using fewer images, which improves the speed of camera streaming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117201951B_ABST
    Figure CN117201951B_ABST
Patent Text Reader

Abstract

A method and an electronic device for image processing are disclosed. The method comprises: obtaining a sensor image; performing lens shading correction on the sensor image to obtain a first image; performing weighted masking on the first image to obtain a second image; and performing automatic white balance processing on the second image to obtain a third image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Some exemplary embodiments of the inventive concept relate to the field of image processing. More specifically, they relate to image processing methods and / or electronic devices for improving the speed of camera stream (or image stream) processing. Background Technology

[0002] Raw images captured by an image sensor undergo various image processing steps, including Lens Shading Correction (LSC) and Automatic White Balance (AWB). LSC and AWB processes influence each other; in other words, they are interdependent. Typically, the LSC gain of the current image frame depends on the correlated color temperature (CCT) determined by the AWB processing of the previous image frame. Accordingly, the LSC gain of the current image frame affects the result of the AWB processing of the current image frame, and the result of the AWB processing of the previous image frame subsequently affects the LSC processing of the next image frame.

[0003] When processing an image stream comprising images from multiple sensors, the CCT used in previous image processing may no longer be applicable if there are changes in lighting or the image sensors themselves. In such cases, obtaining a stable CCT may require iterative processing over several image frames, leading to extended processing time.

[0004] Therefore, there is a need for an image processing method that can improve the speed of camera stream processing. Summary of the Invention

[0005] According to some exemplary embodiments of the inventive concept, an image processing method is provided, the method comprising: obtaining a sensor image; performing lens shading correction on the sensor image to obtain a first image; performing weighted masking on the first image to obtain a second image; and performing automatic white balance processing on the second image to obtain a third image.

[0006] The sensor images may include multiple consecutive sensor images, and lens shading correction, weighted masking, and automatic white balance processing may be performed for each sensor image to obtain a first image, a second image, and a third image corresponding to each sensor image.

[0007] The steps of performing weighted masking may include: determining whether a first image is in a transitional state; selecting a weighted mask based on the determination result, wherein the weighted mask includes a plurality of weights, each of the plurality of weights corresponding to one of a plurality of pixels in the first image; generating a second image based on the weighted mask and the first image, wherein each pixel value of the second image is based on a corresponding weight among the plurality of weights in the weighted mask and the pixel value of the corresponding pixel in the first image.

[0008] The method may further include: obtaining the correlated color temperature of a third image through automatic white balance processing, wherein the lens shading correction processing performed on the current sensor image is based on the correlated color temperature of the third image corresponding to the previous sensor image.

[0009] The step of determining whether the first image is in a transitional state may include: determining whether the difference between the estimated values ​​of the correlated color temperature of the first image corresponding to the current sensor image and the first image corresponding to the previous sensor image is greater than a threshold, wherein the estimated value of the correlated color temperature of the first image corresponding to the current sensor image is the correlated color temperature of the third image corresponding to the previous sensor image; determining that the first image corresponding to the current sensor image is in a transitional state in response to the difference being greater than the threshold; and determining that the first image corresponding to the current sensor image is in a stable state in response to the difference not being greater than the threshold.

[0010] The step of generating the second image may include: in response to determining that the first image is in a transitional state, determining a transition weighted mask, and generating the second image based on the transition weighted mask and the first image, wherein the value of each weight in the transition weighted mask is between 0 and 1; in response to determining that the first image is in a stable state, selecting a stable weighted mask, and generating the second image based on the stable weighted mask and the first image, wherein the value of each weight in the stable weighted mask is 1.

[0011] The transition weighting mask of the first image corresponding to the current sensor image can be determined to be different from the transition weighting mask of the first image corresponding to the previous sensor image, wherein the weights corresponding to the outer pixels of the first image in the transition weighting mask of the first image corresponding to the current sensor image are greater than the weights corresponding to the corresponding pixels in the transition weighting mask of the first image corresponding to the previous sensor image.

[0012] The step of determining the transition weighting mask may include: selecting a weighting mask corresponding to the difference between the estimated values.

[0013] The larger the difference between the estimated values, the smaller the weight value corresponding to the outer pixels of the first image in the transition weighted mask can be.

[0014] According to some exemplary embodiments of the inventive concept, an electronic device is provided, the electronic device comprising: a sensor module configured to acquire a sensor image; and a processor configured to: perform lens shading correction on the sensor image to acquire a first image; perform weighted masking on the first image to acquire a second image; and perform automatic white balance processing on the second image to acquire a third image.

[0015] The sensor images may include multiple consecutive sensor images, and the processor may perform lens shading correction, weighted masking and automatic white balance processing on each sensor image to obtain a first image, a second image and a third image corresponding to each sensor image.

[0016] The processor can be configured to: determine whether a first image is in a transitional state; select a weighted mask based on the determination result, wherein the weighted mask includes a plurality of weights, each of the plurality of weights corresponding to one of a plurality of pixels in the first image; and generate a second image based on the weighted mask and the first image, wherein each pixel value of the second image is based on a corresponding weight among the plurality of weights in the weighted mask and the pixel value of the corresponding pixel in the first image.

[0017] The processor can also be configured to obtain the correlated color temperature of a third image through automatic white balance processing, wherein the lens shading correction processing performed on the current sensor image is based on the correlated color temperature of the third image corresponding to the previous sensor image.

[0018] The processor can be configured to: determine whether the difference between the estimated values ​​of the correlated color temperature of a first image corresponding to the current sensor image and a first image corresponding to the previous sensor image is greater than a threshold, wherein the estimated value of the correlated color temperature of the first image corresponding to the current sensor image is the correlated color temperature of a third image corresponding to the previous sensor image; determine that the first image corresponding to the current sensor image is in a transitional state in response to the difference being greater than the threshold; and determine that the first image corresponding to the current sensor image is in a stable state in response to the difference not being greater than the threshold.

[0019] The processor can be configured to: in response to determining that the first image is in a transitional state, determine a transitional weighted mask and generate a second image based on the transitional weighted mask and the first image, wherein the value of each weight in the transitional weighted mask is between 0 and 1; in response to determining that the first image is in a stable state, select a stable weighted mask and generate a second image based on the stable weighted mask and the first image, wherein the value of each weight in the stable weighted mask is 1.

[0020] The transition weighting mask of the first image corresponding to the current sensor image can be determined to be different from the transition weighting mask of the first image corresponding to the previous sensor image, wherein the weights corresponding to the outer pixels of the first image in the transition weighting mask of the first image corresponding to the current sensor image are greater than the weights corresponding to the corresponding pixels in the transition weighting mask of the first image corresponding to the previous sensor image.

[0021] The processor can be configured to: select a weighted mask corresponding to the difference between the estimated values.

[0022] The larger the difference between the estimated values, the smaller the weight value corresponding to the outer pixels of the first image in the transition weighted mask can be.

[0023] According to some exemplary embodiments of the inventive concept, a non-transitory computer-readable storage medium storage instruction is provided, which, when executed by a processor, causes the processor to perform the method disclosed above.

[0024] Image processing methods and electronic devices according to some exemplary embodiments of the present invention can perform weighted masking processing between lens shading correction processing and automatic white balance processing when the light source changes or the imaging sensor changes. This allows for the acquisition of a converged correlated color temperature using a smaller number of images, thereby increasing the speed of camera streaming processing. Attached Figure Description

[0025] The above and other features of the inventive concept will become clearer from the following detailed description taken in conjunction with the accompanying drawings, wherein:

[0026] Figure 1 This is a block diagram illustrating some example embodiments of an electronic device according to an inventive concept;

[0027] Figure 2 This is a diagram illustrating an example of image stream processing;

[0028] Figure 3 This is a diagram illustrating examples of image stream processing according to some exemplary embodiments of the inventive concept;

[0029] Figure 4 This is a flowchart illustrating an image processing method according to some example embodiments of the inventive concept;

[0030] Figure 5 This is a flowchart illustrating a weighted masking process according to some example embodiments of the inventive concept;

[0031] Figure 6A and Figure 6B Examples of transition weighted masks according to some exemplary embodiments of the inventive concept are shown;

[0032] Figure 7 A block diagram of a mobile terminal according to some example embodiments of the inventive concept is shown. Detailed Implementation

[0033] Example embodiments of the inventive concept will be described below with reference to the accompanying drawings. However, various changes and modifications to the methods, apparatus, and / or systems described herein will be apparent to those skilled in the art. For example, the order of operations described herein is merely illustrative, except for those operations that must occur in a specific order, and is not intended to be limited to those orders set forth herein, but may be changed as will be apparent to those skilled in the art.

[0034] Although the terms "first" or "second" are used to explain various components, the components are not limited to these terms. These terms should only be used to distinguish one component from another. For example, a "first" component may be referred to as a "second" component, or similarly, a "second" component may be referred to as a "first" component.

[0035] It will be understood that when a component is referred to as being "connected to" another component, the component may be directly connected to or combined with the other component, or there may be an intermediate component.

[0036] As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form as well. It should also be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of the stated features, integrals, steps, operations, elements, components, or combinations thereof, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.

[0037] Unless otherwise defined, all terms used herein (including technical or scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It will also be understood that, unless expressly defined herein, terms (such as those defined in a general dictionary) shall be interpreted as having a meaning consistent with their meaning in the context of the relevant field and shall not be interpreted in an idealized or overly formalized sense.

[0038] Figure 1 This is a block diagram illustrating some example embodiments of an electronic device based on an inventive concept.

[0039] Electronic devices according to various exemplary embodiments of the present invention may be, or may include, at least one of a camera, smartphone, tablet PC, personal digital assistant (PDA), portable multimedia player (PMP), augmented reality device, virtual reality device, and various wearable devices (e.g., smartwatch, smart glasses, smart bracelet, etc.). However, the exemplary embodiments are not limited thereto, and electronic devices according to the present invention may be any electronic device with image processing capabilities.

[0040] like Figure 1 As shown, the electronic device 100 according to some example embodiments includes at least a sensor module 110 and a processor 120. Furthermore, the electronic device 100 may also include a memory unit.

[0041] Sensor module 110 can capture images of an object to generate multiple sensor images. The sensor images output from the sensor module are also known as raw images.

[0042] Processor 120 can receive sensor images from sensor module 110 and perform image processing on the sensor images. Processor 120 can perform various operations on the sensor images (including preprocessing, lens shading correction (LSC), automatic white balance (AWB), and other post-processing). Although various processing operations performed by processor 120 on images are shown herein, they are merely examples, and the inventive concept is not limited thereto.

[0043] According to an example embodiment, the processor 120 may obtain a sensor image, perform lens shading correction on the sensor image to obtain a first image, perform weighted masking on the first image to obtain a second image, and perform automatic white balance on the second image to obtain a third image.

[0044] The memory unit can acquire images from an external source or receive images generated by the sensor module 110. The memory unit can store images required for performing image processing tasks.

[0045] The memory unit may also store data and / or software or instructions for implementing image processing methods according to some example embodiments. When the processor 120 executes the software or instructions, the image processing methods according to some example embodiments can be implemented. The memory unit may be implemented as part of the processor 120, or it may be implemented within the electronic device 100 separately from the processor 120.

[0046] The processor 120 can be implemented as a general-purpose processor, an application processor (AP), an integrated circuit dedicated to image processing, a field-programmable gate array, or a combination of hardware and software.

[0047] Figure 2 This is a diagram illustrating an example of processing an image stream.

[0048] Reference Figure 2 The processor 120 can perform various operations on the sensor image (such as preprocessing, lens shading correction (LSC), automatic white balance (AWB), and other post-processing tasks) to generate an output image.

[0049] According to some example embodiments, preprocessing steps may include dark current removal, linearity correction, and bad pixel compensation, among other tasks. LSC refers to the correction of pixels located around the field of view based on the physical characteristics of the lens, so that the brightness of the image is consistent. The gain of LSC is related to the correlated color temperature (CCT) of the image. AWB involves calculating the gain of the RGB (red, green, blue) channels and determining the CCT of the shooting scene based on the color statistics of the scene. Other processing after AWB may include noise removal, sharpness enhancement, color gamut mapping, etc. Although various image processing operations can be performed on an image, these are merely examples, and the inventive concept is not limited thereto.

[0050] The sensor module 110 can capture multiple consecutive sensor images (e.g., multiple frames of sensor images), and the processor 120 can sequentially perform preprocessing, LSC, AWB, and other processing for each sensor image.

[0051] Figure 2 The right side shows the relationship between LSC processing and AWB processing. Figure 2 The upper right side shows the effect of CCT on LSC gain during LSC processing, where the horizontal axis R represents the distance from the image plane pixel to the center point of the image plane, and the vertical axis represents the LSC gain. Figure 2 The lower right section shows how, in AWB processing, the R-channel gain RGain and B-channel gain BGain are obtained based on the results of LSC processing, and therefore the CCT is calculated based on RGain and BGain. Figure 2 It can be seen that different LSC gains can be obtained based on different CCT values ​​(e.g., CCT1, CCT2, and CCT3). Furthermore, the results of LSC processing directly affect the channel gains (e.g., RGain and BGain) in AWB processing, thus affecting the calculation of CCT values.

[0052] In one example, the LSC processing of the first sensor image is based on the initial CCT. The CCT obtained from the AWB processing of the first sensor image can be used as the CCT estimate for the second sensor image and is then used for the LSC processing of the second sensor image. This is performed iteratively on multiple sensor images. Figure 2 The image processing shown in the figure can obtain a convergent (or stable) CCT.

[0053] When the lighting conditions change or the imaging sensor changes, the CCT used in previous image processing steps may no longer be applicable to the current scene. In such cases, iterative processing is performed on several frames of images to obtain a CCT that converges to a steady state. However, this results in increased processing time.

[0054] The following is combined Figures 3 to 5 A method for image processing according to an example embodiment of the present disclosure is described.

[0055] Figure 3 This is a diagram illustrating the processing of an image stream according to some example embodiments.

[0056] Reference Figure 3 ,and Figure 2 The image streams shown in the diagram undergo different processing, with weighted masking processing between LSC processing and AWB processing.

[0057] Typically, when calculating LSC gain based on CCT, CCT errors will cause significant LSC gain errors at pixels located at the corners or periphery of the image. This is because lens shading is more pronounced at corners. Conversely, CCT errors have a smaller impact on LSC gain at pixels in the center of the image. In other words, an incorrect CCT has a smaller impact on pixels located in the center of the image. Since AWB calculation is insensitive to corner pixels, the influence of pixels located at the corners of the image can be appropriately masked when calculating CCT using AWB processing based on LSC processing results.

[0058] Weighted masking can be triggered based on various conditions. For example, weighted masking can be triggered (e.g., executed) when the light source of the scene where the image is captured changes, or when the image sensor used for imaging changes.

[0059] Whether to trigger weighted masking can be determined based on the difference between the CCT values ​​of two adjacent frames. For example, when the difference between the CCT values ​​of two adjacent frames is greater than a predetermined threshold, it can be determined that the image is in a transitional state. In this case, a weighted mask can be used to perform weighted masking on the image after LSC processing. See below for reference. Figure 4 , Figure 5 , Figure 6A and Figure 6B Provide a detailed description of the weighted masking process.

[0060] Figure 4 This is a flowchart illustrating an image processing method according to some example embodiments. Although Figure 4 Various steps are shown, but the order of the steps is not necessarily limited to... Figure 4 The order shown in the image.

[0061] Reference Figure 4In step S410, the processor 120 may acquire sensor images. For example, the processor 120 may receive sensor images from the sensor module 110 or from outside the electronic device 100. The sensor images acquired by the processor 120 may include multiple (or multiple frames) of sensor images captured sequentially.

[0062] In some example embodiments, the image to which lens shading correction processing will be performed may be referred to as a sensor image. In other words, preprocessing (e.g., dark current removal, linearity correction, dead pixel compensation, etc.) may be performed on the captured image before performing lens shading correction processing.

[0063] In step S420, the processor 120 may perform lens shading correction processing on the sensor image to obtain a first image.

[0064] In step S430, the processor 120 may perform weighted masking processing on the first image to obtain the second image.

[0065] In step S440, the processor 120 may perform automatic white balance processing on the second image to obtain a third image.

[0066] The processor 120 can perform lens shading correction processing, weighted masking processing, and automatic white balance processing for each acquired sensor image to obtain a first image, a second image, and a third image corresponding to each sensor image.

[0067] Reference Figure 3 The lens shading correction processing performed on the current sensor image is based on the CCT of the third image corresponding to the previous sensor image. For example, the LSC processing of the first sensor image can be based on the initial CCT value, the LSC processing of the second sensor image can be based on the CCT obtained through the AWB processing of the first sensor image, and the LSC processing of the third sensor image can be based on the CCT obtained through the AWB processing of the second sensor image.

[0068] The image processing method according to an example embodiment of the inventive concept can improve the speed of camera stream processing by performing a weighted masking process between lens shading correction processing and automatic white balance processing when the light source changes or the imaging sensor changes. This allows a fewer number of images to be used to obtain a converged CCT (e.g., a CCT corresponding to the changed shooting environment).

[0069] Figure 5 This is a flowchart illustrating a weighted masking process according to some example embodiments. Figure 5 The steps in can correspond to Figure 4 Step S430 in the process. Although Figure 5Various steps are shown, but the order of the steps is not necessarily limited to... Figure 5 The order shown in the image.

[0070] Reference Figure 5 In step S431, it can be determined whether the first image is in a transition state.

[0071] According to some example embodiments, it can be determined whether a first image (e.g., the first image corresponding to the current sensor image) is in a transition state based on whether the difference between the estimated CCT values ​​of the first image corresponding to the current sensor image and the first image corresponding to the previous sensor image is greater than a predetermined threshold. In this case, the estimated CCT value of the first image corresponding to the current sensor image may be the CCT value of the third image corresponding to the previous sensor image.

[0072] If the difference between the estimated CCT values ​​of the first image corresponding to the current sensor image and the first image of the previous sensor image is greater than a threshold, it can be determined that the first image corresponding to the current sensor image is in a transition state ("Yes" in S431). Therefore, in step S432, a transition weighted mask can be determined.

[0073] In response to the difference not being greater than the threshold, it can be determined that the first image corresponding to the current sensor image is in a stable state ("No" in S431). Therefore, a stable weighted mask can be selected in step S433.

[0074] In step S434, a second image can be generated based on the weighted mask and the first image.

[0075] According to an example embodiment, the weighted mask may include multiple weights, each of which corresponds to one of a plurality of pixels in the first image. Each pixel value in the second image can be calculated based on a corresponding weight among the multiple weights in the weighted mask and the pixel value of the corresponding pixel in the first image. For example, each pixel value in the second image can be obtained by multiplying the corresponding weight in the weighted mask by the pixel value of the corresponding pixel in the first image. The pixel values ​​of the second image can be used for subsequent AWB processing.

[0076] In response to determining that the first image is in a stable state, a stable weighted mask can be selected. In the stable weighted mask, the value of each weight is 1.

[0077] In response to determining that the first image is in a transition state, a transition weighted mask can be determined. In the transition weighted mask, the value of each weight ranges from 0 to 1.

[0078] Since the LSC gain error caused by the faulty CCT has a smaller impact on pixels located in the center of the image, in the transition weighting mask, the weights corresponding to pixels located in the center of the image can be set to large values, and the weights corresponding to pixels located in the outer edges of the image can be set to small values.

[0079] Figure 6A and Figure 6B An example of a transition weighted mask according to some example embodiments is shown.

[0080] According to one example embodiment, in response to a first image being in a transition state, transition weighted masks can be sequentially selected from a predetermined set of weighted masks. The selected transition weighted masks can be used for each of a plurality of consecutive first images, and the transition weighted mask of the first image corresponding to the current sensor image can be different from the transition weighted mask of the first image corresponding to the previous sensor image.

[0081] Figure 6A and Figure 6B Each set of weighted masks, comprising multiple weighted masks, is shown. (Refer to...) Figure 6A and Figure 6B Each weighted mask includes multiple weights corresponding to pixels in the first image. Figure 6A and Figure 6B In the diagram, black areas represent weight values ​​of 0 (in other words, pixels corresponding to black areas are completely masked), white areas represent weight values ​​of 1, and gray areas represent weight values ​​between 0 and 1. Therefore, in a transition-weighted mask, corners or edges have weight values ​​of 0. Although... Figure 6A and Figure 6B The weighted mask set shown includes three transitional weighted masks and one stable weighted mask, but this is merely an example, and the inventive concept is not limited thereto. For example, the number of weighted masks included in the weighted mask set and the weight values ​​in the weighted masks can be varied.

[0082] For example, in response to the previous first image being in a stable state while the current first image is in a transitional state, it can be from Figure 6A or Figure 6B The first weighted mask is selected from the weighted mask set to perform weighted masking processing on the current first image. Then, a second weighted mask can be selected for the next first image, and a third weighted mask and a stable weighted mask can be selected for subsequent first images, respectively. (See reference...) Figure 6A and Figure 6B As the weighted mask gradually changes from the first weighted mask to the stable weighted mask, the weights corresponding to the outer pixels in the first image gradually increase until all weights become 1.

[0083] In another example, the weighted mask can be determined based on the difference between the estimated CCT values ​​of the first image corresponding to the current sensor image and the first image corresponding to the previous sensor image.

[0084] For example, multiple weighted masks corresponding to different differences in CCT can be predetermined. When the difference in estimated CCT values ​​between two first images is obtained in step S431, a weighted mask corresponding to the determined difference can be selected in step S432. In one example, the larger the difference in estimated CCT values, the smaller the weight assigned to the peripheral pixels in the weighted mask.

[0085] Figure 7 Block diagrams of mobile terminals according to some example embodiments are shown.

[0086] like Figure 7 As shown, a mobile terminal 1000 according to some example embodiments includes a communication unit 1010, an input unit 1020, an image processing unit 1030, a display unit 1040, a storage unit 1050, a control unit 1060, and an image sensor 1070.

[0087] The communication unit 1010 can perform communication operations of the mobile terminal 1000. The communication unit 1010 can establish a communication channel to a communication network and / or perform communications associated with, for example, voice calls, video calls, and / or data calls.

[0088] The input unit 1020 is configured to receive various input information and various control signals, and to send the input information and control signals to the control unit 1060. The input unit 1020 can be implemented by various input devices such as a keypad and / or keyboard, a touch screen and / or stylus, a microphone, etc. However, the example embodiment is not limited thereto.

[0089] Image processing unit 1030 is connected to image sensor 1070. Image sensor 1070 can capture images and send the captured images to image processing unit 1030. Image processing unit 1030 can perform image processing on the images (e.g., using...). Figure 4 The image processing unit 1030 (illustrated by the image processing method) sends the image processing result to the control unit 1060. The control unit 1060 may send the image processing result via the communication unit 1010, and / or may store the image processing result in the storage unit 1050. The image processing unit 1030 may be similar to... Figure 1 The processor 120 in the middle.

[0090] The display unit 1040 is used to display various information, which can be achieved, for example, via a touchscreen. However, the example embodiment is not limited thereto.

[0091] Storage unit 1050 may include volatile memory and / or non-volatile memory. Storage unit 1050 may store various data generated and used by mobile terminal 1000. For example, storage unit 1050 may store operating system and applications (e.g., applications associated with the methods of example embodiments according to the inventive concept) used to control the operation of mobile terminal 1000. Control unit 1060 may control the overall operation of mobile terminal 1000 and may control some or all of the internal components of mobile terminal 1000. Control unit 1060 may be implemented as a general-purpose processor, application processor (AP), application-specific integrated circuit, field-programmable gate array, etc., but the example embodiments are not limited thereto.

[0092] In some example embodiments, the image processing unit 1030 and the control unit 1060 may be implemented by the same device and / or integrated in a single chip.

[0093] The devices, units, modules, and other components described herein may be implemented by hardware components. Examples of hardware components that can be used to perform the operations described herein include: controllers, sensors, generators, drivers, memories, comparators, arithmetic logic units, adders, subtractors, multipliers, dividers, integrators, and any other electronic components configured to perform the operations described herein. In other examples, one or more of the hardware components performing the operations described herein may be implemented by computing hardware (e.g., by one or more processors or computers). A processor or computer may be implemented by one or more processing elements (such as logic gate arrays, controllers and arithmetic logic units, digital signal processors, microcomputers, programmable logic controllers, field-programmable gate arrays, programmable logic arrays, microprocessors, or any other means or combination of means configured to respond to and execute instructions in a defined manner to achieve a desired result). In one example, a processor or computer includes or is connected to one or more memories storing instructions or software executed by the processor or computer. Hardware components implemented by a processor or computer may execute instructions or software (such as an operating system (OS) and one or more software applications running on the OS) for performing the operations described herein. Hardware components can also access, manipulate, process, create, and store data in response to the execution of instructions or software. For simplicity, the singular terms "processor" or "computer" are used to describe the examples in this application; however, in other examples, multiple processors or computers may be used, or a processor or computer may include multiple processing elements, or multiple types of processing elements, or both. For example, a single hardware component, or two or more hardware components, may be implemented by a single processor, or two or more processors, or a processor and a controller. One or more hardware components may be implemented by one or more processors, or a processor and a controller, and one or more other hardware components may be implemented by one or more other processors, or another processor and another controller. One or more processors, or a processor and a controller, may implement a single hardware component, or two or more hardware components. Hardware components may have any one or more different processing configurations, examples of which include: a single processor, a standalone processor, a parallel processor, Single Instruction Single Data (SISD) multiple processing, Single Instruction Multiple Data (SIMD) multiple processing, Multiple Instruction Single Data (MISD) multiple processing, and Multiple Instruction Multiple Data (MIMD) multiple processing.

[0094] The methods for performing the operations described in this application may be executed by computing hardware (e.g., by one or more processors or a computer), which is implemented to execute instructions or software as described above to perform the operations performed by the methods described in this application. For example, a single operation, or two or more operations, may be executed by a single processor, or two or more processors, or a processor and a controller. One or more operations may be executed by one or more processors, or a processor and a controller, and one or more other operations may be executed by one or more other processors, or another processor and another controller. One or more processors, or a processor and a controller, may execute a single operation, or two or more operations.

[0095] Instructions or software for controlling a processor or computer to implement hardware components and perform the methods described above can be written as computer programs, code segments, instructions, or any combination thereof to individually or collectively instruct or configure the processor or computer to operate as a machine or special-purpose computer to perform operations performed by the hardware components and methods described above. In one example, the instructions and / or software include machine code (such as machine code generated by a compiler) that is directly executed by the processor or computer. In another example, the instructions or software include high-level code that is executed by the processor or computer using an interpreter. Those skilled in the art or programmers can readily write the instructions and / or software based on the block diagrams and flowcharts shown in the accompanying drawings and the corresponding descriptions in the specification, which disclose algorithms for performing operations performed by the hardware components and methods described above.

[0096] Instructions or software used to control a processor or computer to implement hardware components and perform the methods described above, as well as any associated data, data files, and data structures, may be recorded, stored, or fixed in one or more non-transitory computer-readable storage media, or may be recorded, stored, or fixed on one or more non-transitory computer-readable storage media. Examples of non-transitory computer-readable storage media include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-RLTH, BD -RE, Blu-ray or optical disc storage devices, hard disk drives (HDDs), solid-state drives (SSDs), card storage devices (such as multimedia cards or microcards (e.g., Secure Digital (SD) or Extreme Digital (XD))), magnetic tape, floppy disks, magneto-optical data storage devices, optical data storage devices, hard disks, solid-state drives, and at least one of any other device, any other device configured to store instructions or software and any associated data, data files, and data structures in a non-transitory manner and to provide instructions or software and any associated data, data files, and data structures to a processor or computer, enabling the processor or computer to execute the instructions.

[0097] Although various exemplary embodiments of the inventive concept have been described, those skilled in the art will understand that various changes in form and detail may be made to these examples without departing from the spirit and scope of the inventive concept set forth in the claims.

Claims

1. An image processing method, comprising: Obtain sensor images; Lens shading correction is performed on the sensor image to obtain the first image; Perform weighted masking on the first image to obtain the second image; Perform automatic white balance processing on the second image to obtain the third image. The steps involved in performing weighted masking include: Determine whether the first image is in a transition state; Based on the determined results, a weighted mask is selected, wherein the weighted mask includes multiple weights, each of which corresponds to one of multiple pixels in the first image; A second image is generated based on a weighted mask and a first image, wherein each pixel value of the second image is calculated based on a corresponding weight among the plurality of weights in the weighted mask and the pixel value of the corresponding pixel in the first image.

2. The method according to claim 1, in, The sensor images include multiple consecutive sensor images, and lens shading correction, weighted masking, and automatic white balance processing are performed for each sensor image to obtain a first image, a second image, and a third image corresponding to each sensor image.

3. The method according to claim 1, further comprising: The correlated color temperature of the third image is obtained through automatic white balance processing. The lens shading correction process performed on the current sensor image is based on the correlated color temperature of a third image corresponding to the previous sensor image.

4. The method according to claim 3, wherein, The steps to determine whether the first image is in a transition state include: Determine whether the difference between the estimated values ​​of the correlated color temperature of the first image corresponding to the current sensor image and the first image corresponding to the previous sensor image is greater than a threshold, wherein the estimated value of the correlated color temperature of the first image corresponding to the current sensor image is the correlated color temperature of the third image corresponding to the previous sensor image. In response to the difference being greater than a threshold, it is determined that the first image corresponding to the current sensor image is in a transition state; In response to the difference not being greater than the threshold, it is determined that the first image corresponding to the current sensor image is in a stable state.

5. The method according to claim 4, wherein, The steps to generate the second image include: In response to determining that the first image is in a transition state, a transition weighted mask is determined, and a second image is generated based on the transition weighted mask and the first image, wherein the value of each weight in the transition weighted mask is between 0 and 1; In response to determining that the first image is in a stable state, a stable weighted mask is selected, and a second image is generated based on the stable weighted mask and the first image, wherein the value of each weight in the stable weighted mask is 1.

6. The method according to claim 5, wherein, The transition weighting mask of the first image corresponding to the current sensor image is determined to be different from the transition weighting mask of the first image corresponding to the previous sensor image. In this process, the weights corresponding to the outer pixels of the first image in the transition weighted mask of the first image corresponding to the current sensor image are greater than the weights corresponding to the corresponding pixels in the transition weighted mask of the first image corresponding to the previous sensor image.

7. The method according to claim 5, wherein, The steps to determine the transition weighting mask include: Select a weighted mask corresponding to the difference between the estimated values.

8. The method according to claim 7, wherein, The larger the difference between the estimated values, the smaller the weight value corresponding to the outer pixels of the first image in the transition weighted mask.

9. An electronic device comprising: The sensor module is configured to acquire sensor images; The processor is configured as follows: Lens shading correction is performed on the sensor image to obtain the first image; Perform weighted masking on the first image to obtain the second image; Perform automatic white balance processing on the second image to obtain the third image. The processor is configured as follows: Determine whether the first image is in a transition state; Based on the determined results, a weighted mask is selected, wherein the weighted mask includes multiple weights, each of which corresponds to one of multiple pixels in the first image; A second image is generated based on a weighted mask and a first image, wherein each pixel value of the second image is calculated based on a corresponding weight among the plurality of weights in the weighted mask and the pixel value of the corresponding pixel in the first image.

10. The electronic device according to claim 9, wherein, The sensor images include multiple consecutive sensor images, and the processor performs lens shading correction, weighted masking and automatic white balance processing on each sensor image to obtain a first image corresponding to each sensor image, a second image corresponding to each sensor image and a third image corresponding to each sensor image.

11. The electronic device according to claim 9, wherein, The processor is also configured to obtain the correlated color temperature of the third image through automatic white balance processing. The lens shading correction process performed on the current sensor image is based on the correlated color temperature of a third image corresponding to the previous sensor image.

12. The electronic device according to claim 11, wherein, The processor is configured as follows: Determine whether the difference between the estimated values ​​of the correlated color temperature of the first image corresponding to the current sensor image and the first image corresponding to the previous sensor image is greater than a threshold, wherein the estimated value of the correlated color temperature of the first image corresponding to the current sensor image is the correlated color temperature of the third image corresponding to the previous sensor image. In response to the difference being greater than a threshold, it is determined that the first image corresponding to the current sensor image is in a transition state; In response to the difference not being greater than the threshold, it is determined that the first image corresponding to the current sensor image is in a stable state.

13. The electronic device according to claim 12, wherein, The processor is configured as follows: In response to determining that the first image is in a transition state, a transition weighted mask is determined, and a second image is generated based on the transition weighted mask and the first image, wherein the value of each weight in the transition weighted mask is between 0 and 1; In response to determining that the first image is in a stable state, a stable weighted mask is selected, and a second image is generated based on the stable weighted mask and the first image, wherein the value of each weight in the stable weighted mask is 1.

14. The electronic device according to claim 13, in, The transition weighting mask of the first image corresponding to the current sensor image is determined to be different from the transition weighting mask of the first image corresponding to the previous sensor image. In this process, the weights corresponding to the outer pixels of the first image in the transition weighted mask of the first image corresponding to the current sensor image are greater than the weights corresponding to the corresponding pixels in the transition weighted mask of the first image corresponding to the previous sensor image.

15. The electronic device according to claim 13, wherein, The processor is configured as follows: Select a weighted mask corresponding to the difference between the estimated values.

16. The electronic device according to claim 15, wherein, The larger the difference between the estimated values, the smaller the weight value corresponding to the outer pixels of the first image in the transition weighted mask.

17. A non-transitory computer-readable storage medium storing instructions, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Noise canceling circuit, noise canceling method, and solid-state imaging device

    CN101715049A

  • Colour balance processor

    US20150029359A1