Image processing method and processing device, electronic device, and readable storage medium

CN116934629BActive Publication Date: 2026-08-11BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-04
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,网格校正法可能需要较大的存储空间以用于存储校正参数

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116934629B_ABST
    Figure CN116934629B_ABST
Patent Text Reader

Abstract

Embodiments of this disclosure provide an image processing method, an image signal processing apparatus, an electronic device, and a readable storage medium. The image processing method includes: reading a third gain value of nodes of a grid used for image partitioning in a grid shadow correction method, and shadow correction parameters for shadow correction of the image using a reference shadow correction method different from the grid shadow correction method; obtaining a second gain value of the grid nodes using the shadow correction parameters in the reference shadow correction method; and obtaining a first gain value for the grid nodes that is decompressed relative to the third gain value by performing a numerical operation between the third gain value and the second gain value. The first gain value is used for shadow correction of the image in the grid shadow correction method. This image processing method can reduce the storage space required to store the gain value used for the grid shadow correction method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed herein relate to the field of image processing, and particularly to image processing methods and processing apparatus, electronic devices, and readable storage media. Background Technology

[0002] Currently, portable devices, such as mobile phones, tablets, digital cameras, multimedia devices, and other types of computing and electronic devices, typically include digital camera equipment used to capture digital images. A digital camera consists of a lens, an image sensor, and an image signal processor (ISP). One problem arising from operating the image sensor is the need to perform lens shading correction.

[0003] To improve image quality, lens shading correction (LSC) techniques, such as grid shading correction, are commonly used to compensate for shadows. However, grid correction may require significant storage space to store the correction parameters. Summary of the Invention

[0004] According to at least one embodiment of the present disclosure, an image processing method is provided, the method comprising: reading a third gain value of a node of a grid used for image division in a grid shadow correction method and a shadow correction parameter for shadow correction of the image in a reference shadow correction method different from the grid shadow correction method; obtaining a second gain value of a node of the grid in the reference shadow correction method by means of the shadow correction parameter; and obtaining a first gain value for a node of the grid that is decompressed relative to the third gain value by performing a numerical operation between the third gain value and the second gain value, wherein the first gain value is used for shadow correction of the image in the grid shadow correction method.

[0005] For example, in the image processing method according to embodiments of the present disclosure, the reference shadow correction method includes a polynomial fitting correction method or a concentric circle correction method.

[0006] For example, in the image processing method according to the embodiments of the present disclosure, the polynomial order of the polynomial fitting correction method is 2 to 3, and the number of concentric circles in the concentric circle correction method is 6 to 36.

[0007] For example, in the image processing method according to an embodiment of the present disclosure, the first gain value includes the corresponding first gain values ​​of the R channel, Gr channel, Gb channel and B channel obtained by the grid shadow correction method, and wherein the shadow correction parameters include shadow correction parameters shared by the R channel, Gr channel, Gb channel and B channel.

[0008] For example, in the image processing method according to embodiments of the present disclosure, the shadow correction parameters include one or more of the optical center coordinates and polynomial coefficients in the polynomial fitting correction method; or the shadow correction parameters include one or more of the optical center coordinates, the radius of the concentric circle, and the corresponding gain value in the concentric circle correction method.

[0009] For example, the image processing method according to an embodiment of the present disclosure further includes: performing Columbus decoding on the read third gain value, performing numerical transformation on the decoded third gain value, and using the numerically transformed third gain value to perform numerical operation with the second gain value to obtain a first gain value.

[0010] For example, in the image processing method according to an embodiment of the present disclosure, the decoded third gain value is a non-negative integer.

[0011] For example, in the image processing method according to an embodiment of the present disclosure, the numerical transformation of the decoded third gain value includes: mapping a non-negative integer to another integer, adding 2 to the other integer to a first power, and obtaining a sum, wherein obtaining the first gain value includes obtaining a first gain value shifted left by a first number of bits, and the first gain value shifted left by a first number of bits is used to perform shadow correction on the image in the grid shadow correction method.

[0012] For example, in the image processing method according to an embodiment of the present disclosure, the numerical transformation of the decoded third gain value includes: mapping a non-negative integer to another integer, wherein obtaining the first gain value includes obtaining a first gain value shifted left by a first number of bits, and the first gain value shifted left by a first number of bits is used to perform shadow correction on the image in the grid shadow correction method.

[0013] For example, in the image processing method according to an embodiment of the present disclosure, the third gain value read is a Columbus-coded non-negative integer.

[0014] For example, in the image processing method according to an embodiment of the present disclosure, the adjustment factor of Columbus decoding is a second power of 2; Columbus decoding includes finite-length Columbus decoding.

[0015] According to at least one embodiment of the present disclosure, an image signal processing apparatus is provided, comprising: a third gain value acquisition unit configured to read a third gain value of a node of a grid used for image division in a grid shadow correction method and a shadow correction parameter for shadow correction of an image in a reference shadow correction method different from the grid shadow correction method; a second gain value acquisition unit configured to obtain a second gain value of a node of the grid in the reference shadow correction method through the shadow correction parameter; and a first gain value acquisition unit configured to obtain a first gain value for a node of the grid that is decompressed relative to the third gain value by performing a numerical operation between the third gain value and the second gain value, wherein the first gain value is used for shadow correction of the image in the grid shadow correction method.

[0016] According to at least one embodiment of the present disclosure, another image processing method is provided, the image processing method comprising: obtaining a first gain value of the nodes of a grid used for image division in a grid shadow correction method; obtaining a second gain value for the nodes of the grid using a reference shadow correction method different from the grid shadow correction method; obtaining a third gain value that is compressed relative to the first gain value by performing numerical operations on the first gain value and the second gain value; and storing the third gain value and shadow correction parameters for shadow correction of the image by the reference shadow correction method.

[0017] An electronic device is provided according to at least one embodiment of the present disclosure, the electronic device including: one or more processors; a memory storing one or more computer program modules; wherein the one or more computer program modules are executed by the one or more processors to implement the image processing method of any of the above embodiments.

[0018] According to at least one embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided thereon storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the image processing method of any of the above embodiments. Attached Figure Description

[0019] The above and other aspects, features, and advantages of specific embodiments of the present disclosure will become clearer from the following description taken in conjunction with the accompanying drawings, in which:

[0020] Figure 1 It is a grayscale image of brightness and shadow.

[0021] Figure 2 This is a diagram illustrating the Bayer arrangement.

[0022] Figure 3 This is a flowchart of the calibration process of a grid correction method according to at least one embodiment of the present disclosure.

[0023] Figure 4 This is a schematic diagram of mesh division for a mesh correction method according to at least one embodiment of the present disclosure.

