Image processing method and device, electronic equipment, readable storage medium and program product

By obtaining the nonlinear correction mapping relationship of the image sensor to correct the nonlinear response pixel values, the problem of image color cast caused by the nonlinear FWC characteristic image sensor is solved, and the accuracy and quality of image processing are improved.

CN118660233APending Publication Date: 2024-09-17GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410791118.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

When an image sensor with nonlinear FWC characteristics is used to output an image, there are problems with image color cast and inaccurate processing.

Method used

By obtaining the nonlinear correction mapping relationship of the image sensor, nonlinear brightness correction is performed on the nonlinear response pixel value based on this relationship to obtain a corrected image, and the corrected image is used in image signal processing to avoid image color cast caused by the nonlinear response.

Benefits of technology

It improves the accuracy of image processing and ensures the accuracy and quality of image signal processing, especially in the processing of high dynamic range and highlight areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660233A
    Figure CN118660233A
Patent Text Reader

Abstract

The invention relates to an image processing method and device, electronic equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a nonlinear correction mapping relation corresponding to an image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relation represents a mapping relation between a nonlinear response pixel value and a linear correction pixel value under the same exposure; acquiring a first image through the image sensor, and performing nonlinear brightness correction on the nonlinear response pixel value in the first image based on the linear correction pixel value in the nonlinear correction mapping relation to obtain a corrected image; and performing image signal processing on the corrected image to obtain a target image. By adopting the method, the accuracy of image processing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of imaging technology, and in particular to an image processing method, device, electronic device, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of imaging technology, image sensors with linear FWC (Full Well Capacity) characteristics and image sensors with nonlinear FWC (N-FWC) characteristics have emerged. Among them, the linear FWC characteristic is characterized by a linear increasing relationship between the response pixel value and the exposure. The greater the exposure, the greater the response pixel value. After reaching the maximum value of the pixel, the pixel value will not change even if the exposure increases. The response curve of the nonlinear FWC (N-FWC) characteristic is different from this. The relationship between the response pixel value and the exposure is not completely linear.

[0003] However, when an image sensor with nonlinear FWC characteristics is used to output an image, the color of the image will be biased, resulting in inaccurate image processing. Summary of the invention

[0004] Embodiments of the present application provide an image processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the accuracy of image processing.

[0005] In a first aspect, the present application provides an image processing method, comprising:

[0006] Acquire a nonlinear correction mapping relationship corresponding to an image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure;

[0007] Acquire a first image through the image sensor, and perform nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image;

[0008] Performing image signal processing on the corrected image to obtain a target image.

[0009] In one embodiment, performing nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on the linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image includes:

[0010] Determine a nonlinear response pixel region in the first image; the nonlinear response pixel region includes nonlinear response pixel values;

[0011] The linear correction pixel values ​​corresponding to the nonlinear response pixel values ​​in the nonlinear response pixel area are determined from the nonlinear correction mapping relationship, and the nonlinear response pixel values ​​are corrected to the corresponding linear correction pixel values ​​to obtain a corrected image.

[0012] In one embodiment, the nonlinear correction mapping relationship includes at least two nonlinear correction sub-mapping relationships, each nonlinear correction sub-mapping relationship corresponds to a color channel, and the nonlinear correction sub-mapping relationship represents a mapping relationship between a nonlinear response sub-pixel value and a linear correction sub-pixel value of the color channel under the same exposure; the step of determining the linear correction pixel value corresponding to the nonlinear response pixel value in the nonlinear response pixel area from the nonlinear correction mapping relationship, and correcting the nonlinear response pixel value to the corresponding linear correction pixel value to obtain a corrected image includes:

[0013] For each color channel, determine a linear correction sub-pixel value corresponding to a nonlinear response sub-pixel value of the color channel in the nonlinear response pixel area from a nonlinear correction sub-mapping relationship corresponding to the color channel, and correct the nonlinear response sub-pixel value of the color channel to a linear response sub-pixel value to obtain a sub-corrected image of the color channel;

[0014] A corrected image is generated based on the sub-corrected images of each of the color channels.

[0015] In one embodiment, the method further comprises:

[0016] Under different exposure levels, obtaining response pixel values ​​of the image sensor;

[0017] Based on the response pixel values ​​under different exposure amounts, an inflection point value is determined from each response pixel value, and a linear response pixel value and a nonlinear response pixel value are determined; the nonlinear response pixel value is greater than or equal to the inflection point value, and the linear response pixel value is less than the inflection point value;

[0018] Determining a linear correction pixel value corresponding to the nonlinear response pixel value according to the linear response pixel value;

[0019] Based on the nonlinear response pixel value and the linear correction pixel value under the same exposure, a nonlinear correction mapping relationship is calibrated.

[0020] In one embodiment, obtaining the response pixel value of the image sensor under different exposure levels includes:

[0021] At each exposure level, acquiring at least two frames of exposure images;

[0022] Based on at least two frames of exposure images, generating a standard image corresponding to the exposure amount;

[0023] A target image block in the standard image is determined, and a response pixel value corresponding to the exposure amount is determined based on each pixel value in the target image block.

[0024] In one embodiment, determining the linear correction pixel value corresponding to the nonlinear response pixel value according to the linear response pixel value includes:

