Image ISP processing method and device, equipment and storage medium

By using a parameterized ISP processing flow, sensor-related and sensor-independent calibration steps are decoupled, adapting to different CMOS sensors. This solves the noise and color distortion problems of CMOS sensor image data, achieving low-latency, low-cost, and highly compatible image processing, suitable for multi-sensor platforms and batch deployments.

CN122048759APending Publication Date: 2026-05-15SHENZHEN DIVIMATH SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, image data directly output by CMOS sensors suffers from noise, color distortion, and uneven brightness. Furthermore, traditional image signal processing algorithms are optimized for specific CMOS sensor models, requiring redesign and debugging of the processing flow when the sensor is replaced, increasing development cycle and cost. At the same time, complex algorithm structures require high hardware resources, making it difficult to meet the real-time and cost-sensitive application scenarios.

Method used

A parameterizable ISP processing flow is adopted to decouple sensor-related calibration steps from sensor-independent post-processing steps. By adapting sensor calibration parameters to different CMOS sensors, preprocessing such as black level compensation, linear correction, lens shading correction, and gain adjustment is achieved. Combined with steps such as gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, and color correction, the target image is generated.

Benefits of technology

It achieves low-latency, low-cost, and highly compatible ISP processing, suitable for multi-sensor platforms and batch deployments. It maintains high image quality while reducing processing latency and resource consumption, and improves the compatibility and portability of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048759A_ABST
    Figure CN122048759A_ABST
Patent Text Reader

Abstract

The invention is suitable for the field of image processing, and discloses an image ISP processing method and device, equipment and a storage medium. The image ISP processing method comprises the following steps: acquiring a to-be-processed image acquired by a CMOS sensor; image signal processing is performed on the to-be-processed image to obtain a target image, and the image signal processing comprises black level compensation, linear correction, lens shadow correction, gain adjustment, gamma correction, dead pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction and ultra-strong light suppression. Black level compensation, linear correction, lens shadow correction and gain adjustment are executed based on sensor calibration parameters corresponding to the CMOS sensor; and outputting the target image. According to the method, high image quality is maintained, low-delay, low-cost and high-compatibility ISP processing is realized, and the method is suitable for the electronic field of multi-sensor platforms and batch deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing, and particularly relates to an image ISP processing method, apparatus, device, and storage medium. Background Technology

[0002] CMOS sensors are image acquisition elements widely used in cameras, surveillance equipment and other fields. The RAW image data they directly output usually contains problems such as noise, color distortion, and uneven brightness, and cannot be directly used for display or analysis.

[0003] Traditional image signal processing algorithms are typically optimized for specific CMOS sensor models, requiring the entire processing flow to be redesigned and debugged when the sensor is changed, increasing development time and cost. Furthermore, complex algorithm structures often require significant hardware resources, resulting in high processing latency and costs, making it difficult to meet the demands of real-time and cost-sensitive applications. Therefore, a new technological approach is needed to address these technical challenges. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide an image ISP processing method, apparatus, device, and storage medium, which can solve the problem in related technologies that it is difficult to meet the needs of application scenarios that are sensitive to real-time performance and cost.

[0005] The first aspect of this invention provides an ISP processing method for images, comprising: Acquire the image to be processed from the CMOS sensor; Image signal processing is performed on the image to be processed to obtain the target image. The image signal processing includes black level compensation, linear correction, lens shading correction, gain adjustment, gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression. The black level compensation, linear correction, lens shading correction, and gain adjustment are performed based on the sensor calibration parameters corresponding to the CMOS sensor. Output the target image.

[0006] Optionally, in a first implementation of the first aspect of the present invention, the step of performing image signal processing on the image to be processed to obtain the target image includes: Obtain the sensor calibration parameters corresponding to the CMOS sensor, wherein the sensor calibration parameters include black level compensation value, linear correction parameter, lens shading correction coefficient and gain adjustment parameter; Based on the sensor calibration parameters, the black level compensation, linear correction, lens shading correction, and gain adjustment are sequentially performed on the image to be processed to obtain a first image; The first image is sequentially subjected to the following steps: gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression, to obtain the target image.

[0007] Optionally, in a second implementation of the first aspect of the present invention, the step of sequentially performing black level compensation, linear correction, lens shading correction, and gain adjustment on the image to be processed according to the sensor calibration parameters to obtain a first image includes: Based on the black level compensation value, black level subtraction is performed on the R, Gr, Gb, and B channels of the image to be processed to obtain a black level compensated image; Based on the linear correction parameters, the black level compensation image is subjected to linear mapping correction of the R, G, and B channels to obtain a linearly corrected image; Based on the lens shadow correction coefficient, shadow compensation is performed on the linearly corrected image according to the distance between the pixel and the image center to obtain a shadow compensation image; Based on the gain adjustment parameters, the gain of the R, G, and B channels of the shadow compensation image is multiplied and adjusted to obtain the first image.

[0008] Optionally, in a third implementation of the first aspect of the present invention, before the step of obtaining the sensor calibration parameters corresponding to the CMOS sensor, the method further includes: Acquire a first raw image captured by the CMOS sensor under no-light conditions, and calculate the average value of each channel as the black level compensation value based on the first raw image; The second original image of the grayscale block of the standard color card is acquired by the CMOS sensor. Based on the second original image, a linear correction curve is fitted to obtain the linear correction parameter. Based on the second original image, the gain ratio of the R, G, and B channels is calculated to obtain the gain adjustment parameter. The CMOS sensor acquires multi-position image data from multiple locations on a standard color chart grayscale block, and calculates lens shadow correction coefficients based on the multi-position image data to obtain the sensor calibration parameters corresponding to the CMOS sensor.