[0024] Figure 5a This is a schematic diagram of a mesh node cell according to at least one embodiment of the present disclosure.

[0025] Figure 5b This is a schematic diagram of another mesh node cell according to at least one embodiment of the present disclosure.

[0026] Figure 5c This is a schematic diagram of another mesh node cell according to at least one embodiment of the present disclosure.

[0027] Figure 6 This is a flowchart of the calibration process of a polynomial fitting correction method according to at least one embodiment of the present disclosure.

[0028] Figure 7 This is a flowchart of the calibration process of the concentric circle correction method according to at least one embodiment of the present disclosure.

[0029] Figure 8 This is a schematic diagram of concentric circle division in the calibration process of the concentric circle correction method according to at least one embodiment of the present disclosure.

[0030] Figure 9 It is an image processing method (e.g., a compression method for lens shading correction) according to at least one embodiment of the present disclosure.

[0031] Figure 10 This is another image processing method for lens shading correction compression according to at least one embodiment of the present disclosure.

[0032] Figure 11 This is a schematic diagram of the Golomb code according to at least one embodiment of the present disclosure.

[0033] Figure 12 It is an image processing method (e.g., a decompression method for lens shading correction) according to at least one embodiment of the present disclosure.

[0034] Figure 13 This is another image processing method for decompression for lens shading correction according to at least one embodiment of the present disclosure.

[0035] Figure 14 It is an image signal processing apparatus for image processing (e.g., decompression for lens shading correction) according to at least one embodiment of the present disclosure.

[0036] Figure 15 It is an electronic device for compression or decompression for lens shading correction according to at least one embodiment of the present disclosure.

[0037] Figure 16 It is a non-transitory computer-readable storage medium according to at least one embodiment of the present disclosure. Detailed Implementation

[0038] Before proceeding with the detailed description below, it may be advantageous to define certain words and phrases used throughout this patent document. The terms “comprising” and “including” and their derivatives mean including but not limited to. The term “or” is inclusive, meaning and / or. The phrase “associated with” and its derivatives mean including, comprising, interconnecting, containing, contained within, connected or connected to, coupled or coupled to, communicating with, cooperating, intertwining, juxtaposing, proximate, binding or binding to, having, having attributes, having a relationship or being related to, etc. The term “controller” means any device, system, or part thereof that controls at least one operation. Such a controller may be implemented in hardware, or a combination of hardware and software and / or firmware. The functionality associated with any particular controller may be centralized or distributed, local or remote. The phrase “at least one,” when used with a list of items, means that different combinations of one or more of the listed items may be used, and that only one item from the list may be required. For example, "at least one of A, B, and C" includes any one of the following combinations: A, B, C, A and B, A and C, B and C, A and B and C.

[0039] Definitions of other specific words and phrases are provided throughout this patent document. Those skilled in the art will understand that, in many, if not most, cases, such definitions apply to the prior and future use of the words and phrases thus defined.

[0040] The various embodiments of the principles of this disclosure described below with reference to the accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this disclosure in any way. Those skilled in the art will understand that the principles of this disclosure can be implemented in any suitably arranged system or device. In some cases, the actions described in the specification may be performed in a different order and the desired result may still be achieved. Furthermore, the processes depicted in the drawings do not necessarily require a specific order or sequential sequence to achieve the desired result. In certain embodiments, multitasking and parallel processing may be advantageous.

[0041] Figure 1 It is a grayscale image of brightness and shadow.

[0042] The optical characteristics of a lens can cause lens shading problems in images. Lens shading can be divided into luma shading and chroma / color shading.

[0043] Chromatic shadows occur because the lens has different refractive indices for different wavelengths of light, causing the focal planes of different colors to separate, resulting in color aberration in the image, typically manifesting as a center color cast. Chromatic shadows can usually be effectively corrected by matching the lens and sensor (the angle of the principal ray).

[0044] Brightness shadows occur because a lens can be considered a convex lens. According to the imaging principle of a convex lens, the amount of light passing through the lens gradually decreases from the center to the edges. This causes a difference in brightness between the center and the edges of the image (higher brightness in the center and lower brightness at the edges). Therefore, when aiming to capture an image with uniform brightness distribution in a scene with uniform lighting, the gradual decrease in light passing through the lens from the center to the edges, as described by the imaging principle of a convex lens, creates brightness shadows. Figure 1 As shown.

[0045] Luminous shadows are inherent and cannot be completely avoided, therefore lens luminous shadow correction is necessary. In this case, only the pixel value at the optical center is accurate; the brightness decreases with distance from the optical center, meaning the pixel value becomes smaller. Therefore, pixel values ​​at other locations should be corrected using the optical center as the standard.

[0046] Figure 2 This is a diagram illustrating the Bayer arrangement.

[0047] It can acquire raw (RAW) images with a flat brightness distribution in uniform lighting scenarios. RAW images typically use a Bayer arrangement, meaning each pixel corresponds to a color channel. Pixels with green as their corresponding color channel are called G channel pixels, those with red as their corresponding color channel are called R channel pixels, and those with blue as their corresponding color channel are called B channel pixels. RAW images can be in any of the following formats: GRBG, RGGB, BGGR, and GBRG. The arrangement of RAW images can be as follows: Figure 2 As shown. Generally, a G with R sides is labeled Gr, and a G with B sides is labeled Gb. This disclosure uses RAW format images as examples to describe various correction methods, but it is understood that the various correction methods described below can also be applied to at least the RGB and YUV domains.

[0048] Generally, lens shadow correction methods mainly include polynomial fitting, concentric circle method, and grid correction method. The polynomial fitting method is relatively simple, computationally inefficient, and requires little storage space. However, it has stringent application conditions; the lens shadow needs to exhibit central symmetry. If it is not centrally symmetric, for example, due to improper lens mounting or other reasons causing local anomalies, this method cannot effectively correct the shadow. The concentric circle method has a computational cost, storage space requirement, and correction effect between polynomial fitting and grid correction. Its disadvantages include stringent application conditions, and the fact that the lens shadow changes in an elliptical or even irregular pattern from the optical center outwards, resulting in less than ideal correction. The grid correction method provides the best lens shadow correction effect, but it requires a large amount of storage space to store the gain values.

[0049] Currently, existing lens shading correction technology involves module manufacturers uniformly burning the gain values ​​and other information that need to be stored into a one-time programmable (OTP) memory during production. However, OTP memory generally has a small storage space.

[0050] Figure 3 This is a flowchart of the calibration process of a grid correction method according to at least one embodiment of the present disclosure. Figure 4 This is a schematic diagram of mesh generation for a mesh correction method according to at least one embodiment of the present disclosure. The calibration process of the mesh correction method (i.e., mesh shading correction method) includes steps S302, S304, and S306.