[0025] generating a linear response sub-curve according to the linear response pixel value;

[0026] Based on the linear response sub-curve, a linear correction pixel value corresponding to the nonlinear response pixel value is determined.

[0027] In one of the embodiments, after acquiring the first image by the image sensor, the method further includes:

[0028] Performing noise reduction processing on the first image to obtain a second image;

[0029] The step of performing nonlinear brightness correction on the nonlinear response pixel values ​​in the first image based on the linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image includes:

[0030] Based on the linear correction pixel values ​​in the nonlinear correction mapping relationship, nonlinear brightness correction is performed on the nonlinear response pixel values ​​in the second image to obtain a corrected image.

[0031] In a second aspect, the present application further provides an image processing device, comprising:

[0032] A mapping relationship acquisition module is used to acquire a nonlinear correction mapping relationship corresponding to an image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure;

[0033] A first image module is used to obtain a first image through the image sensor.

[0034] A correction module, configured to perform nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image;

[0035] The image signal processing module is used to perform image signal processing on the corrected image to obtain a target image.

[0036] In a third aspect, the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0037] Acquire a nonlinear correction mapping relationship corresponding to an image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure;

[0038] Acquire a first image through the image sensor, and perform nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image;

[0039] Performing image signal processing on the corrected image to obtain a target image.

[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0041] Acquire a nonlinear correction mapping relationship corresponding to an image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure;

[0042] Acquire a first image through the image sensor, and perform nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image;

[0043] Performing image signal processing on the corrected image to obtain a target image.

[0044] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0045] Acquire a nonlinear correction mapping relationship corresponding to an image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure;

[0046] Acquire a first image through the image sensor, and perform nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image;

[0047] Performing image signal processing on the corrected image to obtain a target image.

[0048] The above-mentioned image processing method, device, electronic device, computer-readable storage medium and computer program product obtain a nonlinear correction mapping relationship corresponding to an image sensor, wherein the image sensor has a nonlinear full-well capacity characteristic, and the nonlinear correction mapping relationship characterizes a mapping relationship between nonlinear response pixel values ​​and linear correction pixel values ​​under the same exposure; a first image is obtained through the image sensor with the nonlinear full-well capacity characteristic, and based on the linear correction pixel values ​​in the nonlinear correction mapping relationship, a nonlinear brightness correction is performed on the nonlinear response pixel values ​​in the first image to obtain a corrected image. Then, when processing image signals, the corrected image can avoid the problem of image color cast caused by the nonlinear response pixel values, thereby obtaining a target image more accurately and improving the accuracy of image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 is a schematic flow chart of an image processing method in one embodiment;

[0051] Figure 2 Response curves of three color channels RGB in one embodiment;

[0052] Figure 3 is a schematic diagram of nonlinear FWC response curve correction in one embodiment;

[0053] Figure 4 is a schematic flow chart of an image processing method in another embodiment;

[0054] Figure 5 is a structural block diagram of an image processing device in one embodiment;

[0055] Figure 6 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. 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.

[0057] In one embodiment, Figure 1As shown, an image processing method is provided. This embodiment uses the method applied to an electronic device as an example for illustration. The electronic device may be a terminal or a server. It is understandable that the method may also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. Among them, the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server may be an independent physical server, a server cluster or a distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0058] In this embodiment, the image processing method includes the following steps:

[0059] Step S102, obtaining a nonlinear correction mapping relationship corresponding to the image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure.

[0060] Among them, the nonlinear full well capacity (N-FWC) characteristic refers to the nonlinear relationship between the response pixel value and the exposure of the image sensor, that is, as the exposure increases, the response pixel value of the image sensor does not increase completely linearly. The image sensor with nonlinear full well capacity (N-FWC) characteristics has a relationship (response curve) between the corresponding response pixel value and the exposure, including a linear stage and a nonlinear stage. When the exposure is small, it is in the linear stage, at which time the response pixel value is linearly proportional to the exposure. As the exposure increases, the response curve will gradually enter the nonlinear stage, at which time the response pixel value presents a slowly increasing nonlinear relationship with the increase in exposure.

[0061] The nonlinear response pixel value is a nonlinear response pixel value obtained after the image sensor is exposed. The linear correction pixel value is a pixel value used to perform nonlinear brightness correction on the nonlinear response pixel value. Optionally, the nonlinear correction mapping relationship can be expressed in a table, formula or other manner, which is not limited here.

[0062] Optionally, the electronic device obtains a nonlinear correction mapping relationship completed by calibration of the image sensor. The calibration method of the nonlinear correction mapping relationship includes: calibrating the image sensor to generate a response curve; the response curve includes a linear response sub-curve and a nonlinear response sub-curve, the linear response sub-curve represents the relationship between the exposure and the linear response pixel value, and the nonlinear response sub-curve represents the relationship between the exposure and the nonlinear response pixel value; based on the response pixel value curve, a linear correction curve corresponding to the nonlinear response sub-curve is fitted; based on the nonlinear response sub-curve and the linear correction curve, a nonlinear correction mapping relationship is generated.

[0063] The linear response sub-curve indicates that the image sensor is in a linear stage, and the nonlinear response sub-curve indicates that the image sensor is in a nonlinear stage.