[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the step of sequentially performing the gamma correction, the bad pixel detection, the 2D noise reduction, the edge sharpening, the wide dynamic range adjustment, the color correction, and the ultra-high light suppression on the first image to obtain the target image includes: Perform gamma correction processing on the first image to obtain a gamma-corrected image; Perform bad pixel detection and repair processing on the gamma-corrected image to obtain a bad pixel repaired image; Perform 2D noise reduction and edge sharpening processing on the defective pixel repair image to obtain a noise-reduced and sharpened image; Perform wide dynamic range adjustment processing on the denoised and sharpened image to obtain a dynamic range adjusted image; Perform color correction processing on the dynamic range adjusted image to obtain a color-corrected image; The color-corrected image is subjected to ultra-strong light suppression processing to obtain the target image.

[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the step of performing 2D noise reduction and edge sharpening processing on the defective pixel repair image to obtain a noise-reduced and sharpened image includes: Edge detection is performed on the damaged pixel repair image to distinguish between edge regions and non-edge regions; A first 2D noise reduction process and an edge sharpening process are performed on the edge region to obtain an edge region processed image, and a second 2D noise reduction process is performed on the non-edge region to obtain a non-edge region processed image, wherein the filtering intensity of the second 2D noise reduction process is greater than that of the first 2D noise reduction process. The noise-reduced and sharpened image is generated based on the image processed from the edge region and the image processed from the non-edge region.

[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the step of performing edge detection on the defective pixel repair image to distinguish edge regions and non-edge regions includes: Calculate the pixel value gradient of each pixel in the damaged pixel repair image within a preset neighborhood; If the pixel value gradient is greater than a preset threshold, the corresponding pixel is classified into the edge region. If the pixel value gradient is less than or equal to the preset threshold, the corresponding pixel is classified into the non-edge region.

[0012] Secondly, embodiments of this application provide an image ISP processing apparatus, the apparatus comprising: The acquisition module acquires the image to be processed, which is collected by the CMOS sensor. The processing module performs image signal processing on the image to be processed to obtain the target image. The image signal processing includes black level compensation, linear correction, lens shading correction, gain adjustment, gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression. The black level compensation, linear correction, lens shading correction, and gain adjustment are performed based on the sensor calibration parameters corresponding to the CMOS sensor. The output module outputs the target image.

[0013] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described image ISP processing method.

[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described image ISP processing method.

[0015] Fifthly, embodiments of the present invention provide a computer program product that, when run on an electronic device, causes the electronic device to execute the aforementioned image ISP processing method.

[0016] The beneficial effects of this invention compared to existing technologies are as follows: Through a parameterizable ISP processing flow, sensor-related calibration steps can be decoupled from sensor-independent post-processing steps, allowing the same algorithm to be adapted to different CMOS sensors by adjusting front-end parameters. This not only preserves complete image processing functionality but also reduces processing latency and resource consumption. Therefore, this invention achieves low-latency, low-cost, and highly compatible ISP processing while maintaining high image quality, making it suitable for multi-sensor platforms and batch deployments in the electronics field. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of an embodiment of the ISP processing method for images in this invention. Figure 2 This is a schematic diagram of a specific embodiment two of the image ISP processing method in this invention; Figure 3 This is a schematic diagram of a specific embodiment three of the image ISP processing method in this invention; Figure 4 This is a schematic diagram of an embodiment of the image ISP processing device in this invention; Figure 5 This is a schematic diagram of one embodiment of the electronic device in this invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are protected by this invention.

[0020] It should be noted that the terms "comprising," "including," and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this invention, are intended to cover non-exclusive inclusion. For example, a process, method, terminal, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. In the claims, specification, and accompanying drawings of this invention, relational terms such as "first" and "second" are used merely to distinguish one entity / operation / object from another entity / operation / object, and do not necessarily require or imply any such immediate relationship or order between these entities / operations / objects.

[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0022] CMOS sensors are image acquisition elements widely used in cameras, surveillance equipment and other fields. The RAW image data they directly output usually contains problems such as noise, color distortion, and uneven brightness, and cannot be directly used for display or analysis.

[0023] Traditional image signal processing algorithms are typically optimized for specific CMOS sensor models, requiring the entire processing flow to be redesigned and debugged when the sensor is changed, increasing development time and cost. Furthermore, complex algorithm structures often require significant hardware resources, resulting in high processing latency and costs, making it difficult to meet the demands of real-time and cost-sensitive applications. Therefore, a new technological approach is needed to address these technical challenges.

[0024] In view of this, embodiments of the present invention provide an image ISP processing method, apparatus, device, and storage medium. Through a parameterizable ISP processing flow, sensor-related calibration steps can be decoupled from sensor-independent post-processing steps, allowing the same algorithm to be adapted to different CMOS sensors by adjusting front-end parameters. This not only retains complete image processing functionality but also reduces processing latency and resource consumption. Therefore, the present invention achieves low-latency, low-cost, and highly compatible ISP processing while maintaining high image quality, making it suitable for multi-sensor platforms and batch deployments in the electronics field.

[0025] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0026] Example 1: Figure 1 This illustration shows a schematic flowchart of an image ISP processing method according to an embodiment of this application. This method can be applied to electronic devices. Electronic devices can be servers, service clusters, mobile phones, tablets, laptops, ultra-mobile personal computers (UMPCs), netbooks, etc.

[0027] Specifically, the ISP processing method for the above image may include the following steps S101 to S103.

[0028] Step S101: Acquire the image to be processed by the CMOS sensor.

[0029] In embodiments of this application, the electronic device receives raw image data acquired by a connected CMOS sensor as the input image to be processed. Optionally, the image to be processed may be Bayer format RAW data directly output by the sensor, or image data after preliminary format conversion.

[0030] Step S102: Perform image signal processing on the image to be processed to obtain the target image. The image signal processing includes black level compensation, linear correction, lens shading correction, gain adjustment, gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression. Black level compensation, linear correction, lens shading correction, and gain adjustment are performed based on the sensor calibration parameters corresponding to the CMOS sensor.

[0031] Black level compensation refers to a correction operation used to eliminate the inherent base signal level of a CMOS sensor under no-light conditions due to its dark current. By subtracting a predetermined compensation value from the original value of each pixel, the pixel values ​​of areas that should be pure black in the image are ensured to return to zero, thus restoring the correct black baseline.

[0032] Linear correction refers to a processing step used to correct the nonlinear response of a sensor's photoelectric conversion. It involves adjusting the pixel values ​​of each color channel (such as R, G, B) using a mathematical mapping function to ensure a linear relationship between the output and the input light intensity, providing an accurate basis for subsequent color processing.

[0033] Lens vignetting correction, also known as shading correction, is a method to compensate for the phenomenon where the edges of an image are darker than the center due to the optical characteristics of the lens. It achieves uniform brightness across the entire image by adjusting the gain based on the distance between pixels and the image center.

[0034] Gain adjustment here refers to a part of white balance adjustment. By applying different digital gains to the red, green, and blue color channels respectively, the overall color cast of the image caused by different light source color temperatures is corrected, so that white objects appear as neutral colors under different lighting conditions.

[0035] Gamma correction refers to a non-linear transformation of image brightness data based on the non-linear characteristics of human vision. By stretching dark areas and compressing bright areas, it optimizes the visual contrast and tonal gradation of the image on standard display devices.

[0036] Bad pixel detection refers to an algorithmic process that automatically identifies abnormal pixels (manifested as bright or dark spots with values ​​that differ greatly from surrounding pixels) in an image due to defects in sensor pixels. It is a prerequisite for image restoration.

[0037] 2D noise reduction refers to a technique that uses the correlation between adjacent pixels in the two-dimensional space plane of an image to smooth the image and suppress random noise through filtering algorithms, aiming to improve the signal-to-noise ratio of the image.

[0038] Edge sharpening is an image processing technique that enhances the outlines and details of objects in an image. It uses algorithms to highlight the contrast of pixels at edges, making the image appear clearer and more layered.

[0039] Wide dynamic range (WDR) adjustment is a technique used to extend the range of brightness that an image can represent. By locally adjusting overexposed and underexposed areas in an image, details are brought to the surface, thus preserving information from both bright and dark areas in high-contrast scenes.

[0040] Color correction refers to adjusting the chromaticity and luminance components of an image to calibrate and correct color distortion caused by factors such as sensor spectral response and nonlinearity of the processing link, aiming to restore the true color of the photographed object or conform to a specific color standard.

[0041] Ultra-high brightness suppression is a technique specifically designed to process localized, extremely bright areas in an image. By detecting these areas and replacing or blending them with appropriate values, glaring highlights are suppressed, some highlight details are restored, and the visual effect is improved.

[0042] In the embodiments of this application, the four processing steps of black level compensation, linear correction, lens shading correction, and gain adjustment are performed according to the sensor calibration parameters corresponding to the specific CMOS sensor of the currently acquired image. The sensor calibration parameters are obtained and stored in advance through the calibration process of the sensor and are called up during processing.

[0043] By applying all the above processing steps in sequence, the input image to be processed is corrected and enhanced step by step, and finally the target image with optimized quality is generated.

[0044] Step S103: Output the target image.

[0045] In the embodiments of this application, after image signal processing is completed, the final target image data is output to the designated target.

[0046] Optionally, the output target can be the device's display module for real-time preview, or it can be saved on a storage medium, or transmitted to other devices via a network interface, or delivered to subsequent computer vision applications (such as object detection, face recognition, etc.) for further analysis.

[0047] The beneficial effects of this application's embodiments compared to existing technologies are as follows: By using sensor calibration parameters, the general and fixed ISP processing steps are decoupled from the physical data of specific sensors. For each different CMOS sensor, unique calibration parameters can be generated through a single calibration process. During preprocessing, the corresponding sensor's calibration parameters are directly called to perform data preprocessing, allowing the general algorithm framework to automatically adapt to the sensor's hardware attributes. Without modifying the core algorithm flow, optimal image processing results can be achieved for each sensor, improving algorithm compatibility.

[0048] Example 2: In some specific embodiments of this application, reference is made to Figure 2 , Figure 2 This is a schematic diagram of a specific embodiment two of the ISP processing method for images in this invention. The image to be processed is subjected to image signal processing, which may specifically include steps S201 to S203.

[0049] Step S201: Obtain the sensor calibration parameters corresponding to the CMOS sensor, wherein the sensor calibration parameters include black level compensation value, linear correction parameter, lens shading correction coefficient and gain adjustment parameter.

[0050] In embodiments of this application, sensor calibration parameters corresponding to the specific CMOS sensor are obtained before processing the image to be processed. The sensor calibration parameters can be stored in the memory of the image ISP processing device or read from an external configuration file.

[0051] Optionally, the corresponding sensor calibration parameters can be retrieved from a pre-stored parameter database by querying the sensor identifier or model. These sensor calibration parameters specifically include black level compensation values, linearity correction parameters, lens shading correction coefficients, and gain adjustment parameters.

[0052] In step S202, based on the sensor calibration parameters, black level compensation, linear correction, lens shading correction, and gain adjustment are sequentially performed on the image to be processed to obtain the first image.

[0053] In the embodiments of this application, based on the acquired sensor calibration parameters, front-end calibration processing dependent on the specific sensor is performed sequentially on the image to be processed. Specifically, black level compensation is performed on each channel of the image according to the black level compensation value. Linear correction is performed on the black level compensated image according to the linear correction parameters. Lens shading correction is performed on the linearly corrected image using the lens shading correction coefficient. Gain adjustment parameters are applied to adjust the gain of the lens shading corrected image. After completing the above corrections, a first image is obtained.

[0054] Step S203: Perform gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction and ultra-strong light suppression on the first image in sequence to obtain the target image.

[0055] In the embodiments of this application, gamma correction is performed on the first image to adjust the image's brightness response curve. Defect detection is then performed on the gamma-corrected image to identify and repair potential defects in the image sensor. 2D noise reduction is then performed on the defect-repaired image to smooth the image and reduce noise. Edge sharpening is then performed on the noise-reduced image to enhance the clarity of object edges. Wide dynamic range adjustment is then performed on the edge-sharpened image to improve detail in overly bright or dark areas. Color correction is then performed on the wide dynamic range adjusted image to restore or optimize color representation. Finally, ultra-high light suppression processing is performed on the color-corrected image to suppress overexposed highlights. After completing the above processing, the target image is obtained.

[0056] In this embodiment of the invention, by clearly dividing the entire image preprocessing flow into dependent correction and general processing, the core process of the processing algorithm can be decoupled from specific sensor hardware. When replacing the CMOS sensor, only a one-time parameter calibration is needed for the new sensor, without redesigning or making large-scale modifications to the backend algorithms such as noise reduction, sharpening, and color correction. This greatly improves the portability and reusability of the image preprocessing algorithm.

[0057] Example 3: In some specific embodiments of this application, reference is made to Figure 3 , Figure 3 This is a schematic diagram of a specific embodiment three of the ISP processing method for images in this invention. According to the sensor calibration parameters, black level compensation, linear correction, lens shadow correction and gain adjustment are sequentially performed on the image to be processed to obtain a first image. Specifically, it may include steps S301 to S304.

[0058] Step S301: Based on the black level compensation value, perform black level subtraction on the R, Gr, Gb, and B channels of the image to be processed to obtain a black level compensated image.

[0059] In the embodiments of this application, a pre-stored black level compensation value for the current CMOS sensor is invoked. This compensation value includes four values ​​corresponding to the R (red), Gr (red row green), Gb (blue row green), and B (blue) channels, respectively.

[0060] For each pixel in the image to be processed, the corresponding black level compensation value is subtracted from the original values ​​of its R, Gr, Gb, and B channels. After processing all pixels, a black level compensated image is generated.

[0061] Optionally, black level compensation mainly addresses the dark current in CMOS sensors caused by external factors such as temperature. This dark current generates additional signals on top of the optical components, preventing the sensor's black level from truly displaying black. This step primarily adjusts the black level error caused by the dark current in the sensor. The adjustment is achieved using the following formula: R_out = R_in – ROB; Gr_out = Gr_in – GrROB; Gb_out = Gb_in – GbROB; B_out = B_in – BOB.

[0062] Here, R_out, Gr_out, Gb_out, and B_out are the outputs of this step, while R_in, Gr_in, Gb_in, and B_in are the inputs of the lens sensor and also the inputs of this step. ROB, GROB, GBOB, and BOB are the compensation values ​​to be obtained. The steps to obtain these values ​​are as follows: First, completely cover the lens with a lens cap, then capture the average values ​​of R, Gr, Gb, and B when there is no light input. These average values ​​are the values ​​of ROB, GROB, GBOB, and BOB.

[0063] Step S302: Based on the linear correction parameters, perform linear mapping correction on the R, G, and B channels of the black level compensation image to obtain a linearly corrected image.

[0064] In embodiments of this application, linear correction parameters calibrated for the current sensor are used. These linear correction parameters define how input pixel values ​​are mapped to output pixel values ​​to correct for the sensor's non-linear response.

[0065] The black level compensated image data obtained in the previous step is converted into a format where each pixel has complete R, G, and B channel values. Then, for the converted image, a linear mapping function defined by the corresponding linear correction parameters is applied to the pixel values ​​of the R, G, and B color channels for correction. After processing, a linearly corrected image is generated.

[0066] Optional linear correction is used to improve the linearity of R, G, and B. The debugging steps are as follows: First, convert the Bayer data output from the black level compensation to RGB data. Then, point the lens at each of the six grayscale blocks on the color chart, i.e., the bottom row of grayscale. Obtain the RGB values ​​for each block, and then apply the following formula: DataOutput=SlopeN (DataInput - InputN) + OutputN; Where DataOutput represents the output value of this step, and DataInput represents the input value of this step. That is, when calculating the R channel data, it represents the output and input values ​​of the R component; similarly, when representing the G and B channel data, it represents the output and input values ​​of the G and B channels. SlopeN, InputN, and OutputN represent the parameter values ​​that need to be calculated for each channel.

[0067] Step S303: Based on the lens shadow correction coefficient, perform shadow compensation on the linear correction image according to the distance between the pixel and the image center to obtain the shadow compensation image.

[0068] In embodiments of this application, lens shading correction coefficients calibrated for the current sensor and lens combination are loaded. These lens shading correction coefficients are used to calculate a compensation factor related to pixel position.

[0069] For each pixel in the linearly corrected image obtained in the previous step, calculate the distance (or the square of the distance) from the pixel's coordinates to the geometric center of the image. Based on this distance value and the lens shading correction coefficient, calculate a compensation factor using a predetermined formula. This compensation factor is a distance-dependent gain value; the farther away from the center, the larger the factor value (used to improve vignetting brightness).

[0070] Multiply the pixel's luminance value (or RGB value) by (1 + Factor) to achieve luminance compensation. After performing this operation on all pixels, a shadow-compensated image is generated.

[0071] Optionally, lens vignetting correction is primarily because the shorter the lens focal length, the greater the difference in the angle of incidence between the center and peripheral pixels of the image. This causes the image edges to become blurred, a phenomenon known as lens vignetting or lens shadow. Lens vignetting correction involves multiplying the image by different coefficients based on the distance from a specified point to the lens center to correct the phenomenon where the image brightness gradually decreases as the distance from the center point increases. The correction formula is as follows: D2=R R>>(lscoef+3); D4=(D2>>ls4scale) (D2>>ls4scale); Factor=Clip((D2 lsgain)>>(lsprec+3)+(D4 lsr4gain)>>(lsr4prec+3),lsclip); Output=input (1+Factor).

[0072] Where lscoef is R The distance coefficient of R, lsprec is the distance coefficient of R. The precision of R, lsgain is the precision of R. R is the gain value, ls4scale is the distance coefficient in D4, lsr4prec is the precision in D4, and lsr4gain is the gain value in D4. In the formula, R is the distance from the specified point to the center point of the lens. The steps to obtain these parameter values ​​are as follows: First, align the grayscale patch on the color chart, then obtain seven 10... The RGB average value of 10 matrix blocks is used to calculate the parameters for shadow correction. The parameters that meet the conditions can be obtained based on the values ​​of 7 points.

[0073] Step S304: According to the gain adjustment parameters, the gain of the R, G, and B channels of the shadow compensation image is multiplied and adjusted to obtain the first image.

[0074] In the embodiments of this application, gain adjustment parameters calibrated for the current sensor and expected lighting conditions are applied. These gain adjustment parameters include R-channel gain (RGAIN), G-channel gain (GGAIN), and B-channel gain (BGAIN).

[0075] For the shadow-compensated image obtained in the previous step, perform multiplication operations on the R, G, and B channel values ​​of each pixel: multiply the R channel value by RGAIN, the G channel value by GGAIN, and the B channel value by BGAIN. After adjusting the gain of all pixels, the first image is obtained.

[0076] Optionally, gain adjustment mainly involves white balance adjustment. This step primarily corrects the colors, and automatic white balance adjustment only occurs after all CMOS parameters are determined. This step involves manually adjusting the CMOS gain parameters. Adjust using the following formula: R_out = R_inxRGAIN; G_out = G_inxGGAIN; B_out=B_inxBGAIN.

[0077] In this step, R_out, G_out, and B_out are the outputs, R_in, G_in, and B_in are the inputs, and RGAIN, GGAIN, and BGAIN are the parameters that need to be determined. The determination steps are as follows: first, obtain the RGB values ​​of the gray block; then, target the RGB values ​​with a ratio of 1:1:1. Therefore, set GGAIN=1, and obtain RGAIN and BGAIN according to the following ratio.

[0078] RGAIN = Capture_G / Capture_R; GGAIN=1.0; BGAIN = Capture_G / Capture_B.

[0079] In this embodiment of the invention, the sensor-based calibration step effectively solves the problem of inconsistent image quality caused by using uniform calibration parameters for different sensors.

[0080] Example 4: In some specific embodiments of this application, before the step of obtaining the sensor calibration parameters corresponding to the CMOS sensor, steps S401 to S402 may be included.

[0081] Step S401: Acquire the first raw image captured by the CMOS sensor under no-light conditions, and calculate the average value of each channel as the black level compensation value based on the first raw image.

[0082] In embodiments of this application, the CMOS sensor connected to it is controlled to enter a black field acquisition mode. This means that the sensor lens is completely covered or the image is taken in a completely dark environment. The CMOS sensor is controlled to acquire one or more frames of images as a first raw image. This image records the sensor's dark current and readout noise when there is no effective light signal input.

[0083] Read the data of the first raw image and calculate the pixel average of its R, Gr, Gb, B (corresponding to Bayer format) or R, G, B channels respectively.

[0084] Step S402: Acquire the second original image of the grayscale block of the standard color card by the CMOS sensor. Based on the second original image, fit a linear correction curve to obtain the linear correction parameters. Based on the second original image, calculate the gain ratio of the R, G, and B channels to obtain the gain adjustment parameters.

[0085] In an embodiment of this application, a CMOS sensor is controlled to capture an image of a standard color chart containing a series of known grayscale values ​​under a standard light source. This image is then used as a second raw image. This image contains the sensor's response to these standard grayscale gradients.

[0086] First, a linear correction curve is fitted based on the data from the second original image. Specifically, regions in the image corresponding to several grayscale blocks on the color chart are identified and extracted. For each color channel (R, G, B), the actual output pixel values ​​(DataInput) of these grayscale blocks are obtained and a correspondence is established with the known standard input values ​​(ideal output values ​​DataOutput). Using the least squares method or other fitting algorithms, parameters (such as SlopeN, InputN, OutputN) that linearly map the actual output values ​​to the ideal output values ​​are calculated; these parameters are the linear correction parameters.

[0087] Secondly, gain adjustment parameters are calculated based on the same second original image. Specifically, a neutral gray patch is selected (the goal is to make the R, G, and B values ​​of this patch equal). The average R, G, and B values ​​of this gray patch region are obtained and denoted as Capture_R, Capture_G, and Capture_B, respectively.

[0088] Optionally, the G channel can be used as a reference. The default formula is as follows: RGAIN = Capture_G / Capture_R; BGAIN=Capture_G / Capture_B, GGAIN=1).

[0089] Calculate the gain adjustment parameters (RGAIN, BGAIN).

[0090] Step S402: Obtain multi-position image data from multiple locations of the grayscale block of the standard color card captured by the CMOS sensor, and calculate the lens shadow correction coefficient based on the multi-position image data to obtain the sensor calibration parameters corresponding to the CMOS sensor.

[0091] In the embodiments of this application, the CMOS sensor is still controlled to align with the grayscale block of the standard color card under the same standard light source, but it is necessary to collect image data when it is located at different positions in the image (such as the center and multiple edges and corners).

[0092] Acquire multiple frames of images, or extract grayscale data from multiple specified locations from a single frame of a large color chart image; this data is collectively referred to as multi-location image data. Calculate the average brightness of the grayscale block at each location and record the coordinates or distance of that location relative to the image center. Based on the distance information of these locations and the corresponding brightness attenuation data, use a predefined lens shading model to calculate, through parameter fitting or solving, the lens shading correction coefficients (such as lscoef, lsgain, lsr4gain, etc.) required to compensate for brightness attenuation from the center to the edge.

[0093] In this embodiment of the invention, by obtaining sensor calibration parameters, the algorithm can stably achieve the expected image correction effect on different hardware platforms.

[0094] Example 5: In some specific embodiments of this application, the first image is subjected to gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction and ultra-strong light suppression in sequence to obtain the target image, which may specifically include steps S501 to S502.

[0095] Step S501: Perform gamma correction processing on the first image to obtain a gamma-corrected image.

[0096] In the embodiments of this application, the brightness information of the first image is nonlinearly transformed according to a preset gamma curve or gamma value parameter. After processing, a gamma-corrected image is generated.

[0097] Optionally, gamma correction primarily addresses the fact that the human visual system perceives brightness, or rather, RGB three-color signals, in a roughly logarithmic, rather than linear, relationship. Gamma correction attempts to compensate for the non-linear characteristics of RGB color elements caused by the sensor's spectral characteristics by using inverse gamma transform to ensure the linear features that need to be transmitted. This module uses seven specified points on the gamma curve for adjustment, as shown in the formula below: Output=Slope (Input - InPoint) + OutPoint; Where Output is the target output, Input is the input, and InPoint and OutPoint are the parameters that need to be configured for this step.

[0098] Step S502: Perform bad pixel detection and repair processing on the gamma-corrected image to obtain a bad pixel repaired image.

[0099] In the embodiments of this application, the gamma-corrected image obtained in the previous step is read. Each pixel in the image is analyzed, and by comparing the numerical differences between the target pixel and its surrounding neighboring pixels, it is determined whether the pixel is an abnormal bad pixel (such as a white spot or a black spot). For pixels determined to be bad pixels, a replacement value is calculated according to a preset rule (such as using the median or mean of neighboring pixels), and the original bad pixel value is replaced.

[0100] Optionally, the detection process can use a multi-directional threshold comparison method. After the repair is completed, a damaged pixel repair image is obtained.

[0101] Step S503: Perform 2D noise reduction and edge sharpening processing on the defective pixel repair image to obtain a noise-reduced and sharpened image.

[0102] In the embodiments of this application, spatial domain filtering is performed on the defective pixel repair image to reduce noise, i.e., 2D noise reduction. Furthermore, edge sharpening processing is applied to the defective pixel repair image to enhance the clarity of object contours. Optionally, edge sharpening processing can be performed using methods such as the Laplacian operator or unsharpening masking. The denoised and sharpened images are then merged and output to obtain a denoised and sharpened image.

[0103] Step S504: Perform wide dynamic range adjustment processing on the noise-reduced and sharpened image to obtain a dynamic range adjusted image.

[0104] In the embodiments of this application, the brightness histogram distribution of the denoised and sharpened image is analyzed to identify excessively dark and bright areas. Through tone mapping or image enhancement algorithms, visible details in dark areas are selectively enhanced, while details in highlight areas are suppressed or restored, thereby expanding the dynamic range of the image. After processing, a dynamic range adjusted image is obtained.

[0105] Step S505: Perform color correction processing on the dynamic range adjusted image to obtain a color-corrected image.

[0106] In the embodiments of this application, the chromaticity (such as Cb and Cr components) and / or luminance (Y component) of the dynamic range adjustment image are adjusted according to the target color space (such as sRGB, Adobe RGB) or a specific color preference. After correction, a color-corrected image is obtained.

[0107] Step S506: Perform ultra-strong light suppression processing on the color-corrected image to obtain the target image.

[0108] In the embodiments of this application, localized extreme highlight areas (such as light sources or reflections) are detected in the color-corrected image. These localized extreme highlight areas may have lost detail due to overexposure. Specific algorithms are applied, such as interpolation replacement using surrounding pixel information or local brightness compression, to suppress overexposure spots and restore some highlight details. After processing, the target image is obtained.

[0109] Optionally, color correction primarily corrects the Y and C components separately. The function restores the most accurate color and brightness information by adjusting relevant parameters of chroma and luminance. Gain and clipping operations are performed on the luminance component, and gain and cornering operations are performed on the eight regions of the chroma component. The correction formula for the Y component is as follows: Yout=Gain (Yin-Clamp); Both input and output are 10-bit. The value of Yin ranges from 0 to 1023. The output range of Yout varies depending on the standard; for example, for the BT656, the value range of Yout is 64 to 960. From the input and output value ranges, the gain and clipping parameters can be calculated. For example, if the brightness range of 0-1023 is compressed to 64-960, the gain and clipping parameters should be set as follows: Gain = 0.84375, Clamp = -76.

[0110] The correction of the C component mainly includes angle correction and gain adjustment. Two parameters are set: CBPN and CRPN. These two parameters are used to adjust the angle of the chromaticity component. This may cause interference from other colors when displaying white. The purpose of CBPN and CRPN is to avoid this phenomenon.

[0111] In this embodiment of the invention, the complexity of algorithm debugging is significantly reduced, and stable high-quality images can be obtained.

[0112] Example 6: In some specific embodiments of this application, 2D noise reduction and edge sharpening processing are performed on the defective pixel repair image to obtain a noise-reduced and sharpened image, which may specifically include steps S601 to S602.

[0113] Step S601: Perform edge detection on the defective pixel repair image to distinguish between edge regions and non-edge regions.

[0114] In the embodiments of this application, the image for defective pixel restoration is analyzed, and an algorithm is used to identify and mark regions that belong to edges and regions that do not belong to edges. Edge detection can be achieved by calculating pixel gradients, using edge detection operators (such as Sobel, Canny), or analyzing local pixel value changes. After detection, the image is divided into two logical regions: edge regions and non-edge regions.

[0115] Step S602: Perform first 2D noise reduction and edge sharpening on the edge region to obtain the edge region processed image, and perform second 2D noise reduction on the non-edge region to obtain the non-edge region processed image, wherein the filtering intensity of the second 2D noise reduction is greater than that of the first 2D noise reduction.

[0116] In the embodiments of this application, based on the division results of the previous step, the two regions are subjected to independent image processing.

[0117] For pixels marked as edge regions, a first 2D noise reduction process is applied. This first 2D noise reduction aims to smooth noise, but its filtering intensity is set relatively weak to avoid excessively blurring important edge details. Next, edge sharpening is applied to the same region to further enhance the contrast between pixels in that region, making the edge contours clearer and more prominent. After these two steps, the edge region processed image is obtained.

[0118] For pixels marked as non-edge regions, a second 2D noise reduction process is applied. The filtering intensity of the second 2D noise reduction process is set to be greater than that of the first 2D noise reduction process applied to edge regions. This means that a more powerful filtering algorithm will be used in non-edge regions to more effectively eliminate noise in those regions.

[0119] Step S602: Generate a noise-reduced and sharpened image based on the edge region processing image and the non-edge region processing image.

[0120] In the embodiments of this application, the edge region processed image and the non-edge region processed image are merged. The merging method can directly combine the pixels of the corresponding regions into a complete image based on the original edge / non-edge region markers. Ultimately, a noise-reduced and sharpened image is generated that effectively suppresses noise while maintaining clear edges.

[0121] In this embodiment of the invention, edge blurring and loss of detail are effectively avoided by using partitioning differentiation processing.

[0122] Example 7: In some specific embodiments of this application, edge detection is performed on the defective pixel repair image to distinguish edge regions and non-edge regions, which may specifically include steps S701 to S702.

[0123] Step S701: Calculate the pixel value gradient of each pixel in the bad pixel repair image within a preset neighborhood.

[0124] In the embodiments of this application, for each pixel in the defective pixel restoration image, a preset neighborhood is defined with that pixel as the center. The pixel value gradient within the preset neighborhood is calculated.

[0125] Optionally, gradient calculation can be achieved using differential operators (such as Sobel and Prewitt) or by directly calculating the maximum difference between pixel values ​​in the neighborhood.

[0126] In step S702, if the pixel value gradient is greater than a preset threshold, the corresponding pixel is classified into the edge region.

[0127] In the embodiments of this application, the calculated pixel value gradient of each pixel is compared with a preset threshold. If the gradient value of a pixel is greater than the preset threshold, then the pixel is classified as an edge region.

[0128] If the gradient value of a pixel is less than or equal to a preset threshold, the electronic device will classify the pixel as a non-edge region.

[0129] In step S702, if the pixel value gradient is less than or equal to a preset threshold, the corresponding pixel is classified into a non-edge region.

[0130] In the embodiments of this application, after traversing the entire image for defective pixel restoration, the classification of all pixels is completed. All pixels in the image are explicitly marked as belonging to edge regions or non-edge regions. The classification results will be used as input to perform subsequent partition-based differential noise reduction and sharpening processing.

[0131] In this embodiment of the invention, the requirements of low latency and low complexity are met; at the same time, the detection sensitivity and noise resistance can be flexibly balanced by adjusting the neighborhood size and threshold.

[0132] Figure 4 This illustration shows a schematic diagram of an image ISP processing apparatus 800 according to an embodiment of this application. The image ISP processing apparatus 800 can be configured on an electronic device. Specifically, the image ISP processing apparatus 800 may include: The acquisition module 801 acquires the raw image captured by the CMOS sensor and obtains the hardware configuration information of the CMOS sensor. The processing module 802 dynamically determines the image signal processing parameters based on the hardware configuration information; The output module 803 performs image signal processing on the original image sequentially according to the processing parameters to obtain the target image data. The image signal processing includes black level compensation, linear correction, lens shading correction, gain adjustment, gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression. Black level compensation, linear correction, lens shading correction, and gain adjustment are performed based on at least one of the sensor calibration parameters corresponding to the CMOS sensor.

[0133] The beneficial effects of this application's embodiments compared to existing technologies are as follows: Through a parameterizable ISP processing flow, sensor-related calibration steps can be decoupled from sensor-independent post-processing steps, allowing the same algorithm to be adapted to different CMOS sensors by adjusting front-end parameters. This not only retains complete image processing capabilities but also reduces processing latency and resource consumption. Therefore, this invention achieves low-latency, low-cost, and highly compatible ISP processing while maintaining high image quality, making it suitable for multi-sensor platforms and batch deployments in the electronics field.

[0134] Processing module 802 is also specifically used for: Obtain the sensor calibration parameters corresponding to the CMOS sensor, including black level compensation value, linearity correction parameter, lens shading correction coefficient and gain adjustment parameter; Based on the sensor calibration parameters, black level compensation, linear correction, lens shading correction and gain adjustment are sequentially performed on the image to be processed to obtain the first image; The first image is sequentially subjected to gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression to obtain the target image.

[0135] Processing module 802 is also specifically used for: Based on the black level compensation value, the R, Gr, Gb, and B channels of the image to be processed are subjected to black level subtraction respectively to obtain a black level compensated image; Based on the linear correction parameters, the black level compensated image is linearly mapped and corrected in the R, G, and B channels to obtain a linearly corrected image. Based on the lens shadow correction coefficient, shadow compensation is performed on the linearly corrected image according to the distance between the pixel and the image center to obtain the shadow compensation image; Based on the gain adjustment parameters, the gain of the R, G, and B channels of the shadow compensation image is multiplied and adjusted to obtain the first image.

[0136] Processing module 802 is also specifically used for: Acquire the first raw image captured by the CMOS sensor under no-light conditions, and calculate the average value of each channel as the black level compensation value based on the first raw image; The second raw image of the grayscale block of the standard color card is acquired by the CMOS sensor. Based on the second raw image, a linear correction curve is fitted to obtain the linear correction parameters. Based on the second raw image, the gain ratio of the R, G, and B channels is calculated to obtain the gain adjustment parameters. The system acquires multi-position image data from multiple locations on a standard color chart grayscale block using a CMOS sensor. Based on this multi-position image data, it calculates the lens shading correction coefficient to obtain the corresponding sensor calibration parameters for the CMOS sensor.

[0137] Processing module 802 is also specifically used for: Perform gamma correction on the first image to obtain a gamma-corrected image; Perform bad pixel detection and repair processing on the gamma-corrected image to obtain a bad pixel repaired image; Perform 2D noise reduction and edge sharpening on the image with damaged pixels to obtain a noise-reduced and sharpened image; Perform wide dynamic range adjustment processing on the denoised and sharpened image to obtain a dynamic range adjusted image; Perform color correction processing on the dynamic range adjusted image to obtain a color-corrected image; The color-corrected image is subjected to ultra-high light suppression processing to obtain the target image.

[0138] Processing module 802 is also specifically used for: Edge detection is performed on the image to repair bad pixels to distinguish between edge regions and non-edge regions; A first 2D noise reduction and edge sharpening process is performed on the edge region to obtain the edge region processed image, and a second 2D noise reduction process is performed on the non-edge region to obtain the non-edge region processed image, wherein the filtering intensity of the second 2D noise reduction process is greater than that of the first 2D noise reduction process. A noise-reduced and sharpened image is generated by processing images based on edge regions and non-edge regions.

[0139] Processing module 802 is also specifically used for: Calculate the pixel value gradient of each pixel in the predefined neighborhood in the image with damaged pixels repaired; If the pixel value gradient is greater than the preset threshold, the corresponding pixel will be classified as an edge region. If the pixel value gradient is less than or equal to a preset threshold, the corresponding pixel will be classified as a non-edge region.

[0140] like Figure 5The diagram illustrates an electronic device according to an embodiment of the present invention. The electronic device 900 may include a processor 901, a memory 902, and a computer program 903 stored in the memory 902 and executable on the processor 901, such as an image ISP processing program. When the processor 901 executes the computer program 903, it implements the steps described in the various image ISP processing embodiments.

[0141] A computer program can be divided into one or more modules / units. One or more modules / units are stored in memory 902 and executed by processor 901 to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in an electronic device.

[0142] The electronic device may include, but is not limited to, a processor 901 and a memory 902. Those skilled in the art will understand that... Figure 5 This is merely an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than shown, or combine certain components, or different components. For example, an electronic device may also include input / output devices, network access devices, buses, etc.

[0143] The processor 901 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0144] The memory 902 can be an internal storage unit of an electronic device, such as a hard drive or RAM. The memory 902 can also be an external storage device of the electronic device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 902 can include both internal and external storage units. The memory 902 is used to store computer programs and other programs and data required by the electronic device. The memory 902 can also be used to temporarily store data that has been output or will be output.

[0145] It should be noted that, for the sake of convenience and brevity, the structure of the above-mentioned electronic device can also be referred to the specific description of the structure in the method embodiment, which will not be repeated here.

[0146] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the above-described image ISP processing method.

[0147] This invention provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps in the aforementioned image ISP processing method.

[0148] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0149] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for various specific applications, but such implementations should not be considered beyond the scope of this invention.