[0051] In step S302, the image can be divided into a grid. For example... Figure 4 As shown, the grid correction method according to embodiments of this disclosure may include dividing the image into a grid. Based on the characteristics of lens shading, the closer to the edges, the more severe the influence of lens shading, i.e., the greater the gradient. Therefore, the grid size can be configured to be relatively sparse in the middle and relatively dense around the edges, with central symmetry. A Gaussian distribution can be used for grid division. Alternatively, a proportional relationship can be used for grid division. The grid size can be configured to be an even number, with excess size added to the center, and the grid size recorded. Figure 4 The number and distance of the grid shown are merely examples; other numbers and distances can be used for grid division. Figure 4 The intersection of the horizontal and vertical lines can be called a grid node. Furthermore, to prevent outliers, black level correction and smoothing operations can be performed; however, for the sake of brevity and to avoid unnecessary confusion, descriptions of black level correction and smoothing operations are omitted here.

[0052] Mesh calibration can be performed channel-by-channel, meaning that the calibration and correction of mesh nodes can be performed separately in the R channel, Gr channel, Gb channel, and B channel.

[0053] In step S304, the maximum pixel value of the image can be determined. For example, the optical centers (maximum values ​​of pixels in the image data) of the four channels can be determined separately, and the maximum pixel values ​​of the four channels can be recorded as the standard for correction.

[0054] Figure 5a This is a schematic diagram of a mesh node cell according to at least one embodiment of the present disclosure. Figure 5b This is a schematic diagram of another mesh node cell according to at least one embodiment of the present disclosure. Figure 5c This is a schematic diagram of another mesh node cell according to at least one embodiment of the present disclosure.

[0055] To more accurately determine the pixel value of each grid node and thus more accurately calculate the gain value of each grid node, the pixel value of the grid node can be calculated using a pixel unit composed of several pixels.

[0056] like Figure 5a As shown, in one embodiment, the pixels of each grid node within the divided grid can be calculated using an 8×8 pixel unit centered on the coordinates of that grid node. However, this disclosure is not limited to this, and units of other sizes are also possible. Specifically, for the R channel, Gr channel, Gb channel, and B channel, the average pixel value of the corresponding pixel in the unit is calculated as the corresponding pixel value of the grid node in the aforementioned four channels.

[0057] like Figure 5b As shown, in another embodiment, the pixel of each grid node located at a vertex on the edge of the divided grid can be calculated using a 4×4 pixel cell with the grid node coordinates as the vertex. However, this disclosure is not limited to this, and cells of other sizes are also possible. Specifically, for the R channel, Gr channel, Gb channel, and B channel, the average pixel value of the corresponding pixel in the cell is calculated as the corresponding pixel value of the grid node in the above four channels.

[0058] like Figure 5c As shown, in another embodiment, the pixels of each grid node on the edge of the divided grid can be calculated using a 4×8 pixel unit, where the grid node is located at the midpoint of the portion of the grid edge included by the unit. However, this disclosure is not limited to this, and other unit sizes are also possible. Specifically, for the R channel, Gr channel, Gb channel, and B channel, the average pixel value of the corresponding pixel in the unit is calculated as the corresponding pixel value of the grid node in the aforementioned four channels.

[0059] In step S306, the maximum pixel value can be divided by the pixel value of each grid node to obtain the gain value of each grid node. For example, the maximum pixel value can be the maximum pixel value of the corresponding channel obtained in step S304. For example, the gain value of each grid node can be obtained by dividing the maximum pixel value of the corresponding channel by the pixel value of each grid node in the corresponding channel. By storing the gain value of each grid node and grid-related information (e.g., grid size, number of grids, coordinates of grid nodes, or one or more of these), a grid gain lookup table can be obtained for use in shading correction.

[0060] It should be understood that the calibration process of the grid correction method described above is merely an example. The calibration process of the grid correction method described in this article can include various methods for obtaining a lens shading correction gain lookup table in grid form. The lens shading correction gain lookup table obtained through the above calibration process can be used to perform shading correction on an image.

[0061] Grid correction can handle various shadow conditions (e.g., non-centrosymmetric shadows), but it requires significant storage space to store the grid gain lookup table. When using the grid gain lookup table for shadow correction, the gain value of each pixel can be obtained through bilinear interpolation using the gain value of each grid node to compensate for the brightness of the shadow area.

[0062] Figure 6 This is a flowchart of the calibration process of a polynomial fitting correction method according to at least one embodiment of the present disclosure. The calibration process of the polynomial fitting correction method includes steps S602, S604 and S606.

[0063] In step S602, the optical center of the image can be determined. For example, the optical centers (maximum values ​​of pixels in the image data) of the four channels can be determined separately, and the maximum pixel values ​​and their coordinates (x0, y0) for each of the four channels can be recorded. This can be achieved by referring to a reference based on... Figure 5a and Figure 5b The process described in step S304 is used to determine the pixel value of the optical center. In some cases, the middle part of the image may contain the maximum pixel value. To determine a more accurate optical center, the final optical center can be determined based on the upper left and lower right corners of the region with the maximum pixel value, and its coordinates and pixel value can be recorded.

[0064] In step S604, the gain value and coordinates of pixels in the image can be determined. For example, the pixel values ​​of the pixels in the four channels of the image can be determined separately, and the gain value of each pixel can be obtained by dividing the maximum value of the pixel by the pixel value of each pixel. At the same time, the coordinates (x, y) of the pixel with the gain value are determined.

[0065] In step S606, a polynomial function relating the gain value and the coordinates can be fitted. For example, by referring to equations 1 to 3, the distance r of each pixel (x, y) from the optical center (x0, y0) can be obtained.

[0066] r h =x - x0 (1)

[0067] r v =y-y0 (2)

[0068]

[0069] Where, r h Let r be the lateral distance of each pixel (x, y) from the optical center (x0, y0). v Let r be the vertical distance from each pixel (x, y) to the optical center (x0, y0), and let r be the Euclidean distance from each pixel (x, y) to the optical center (x0, y0). By fitting the gain value with a polynomial, equation (4) can be obtained.

[0070] pgain=1+ar+br 2 +cr 3 +…(4)

[0071] Where a, b, c, etc. are polynomial coefficients. Since the correction coefficient is 1 when the distance is 0, the constant term of the polynomial is 1. Polynomials of more or fewer orders can be fitted as needed. The third-order fitting polynomial shown in equation (4) is just an example. As an example, the polynomial coefficients a, b, c, etc. can be obtained by fitting the model using the least squares method.