[0064] Step S104: acquiring a first image through an image sensor, and performing nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on linear correction pixel values ​​in a nonlinear correction mapping relationship to obtain a corrected image.

[0065] The first image is an image obtained by exposure of the image sensor. The first image may be in RAW image format or other image formats, which are not limited here.

[0066] Optionally, the electronic device determines a nonlinear response pixel value from the first image, and performs a nonlinear brightness correction on the nonlinear response pixel value in the first image based on a linear correction pixel value in a nonlinear correction mapping relationship to obtain a corrected image.

[0067] Optionally, the electronic device determines a first linear correction pixel value corresponding to a nonlinear response pixel value in the first image from a nonlinear correction mapping relationship; compares the first linear correction pixel value with the nonlinear response pixel value, and adjusts the first linear correction pixel value based on the comparison result to obtain a second linear correction pixel value; and corrects the nonlinear response pixel value in the first image to the second linear correction pixel value to obtain a corrected image.

[0068] Among them, if the comparison result indicates that the difference between the first linear correction pixel value and the nonlinear response pixel value is within the target difference range, the first linear correction pixel value is used as the second linear correction pixel value; if the comparison result indicates that the difference between the first linear correction pixel value and the nonlinear response pixel value exceeds the target difference range, the first linear correction pixel value is reduced to obtain the second linear correction pixel value.

[0069] Optionally, the electronic device determines, from a nonlinear correction mapping relationship, a first linear correction pixel value corresponding to a nonlinear response pixel value in the first image; multiplies the first linear correction pixel value by a target weight factor to obtain a third linear correction pixel value; and corrects the nonlinear response pixel value in the first image to the third linear correction pixel value to obtain a corrected image.

[0070] In other optional implementations, the electronic device may also use other methods to perform nonlinear brightness correction on the nonlinear response pixel values ​​in the first image based on the linear correction pixel values ​​in the nonlinear correction mapping relationship, which is not limited here.

[0071] Step S106, performing image signal processing on the corrected image to obtain a target image.

[0072] Among them, Image Signal Processing (ISP) includes LSC (Lens Shading Correct) and AWB (Auto White Balance), and may also include subsequent ISP processing, such as HDR (High Dynamic Range Imaging) processing, color correction or highlight suppression, etc., which are not limited here. When an electronic device performs image signal processing, it is necessary to input a linear corresponding value in order to make the final output target image effect normal, so it is necessary to correct the nonlinear response pixel value to a linear correction pixel value.

[0073] For example, after the electronic device performs nonlinear brightness correction on the nonlinear response pixel values ​​in the first image, the corrected pixel values ​​may exceed the maximum bit width of the input pixels, and both LSC processing and AWB processing will increase the pixel values. The electronic device can then perform highlight suppression and local tone mapping on the image to compress the values ​​of the bright area that exceed the maximum bit width to within the maximum bit width required by the system while maintaining the dynamics and local contrast of the highlight area.

[0074] It is understandable that when the image sensor with linear FWC characteristics in traditional technology adopts single-frame HDR solution and dual-frame HDR solution, the single-frame HDR solution shortens the exposure time in order to improve the dynamic range of the image, resulting in poor image signal-to-noise ratio, and the dual-frame HDR solution will have ghosts in motion scenes and has high power consumption; while the image sensor with nonlinear full well capacity (F-FWC) characteristics is not easy to saturate in the highlight area, so it is beneficial to retain the dynamics of the highlight area, and there is no need to shorten the exposure time to improve the dynamic range, which leads to the problem of poor image signal-to-noise ratio. That is, the target image contains both high dynamic range and high signal-to-noise ratio, while also avoiding the ghost problem in motion scenes, and has the advantage of low power consumption because of processing single-frame images.

[0075] The above-mentioned image processing method obtains a nonlinear correction mapping relationship corresponding to an image sensor, wherein the image sensor has a nonlinear full-well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure; a first image is obtained through the image sensor having the nonlinear full-well capacity characteristic, and based on the linear correction pixel value in the nonlinear correction mapping relationship, a nonlinear brightness correction is performed on the nonlinear response pixel value in the first image to obtain a corrected image. Then, when processing image signals, the corrected image can avoid the problem of image color cast caused by the nonlinear response pixel value, thereby obtaining a target image more accurately and improving the accuracy of image processing.

[0076] In one embodiment, based on the linear correction pixel values ​​in the nonlinear correction mapping relationship, nonlinear brightness correction is performed on the nonlinear response pixel values ​​in the first image to obtain a corrected image, including: determining a nonlinear response pixel area in the first image; the nonlinear response pixel area includes nonlinear response pixel values; determining the linear correction pixel values ​​corresponding to the nonlinear response pixel values ​​in the nonlinear response pixel area from the nonlinear correction mapping relationship, and correcting the nonlinear response pixel values ​​in the nonlinear response pixel area to the corresponding linear correction pixel values ​​to obtain the corrected image.

[0077] The nonlinear response pixel region is a region including nonlinear response pixel values, and the brightness of the nonlinear response pixel region is higher than the brightness corresponding to the exposure of the inflection point value.

[0078] Optionally, the electronic device traverses each response pixel value in the first image, and if the response pixel value is greater than the inflection point value, determines the response pixel value as a nonlinear response pixel value, and determines a nonlinear response pixel area based on each nonlinear response pixel value.