[0150] In the embodiments provided by this invention, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the electronic device embodiments described above are merely illustrative. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0151] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0152] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0153] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0154] The embodiments described above are merely illustrative of the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. An image ISP processing method, characterized in that, include: Acquire the image to be processed from the CMOS sensor; Image signal processing is performed on the image to be processed to obtain the target image. The image signal processing includes black level compensation, linear correction, lens shading correction, gain adjustment, gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression. The black level compensation, linear correction, lens shading correction, and gain adjustment are performed based on the sensor calibration parameters corresponding to the CMOS sensor. Output the target image.

2. The image ISP processing method as described in claim 1, characterized in that, The step of performing image signal processing on the image to be processed to obtain the target image includes: Obtain the sensor calibration parameters corresponding to the CMOS sensor, wherein the sensor calibration parameters include black level compensation value, linear correction parameter, lens shading correction coefficient and gain adjustment parameter; Based on the sensor calibration parameters, the black level compensation, linear correction, lens shading correction, and gain adjustment are sequentially performed on the image to be processed to obtain a first image; The first image is sequentially subjected to the following steps: gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression, to obtain the target image.

3. The image ISP processing method as described in claim 2, characterized in that, The step of sequentially performing black level compensation, linear correction, lens shading correction, and gain adjustment on the image to be processed according to the sensor calibration parameters to obtain a first image includes: Based on the black level compensation value, black level subtraction is performed on the R, Gr, Gb, and B channels of the image to be processed to obtain a black level compensated image; Based on the linear correction parameters, the black level compensation image is subjected to linear mapping correction of the R, G, and B channels to obtain a linearly corrected image; Based on the lens shadow correction coefficient, shadow compensation is performed on the linearly corrected image according to the distance between the pixel and the image center to obtain a shadow compensation image; Based on the gain adjustment parameters, the gain of the R, G, and B channels of the shadow compensation image is multiplied and adjusted to obtain the first image.