[0072] It should be understood that the calibration process of the polynomial shading correction method described above is merely an example, and the calibration process of the polynomial shading correction method described in this article can include various methods of calibrating lens shading correction in polynomial form.

[0073] Using the fitted polynomial (4), the gain value pgain of a pixel can be determined by the Euclidean distance from the optical center of the image. By storing the optical center coordinates (x0, y0) and polynomial coefficients a, b, c, etc., obtained through the above calibration process, lens shading can be corrected.

[0074] Figure 7 This is a schematic diagram of the calibration process of the concentric circle correction method according to at least one embodiment of the present disclosure. Figure 8 This is a schematic diagram of concentric circle division in the calibration process of the concentric circle correction method according to at least one embodiment of the present disclosure.

[0075] The calibration process of the concentric circle correction method includes steps S702, S704 and S706.

[0076] In step S702, the image can be divided into concentric circles (i.e., annular division). For example... Figure 8 As shown, the calibration process of the concentric circle correction method according to embodiments of this disclosure may include dividing the image into concentric circles. Based on the characteristics of lens shading, the closer to the edges, the more severe the influence of lens shading, i.e., the greater the gradient. Therefore, the grid size can be configured to be relatively sparse in the center and relatively dense around the edges, with central symmetry. A Gaussian distribution can be used for concentric circle division. Alternatively, an equal ratio can be used for concentric circle division. Figure 8 The number and distance of concentric circles shown are merely examples; other numbers and distances can be used to divide concentric circles.

[0077] In step S704, the optical center of the image can be determined. For example, the optical centers (maximum values ​​of pixels in the image data) of the four channels can be determined separately, and the maximum pixel values ​​and their coordinates (x0, y0) for each of the four channels can be recorded. This can be achieved by referring to... Figure 5a and Figure 5b The process described above determines the pixel value of the optical center. In some cases, the middle portion of the image may contain the maximum pixel value. To determine a more accurate optical center, the final optical center can be determined based on the upper left and lower right corners of the region with the maximum pixel value, and its coordinates and pixel value can be recorded.

[0078] In step S706, the gain value of the pixel on the concentric circle with the optical center as the center and the corresponding concentric circle radius can be determined. For example, the concentric circle radius corresponding to the gain value cgain of the pixel on the concentric circle with the optical center as the center in the image data of the four channels can be determined respectively.

[0079] It should be understood that the above-described calibration process for concentric circle shadow correction is merely an example, and the calibration process for concentric circle shadow correction described in this article can include various methods for calibration processes that perform lens shadow correction in the form of concentric circles.

[0080] In the concentric circle correction method, the gain value of a pixel can be obtained through interpolation using the Euclidean distance from the optical center of the image. By storing the optical center coordinates (x0, y0), the radius of the concentric circles, and the corresponding gain values, lens shading can be corrected.

[0081] Figure 9 This is an image processing method according to at least one embodiment of the present disclosure, the image processing method including a compression method for lens shading correction. The compression method includes steps S902, S904, S906 and S908.

[0082] In step S902, the first gain value gain1 of the nodes of the grid used for image partitioning in the grid shadow correction method can be obtained. For example, it can be obtained by referring to... Figure 3 The described grid correction method obtains the corresponding first grid gain values ​​in the R, Gr, Gb, and B channels. The grid correction method described herein can include various methods for obtaining a lens shading correction gain lookup table including the first gain value gain1 in grid form. For example, the first gain value gain1 of each node in the grid is organized and used in a lookup table manner. The first gain value gain1 can be used to handle various shading conditions (e.g., non-centrosymmetric shading). For example, when performing shading correction using a grid gain lookup table, the gain value of each pixel can be obtained through bilinear interpolation using the gain values ​​of each grid node to compensate for the brightness of the shading area.

[0083] In step S904, a second gain value gain2 for the nodes of the grid can be obtained using a reference shadow correction method different from the grid shadow correction method. For example, the reference shadow correction method different from the grid shadow correction method can be to obtain the second gain value gain2 for the nodes of the grid by using the polynomial fitting correction method or the concentric circle correction method described above, but the embodiments of this disclosure are not limited to these two shadow correction methods. For example, interpolation can be used to obtain the second gain value of the grid for four channels. Alternatively, the second gain value of the grid for only one of the four channels can be obtained and used as the second gain value of the grid shared by the four channels. However, the embodiments of this disclosure are not limited to the above methods; for example, other methods for shadow correction of the image are also possible.

[0084] In step S906, a third gain value, compressed relative to the first gain value, is obtained by performing a numerical operation between the first gain value and the second gain value. In one embodiment, the third gain value gain3 of the grid can be obtained by dividing the first gain value gain1 of the grid by the second gain value gain2 of the grid, as shown in equation (5). Since the first gain value and the second gain value of the grid may be numerically close, the third gain value gain3 of the grid may be closer to the value 1 than the first gain value gain1. For example, the first gain value of the grid for each of the four channels can be divided by the second gain value of the corresponding four channels of the grid. Alternatively, the first gain value of the grid for each of the four channels can be divided by the second gain value of the shared grid.

[0085] In another embodiment, the third gain value of the grid, gain3, is obtained by dividing the first gain value gain1 of the grid by the second gain value gain2 of the grid and subtracting 1 from the quotient. Since the first gain value and the second gain value of the grid may be numerically close, the third gain value gain3 of the grid may be closer to the value 0 than the first gain value gain1.

[0086] In other embodiments, other numerical operations can be used. For example, the average of the first gain value gain1 and the second gain value gain2 can be calculated, and then the first gain value gain1 can be subtracted from this average. It should be understood that other numerical operation methods are also possible. Since the first gain value and the second gain value of the mesh may be numerically close, the third gain value gain3 of the mesh may be closer to the value 1 or closer to the value 0 than the first gain value gain1.

[0087]

[0088] In step S908, a third gain value, gain3, and shadow correction parameters for applying shadow correction to the image using a reference shadow correction method can be stored. For example, these shadow correction parameters can be used to obtain the shadow correction gain value of the image. For example, the shadow correction parameters can be specific to each of the R, Gr, Gb, and B channels. In one embodiment, the shadow correction parameters can be specific to each of the four channels, and can be a reference... Figure 6 The described polynomial fitting correction method uses optical center coordinates (x0, y0) and polynomial coefficients a, b, c, etc. In another embodiment, for each of the four channels described above, the shadow correction parameters can be referenced... Figure 7 The description of the concentric circle correction method includes the optical center coordinates (x0, y0), the radius of the concentric circles, and the corresponding gain values. However, this disclosure is not limited to the above situation; for example, shadow correction parameters for other methods of image shadow correction are also possible. Alternatively, since the shadow correction parameters for the four channels may be very similar, the shadow correction parameters for only one of the four channels can be obtained and used as the shadow correction parameters shared by all four channels.