[0079] Optionally, the electronic device obtains the brightness of the first image, and determines a nonlinear response pixel region having a brightness greater than a brightness threshold from the first image; wherein the brightness threshold can be set as needed.

[0080] Optionally, the nonlinear correction mapping relationship includes at least two nonlinear correction sub-mapping relationships, each nonlinear correction sub-mapping relationship corresponds to a color channel, and the nonlinear correction sub-mapping relationship represents the mapping relationship between the nonlinear response sub-pixel value and the linear correction sub-pixel value of the color channel under the same exposure; from the nonlinear correction mapping relationship, the linear correction pixel value corresponding to the nonlinear response pixel value in the nonlinear response pixel area is determined, and the nonlinear response pixel value in the nonlinear response pixel area is corrected to the corresponding linear correction pixel value to obtain a corrected image, including: for each color channel, from the nonlinear correction sub-mapping relationship corresponding to the color channel, the linear correction sub-pixel value corresponding to the nonlinear response sub-pixel value of the color channel in the nonlinear response pixel area is determined, and the nonlinear response sub-pixel value of the color channel is corrected to the corresponding linear response sub-pixel value to obtain a sub-corrected image of the color channel; based on the sub-corrected images of each color channel, a corrected image is generated.

[0081] The color space of the first image is not limited, such as RGB (Red, red; Green, green; Blue, blue), YUV (Y represents brightness, U and V represent chrominance), etc. If the color space of the first image is RGB, RGB is three color channels respectively, and if the color space of the first image is YUV, YUV is three color channels respectively.

[0082] Optionally, the electronic device superimposes the sub-corrected images of each color channel to generate a corrected image.

[0083] Taking the three color channels of RGB as an example, the nonlinear correction sub-mapping relationships corresponding to the three color channels of RGB are lutR, lutG and lutB respectively, and the nonlinear brightness correction strategy is:

[0084] if(In_x <= kneeVal)

[0085] Out_x = In_x;

[0086] else

[0087] Out_x = lutC[In_x];

[0088] Among them, In_x is the response sub-pixel value of each color channel in the first image, kneeVal is the inflection point value of the same color channel, and lutC represents one of lutR, lutG and lutB; if In_x <= kneeVal, it means that the response sub-pixel value of the color channel is a linear response sub-pixel value, and there is no need to correct the linear response sub-pixel value, that is, Out_x = In_x; if In_x>kneeVal, that is, else, it means that the response sub-pixel value of the color channel is a non-linear response sub-pixel value, and the non-linear response sub-pixel value of the color channel is corrected to the corresponding linear response sub-pixel value, that is, Out_x = lutC[In_x].

[0089] In this embodiment, the electronic device determines a nonlinear response pixel region in the first image. Then, from the nonlinear correction mapping relationship, the linear correction pixel value corresponding to the nonlinear response pixel value in the nonlinear response pixel region can be determined, and the nonlinear response pixel value can be corrected to the corresponding linear correction pixel value. This can accurately obtain a corrected image, avoid the problem of color cast in the target image, and improve the accuracy of image processing.

[0090] It is understandable that the response curves of different color channels (such as the three channels of R / G / B) are not the same, and the exposure amounts received by the three color components at the same pixel position are also different. This results in the sub-response pixel values ​​of different color channels in the nonlinear stage not being in the proportional relationship that should be in the linear region. Therefore, the electronic device corrects the nonlinear response sub-pixel value of each color channel based on the nonlinear correction sub-mapping relationship corresponding to each color channel, so as to more accurately obtain the sub-corrected image of each color channel, thereby more accurately obtaining the corrected image.

[0091] In one embodiment, a calibration method for a nonlinear correction mapping relationship includes: obtaining response pixel values ​​of an image sensor at different exposures; determining an inflection point value from each response pixel value based on the response pixel values ​​at different exposures, and determining a linear response pixel value and a nonlinear response pixel value; the nonlinear response pixel value is greater than the inflection point value, and the linear response pixel value is less than or equal to the inflection point value; determining a linear correction pixel value corresponding to the nonlinear response pixel value based on the linear response pixel value; and calibrating the nonlinear correction mapping relationship based on the nonlinear response pixel value and the linear correction pixel value at the same exposure.

[0092] The inflection point value is a response pixel value used to distinguish between a linear response pixel value and a nonlinear response pixel value, that is, a response pixel value used to distinguish between a linear stage and a nonlinear stage. The exposure value indicates the amount of light flux entering the image sensor after the light source is reflected by the surface of the object.

[0093] Optionally, the electronic device performs exposure with different exposure amounts through an image sensor to obtain response pixel values ​​corresponding to the different exposure amounts.

[0094] Optionally, the electronic device performs exposure with different exposure amounts through an image sensor, obtains exposure images corresponding to the different exposure amounts, and obtains response pixel values ​​corresponding to the different exposure amounts based on the exposure images corresponding to the different exposure amounts. The electronic device may average the pixel values ​​in the exposure images corresponding to each exposure amount to obtain the response pixel value corresponding to each exposure amount; it may also determine an image block from each exposure image, average the pixel values ​​in the image block to obtain the response pixel value corresponding to each exposure amount; or it may adopt other methods, which are not limited here.