4. The image ISP processing method as described in claim 2, characterized in that, Before the step of obtaining the sensor calibration parameters corresponding to the CMOS sensor, the method further includes: Acquire a first raw image captured by the CMOS sensor under no-light conditions, and calculate the average value of each channel as the black level compensation value based on the first raw image; The second original image of the grayscale block of the standard color card is acquired by the CMOS sensor. Based on the second original image, a linear correction curve is fitted to obtain the linear correction parameter. Based on the second original image, the gain ratio of the R, G, and B channels is calculated to obtain the gain adjustment parameter. The CMOS sensor acquires multi-position image data from multiple locations on a standard color chart grayscale block, and calculates lens shadow correction coefficients based on the multi-position image data to obtain the sensor calibration parameters corresponding to the CMOS sensor.

5. The image ISP processing method as described in claim 2, characterized in that, The process of sequentially performing gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-high light suppression on the first image to obtain the target image includes: Perform gamma correction processing on the first image to obtain a gamma-corrected image; Perform bad pixel detection and repair processing on the gamma-corrected image to obtain a bad pixel repaired image; Perform 2D noise reduction and edge sharpening processing on the defective pixel repair image to obtain a noise-reduced and sharpened image; Perform wide dynamic range adjustment processing on the denoised and sharpened image to obtain a dynamic range adjusted image; Perform color correction processing on the dynamic range adjusted image to obtain a color-corrected image; The color-corrected image is subjected to ultra-strong light suppression processing to obtain the target image.