[0089] The second gain value (gain2) of a node in the mesh can be obtained through the shading correction parameters. For example, interpolation can be used to obtain the second gain value of the mesh for all four channels through the shading correction parameters. Alternatively, the second gain value of the mesh for only one of the four channels can be obtained and used as the second gain value of the mesh shared by all four channels.

[0090] The third gain value (gain3) of the mesh and the shading correction parameters can be stored in, for example, an OTP memory. For instance, the third gain value (gain3) can be stored in a lookup table-like manner. Furthermore, in embodiments of this disclosure, mesh-related information can also be stored, which may include, for example, one or more of the following: mesh size, number of meshes, and coordinates of mesh nodes.

[0091] For example, the third grid gain values ​​for all four channels and the shadow correction parameters for all four channels can be stored. Alternatively, the third grid gain values ​​for all four channels and a shared shadow correction parameter can be stored.

[0092] Because the third gain value of the grid is closer to 1 or 0 than the first gain value, storing the third gain value requires significantly less storage space than storing the first gain value. Even considering the shading correction parameters, the storage space required to store the third grid gain value and the shading correction parameters is still less than the storage space required to store the first gain value. When the R, Gr, Gb, and B channels share the shading correction parameters, the storage space footprint can be further reduced. This can be beneficial for reducing the cost of OTP memory.

[0093] As mentioned above, there are at least three methods for lens shadow correction. The compression method for lens shadow correction according to this disclosure can effectively correct shadows using a grid correction method, which has better correction effects than polynomial fitting correction and concentric circle correction, while significantly reducing the occupation of OTP storage space and lowering costs.

[0094] Specifically, in the compression method according to embodiments of this disclosure, the shadow correction parameters are referenced... Figure 6 When obtaining the polynomial fitting correction method described, the polynomial order can be set to second or third order. A second or third order fitting polynomial can control the third gain value of the mesh to be near 1 or 0, thereby reducing storage space and also reducing the storage space occupied by the shading correction parameters that need to be stored.

[0095] Specifically, in the compression method according to embodiments of this disclosure, the shadow correction parameters are referenced... Figure 7 When obtaining the concentric circle correction method described, the number of concentric circles can be set from 6 to 36. Preferably, the concentric circle correction method with 12 to 24 concentric circles can control the third gain value of the mesh to be close to a value of 1 or 0 to reduce storage space, while also reducing the storage space occupied by the shadow correction parameters that need to be stored.

[0096] Figure 10This is an image processing method according to at least one embodiment of the present disclosure, the image processing method including another compression method for lens shading correction. The compression method includes steps S1002, S1004, S1006, S1008, S1010, and S1012. Steps S1002 to S1006 are consistent with reference to... Figure 9 Steps S902 to S906 are similar and will not be repeated here.

[0097] In step S1008, the third gain value gain3 of the mesh can be numerically transformed. For example, the third gain value can be numerically transformed separately for each of the R channel, Gr channel, Gb channel, and B channel.

[0098] In one embodiment, as shown in equation (6), the numerical transformation may include left-shifting a third gain value close to the value 1 (this is only an example; a third gain value close to the value 1 may be the third gain value gain3 of the grid obtained by dividing the first gain value gain1 of the grid by the second gain value gain2 of the grid as described above) by k1 bits to convert the third gain value to a positive integer, and subtracting 2^k1 from the converted positive integer to obtain the difference Diff. In one embodiment, the third gain value may be left-shifted by k1 = 10 bits, thereby converting the third gain value to be close to the positive integer 2^10 = 1024. In other embodiments, the third gain value may be left-shifted by k1 = 5 to k1 = 10 bits.

[0099] Diff = round(gain3*2) k1 )-2 k1 (6)

[0100] The function `round()` rounds the result to the nearest integer. Some values ​​in the difference `Diff` may be positive, and some may be negative.

[0101] In another embodiment, as shown in equation (7), the numerical transformation may include left-shifting a third gain value close to 0 (this is only an example; a third gain value close to 0 may be the third gain value gain3 of the grid obtained by dividing the first gain value gain1 of the grid by the second gain value gain2 of the grid, subtracting 1 from the quotient) by k1 bits to convert the third gain value to an integer that may be positive or negative. In one embodiment, the third gain value may be left-shifted k1 = 10 bits. In other embodiments, the third gain value may be left-shifted k1 = 5 to k1 = 10 bits.

[0102] Diff = round(gain3*2) k1 (7)

[0103] Here, round() means rounding to the nearest integer. Some numbers in Diff may be positive, and some numbers in Diff may be negative.

[0104] Furthermore, as shown in equation (8), Diff is mapped to MDiff.

[0105]

[0106] After mapping, all Mdiff values ​​are non-negative integers. Through the above numerical transformation, the third gain gain3 can be transformed into a non-negative integer Mdiff.

[0107] The above numerical transformation process is just an example. Other numerical transformation methods can also be used to transform the third gain value gain3, which is close to 0 or close to 1, into a non-negative integer.

[0108] In step S1010, the third gain value of the numerical transformation can be Golomb encoded. That is, the non-negative integer Mdiff is encoded using Golomb encoding. As described above, the third gain value gain3 is close to the value 1 or the value 0. Therefore, in the transformed non-negative integer Mdiff, the probability of smaller values ​​appearing is much greater than the probability of larger values ​​appearing. Golomb encoding uses a shorter code length to encode smaller values ​​and a longer code length to encode larger values. The process of encoding the non-negative integer Mdiff using the Golomb encoding method is described in detail below.

[0109] Figure 11 This is a schematic diagram of Golomb encoding according to at least one embodiment of the present disclosure.

[0110] The non-negative integer Mdiff is Golomb encoded using an adjustment coefficient m = 2^k², which is a positive integer. The Golomb code consists of two parts: a unary code part and a binary code part. The unary code part consists of q zeros (or 1s), where q is the quotient of Mdiff divided by m. The binary code part r is the remainder of Mdiff divided by m, and r has k² bits. The unary code and the binary code are separated by a "1" (if the unary code part consists of q ones, a "0" can be used as a separator).

[0111] As an example, when Mdiff = 51 and k2 = 3, we can calculate m = 2^k2 = 8. Taking the remainder of Mdiff with respect to m, we get q = 6. Taking the quotient of Mdiff with respect to m, we get r = 3. Therefore, with Mdiff = 51 and k2 = 3, the Golomb code for Mdiff = 51 is as follows: Figure 11 As shown.