[0095] Optionally, the response pixel values ​​of the image sensor are obtained under different exposure levels, including: obtaining at least two frames of exposure images under each exposure level; generating a standard image corresponding to the exposure level based on the at least two frames of exposure images; determining a target image block in the standard image, and determining the response pixel value corresponding to the exposure level based on each pixel value in the target image block.

[0096] Optionally, for each exposure amount, the electronic device performs average processing on at least two frames of exposure images corresponding to the exposure amount to obtain a standard image corresponding to the exposure amount.

[0097] The position and size of the target image block can be set as needed. For example, the electronic device determines an MxM (eg, M=64) image block from the center of the standard image as the target image block.

[0098] Optionally, for each exposure amount, the electronic device performs average processing on each pixel value in the target image block corresponding to the exposure amount to determine a response pixel value corresponding to the exposure amount.

[0099] Optionally, the electronic device determines, for each color channel, a sub-response pixel value corresponding to the color channel based on the channel pixel values ​​of the color channel of the target image block; and determines a response pixel value corresponding to the exposure amount based on the sub-response pixel values ​​corresponding to the color channel.

[0100] Exemplarily, under the condition of a light source with stable brightness, a single and fixed background content and color, and a fixed camera module, the electronic device captures an image sequence for each exposure time, and each image sequence includes at least two frames of exposure images; the exposure time represents the exposure amount, and the exposure time and the exposure amount are positively correlated.

[0101] For example, for exposure time t=t1, N (N>=100) frames of exposure images are collected to obtain image sequence S1; for exposure time t2=t1+μ(n>0), N frames of exposure images are collected to obtain sequence S2; and so on, for each exposure time tn=t1+μ*(n-1), N frames of exposure images are collected to obtain sequence Sn. The electronic device accumulates the N frames of exposure images in each image sequence and takes the average value, which can eliminate the interference of single-frame image noise and obtain the standard image I1 / I2… / In corresponding to the image sequence; take the MxM (for example, M=64) target image block at the center of each standard image, and count the average value of each color channel in the target image block as the sub-response pixel value of each color channel under the exposure time, and then obtain the response pixel value R1G1B1 / R2G2B2… / RnGnBn under the exposure time t1 / t2 / … / tn, each response pixel value includes the sub-response pixel value of the three RGB color channels; based on the sub-response pixel values ​​of the three RGB color channels, the response curves of the three RGB color channels can be fitted. Figure 2 Shown are the response curves of the three RGB color channels.

[0102] It is understandable that the light source, brightness and background of the electronic device capturing the image are fixed, and the exposure amount is proportional to the exposure time. Therefore, this solution uses the exposure time instead of the exposure amount to calculate the response curve of the image sensor.

[0103] Optionally, based on the response pixel values ​​under different exposure amounts, the inflection point value is determined from each response pixel value, including: based on a proportional relationship between the exposure amount and the response pixel value, the inflection point value is determined from each response pixel value.

[0104] It can be understood that when the response pixel value is less than or equal to the inflection point value, it is in a linear stage, that is, the proportional relationship between the exposure and the response pixel value is fixed, and after the response pixel value exceeds the inflection point value, the ratio of the pixel value to the exposure will become larger and larger. Therefore, the inflection point value can be determined by the fluctuation of the proportional relationship between the exposure and the response pixel value.

[0105] Optionally, the electronic device detects the proportional relationship between the exposure amount and the response pixel value. If the proportional relationship is within the target proportional range, it is determined that the response pixel value is in a linear stage; when the proportional relationship exceeds the target proportional range, the response pixel value corresponding to the excess proportional range is used as the inflection point value.

[0106] Optionally, the electronic device obtains the black level of the image sensor; determines the slope of the response curve based on the response pixel value, exposure time and black level; when the slope is greater than the target slope threshold, determines the intersection between the straight line corresponding to the target slope threshold and the response curve, and uses the response pixel value at the intersection as the inflection point value.

[0107] Exemplarily, in the linear stage, the relationship between the response pixel value and the exposure is val=k*t+ob, where val is the response pixel value, k is the slope, t is the exposure (exposure time), and ob is the black level. When the image acquisition environment is constant and the number of frames in the image sequence is large enough, the value of k is very constant in the linear stage. When the fluctuation of the value of k is greater than the target slope threshold as the exposure increases, it can be considered that the inflection point value kneeVal has been found.

[0108] The electronic device determines a knee point value of each color channel for each color channel.

[0109] Optionally, determining a linear correction pixel value corresponding to a nonlinear response pixel value according to the linear response pixel value includes: generating a linear response sub-curve according to the linear response pixel value; and determining a linear correction pixel value corresponding to the nonlinear response pixel value based on the linear response sub-curve.

[0110] Optionally, the electronic device fits each linear response pixel value to generate a linear response sub-curve; and extends the linear response sub-curve to obtain a linear correction pixel value corresponding to each nonlinear response pixel value under the same exposure.

