Image processing method and intelligent terminal
By calculating the ambient spectrum intensity distribution in the camera screen, the image is subjected to white balance compensation processing, which solves the problems of low accuracy and high cost of spectral intensity distribution in the prior art, and achieves an efficient and low-cost image processing effect.
Patent Information
- Application Number
- CN202411428365.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art when processing images under different light source conditions, the correction parameters are not accurate enough, resulting in poor color processing effects and high additional equipment costs.
The spectral intensity distribution of ambient light is calculated by shooting pictures on ordinary cameras, and the white balance compensation processing is performed on the target image using the prediction results, so as to achieve high accuracy, low cost and simple operation image processing.
Improve the accuracy of image white balance processing, reduce equipment costs, and improve user experience.
Smart Images

Figure CN119450240A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method and an intelligent terminal. Background Art
[0002] The purpose of white balance is to restore the color of an object under different light sources to its inherent color. The human visual system has the characteristic of color constancy, so human observation of objects is not affected by light sources. However, the color of objects in the captured image of the image sensor is different under different light conditions. It will be blue under a clear sky and red under candlelight.
[0003] At present, the most commonly used color processing method in the industry is to calibrate multiple light sources in an offline scenario to obtain correction parameters under different light sources, and then adjust the original image captured by the color camera according to the correction parameters; or to carry out additional multi-spectral sensors to collect spectral information, and measure the spectral intensity distribution under complex light sources and backgrounds, so as to adjust the image according to the measured spectral intensity distribution. However, the existing technology has the problem that the correction parameters are not accurate enough, which affects the subsequent color processing, and the high cost of adding additional equipment is required.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the invention
[0005] In response to the above technical problems, the present application provides an image processing method and an intelligent terminal, which can calculate the spectral intensity distribution of ambient light through the pictures taken by an ordinary camera, with high accuracy, low cost and simple and convenient operation.
[0006] To solve the above technical problems, the present application provides an image processing method, which includes the steps of: S1, in response to a preset operation for a target image, performing white balance compensation processing on the target image according to a predicted result of the spectral intensity distribution in the target image.
[0007] Optionally, the method further includes the step: S0, identifying a light source scene in the target image, and predicting a spectral intensity distribution of the light source scene.
[0008] Optionally, S0 includes the following steps: S01, identifying the light source scene in the target image, and obtaining at least two vector groups of the light source scene through singular decomposition; S02, identifying the target area in the target image, and obtaining the image reflectivity of the target area; S03, predicting the spectral intensity distribution of the light source scene based on the image reflectivity and the vector group.
[0009] Optionally, S03 includes: jointly deriving various color expressions of the target image through the image reflectance, the vector group and the camera sensor sensitivity function; and calculating the spectral intensity distribution in combination with actual values of each color in the target image.
[0010] Optionally, the vector group comprises products of vector coefficients and basis vectors.
[0011] Optionally, S0 further includes the step: S04, when it is identified that the light source direction of the light source scene is a backlight direction, correcting the spectral intensity distribution by a backlight ratio function.
[0012] Optionally, before S1, the step further includes: performing black compensation processing and / or demosaic interpolation processing on the target image.
[0013] Optionally, white balance compensation is performed on the target image, including: calculating the RBG value of the target color point in the light source scene according to the prediction result of the spectral intensity distribution, obtaining the white balance gain value of the target image according to the RGB value of the target color point, and performing white balance compensation on the target image according to the white balance gain value.
[0014] The present application also provides an intelligent terminal, which includes: a memory and a processor, wherein an image processing program is stored in the memory, and when the image processing program is executed by the processor, the steps of the above method are implemented.
[0015] The present application also provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0016] As described above, the image processing method of the present application includes the steps of: in response to a preset operation for a target image, performing white balance compensation processing on the target image according to the predicted result of the spectral intensity distribution in the target image. Through the above technical solution, the function of calculating the spectral intensity distribution of ambient light through the shooting picture of an ordinary camera can be realized, thereby performing white balance processing on the image, solving the problems of low accuracy and high cost of spectral intensity distribution, and thus improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.
[0018] Figure 1 A schematic diagram of the hardware structure of a smart terminal for implementing each embodiment of the present application;
[0019] Figure 2 A communication network system architecture diagram provided for an embodiment of the present application;
[0020] Figure 3 is a flowchart of an image processing method according to a first embodiment;
[0021] Figure 4 is a flowchart of an image processing method according to a first embodiment;
[0022] Figure 5 is a diagram of a target area recognition interface of an image processing method according to the first embodiment;
[0023] Figure 6 is a specific flow chart of the image processing method according to the first embodiment;
[0024] Figure 7 is a flowchart of an image processing method according to the second embodiment.
[0025] The realization of the purpose, functional features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The above-mentioned drawings have shown clear embodiments of this application, which will be described in more detail later. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0026] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0027] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0028] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate that there are the described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or", "and / or", "including at least one of the following" etc. used in this application can be interpreted as inclusive, or mean any one or any combination. For example, “comprising at least one of the following: A, B, C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”, and for another example, “A, B or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”. An exception to this definition will only occur when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.
[0029] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0030] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0031] It should be noted that, in this article, step codes such as S11, S12, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing it specifically, those skilled in the art may execute S12 first and then S11, etc., but these should all be within the scope of protection of this application.
[0032] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0034] The smart terminal may be implemented in various forms. For example, the smart terminal described in this application may include smart terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0035] The following description will be made by taking a mobile terminal as an example, and those skilled in the art will understand that, in addition to components specifically used for mobile purposes, the construction according to the embodiments of the present application can also be applied to fixed-type terminals.
[0036] See also Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application, the mobile terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A / V (audio / video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111 and other components. Those skilled in the art can understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0037] Combine the following Figure 1 The following is a detailed introduction to the various components of the mobile terminal:
[0038] The radio frequency unit 101 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving the downlink information of the base station, it is sent to the processor 110 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communications can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution) and 5G, etc.
[0039] WiFi is a short-range wireless transmission technology. Mobile terminals can help users send and receive emails, browse web pages, and access streaming media through WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as needed without changing the essence of the invention.
[0040] The audio output unit 103 can convert the audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0041] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, and other operating modes, and can process such sound into audio data. The processed audio (voice) data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 can implement various types of noise elimination (or suppression) algorithms to eliminate (or suppress) noise or interference generated in the process of receiving and sending audio signals.
[0042] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured on the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0043] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0044] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile terminal. Optionally, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1071 or near the touch panel 1071 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 110, and can receive and execute the command sent by the processor 110. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may further include other input devices 1072. Optionally, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc., which are not specifically limited here.
[0045] Optionally, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Then, the processor 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Figure 1 In the figure, the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to implement the input and output functions of the mobile terminal, which is not limited here.
[0046] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
[0047] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area. Optionally, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0048] The processor 110 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. It executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, so as to monitor the mobile terminal as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. Optionally, the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.
[0049] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0050] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0051] In order to facilitate understanding of the embodiments of the present application, the communication network system on which the mobile terminal of the present application is based is described below.
[0052] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present application. The communication network system is an LTE system of universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203 and an operator's IP service 204, which are connected in sequence.
[0053] Optionally, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0054] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 , etc. Optionally, eNodeB 2021 may be connected to other eNodeBs 2022 via a backhaul (eg, an X2 interface), and eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 may provide UE 201 with access to EPC 203 .
[0055] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, PGW (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function) 2036, etc. Optionally, MME 2031 is a control node that processes signaling between UE 201 and EPC 203, and provides bearer and connection management. HSS 2032 is used to provide some registers to manage functions such as home location register (not shown in the figure), and store some user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, which selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).
[0056] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem) or other IP services.
[0057] Although the above introduction takes the LTE system as an example, those skilled in the art should know that the present application is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA and future new network systems (such as 5G), etc., without limitation here.
[0058] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present application are proposed.
[0059] First embodiment
[0060] See also Figure 3 , Figure 3 is a flowchart of an image processing method according to the first embodiment.
[0061] like Figure 3 As shown, the image processing method provided in the first embodiment of the present application includes the following steps:
[0062] S1, in response to a preset operation for a target image, performing white balance compensation processing on the target image according to a prediction result of the spectral intensity distribution in the target image.
[0063] The target image is the image that needs to be white balanced.
[0064] The preset operation may be a white balance compensation processing operation, or may be a target image selection operation and an output operation, and the like.
[0065] Spectral power distribution (SPD), a general light source is a complex light composed of a mixture of colored lights of different wavelengths. If the intensity of each colored light in its spectrum is measured by a sensor, the radiant energy of colored lights of different wavelengths can be obtained. The instrument used to measure radiant energy is called a spectroradiometer. Spectral density represents the magnitude of radiant energy within a unit wavelength interval. Usually, the radiant energy of colored lights of different wavelengths in a light source changes with the change of wavelength, so spectral density is a function of wavelength. The functional relationship between spectral density and wavelength is called spectral distribution. In practice, the spectral distribution is more often described by the functional relationship between the relative value of spectral density and wavelength, which is called relative spectral energy (power) distribution, denoted as S(λ). Relative spectral energy distribution can be expressed by any value, but it is usually obtained by taking the radiant energy at wavelength λ=555nm as 100 as a reference point for comparison. If the spectral wavelength λ is used as the horizontal coordinate and the relative spectral energy distribution S(λ) is used as the vertical coordinate, the relative spectral energy distribution curve of the light source can be drawn.
[0066] White balance (WB) is an important concept in photography and videography. It is used to adjust the color balance in an image and ensure that white objects can be correctly restored to white under different light sources. The goal of white balance is to correct white objects under different light sources to the white color perceived by the human eye, eliminate color cast in the image, and make the image color conform to the visual perception of the human eye.
[0067] In the above manner, the spectral intensity distribution in the target image is predicted, and then white balance compensation processing is performed on the target image based on the prediction result of the spectral intensity distribution.
[0068] Optionally, the method further comprises the step: S0, identifying a light source scene in the target image, and predicting a spectral intensity distribution of the light source scene.
[0069] Light source scenes include artificial light source scenes and natural light source scenes (eg, light sources other than artificial ones such as sunlight / daylight, moonlight, and starlight).
[0070] It should be noted that, in this embodiment, the natural light source scene generally refers to a sunlight / daylight scene.
[0071] The light source scene in the target image, that is, the light source scene when the target image is shot or / acquired. For example, if the target image is acquired in a studio (with the assistance of artificial light source), the light source scene of the target image is an artificial light source scene; if the target image is acquired outdoors (with the assistance of artificial light source), the light source scene of the target image is a natural light source scene.
[0072] Optionally, S0 includes the following steps: S01, identifying the light source scene in the target image, and obtaining at least two vector groups of the light source scene through singular decomposition; S02, identifying the target area in the target image, and obtaining the image reflectivity of the target area; S03, predicting the spectral intensity distribution of the light source scene based on the image reflectivity and the vector group.
[0073] Optionally, the vector group includes: the product of the vector coefficient and the basis vector.
[0074] The vector group includes the product of multiple vector coefficients and base vectors, and the specific number can be determined according to the needs. In this embodiment, the vector group includes the product of 3 vector coefficients and base vectors. For example, E(λ)=α 1 E 1 (λ)+α 2 E 2 (λ)+α 3 E 3 (λ). Where E(λ) is the spectral intensity distribution (SPD) of the ambient light, E 1 (λ), E 2 (λ) and E 3 (λ) are all basis vectors with the same value, α 1 , α 2 and α 3 are vector coefficients whose values are generally different but can be the same.
[0075] It should be noted that different light source scenes correspond to different basis vectors. Therefore, before predicting the spectral intensity distribution of the target image, the light source scene of the target image needs to be identified.
[0076] Singular value decomposition (SVD) is a matrix factorization method, which is a concept in linear algebra but is widely used in machine learning. Singular value decomposition decomposes any given matrix into the product of three matrices: an orthogonal left singular vector matrix, a diagonal singular value matrix, and an orthogonal right singular vector matrix.
[0077] The basis vectors of different light source scenes are obtained by singular decomposition based on the SPD data of a large amount of daylight and artificial light sources stored in the database.
[0078] The target area refers to the area of a certain characteristic object in the target image, such as people, walls, trees, and water.
[0079] It should be noted that, in this embodiment, the target area is the area where the face of a person is located in the target image. The target image is a person image.
[0080] The image reflectivity of the target area is obtained after a large number of tests. In this embodiment, the image reflectivity is the skin color reflectivity. By performing a large number of tests on skins of different skin colors, the image reflectivity of each color skin is finally obtained. Therefore, when obtaining the image reflectivity of the target area, it is necessary to first identify the skin color of the target area / face, and then obtain the reflectivity of the corresponding skin color from the database. The method for obtaining the image reflectivity of other feature objects can refer to the method for obtaining the face.
[0081] Optionally, S03 includes: jointly deriving various color expressions of the target image through the image reflectance, the vector group and the camera sensor sensitivity function; and calculating the spectral intensity distribution in combination with actual values of each color in the target image.
[0082] Camera sensor sensitivity function. Generally speaking, different models of cameras use different sensors, so the corresponding camera sensor sensitivity functions are also different. However, if the same sensor is used, the corresponding camera sensor sensitivity functions are also the same.
[0083] Color expression refers to the matrix corresponding to R, G and B and the vector coefficients, see formula (6).
[0084] The actual value of each color, that is, the average camera signal of the target area obtained by the camera, etc. and
[0085] Optionally, S0 further includes the step: S04, when it is identified that the light source direction of the light source scene is a backlight direction, correcting the spectral intensity distribution by a backlight ratio function.
[0086] The backlight ratio function is the brightness ratio of each pixel position when shooting in a backlight environment and a frontlight environment.
[0087] It should be noted that after identifying the light source scene of the target image, the light direction needs to be confirmed. Then, based on the light source direction, it is determined whether the predicted spectral intensity distribution needs to be corrected.
[0088] In this embodiment, only the light source direction of the natural light source scene needs to be determined. In other embodiments, the light source direction of the artificial light source scene can also be determined.
[0089] Optionally, before S1, the step further includes: performing black compensation processing and / or demosaic interpolation processing on the target image.
[0090] By performing black compensation and demosaic interpolation in advance on the target image, a three-channel RGB image can be obtained, that is, the R, G and B values of the image can be obtained through black compensation processing and / or demosaic interpolation processing.
[0091] Optionally, white balance compensation is performed on the target image, including: calculating the RBG value of the target color point in the light source scene according to the prediction result of the spectral intensity distribution, obtaining the white balance gain value of the target image according to the RGB value of the target color point, and performing white balance compensation on the target image according to the white balance gain value.
[0092] The RGB color value range refers to the intensity value range of the three color channels: red (R), green (G), and blue (B). In computers, the values of these three color channels are usually represented by integers between 0 and 255, where 0 represents the minimum intensity of the color channel (i.e., no color component), and 255 represents the maximum intensity of the color channel (i.e., the color component is the strongest). For example, the white point is (255, 255, 255).
[0093] Exemplarily, after the RGB value of the target color point in the target image is acquired, the white balance gain value of the target image is acquired by Rgain=G / R, Gain=G / G and Bgain=G / B.
[0094] Exemplarily, the spectral intensity distribution is obtained by the following formula:
[0095]
[0096] In the above formula, r(λ) is the skin color reflectance, E(λ) is the spectral intensity distribution (SPD) of the ambient light. R, G, B are the raw data obtained by demosaicing interpolation in the skin color area, and the coefficient κ is related to the light intensity but has nothing to do with color prediction and white balance parameters.
[0097] Therefore, the problem is transformed into a multiple solution problem for E(λ). In order to obtain E(λ), we can regard E(λ) as a combination of three basis vectors. [The number of basis vectors can be any positive integer greater than or equal to 2, that is, 4, 5, 6... are all OK], that is:
[0098] E(λ)=α 1 E 1 (λ)+α 2 E 2 (λ)+α 3 E 3 (λ)......(4)
[0099] Then, define λ i is a uniformly distributed wavelength, and Δλ is the distance between the wavelengths.
[0100]
[0101] Therefore, the formula will be transformed into the form of (5), where α 1 , α 2 , α 3 Put forward, and calculate other known quantities, multiply them into a large known quantity, and then the formula can be rewritten into the form of (6). j,p The matrix M is obtained by merging, and the discrete algebraic equation system obtained by combining equations (1)-(4) is given by the following equation:
[0102]
[0103] The image processing method provided in this embodiment splits the spectral intensity distribution of the light source scene through the basis vectors of the light source, and then predicts the spectral intensity distribution by combining the image reflectivity and the camera sensor sensitivity function. Finally, white balance compensation is performed on the target image according to the predicted result of the spectral intensity distribution, thereby improving the accuracy of the spectral intensity distribution and the white balance compensation effect.
[0104] Second embodiment
[0105] This embodiment is proposed based on any of the above embodiments.
[0106] See also Figure 4 , Figure 4 is a flowchart of an image processing method according to the second embodiment.
[0107] like Figure 4 As shown, the image processing method provided in the second embodiment of the present application includes:
[0108] S11: Acquire a target area in a target image.
[0109] The target image is an image collected by a camera after a camera device (such as a camera, a mobile phone, a computer, or other device carrying a camera) starts a camera function. In other embodiments, the target image can also be an image obtained by shooting.
[0110] The target area is a region image including an object, target and color in the target image.
[0111] In this embodiment, the image processing is for human images, so the target area includes the area where the human skin is located: the skin color area (the same as below), that is, the target area is the face area image, or other area images containing human skin (such as hands and arms, etc. that are not blocked by clothes).
[0112] In other embodiments, the target area is an area of a specific color (eg, gray, white, red, and green) in the target image, thereby achieving processing of other images.
[0113] S12: Obtain the image reflectivity of the target area and basis vector data of the light source scene where the target image is located.
[0114] Image reflectivity is the reflectivity of a certain color point in the target image, which is obtained through multiple tests.
[0115] The light source scene in which the target image is located, that is, the lighting conditions under which the target image is obtained, includes: natural light source scenes (such as sunlight and moonlight, sunlight is used for explanation below) and artificial light source scenes (such as LED lights and neon lights, artificial light sources are used for explanation below), etc.
[0116] The basis vector data is obtained by collecting a large number of SPD (Spectral Power Distribution) of sunlight and artificial light sources using singular value decomposition (SVD). Singular decomposition is a mathematical calculation method and an important matrix decomposition in linear algebra. Singular value decomposition is the generalization of eigendecomposition on any matrix.
[0117] S13: Obtain the sensor sensitivity function of the terminal.
[0118] The sensor sensitivity function is a function used to describe the sensitivity of a sensor to light of different wavelengths. The sensor sensitivity functions of sensors carried by different terminals are generally different.
[0119] S14: Predicting the spectral intensity distribution of the light source scene according to the image reflectivity, basis vector data and sensor sensitivity function.
[0120] For example, it is assumed that the sensor sensitivity function (S r (λ),S g (λ),S b (λ)) and the target image contains skin color areas (through image recognition and segmentation). On this basis, the following three basic formulas can be listed:
[0121]
[0122] In the above formula, r(λ) is the skin color reflectance, E(λ) is the spectral intensity distribution (SPD) of the ambient light. R, G, B are the raw data obtained by demosaicing interpolation in the skin color area. The coefficient κ is related to the light intensity, which is independent of the color prediction and white balance parameters, so k can be regarded as 1.
[0123] In the above formula, all except E(λ) are known. In order to obtain E(λ), E(λ) can be split into a combination of 3 basis vectors (the number of basis vectors can be any positive integer greater than or equal to 2, that is, 2, 3, 4, 5, 6... are all possible), that is:
[0124] E(λ)=α 1 E 1 (λ)+α 2 E 2 (λ)+α 3 E 3 (λ)………………(4)
[0125] Then, define λ i is a uniformly distributed wavelength, and Δλ is the distance between the wavelengths.
[0126]
[0127] Therefore, the formula will be transformed into the form of (5), and then we will 1 , α 2 , α 3 Put forward, and calculate other known quantities, multiply them into a large known quantity, and then the formula can be rewritten into the form of (6). j,p The matrix M is obtained by merging, and the discrete algebraic equation system obtained by combining equations (1)-(4) is given by the following equation:
[0128]
[0129] It is worth noting that the element m in the above matrix M j,p Depends on the basis vector E p (λ i ). The basis vector E p (λ i ) is obtained by accumulating the SPD of a large number of daylight sources and artificial light sources using singular decomposition. Element m j,p It also depends on the reflectivity of the pixel. By accumulating a large number of skin reflectivities, the average reflectivity of the skin reflectivity can be obtained. Therefore, by substituting all known quantities into equation (5), the matrix M in equation (6) can be calculated.
[0130] Similarly, the skin area in the scene is known and we can get the average camera signal of the skin area and Therefore, we can use and and replace R, G and B in equation (6).
[0131] Therefore, the combined coefficient α of the ambient light SPD can be obtained from equation (6): 1 ,α 2 ,α 3 , then the spectral intensity distribution SPD of the ambient light can be obtained using equation (4).
[0132] In the above manner, by introducing the basis vectors of the spectral intensity distribution, the problem with multiple solutions is transformed into a problem with a solution, and then the spectral intensity distribution of the light source used to capture the target image is solved through multiple basic formulas.
[0133] See also Figure 5 and Figure 6 , Figure 5 is a target area recognition interface diagram of the image processing method according to the first embodiment, Figure 6 It is a specific flow chart of the image processing method according to the first embodiment.
[0134] Optionally, the step of obtaining the image reflectivity of the target area and the basis vector data of the ambient light of the scene in which the target image is located includes: identifying the skin color of the target area, and obtaining the corresponding image reflectivity based on the skin color, and the image reflectivity includes skin color reflectivity; obtaining the light source scene in which the target image is located, and obtaining the basis vector data of the corresponding light source based on the light source scene, and the light source scene includes a daylight light source scene and an artificial light source scene.
[0135] Skin colors are generally: white, yellow, brown and black, in addition to red / brown and bronze; in some cases, each color can be subdivided according to skin tone, such as cool tones and warm tones.
[0136] Skin color reflectivity, by collecting the skin color reflectivity of the same race and sorting them from small to large, and by studying the accuracy of color temperature, the relationship between color temperature and skin color reflectivity is confirmed, and the accuracy of light source prediction, CCT prediction and AWB Gain is further improved. Skin color reflectivity is an adjustable parameter to achieve the best effect for different people and different scenes.
[0137] Skin color area segmentation: Segment the skin color area from the target image. Generally, the entire face area is used. In special cases, partial skin color area can be used as needed, or the block combination skin color can be adjusted as needed.
[0138] Skin color values can be calculated using the CIELAB system (Lab color space). This system uses three parameters L, a, and b to represent skin color, where L represents lightness, a represents the difference between red and green, and b represents the difference between yellow and blue. The L value represents lightness, ranging from 0 (black) to 100 (white). a and b represent the color saturation on the red-green axis and the blue-yellow axis, respectively. By measuring the values of these parameters, a skin color value can be calculated to divide skin color. The ITA° value (individual type angle) is also an important indicator, which is used to measure the depth of skin color. The larger the ITA° value, the lighter the skin color, and vice versa.
[0139] Median of skin color area: The skin color of the same user is not completely consistent. It has been verified that the effect and stability of the median of skin color are better than the mean of skin color or the mean of skin color after removing a certain proportion of extreme values. The median of skin color is selected when the calculation amount is minimal. After confirming the skin color of the skin color area, the skin color reflectance corresponding to the skin color is obtained. The skin color reflectance is the average value of the reflectance of the corresponding skin color obtained through a large amount of data analysis and calculation.
[0140] Specifically, in order to pursue high accuracy of the predicted spectral intensity distribution, different light source scenes have certain differences in basis vectors. Therefore, the daylight and artificial light scenes can be separated to use different basis vectors respectively, avoiding partial errors (CCT prediction error of about 200K) caused by mixed use of basis vectors.
[0141] Optionally, after the step of obtaining the light source scene in which the target image is located and obtaining basis vector data of the corresponding light source according to the light source scene, it includes: when it is detected that the scene in which the target image is located is a daylight light source scene, obtaining the light source position in the daylight light source scene, and the light source position includes backlight, front light and side light.
[0142] Specifically, the spectrum difference between backlighting and frontlighting is large, and the backlighting situation needs to be separated for separate processing. Therefore, it is necessary to determine the position of the light source in the target image to determine how the target image was taken, such as front light, side light (top light) or backlighting.
[0143] Optionally, the step of predicting the spectral intensity distribution of the light source scene according to the image reflectivity, basis vector data and sensor sensitivity function includes: when the light source position is backlit, correcting the spectral intensity distribution by a backlight processing algorithm.
[0144] Specifically, in the case of backlighting of a daylight source, the final SPD prediction is corrected by using a backlighting ratio function through a backlighting processing algorithm, thereby obtaining a CCT and a Gain color temperature and gain that match the backlighting situation.
[0145] In other implementations, the backlight processing algorithm may also be used in the case of artificial light sources, but there are certain differences in the backlight ratio functions of artificial light sources and daylight light sources.
[0146] Optionally, the step of acquiring the sensor sensitivity function of the terminal includes: acquiring identification information of the terminal; confirming a terminal model of the terminal according to the identification information; and acquiring the sensor sensitivity function according to the terminal model.
[0147] Sensor sensitivity function: It is related to the terminal model. You need to use a sensitivity function that matches the terminal model. In order to ensure that the algorithm is compatible with various terminal models, the sensor sensitivity function needs to be replaced as a whole according to the terminal model when predicting the spectral intensity distribution.
[0148] Optionally, before the step of acquiring the target area in the target image, the step includes: performing a first processing on the target image to acquire an RGB image of the target image, wherein the first processing includes black compensation and demosaic interpolation.
[0149] Specifically, after acquiring the target image, black compensation and early demosaic interpolation are performed on the target image. The early demosaic interpolation is to obtain three-channel data of the target image to separate the three sensors and obtain the R, G and B values of the image.
[0150] Optionally, the step of obtaining the image reflectance of the target area and the basis vector data of the light source scene where the target image is located includes: splitting the spectral intensity distribution corresponding to the light source scene into a combination of multiple combination coefficients and basis vector data.
[0151] Specifically, the R, G, and B values can be calculated using the following three basic formulas: In the above formula, r(λ) is the skin color reflectance; E(λ) is the spectral intensity distribution (SPD) of the ambient light; R, G, B are the raw data obtained by demosaicing interpolation of the skin color area; the coefficient κ is related to the light intensity, but has nothing to do with color prediction and white balance parameters; (S r (λ),S g (λ),S b (λ)) is the sensor sensitivity function. The skin color reflectance and sensor sensitivity function are both saved in the database in advance and can be called according to actual needs.
[0152] The basis vector data of different light sources are also pre-stored in the database. In order to obtain the spectral intensity distribution, the spectral intensity distribution can be regarded as a combination of multiple basis vectors and combination coefficients. The number of basis vectors can be any positive integer greater than or equal to 2, that is, 2, 3, 4, 5, 6... In this embodiment, the spectral intensity distribution is split into a combination of 3 basis vectors and combination coefficients.
[0153] Optionally, the step of predicting the spectral intensity distribution of the light source scene based on the image reflectance, basis vector data and sensor sensitivity function includes: obtaining the multiple combination coefficients based on the image reflectance, basis vector data and sensor sensitivity function; and predicting the spectral intensity distribution based on the multiple combination coefficients and the basis vector data.
[0154] Specifically, the sensor sensitivity function obtained through the terminal signal, the skin color reflectance obtained by identifying the skin color of the person in the target image, and the basis vector data of the corresponding light source obtained by light source scene recognition are substituted into the above formula 5 to calculate the matrix M in formula 6. Then, the R, G and B three-channel data of the target image obtained by the terminal preprocessing the target image are used to obtain the average camera signal of the skin color area and Reuse and Replace R, G and B in formula 6 to obtain the combination coefficient α of the spectral intensity distribution of the corresponding light source 1 , α 2 and α 3 ; Finally, the combination coefficient α 1 , α 2 and α 3 Substituting into formula 4, the corresponding light source spectral intensity distribution is finally calculated.
[0155] The image processing method of this embodiment introduces the basis vector data of the light source to split the spectral intensity distribution of the scene where the target image is located, thereby predicting the spectral intensity distribution; the basis vector data of the light source scene where the target image is located can be accurately obtained through light source scene judgment, thereby improving the prediction accuracy of the spectral intensity distribution. By identifying the skin color in the target image, the skin color reflectance corresponding to different skin colors is obtained, thereby further improving the prediction accuracy of the spectral intensity distribution.
[0156] Third embodiment
[0157] This embodiment is proposed based on any of the above embodiments.
[0158] See also Figure 7 , Figure 7 is a flowchart of an image processing method according to the third embodiment.
[0159] like Figure 7 As shown, the image processing method provided in this embodiment includes the following steps:
[0160] S21: Acquire a target area in a target image;
[0161] S22: Acquire the image reflectivity of the target area and basis vector data of the light source scene where the target image is located;
[0162] S23: Obtaining a sensor sensitivity function of the terminal;
[0163] S24: predicting the spectral intensity distribution of the light source scene according to the image reflectivity, basis vector data and sensor sensitivity function;
[0164] S25: Obtaining the white point RBG value in the light source scene according to the spectral intensity distribution and the RGB value calculation formula;
[0165] S26: Obtain a white balance gain value of the target image according to the white point RGB value.
[0166] Specifically, after the spectral intensity distribution SPD is predicted by the above embodiment, the AWB gain calculation is performed on the taken photo.
[0167] It should be noted that, similar to the SPD prediction in the above embodiment, the calculation of the AWB gain also adopts the basic
[0168] In the above basic formula, the meanings of the parameters are as follows: R, G, and B represent single pixels that have not been white balanced. After de-mosaicing and interpolation, the R, G, and B values after the Bayer matrix format data is converted into three-channel data. The a coefficient is related to the light intensity and has nothing to do with the spectrum and color information. E(λ) represents the spectral information of the light source, reflects the color characteristics of the light source, and can infer the correlated color temperature (CCT); it is obtained by the pre-SPD prediction algorithm and the spectrum prediction of the human face skin color. r(λ) is the reflectance information, which is within the spectral wavelength range of 400-700nm, and the reflectance of the white point is obtained through actual measurement. S r (λ) represents the sensitivity function of the sensor, which can be considered as customized for the same sensor model and is the same as the sensor sensitivity function used in the previous SPD prediction.
[0169] Therefore, the steps to obtain the AWB gain are as follows:
[0170] 1. Obtain the predicted spectral intensity distribution SPD.
[0171] 2. Use the above basic formula to calculate the RGB value of the white point under the light source.
[0172] 3. Calculate the gain values of the R channel and the B channel according to the white point RGB value.
[0173] Exemplarily, in the process of calculating the white point RGB value, the coefficient a in the formula can be set to 1, and the wavelength range can be set to 400-700nm with an interval of 5nm. Then, the integrals in the above three basic formulas are converted into a matrix budget to calculate the RGB value of the white point. After calculating the white point RGB value, the gain coefficients of the R channel and the B channel are calculated based on Rgain=G / R, Gain=G / G, and Bgain=G / B, and the R channel and B channel data after the gain are calculated using the gain coefficient. Finally, the AWB compensation adjustment of the image is achieved.
[0174] The image processing method of this embodiment obtains information such as the light source spectral intensity distribution SPD and white point reflectance by prediction, calculates the RGB value of the white point of the scene where the target image is located, and then obtains the AWB compensation of the R channel and B channel in the scene through Rgain=G / R, Gain=G / G, and Bgain=G / B. Even if there is no white point or gray point in the scene where the target image is located, the spectral intensity distribution calculation and AWB compensation will be correct.
[0175] The present application also provides an intelligent terminal, which includes a memory and a processor. The memory stores an image processing program, and when the image processing program is executed by the processor, the steps of the image processing method in any of the above embodiments are implemented.
[0176] The present application also provides a computer-readable storage medium, on which an image processing program is stored. When the image processing program is executed by a processor, the steps of the image processing method in any of the above embodiments are implemented.
[0177] In the embodiments of the smart terminal and computer-readable storage medium provided in the present application, all technical features of any of the above-mentioned image processing method embodiments may be included, and the expanded and explained contents of the specification are basically the same as those of the embodiments of the above-mentioned methods, and will not be repeated here.
[0178] The embodiment of the present application further provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the methods in the above various possible implementation modes.
[0179] An embodiment of the present application also provides a chip, including a memory and a processor, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device equipped with the chip executes the methods in various possible implementation modes as described above.
[0180] It is understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, it is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0181] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0182] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0183] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0184] In the present application, the same or similar terminology concepts, technical solutions and / or application scenario descriptions are generally described in detail only the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of the present application, for the same or similar terminology concepts, technical solutions and / or application scenario descriptions that are not described in detail later, reference can be made to the previous related detailed descriptions.
[0185] In the present application, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0186] The various technical features of the technical solution of the present application can be arbitrarily combined. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.
[0187] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present application.
[0188] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a storage disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state storage disk Solid State Disk (SSD)), etc.
[0189] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An image processing method, characterized in that: The method comprises the steps of: S1, in response to a preset operation for a target image, performing white balance compensation processing on the target image according to a prediction result of spectral intensity distribution in the target image.
2. The image processing method according to claim 1, characterized in that: Also includes the steps: S0, identifying the light source scene in the target image, and predicting the spectral intensity distribution of the light source scene.
3. The image processing method according to claim 2, characterized in that: The S0 comprises the following steps: S01, identifying a light source scene in the target image, and obtaining at least two vector groups of the light source scene by singular decomposition; S02, identifying a target area in a target image, and obtaining an image reflectivity of the target area; S03: predicting the spectral intensity distribution of the light source scene according to the image reflectivity and the vector group.
4. The image processing method according to claim 3, characterized in that: The S03 includes: The various color expressions of the target image are jointly derived through the image reflectivity, the vector group and the camera sensor sensitivity function; and the spectral intensity distribution is calculated in combination with the actual values of the various colors in the target image.
5. The image processing method according to claim 4, characterized in that: The vector group includes the product of the vector coefficients and the basis vectors.
6. The image processing method according to any one of claims 2 to 5, characterized in that: The S0 further comprises the steps of: S04: When it is identified that the light source direction of the light source scene is a backlight direction, the spectral intensity distribution is corrected by a backlight ratio function.
7. The image processing method according to any one of claims 1 to 5, characterized in that: The S1 also includes: Perform black compensation processing and / or demosaic interpolation processing on the target image.
8. The image processing method according to any one of claims 1 to 5, characterized in that: The performing white balance compensation processing on the target image comprises: The RBG value of the target color point in the light source scene is calculated according to the prediction result of the spectral intensity distribution, the white balance gain value of the target image is obtained according to the RGB value of the target color point, and the white balance compensation processing is performed on the target image through the white balance gain value.
9. An intelligent terminal, characterized in that: The intelligent terminal comprises: a memory and a processor, wherein an image processing program is stored in the memory, and when the image processing program is executed by the processor, the steps of the image processing method according to any one of claims 1 to 8 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 8 are implemented.