[0112] The value of k2 can significantly affect the compression ratio of Golomb encoding. A variable or fixed k2 can be chosen. According to embodiments of this disclosure, a high compression ratio can be achieved when the k2 value is fixed at 7, while avoiding the complex k2 calculation process. However, this is merely an example, and those skilled in the art can choose other k2 values.

[0113] In another embodiment, a finite-length Golomb coding method can be selected. In cases where Mdiff is much larger than m = 2^k², the conventional Golomb coding method described above may result in a very long encoding of Mdiff, leading to a large storage space requirement. With the finite-length Golomb coding method, when the value of q in the unary code portion exceeds the limit, the value of q can be fixed to LIMIT. The binary code portion r is the binary representation of Mdiff-1 (Mdiff minus 1), and the code length of r is the number of bits occupied by the maximum value of MDiff. By using the finite-length Golomb coding method, the gain value used in the trellis correction method can be further compressed, thereby occupying less storage space and further reducing OTP costs.

[0114] Specifically, in the compression method according to embodiments of this disclosure, LIMIT can be set to 10 while keeping k2 fixed at 7. With this configuration, a higher compression ratio can be achieved with a smaller computational load, thereby reducing the storage space occupied by the OTP.

[0115] Return now Figure 10 In step S1012, the third gain value of the Columbus code and the shadow correction parameters for shadow correction of the image using the reference shadow correction method can be stored. For simplicity, S1012 is referred to as... Figure 9 The same parts as those in S908 will not be described again. For example, the third gain value encoded by Columbus is stored in a lookup table.

[0116] Figure 12 This is another image processing method according to at least one embodiment of the present disclosure, the image processing method including a decompression method for lens shading correction. Figure 12 The decompression method for lens shadow correction in [the text] can be compared with... Figure 9 The compression method corresponds to this. The decompression method includes steps S1202, S1204, and S1206.

[0117] In step S1202, the third gain value of the nodes of the grid used for image partitioning in the grid shadow correction method and the shadow correction parameters for shadow correction of the image using a reference shadow correction method different from the grid shadow correction method can be read. For example, the third gain value of the grid and the shadow correction parameters can be read from the OTP. In one embodiment, grid-related information (e.g., grid size, number of grids, coordinates of grid nodes, or one or more of these) can also be obtained. A description of the third gain value of the grid and the shadow correction parameters can be found in [reference]. Figure 9 S904 to S908.

[0118] In step S1204, the second gain value of the mesh nodes can be obtained through the shadow correction parameters in the reference shadow correction method. The process of obtaining the second gain value of the mesh through the shadow correction parameters can be referred to... Figure 9 The S904 and S908 processes.

[0119] In step S1206, a first gain value for the nodes of the grid, which is decompressed relative to the third gain value, can be obtained by numerically calculating the third gain value and the second gain value, wherein the first gain value is used to perform shadow correction on the image in the grid shadow correction method. For example, by... Figure 9 The inverse operation of the operation in S906 can be used to obtain the result in Figure 9 The first gain value of the grid obtained by the grid correction method in S902.

[0120] Additional or alternative land, refer to Figure 12 The described method may also include lens shading correction of the image using a first gain value; however, this is not mandatory. For example, the obtained first gain value is organized as a lookup table. Various shading conditions (e.g., non-centrosymmetric shading) can be handled using the first gain value. For instance, when performing shading correction using a grid gain lookup table, the gain value of each pixel can be obtained through bilinear interpolation using the gain values ​​of each grid node to compensate for the brightness of the shading area. Note that the process of obtaining the decompressed, grid-node-specific first gain value and the process of performing lens shading correction of the image using the first gain value may or may not be performed on the same processing unit.

[0121] Figure 13 This is an image processing method according to at least one embodiment of the present disclosure, the image processing method including another decompression method for lens shading correction.

[0122] like Figure 13 As shown, Figure 13 The decompression method for lens shadow correction in [the text] can be compared with... Figure 10The compression method corresponds to this. The decompression method includes steps S1302, S1304, S1306, S1308, and S1310.

[0123] In step S1302, the third gain value of the nodes of the grid used for image partitioning in the grid shadow correction method and the shadow correction parameters for shadow correction of the image using a reference shadow correction method different from the grid shadow correction method can be read. The third gain value of the nodes of the grid used for image partitioning in the grid shadow correction method can be Columbus-coded. For example, the Columbus-coded third gain value and shadow correction parameters can be read from the OTP. In one embodiment, grid-related information (e.g., grid size, number of grids, coordinates of grid nodes, or one or more of these) can also be obtained. A description of the Columbus-coded third gain value and shadow correction parameters can be found in [reference needed]. Figure 10 S1008 and S1010.

[0124] Figure 13 S1304 and Figure 12 Similar to S1204, it will not be described again here.

[0125] In step S1306, the read third gain value can be Columbus decoded. For example, the Columbus-encoded third gain value can be decoded into an MDiff. This can be done using... Figure 10 The decoding process is performed by reversing the Columbus encoding process described in S1012. For the sake of brevity, the specific process of Columbus decoding will not be described further.

[0126] In step S1308, the decoded third gain value can be numerically transformed. For example, the decoded third gain value can be numerically transformed to obtain the third gain value of the nodes of the numerically transformed mesh. In one embodiment, the decoded third gain value MDiff can be inversely mapped to Diff, as shown in equation (9).

[0127]

[0128] Next, if the Diff is obtained through transformations using equations (6) and (8), it can be added to 2^k1 as shown in equation (10) to obtain the third gain value gain3 of the numerically transformed grid (for example, the third gain value gain3 of the numerically transformed grid can be the third gain value gain3 shifted left by k1 bits). The above numerical transformation process is merely an example; other numerical transformation methods can also be used to transform MDiff into the third gain value gain3 of the numerical transformation.

[0129] gain3 = Diff + 2 k1 (10)

[0130] Figure 13 Step S1310 and Figure 12 Step S1206 and similar parts will not be described again. For example, the obtained first gain value, which has been left-shifted by several bits, is organized in the form of a lookup table.

[0131] Additional or alternative land, refer to Figure 13 The described method may further include using the obtained first gain value shifted left by k1 bits to perform preliminary shadow correction on the image in the grid shadow correction method (e.g., multiplying the first gain value shifted left by k1 bits by the corresponding pixel value), and shifting the pixel values ​​of the image after preliminary shadow correction to the right by k1 bits to obtain the pixel values ​​of the image after final shadow correction; however, this is not necessary. Various shadow conditions (e.g., non-centrosymmetric shadows) can be handled using the obtained first gain value shifted left by k1 bits. For example, when performing shadow correction using a grid gain lookup table, the gain values ​​of each grid node can be used to obtain the gain values ​​of each pixel through bilinear interpolation to compensate for the brightness of the shadowed portion. Note that the process of obtaining the first gain value shifted left by k1 bits and the process of performing lens shadow correction on the image using the first gain value shifted left by k1 bits may or may not be performed on the same processing unit.