[0111] Exemplarily, the electronic device obtains the nonlinear response pixel values ​​Vm / Vm+1 / Vm+2 / … / Vn corresponding to the exposure tm / tm+1 / tm+2… / tn in the nonlinear stage, and performs more detailed linear or nonlinear interpolation on these data sequences to obtain a more detailed nonlinear response pixel value sequence S{V}; without considering the bit width, the electronic device determines the linear correction pixel values ​​Ym / Ym+1 / Ym+2 / … / Yn corresponding to the exposure tm / tm+1 / tm+2… / tn in the nonlinear stage through the linear response sub-curve (val=k*t+ob) fitted by each linear response pixel value, and performs more detailed linear or nonlinear interpolation on these data sequences to obtain a more detailed linear correction pixel value sequence S{Y}; S{V} and S{Y} are formed into a table with S{V} as the subscript and S{Y} as the content of the table, so as to obtain the nonlinear correction mapping relationship between the nonlinear response pixel value and the linear correction pixel value. Figure 3 Shown is a schematic diagram of the nonlinear FWC response curve correction.

[0112] Optionally, if the nonlinear response pixel value of the image sensor is related to other factors such as ambient light brightness or ISO (sensitivity), the nonlinear correction mapping relationship can be obtained by calibrating under different lighting conditions (factors).

[0113] Optionally, the electronic device may also calibrate multiple response curves by region in an image according to the requirements of the algorithm and the specific conditions of the image sensor, so that each region corresponds to a response curve, and then a smoothing strategy between regions can be combined to avoid block effects after correction; or multiple curves may be calibrated for the entire image, and then multiple curves are weighted averaged to generate a final response curve for each channel; similarly, the electronic device may also statistically generate a response curve for each pixel, and then calculate a nonlinear mapping curve for each pixel.

[0114] In this embodiment, the response pixel values ​​of the image sensor are obtained under different exposure amounts; based on the response pixel values ​​under different exposure amounts, the inflection point value is determined from each response pixel value, and the linear response pixel value and the nonlinear response pixel value are determined; then, based on the linear response pixel value, the linear correction pixel value corresponding to the nonlinear response pixel value can be accurately determined, thereby accurately calibrating the nonlinear correction mapping relationship.

[0115] Furthermore, at each exposure level, at least two frames of exposure images are acquired, and based on the at least two frames of exposure images, a standard image corresponding to the exposure level is generated; a target image block in the standard image is determined, and based on each pixel value in the target image block, a response pixel value corresponding to the exposure level can be more accurately determined.

[0116] Furthermore, a linear response sub-curve is generated according to the linear response pixel value. Then, based on the linear response sub-curve, the linear correction pixel value corresponding to the nonlinear response pixel value can be determined more accurately.

[0117] In one embodiment, after acquiring the first image through the image sensor, it also includes: performing noise reduction processing on the first image to obtain a second image; performing nonlinear brightness correction on the nonlinear response pixel values ​​in the first image based on the linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image, including: performing nonlinear brightness correction on the nonlinear response pixel values ​​in the second image based on the linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image.

[0118] The second image is an image that has been subjected to noise reduction processing.

[0119] Optionally, the electronic device determines a nonlinear response pixel region in the first image; and performs noise reduction processing on the nonlinear response pixel region in the first image to obtain a second image.

[0120] Optionally, the electronic device uses a noise reduction algorithm to perform noise reduction processing on the first image to obtain a second image. The noise reduction algorithm is such as BM3D, non_local_mean algorithm or AI (Artificial Intelligence) noise reduction algorithm based on machine learning, which is not limited here. In addition, whether the response pixel value of the linear response pixel area is denoised or the intensity of the noise reduction can be turned on or off as needed, which is not limited here.

[0121] It is understandable that for an image sensor with a nonlinear full well capacity characteristic, the response pixel value in the linear response pixel area does not involve nonlinear correction, so the noise has no special effect on subsequent processing. However, the response pixel value in the nonlinear response pixel area needs to be corrected to the linear domain. The corrected response pixel value will increase, and the noise in the nonlinear area will also be amplified. Therefore, in order to avoid excessive noise interfering with subsequent processing, it is necessary to perform noise reduction processing on the nonlinear response pixel area, so as to obtain a more accurate corrected image with less noise.

[0122] In one embodiment, Figure 4 As shown, a raw10-bit first image is acquired through an image sensor with N-FWC characteristics; a denoising process is performed on the first image to obtain a 10-bit second image; a nonlinear brightness correction is performed on the nonlinear response pixel values ​​in the second image based on the linear correction pixel values ​​in the nonlinear correction mapping table to obtain a 16-bit corrected image; an LSC process is performed on the corrected image to obtain a 20-bit lens shading correction image; an AWB process is performed on the lens shading correction image to obtain a 20-bit white balance processed image; and a subsequent ISP process is performed on the white balance processed image to obtain a target image.

[0123] In one embodiment, an image processing method is also provided, which is applied to an electronic device, and the image processing method comprises the following steps:

[0124] Step A1, obtaining a nonlinear correction mapping relationship corresponding to the image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure; the nonlinear correction mapping relationship includes at least two nonlinear correction sub-mapping relationships, each nonlinear correction sub-mapping relationship corresponds to a color channel, and the nonlinear correction sub-mapping relationship represents a mapping relationship between a nonlinear response sub-pixel value and a linear correction sub-pixel value of the color channel under the same exposure;

[0125] Among them, the calibration method of the nonlinear correction mapping relationship includes:

[0126] At each exposure level, at least two frames of exposure images are acquired; based on the at least two frames of exposure images, a standard image corresponding to the exposure level is generated; a target image block in the standard image is determined, and based on each pixel value in the target image block, a response pixel value corresponding to the exposure level is determined;

[0127] Based on the response pixel values ​​under different exposure amounts, an inflection point value is determined from each response pixel value, and a linear response pixel value and a nonlinear response pixel value are determined; the nonlinear response pixel value is greater than the inflection point value, and the linear response pixel value is less than or equal to the inflection point value; a linear response sub-curve is generated according to the linear response pixel value; based on the linear response sub-curve, a linear correction pixel value corresponding to the nonlinear response pixel value is determined;

[0128] Based on the nonlinear response pixel value and the linear correction pixel value under the same exposure, the nonlinear correction mapping relationship is calibrated.

[0129] Step A2: acquiring a first image through an image sensor.

[0130] Step A3: performing noise reduction processing on the first image to obtain a second image.

[0131] Step A4, determining a nonlinear response pixel region in the second image; the nonlinear response pixel region includes nonlinear response pixel values.

[0132] Step A5, for each color channel, determine the linear correction sub-pixel value corresponding to the nonlinear response sub-pixel value of the color channel in the nonlinear response pixel area from the nonlinear correction sub-mapping relationship corresponding to the color channel, and correct the nonlinear response sub-pixel value of the color channel to the corresponding linear response sub-pixel value to obtain a sub-corrected image of the color channel.

[0133] Step A6: generating a corrected image based on the sub-corrected images of each color channel.

[0134] Step A7, performing image signal processing on the corrected image to obtain a target image.

[0135] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed 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 these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0136] Based on the same inventive concept, the embodiment of the present application also provides an image processing device for implementing the above-mentioned image processing method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more image processing device embodiments provided below can refer to the limitations on the image processing method above, and will not be repeated here.

[0137] In an exemplary embodiment, Figure 5 As shown, an image processing device is provided, including: a mapping relationship acquisition module 502, a first image module 504, a correction module 506 and an image signal processing module 508, wherein:

[0138] The mapping relationship acquisition module 502 is used to acquire the nonlinear correction mapping relationship corresponding to the image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents the mapping relationship between the nonlinear response pixel value and the linear correction pixel value under the same exposure.

[0139] The first image module 504 is configured to acquire a first image through an image sensor.

[0140] The correction module 506 is used to perform nonlinear brightness correction on the nonlinear response pixel values ​​in the first image based on the linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image.

[0141] The image signal processing module 508 is used to perform image signal processing on the corrected image to obtain a target image.

[0142] The above-mentioned image processing device obtains a nonlinear correction mapping relationship corresponding to an image sensor, wherein the image sensor has a nonlinear full-well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure; a first image is obtained through the image sensor having the nonlinear full-well capacity characteristic, and based on the linear correction pixel value in the nonlinear correction mapping relationship, a nonlinear brightness correction is performed on the nonlinear response pixel value in the first image to obtain a corrected image. Then, when processing image signals, the corrected image can avoid the problem of image color cast caused by the nonlinear response pixel value, thereby obtaining a target image more accurately and improving the accuracy of image processing.

[0143] In one embodiment, the correction module 506 is further used to determine a nonlinear response pixel region in the first image; the nonlinear response pixel region includes nonlinear response pixel values; from the nonlinear correction mapping relationship, the linear correction pixel values ​​corresponding to the nonlinear response pixel values ​​in the nonlinear response pixel region are determined, and the nonlinear response pixel values ​​in the nonlinear response pixel region are corrected to the corresponding linear correction pixel values ​​to obtain a corrected image.

[0144] In one embodiment, the nonlinear correction mapping relationship includes at least two nonlinear correction sub-mapping relationships, each nonlinear correction sub-mapping relationship corresponds to a color channel, and the nonlinear correction sub-mapping relationship represents the mapping relationship between the nonlinear response sub-pixel value and the linear correction sub-pixel value of the corresponding color channel under the same exposure; the correction module 506 is also used to determine, for each color channel, from the nonlinear correction sub-mapping relationship corresponding to the color channel, the linear correction sub-pixel value corresponding to the nonlinear response sub-pixel value of the color channel in the nonlinear response pixel area, and correct the nonlinear response sub-pixel value of the color channel to the corresponding linear response sub-pixel value to obtain a sub-corrected image of the color channel; and generate a corrected image based on the sub-corrected images of each color channel.

[0145] In one embodiment, the above-mentioned device also includes a mapping relationship calibration module; the mapping relationship calibration module is used to obtain the response pixel value of the image sensor under different exposure amounts; based on the response pixel values ​​under different exposure amounts, an inflection point value is determined from each response pixel value, and a linear response pixel value and a nonlinear response pixel value are determined; the nonlinear response pixel value is greater than the inflection point value, and the linear response pixel value is less than or equal to the inflection point value; according to the linear response pixel value, a linear correction pixel value corresponding to the nonlinear response pixel value is determined; based on the nonlinear response pixel value and the linear correction pixel value under the same exposure amount, a nonlinear correction mapping relationship is calibrated.