6. The image ISP processing method as described in claim 1, characterized in that, The step of performing 2D noise reduction and edge sharpening processing on the defective pixel repair image to obtain a noise-reduced and sharpened image includes: Edge detection is performed on the damaged pixel repair image to distinguish between edge regions and non-edge regions; A first 2D noise reduction process and an edge sharpening process are performed on the edge region to obtain an edge region processed image, and a second 2D noise reduction process is performed on the non-edge region to obtain a non-edge region processed image, wherein the filtering intensity of the second 2D noise reduction process is greater than that of the first 2D noise reduction process. The noise-reduced and sharpened image is generated based on the image processed from the edge region and the image processed from the non-edge region.

7. The image ISP processing method as described in claim 6, characterized in that, The step of performing edge detection on the damaged pixel repair image to distinguish between edge regions and non-edge regions includes: Calculate the pixel value gradient of each pixel in the damaged pixel repair image within a preset neighborhood; If the pixel value gradient is greater than a preset threshold, the corresponding pixel is classified into the edge region. If the pixel value gradient is less than or equal to the preset threshold, the corresponding pixel is classified into the non-edge region.

8. An image ISP processing apparatus, characterized in that, The device includes: The acquisition module acquires the image to be processed, which is collected by the CMOS sensor. The processing module performs image signal processing on the image to be processed to obtain the target image. The image signal processing includes black level compensation, linear correction, lens shading correction, gain adjustment, gamma correction, bad pixel detection, 2D noise reduction, edge sharpening, wide dynamic range adjustment, color correction, and ultra-strong light suppression. The black level compensation, linear correction, lens shading correction, and gain adjustment are performed based on the sensor calibration parameters corresponding to the CMOS sensor. The output module outputs the target image.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the ISP processing method for the image as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the ISP processing method for the image as described in any one of claims 1 to 7.