[0132] Figure 14 It is a decompressed image signal processing apparatus for lens shading correction according to at least one embodiment of the present disclosure.

[0133] The image signal processing device 1400 can be implemented as an image signal processor (ISP), for example, through hardware (e.g., integrated circuit IC), firmware (e.g., field-programmable gate array FPGA), software, or any combination thereof. For example, the image signal processor can be a digital signal processor (DSP), which can be installed in a camera, image sensor, or other device with image capture capabilities. The image signal processor 1400 can be configured to process the acquired front-end image.

[0134] For example, the image signal processor 1400 may include a third gain value acquisition unit 1402, a second gain value acquisition unit 1404, and a first gain value acquisition unit 1406.

[0135] The third gain value acquisition unit 1402 can be configured to read the third gain value of the node of the grid used for image division in the grid shadow correction method, as well as the shadow correction parameters used in the reference shadow correction method that performs shadow correction on the image, which is different from the grid shadow correction method.

[0136] The second gain value acquisition unit 1404 can be configured to obtain the second gain value of the nodes of the mesh through the shadow correction parameters in the reference shadow correction method.

[0137] The first gain value acquisition unit 1406 can be configured to obtain a first gain value for the nodes of the grid that is decompressed relative to the third gain value by performing numerical operations on the third gain value and the second gain value, wherein the first gain value is used to perform shadow correction on the image in the grid shadow correction method.

[0138] Additionally or alternatively, the image signal processor 1400 may also include a shadow correction unit. Figure 14 (Not shown in the image), the shadow correction unit is configured to perform shadow correction on the image using a first gain value in a grid shadow correction method to obtain a shadow-corrected image. However, the shadow correction unit is not required. For example, the shadow correction unit according to embodiments of this disclosure may or may not be included in the image signal processor 1400.

[0139] Similarly, the third gain value acquisition unit 1402, the second gain value acquisition unit 1404 and the first gain value acquisition unit 1406 can be implemented by hardware (e.g., IC), firmware (e.g., FPGA), software or any combination thereof.

[0140] At least one embodiment of this disclosure also provides an electronic device for image processing (e.g., compression or decompression for lens shading correction), such as an image sensor. For example, the electronic device includes the image processing apparatus of any embodiment.

[0141] For example, Figure 15 It is an electronic device for image processing (e.g., compression or decompression for lens shading correction) according to at least one embodiment of the present disclosure.

[0142] like Figure 15 As shown, the electronic device 1500 includes a processor 1510 and a memory 1520. The memory 1520 includes one or more computer program modules 1521. The one or more computer program modules 1521 are stored in the memory 1520 and can be configured to be read and executed by the processor 1510. The one or more computer program modules 1521 include instructions for performing the various methods described above according to at least one embodiment of the present disclosure. When executed by the processor 1510, they can perform one or more steps of the various methods described above according to at least one embodiment of the present disclosure and their additional aspects.

[0143] The memory 1520 and the processor 1510 can be interconnected via a bus system and / or other forms of connection mechanism (not shown). For example, the bus can be a Peripheral Component Interconnect Standard (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0144] For example, processor 1510 may be a central processing unit (CPU), a digital signal processor (DSP), a graphics processing unit (GPU), or other processing units with data processing capabilities and / or program execution capabilities, such as a field-programmable gate array (FPGA). Processor 1510 may be a general-purpose processor or a special-purpose processor, capable of controlling other components in electronic device 1500 to perform desired functions.

[0145] Exemplarily, memory 1520 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules 1521 may be stored on the computer-readable storage medium, and processor 1510 may run one or more computer program modules 1521 to implement various functions of electronic device 1500. Various application programs and various data, as well as various data used and / or generated by the application programs, may also be stored in the computer-readable storage medium.

[0146] For example, electronic device 1500 may also include input devices such as cameras, touchscreens, touchpads, keyboards, mice, webcams, microphones, accelerometers, and gyroscopes; output devices such as liquid crystal displays, speakers, and vibrators; storage devices such as magnetic tapes and hard disks (HDDs or SDDs); and communication devices such as network interface cards such as LAN cards and modems. The communication devices allow electronic device 1500 to communicate wirelessly or wiredly with other devices to exchange data and perform communication processing via networks such as the Internet. A drive is connected to the I / O interface as needed. Removable storage media, such as disks, optical disks, magneto-optical disks, and semiconductor memories, are installed on the drive as needed so that computer programs read from them can be installed into the storage device as required.

[0147] For example, the electronic device 1500 may further include a peripheral interface (not shown in the figure). This peripheral interface can be of various types, such as a USB interface, a Lightning interface, etc. The communication device can communicate wirelessly with networks and other devices, such as the Internet, intranets and / or wireless networks such as cellular telephone networks, wireless local area networks (LANs) and / or metropolitan area networks (MANs). Wireless communication can use any of a variety of communication standards, protocols, and technologies, including but not limited to Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Bluetooth, Wi-Fi (e.g., based on IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n standards), Voice over Internet Protocol (VoIP), Wi-MAX, protocols for email, instant messaging, and / or Short Message Service (SMS), or any other suitable communication protocol.

[0148] The electronic device 1500 may be, for example, a system-on-a-chip (SOC) or a device including the SOC. For instance, it can be any device such as a mobile phone, tablet computer, laptop computer, e-reader, game console, television, digital photo frame, navigator, home appliance, communication base station, industrial controller, server, etc., or any combination of data processing devices and hardware. The embodiments of this disclosure do not limit this. The specific functions and technical effects of the electronic device 1500 can be found in the foregoing description of various methods and additional aspects of the compression or decompression according to at least one embodiment of this disclosure, and will not be repeated here.

[0149] Figure 16 It is a non-transitory computer-readable storage medium according to at least one embodiment of the present disclosure.

[0150] like Figure 16 As shown, a non-transitory readable storage medium 1600 stores computer instructions 1610, which, when executed by a processor, perform one or more steps of the various methods and their additional aspects as described above.

[0151] For example, the non-temporarily readable storage medium 1600 may be any combination of one or more computer-readable storage media, such as a computer-readable storage medium containing program code for performing the various methods described above.

[0152] For example, when the program code is read by a computer, the computer can execute the program code stored in the computer storage medium to perform one or more steps of the various methods and additional aspects described above, such as those according to at least one embodiment of the present disclosure.