[0146] In one embodiment, the mapping relationship calibration module is also used to obtain at least two frames of exposure images at each exposure level; generate a standard image corresponding to the exposure level based on the at least two frames of exposure images; determine the target image block in the standard image, and determine the response pixel value corresponding to the exposure level based on each pixel value in the target image block.

[0147] In one embodiment, the mapping relationship calibration module is further used to generate a linear response sub-curve according to the linear response pixel value; and determine the linear correction pixel value corresponding to the nonlinear response pixel value based on the linear response sub-curve.

[0148] In one embodiment, the above-mentioned device also includes a noise reduction module; the noise reduction module is used to perform noise reduction processing on the first image to obtain a second image; the above-mentioned correction module 506 is also used to perform nonlinear brightness correction on the nonlinear response pixel value in the second image based on the linear correction pixel value in the nonlinear correction mapping relationship to obtain a corrected image.

[0149] Each module in the above-mentioned image processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0150] In an exemplary embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an image processing method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.

[0151] Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0152] In one embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0153] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0154] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0156] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0157] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the 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 this application.

[0158] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An image processing method, It is characterized in that The method comprises: Acquire a nonlinear correction mapping relationship corresponding to an image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure; Acquire a first image through the image sensor, and perform nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image; Performing image signal processing on the corrected image to obtain a target image.

2. The method according to claim 1, It is characterized in that The step of performing nonlinear brightness correction on the nonlinear response pixel values ​​in the first image based on the linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image includes: Determine a nonlinear response pixel region in the first image; the nonlinear response pixel region includes nonlinear response pixel values; The linear correction pixel values ​​corresponding to the nonlinear response pixel values ​​in the nonlinear response pixel area are determined from the nonlinear correction mapping relationship, and the nonlinear response pixel values ​​in the nonlinear response pixel area are corrected to the corresponding linear correction pixel values ​​to obtain a corrected image.

3. The method according to claim 2, It is characterized in that The nonlinear correction mapping relationship includes at least two nonlinear correction sub-mapping relationships, each nonlinear correction sub-mapping relationship corresponds to a color channel, and the nonlinear correction sub-mapping relationship represents a mapping relationship between a nonlinear response sub-pixel value and a linear correction sub-pixel value of the color channel under the same exposure; the nonlinear correction mapping relationship is used to determine the linear correction pixel value corresponding to the nonlinear response pixel value in the nonlinear response pixel area, and the nonlinear response pixel value in the nonlinear response pixel area is corrected to the corresponding linear correction pixel value to obtain a corrected image, including: For each color channel, determine the linear correction sub-pixel value corresponding to the nonlinear response sub-pixel value of the color channel in the nonlinear response pixel area from the nonlinear correction sub-mapping relationship corresponding to the color channel, and correct the nonlinear response sub-pixel value of the color channel to the corresponding linear response sub-pixel value to obtain a sub-corrected image of the color channel; A corrected image is generated based on the sub-corrected images of each of the color channels.

4. The method according to claim 1, It is characterized in that The method further comprises: Under different exposure levels, obtaining response pixel values ​​of the image sensor; Based on the response pixel values ​​under different exposure amounts, an inflection point value is determined from each response pixel value, and a linear response pixel value and a nonlinear response pixel value are determined; the nonlinear response pixel value is greater than the inflection point value, and the linear response pixel value is less than or equal to the inflection point value; Determining a linear correction pixel value corresponding to the nonlinear response pixel value according to the linear response pixel value; Based on the nonlinear response pixel value and the linear correction pixel value under the same exposure, a nonlinear correction mapping relationship is calibrated.

5. The method according to claim 4, It is characterized in that The step of obtaining the response pixel value of the image sensor under different exposure levels includes: At each exposure level, acquiring at least two frames of exposure images; Based on at least two frames of exposure images, generating a standard image corresponding to the exposure amount; A target image block in the standard image is determined, and a response pixel value corresponding to the exposure amount is determined based on each pixel value in the target image block.

6. The method according to claim 4, It is characterized in that The step of determining the linear correction pixel value corresponding to the nonlinear response pixel value according to the linear response pixel value comprises: generating a linear response sub-curve according to the linear response pixel value; Based on the linear response sub-curve, a linear correction pixel value corresponding to the nonlinear response pixel value is determined.

7. The method according to claim 1, It is characterized in that After acquiring the first image by the image sensor, the method further includes: Performing noise reduction processing on the first image to obtain a second image; The step of performing nonlinear brightness correction on the nonlinear response pixel values ​​in the first image based on the linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image includes: Based on the linear correction pixel values ​​in the nonlinear correction mapping relationship, nonlinear brightness correction is performed on the nonlinear response pixel values ​​in the second image to obtain a corrected image.

8. An image processing device, It is characterized in that The device comprises: A mapping relationship acquisition module is used to acquire a nonlinear correction mapping relationship corresponding to an image sensor; the image sensor has a nonlinear full well capacity characteristic, and the nonlinear correction mapping relationship represents a mapping relationship between a nonlinear response pixel value and a linear correction pixel value under the same exposure; A first image module is used to obtain a first image through the image sensor. A correction module, configured to perform nonlinear brightness correction on nonlinear response pixel values ​​in the first image based on linear correction pixel values ​​in the nonlinear correction mapping relationship to obtain a corrected image; The image signal processing module is used to perform image signal processing on the corrected image to obtain a target image.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.