[0153] For example, the non-transitory readable storage medium may include a memory card of a smartphone, a storage component of a tablet computer, a hard disk of a personal computer, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), flash memory, and other non-transitory readable storage media or any combination thereof.

[0154] The text and accompanying drawings in this disclosure are provided by way of example only to aid in understanding this disclosure. They should not be construed as limiting the scope of this disclosure in any way. Although certain embodiments and examples have been provided, it will be apparent to those skilled in the art, based on the content disclosed herein, that changes can be made to the illustrated embodiments and examples without departing from the scope of this disclosure.

[0155] Although this disclosure has been described with reference to exemplary embodiments, various changes and modifications may be suggested to those skilled in the art. This disclosure is intended to cover such changes and modifications that fall within the scope of the appended claims.

[0156] Nothing described in this disclosure should be construed as implying that any particular element, step, or function is an essential element that must be included within the scope of the claims. The scope of the patent subject matter is defined only by the claims.

Claims

1. An image processing method, comprising: Multiple third gain values ​​of pixel values ​​of multiple nodes of the grid used for image division in the grid shadow correction method are read, along with shadow correction parameters for shadow correction of the pixel values ​​of the image using a reference shadow correction method different from the grid shadow correction method. In the reference shadow correction method, multiple second gain values ​​of pixel values ​​of multiple nodes of the mesh are obtained through the shadow correction parameters. By performing numerical operations on corresponding third gain values ​​among the plurality of third gain values ​​and corresponding second gain values ​​among the plurality of second gain values, a plurality of first gain values ​​are obtained relative to the plurality of third gain values, for the pixel values ​​of the plurality of nodes of the grid. The plurality of first gain values ​​are used to perform shadow correction on the pixel values ​​of the image in the grid shadow correction method. The multiple third gain values ​​read are then subjected to Columbus decoding. The decoded third gain values ​​are numerically transformed, and the numerically transformed third gain values ​​are used to perform the numerical operation with the multiple second gain values ​​to obtain the multiple first gain values.

2. The method according to claim 1, wherein, The reference shadow correction method includes polynomial fitting correction or concentric circle correction.

3. The method according to claim 2, wherein, The polynomial order of the polynomial fitting correction method is 2 to 3. The number of concentric circles in the concentric circle correction method is 6 to 36.

4. The method according to claim 1, wherein, The plurality of first gain values ​​include the corresponding first gain values ​​of the R channel, Gr channel, Gb channel, and B channel obtained respectively by the mesh shading correction method, and The shadow correction parameters include shadow correction parameters shared by the R channel, Gr channel, Gb channel and B channel.

5. The method according to claim 4, wherein, The shadow correction parameters include the optical center coordinates and one or more polynomial coefficients in the polynomial fitting correction method; or The shadow correction parameters include one or more of the following: the optical center coordinates, the radius of the concentric circles, and the corresponding gain values ​​in the concentric circle correction method.

6. The method according to claim 5, wherein, The decoded third gain values ​​are non-negative integers.

7. The method according to claim 6, wherein, The numerical transformation of the decoded multiple third gain values ​​includes: Map the non-negative integer to another integer. Add the first power of 2 to the other integer to obtain the sum. The process of obtaining the plurality of first gain values ​​includes obtaining a plurality of first gain values ​​shifted left by a first number of bits, and the plurality of first gain values ​​shifted left by a first number of bits are used to perform shadow correction on the image in the grid shadow correction method.

8. The method according to claim 6, wherein, The numerical transformation of the decoded multiple third gain values ​​includes: Map the non-negative integer to another integer. The process of obtaining the plurality of first gain values ​​includes obtaining a plurality of first gain values ​​shifted left by a first number of bits, and the plurality of first gain values ​​shifted left by a first number of bits are used to perform shadow correction on the image in the grid shadow correction method.

9. The method according to claim 6 or 7, wherein, The read third gain values ​​are non-negative integers encoded by Columbus.

10. The method according to claim 1, wherein, The adjustment factor for the Columbus decoding is a power of 2; The Columbus decoding includes finite-length Columbus decoding.

11. An image signal processing apparatus, comprising: The third gain value acquisition unit is configured to read multiple third gain values ​​of pixel values ​​of multiple nodes of the grid used for image division in the grid shadow correction method, and shadow correction parameters for shadow correction of pixel values ​​of the image using a reference shadow correction method different from the grid shadow correction method. The second gain value acquisition unit is configured to obtain multiple second gain values ​​of the pixel values ​​of multiple nodes of the grid in the reference shadow correction method using the shadow correction parameters. The first gain value acquisition unit is configured to obtain multiple first gain values ​​for the pixel values ​​of the multiple nodes of the grid, which are decompressed relative to the multiple third gain values, by performing numerical operations on corresponding third gain values ​​among the multiple third gain values ​​and corresponding second gain values ​​among the multiple second gain values; to perform Columbus decoding on the read multiple third gain values; to perform numerical transformation on the decoded multiple third gain values; and to use the numerically transformed multiple third gain values ​​to perform the numerical operation with the multiple second gain values ​​to obtain the multiple first gain values. The plurality of first gain values ​​are used to perform shadow correction on the pixel values ​​of the image in the grid shadow correction method.

12. An image processing method, comprising: Multiple first gain values ​​are obtained for the pixel values ​​of multiple nodes of the grid used for image partitioning in the grid shadow correction method. Multiple second gain values ​​are obtained for the pixel values ​​of multiple nodes of the grid using a reference shadow correction method different from the grid shadow correction method. By performing numerical operations on corresponding first gain values ​​among the plurality of first gain values ​​and corresponding second gain values ​​among the plurality of second gain values, a plurality of third gain values ​​that are compressed relative to the plurality of first gain values ​​are obtained. The plurality of third gain values ​​are numerically transformed. The plurality of third gain values ​​of the numerical transformation are then Golomb encoded. The storage includes the plurality of third gain values ​​encoded by Columbus and the shadow correction parameters for shadow correction of the pixel values ​​of the image using the reference shadow correction method.

13. An electronic device comprising, One or more processors; Memory, which stores one or more computer program modules; in, The one or more computer program modules are executed by the one or more processors to implement the method according to any one of claims 1-10 or claim 12.

14. A non-transitory computer-readable storage medium having stored thereon computer-executable instructions, in, When executed by a processor, the computer-executable instructions implement the method according to any one of claims 1-10 or claim 12.

Citation Information

Patent Citations

  • Image compression and decompression methods, readable medium and electronic equipment

    CN112135150A

  • Image correction method and device, electronic equipment and computer readable storage medium

    CN113747066A