RAW domain low illumination enhancement method for RCCB image sensor
By performing brightness contribution weighting processing based on RCCB format and dynamic adjustment of area division in the RAW image data stage, the problem of insufficient brightness and loss of details under low illumination conditions is solved, and the output of high-quality images is achieved.
Patent Information
- Application Number
- CN202510502687.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-22
AI Technical Summary
RCCB format RAW images face the problems of insufficient brightness and loss of details under low illumination conditions. The prior art low illumination enhancement methods are prone to introduce noise and artifacts during the processing process and damage image details.
By processing in the RAW image data stage, the first weight coefficient is allocated based on the brightness contribution of the RCCB format, weighted calculations are performed to generate the initial brightness value, combined with edge detection and texture complexity analysis, the image is divided into different regions, and the weight coefficient is dynamically adjusted, the brightness value is reweighted, and the gain adjustment is performed through the nonlinear gain function.
The brightness of the image is improved, the detailed information is retained, the noise is reduced, and the high-quality image is output, avoiding the loss of detail and the introduction of noise caused by the improvement of contrast and saturation in the prior art.
Smart Images

Figure CN120075627A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a RAW domain low illumination enhancement method for an RCCB image sensor. Background Art
[0002] With the rapid development of digital imaging technology, the performance of image sensors, as the core components of digital cameras, directly affects the quality and shooting effects of images. Among them, the RCCB (Red, Clear1, Clear2, Blue) image sensor, as a special color filter array (CFA) design, introduces two transparent channels (Clear1 and Clear2), which can provide richer spectral information and higher sensitivity in low-light environments compared to traditional RGB (Red, Green, Blue) sensors. However, RCCB format RAW images often face problems such as insufficient brightness and loss of details under low-light conditions, which puts higher requirements on subsequent image processing algorithms.
[0003] In the prior art, low-light enhancement methods for RCCB image sensors are mostly focused on the later stages of image processing, such as improving image quality by increasing image contrast and saturation or applying complex denoising algorithms. Although these methods can improve the visual effect of images to a certain extent, they often sacrifice image detail information and easily introduce additional noise and artifacts during the processing process.
[0004] Therefore, it is necessary to provide a RAW domain low-illumination enhancement method for RCCB image sensors to solve the above technical problems. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a RAW domain low-illumination enhancement method for RCCB image sensors, which makes full use of the characteristics of the RCCB format and performs targeted processing at the RAW image data stage, aiming to improve the brightness of the image, retain details and reduce noise, thereby outputting high-quality images. The present invention provides a RAW domain low illumination enhancement method for an RCCB image sensor, the method comprising the following steps: A first weight coefficient is allocated based on the brightness contribution of each channel of the RAW image in RCCB format, and an initial brightness value of each pixel is generated through weighted calculation; Identify the edge of the image by using an edge detection method, and divide the RAW image into an edge area, a texture area, and a smooth area in combination with a texture complexity analysis method; For each pixel point, dynamically adjust the preset first weight coefficient in combination with the area where the pixel point is located and the calculated pixel point features to obtain a second weight coefficient; Re - calculate the brightness values of each pixel point according to the second weight coefficient, and perform gain adjustment on the re - calculated brightness values through a preset non - linear gain function, and output the enhanced RAW image based on the brightness values after gain adjustment.
[0006] Preferably, the steps of obtaining the four - channel data of the RAW image in RCCB format, allocating the first weight coefficient according to the brightness contribution degree of each channel, and generating the initial brightness value of each pixel point through weighted calculation are specifically as follows: Based on the photoelectric response characteristics of the RCCB image sensor, calculate the brightness contribution degree ratios of the four channels respectively; Map the brightness contribution degree ratios of each channel to the first weight coefficient through normalization processing; Perform weighted calculation on the initial brightness value, where the calculation formula of the initial brightness value is: Among them, represents the initial brightness value, , , and are the original pixel values of the red channel, the first transparent channel, the second transparent channel, and the blue channel in the four channels respectively, , , and are the first weight coefficients corresponding to the red channel, the first transparent channel, the second transparent channel, and the blue channel respectively.
[0007] Preferably, the method of identifying the image edge by edge detection includes: Use the Sobel operator to process the RAW image, and calculate the gradient magnitude and direction of each pixel point; Apply threshold processing to the gradient magnitude, and mark the pixel points higher than the dynamic threshold as potential edge points, where the dynamic threshold is obtained through the gradient magnitude mean and the gradient magnitude standard deviation; Apply the non - maximum suppression method to refine the edge, and determine whether it belongs to a part of the edge by comparing each pixel with its neighbors in the gradient direction, and determine the edge region and the non - edge region.
[0008] Preferably, the method of dividing the RAW image into an edge region, a texture region, and a smooth region by combining the texture complexity analysis method includes: For the non - edge region, within a preset neighborhood range, extract the gray - level co - occurrence matrix along the four directions of horizontal, vertical, left diagonal, and right diagonal, and calculate the weighted sum of the squared gray - level differences of adjacent pixels in each direction respectively to obtain four contrast feature values; Normalize the contrast feature values in each direction, and take the average of the normalized results in four directions as the texture complexity of the current pixel; The area type is divided according to a preset first threshold and a preset second threshold, wherein a pixel point with a texture complexity greater than the preset first threshold is identified as a texture area, a pixel point with a texture complexity less than the preset second threshold is identified as a smooth area, and the preset second threshold is less than the preset first threshold.
[0009] Preferably, for each pixel point, dynamically adjusting the preset first weight coefficient in combination with the region where the pixel point is located and the calculated pixel point features to obtain the second weight coefficient includes: For the edge area, the weight adjustment of the red channel and the blue channel is set to the first weight coefficient times, and reduce the first weight coefficients of the two transparent channels respectively. ,in A preset scaling factor associated with edge strength; For the texture area, increase the first weight coefficients of the two transparent channels by , and reduce the first weight coefficients of the red channel and the blue channel by , where C is the local contrast, T is the texture complexity of the current pixel, and are preset proportional coefficients, and are the increments of the first weight coefficients of the red channel and the blue channel respectively, is the calculated local contrast maximum; For the smooth area, increase the first weight coefficients of the two transparent channels by , the first weight coefficients of the red channel and the blue channel are reduced respectively ,in is the brightness value of the current pixel, and is the preset brightness compensation coefficient, is the maximum brightness value of all pixels.
[0010] Preferably, the re-weighted calculation of the brightness value of each pixel point according to the second weight coefficient, and gain adjustment of the re-calculated brightness value by a preset nonlinear gain function, and outputting an enhanced RAW image based on the brightness value after the gain adjustment, comprises: Multiply the original pixel values of the red channel, the first transparent channel, the second transparent channel and the blue channel by the corresponding second weight coefficients respectively, and sum them up to obtain a new brightness value; Use the sigmoid function to adjust the gain of the new brightness value; Taking the brightness value after gain adjustment as a reference, re - allocate the pixel values of each channel and output the enhanced RAW image.
[0011] Compared with the related technologies, a RAW - domain low - light enhancement method for an RCCB image sensor provided by the present invention has the following beneficial effects: The present invention first allocates the first weight coefficient based on the brightness contribution of each channel of the RAW image in RCCB format, and generates the initial brightness value of each pixel point through weighted calculation.
[0012] Then, through the edge detection method and the texture complexity analysis method, the RAW image is divided into an edge region, a texture region, and a smooth region.
[0013] Then, for each pixel point, combining the region where it is located and the calculated pixel point features, dynamically adjust the preset first weight coefficient to obtain the second weight coefficient.
[0014] Finally, re - calculate the brightness value of each pixel point according to the second weight coefficient, and perform gain adjustment on the re - calculated brightness value through a preset non - linear gain function, and output the enhanced RAW image. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flowchart of a RAW - domain low - light enhancement method for an RCCB image sensor provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] The present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that, for the sake of description, only parts related to the present invention are shown in the drawings rather than all the structures. In addition, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0017] In addition, it should be noted that, for the sake of description, only parts related to the present invention are shown in the drawings rather than all the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, a function, a procedure, a subroutine, a sub - program, etc.
[0018] A RAW domain low-light enhancement method for RCCB image sensors, refer to Figure 1 as shown, including the following steps: S1: Based on the brightness contribution of each channel of the RAW image in RCCB format, allocate the first weight coefficient, and generate the initial brightness value of each pixel through weighted calculation.
[0019] Specifically, step S1 specifically includes the following steps: S11: Based on the photoelectric response characteristics of the RCCB image sensor, calculate the brightness contribution ratio of the four channels respectively.
[0020] In this embodiment, first, analyze the photoelectric response characteristics of each channel according to the physical characteristics of the RCCB image sensor. Due to the spectral transmittance limitation of the filter, the quantum efficiency of the red channel (R) and the blue channel (B) is usually lower than that of the transparent channels (C1, C2). Since the transparent channels do not have filters, they can capture light signals in a wider spectral range, so they have higher photosensitivity at low illuminance, but at the same time, they also introduce a higher noise level.
[0021] To quantify the contribution of each channel to brightness, dynamic calculation needs to be combined with the following parameters: Quantum efficiency: Obtain the quantum efficiency values of each channel in the visible light band through sensor calibration data. The quantum efficiency of the transparent channels is usually about 30%-50% higher than that of the red and blue channels.
[0022] Noise characteristics: Based on the dark current test data, analyze the readout noise and shot noise levels of each channel. The noise variance of the transparent channels is usually 1.5-2 times that of the red and blue channels.
[0023] Dynamic range: Determine its linear response interval by measuring the maximum saturated charge capacity of each channel.
[0024] Combining the above parameters, the calculation method of the brightness contribution ratio is: For the red and blue channels, calculate the basic contribution according to the product of their quantum efficiency and dynamic range; For the transparent channels, introduce a noise suppression factor (reciprocal of the noise variance) in the calculation of the basic contribution to reduce the weight of the high-noise area; Through experimental calibration, determine the final brightness contribution ratio of each channel.
[0025] S12: Map the brightness contribution ratio of each channel to the first weight coefficient through normalization processing.
[0026] In this embodiment, normalize the calculated brightness contribution ratio of each channel to ensure that the sum of the four-channel weight coefficients is 1. The specific operations include: Dynamic range compensation: For high-dynamic range scenes, if the pixel values of the red and blue channels are close to the saturation threshold, their contribution weights are proportionally reduced to prevent highlight overflow.
[0027] Noise adaptive adjustment: In low-light regions (such as when the pixel value is less than 5% of the full well capacity), an attenuation coefficient is applied to the transparency channel weight (such as for each 1-unit increase in the noise variance, the weight is reduced by 0.5%) to suppress the noise amplification effect.
[0028] Normalization calculation: Divide the adjusted contribution values of each channel by the sum to obtain the normalized weight coefficients.
[0029] S13: Calculate the initial luminance value by weighting, where the calculation formula for the initial luminance value is: where, represents the initial luminance value, 、 、 and are the original pixel values of the red channel, the first transparency channel, the second transparency channel, and the blue channel in the four channels respectively, 、 、 and are the first weight coefficients corresponding to the red channel, the first transparency channel, the second transparency channel, and the blue channel respectively.
[0030] In this embodiment, based on the normalized first weight coefficients, the four-channel original data of each pixel is weighted and fused. Specifically: Pixel value preprocessing: Perform black level correction and defective pixel repair on the original RAW data to eliminate the influence of the sensor's inherent noise.
[0031] Channel alignment processing: Since the pixel density of the transparency channels in the RCCB array is twice that of the red and blue channels, bilinear interpolation downsampling is required for the transparency channel data to align it with the pixel grid of the red and blue channels.
[0032] Weighted calculation: For each pixel point, multiply the pixel values of its corresponding red channel (R), the downsampled transparency channels (C1, C2), and the blue channel (B) by the obtained first weight coefficients, and then add the products of the four to obtain the initial luminance value.
[0033] In addition, the calculation result needs to be limited within the bit width range of the sensor's original data to avoid calculation overflow.
[0034] S2: Identify the image edges through edge detection methods, and divide the RAW image into edge regions, texture regions, and smooth regions in combination with texture complexity analysis methods.
[0035] Specifically, identifying the image edge through the edge detection method includes: First, use the Sobel operator to process the RAW image and calculate the gradient magnitude and direction of each pixel point.
[0036] In this embodiment, the image is convolved separately by the Sobel operator kernels in the horizontal and vertical directions to calculate the gradient components of each pixel point in the horizontal and vertical directions. The operator kernel in the horizontal direction highlights the left and right edges, and the operator kernel in the vertical direction strengthens the upper and lower edges. Combine the gradient components in the two directions, calculate the gradient magnitude of each pixel point, and determine the main direction of the gradient through the arctangent function, quantizing it to four main directions of 0°, 45°, 90°, and 135°.
[0037] Second, apply threshold processing to the gradient magnitude, and mark the pixel points higher than the dynamic threshold as potential edge points, where the dynamic threshold is obtained through the mean and standard deviation of the gradient magnitude.
[0038] In this embodiment, based on the statistical characteristics of the gradient magnitude of the entire image, calculate its mean and standard deviation, and dynamically set the edge detection threshold. The specific threshold is composed of the mean plus twice the standard deviation. This method can effectively distinguish real edges from noise and retain more than 95% of the effective edge points. The pixels whose gradient magnitude exceeds the threshold are marked as candidate edge points.
[0039] Finally, apply the non-maximum suppression method to refine the edge, and determine whether it belongs to a part of the edge by comparing each pixel with its neighbors in the gradient direction, determining the edge region and the non-edge region.
[0040] In this embodiment, to eliminate the redundant response in edge detection, along the gradient main direction of each candidate edge point, compare its gradient magnitude with that of adjacent pixels. Only retain the pixel points with the largest local gradient magnitude, suppress the non-maximum points, so as to obtain an edge line with a single-pixel width. Subsequently, fill the edge break regions through morphological closing operations, and use the line detection algorithm to connect the longer broken edges to ensure edge continuity.
[0041] Finally, uniformly classify the finally retained edge pixels and their neighborhood within the range of 3×3 pixels around them as the edge region, and mark the rest as the non-edge region, providing a basis for subsequent texture analysis.
[0042] Specifically, dividing the RAW image into an edge region, a texture region, and a smooth region in combination with the texture complexity analysis method includes: First, for the non-edge region, within the preset neighborhood range, extract the gray-level co-occurrence matrix in four directions of horizontal, vertical, left diagonal, and right diagonal, and calculate the weighted sum of the squared gray-level differences of adjacent pixels in each direction to obtain four contrast feature values.
[0043] In this embodiment, within the non-edge region, centered on each pixel, the pixel data of a 5×5 neighborhood window is extracted. Along the four directions of horizontal, vertical, left diagonal, and right diagonal, the co-occurrence frequency of pixel gray values within the neighborhood is statistically calculated to generate gray-level co-occurrence matrices in the four directions. To reduce the computational complexity, the 12-bit original data is linearly compressed to 16 levels of gray.
[0044] Secondly, the contrast feature values in each direction are normalized, and the average value of the normalized results in the four directions is taken as the texture complexity of the current pixel.
[0045] In this embodiment, for the gray-level co-occurrence matrix in each direction, the contrast feature value is calculated. The contrast is quantified by the weighted sum of the squares of the pixel gray differences, reflecting the sharpness of the local texture. After the contrast values in the four directions are respectively normalized to the interval from 0 to 1, their average value is taken as the texture complexity index of the current pixel. The higher the value of this index, the richer the texture details.
[0046] Finally, the region types are divided according to a preset first threshold and a preset second threshold. Among them, the pixel points with texture complexity greater than the preset first threshold are identified as texture regions, and the pixel points with texture complexity less than the preset second threshold are identified as smooth regions, and the preset second threshold is less than the preset first threshold.
[0047] In this embodiment, the preset first threshold and the preset second threshold are set in advance (for example, the preset first threshold is 0.7 and the preset second threshold is 0.3) to classify the texture complexity: Texture region: The region with complexity higher than 0.7, such as regions with rich details like leaves or fabrics; Smooth region: The region with complexity lower than 0.3, such as uniform regions like the sky or a solid-color background; Intermediate region: The complexity is between 0.3 and 0.7, and it is classified as a smooth region to preferentially suppress noise.
[0048] If a certain pixel is marked as both an edge and a texture region at the same time, the edge region is taken as the final classification to ensure the integrity of the edge.
[0049] S3: For each pixel point, in combination with the region where it is located and the calculated pixel point features, the preset first weight coefficient is dynamically adjusted to obtain a second weight coefficient.
[0050] Specifically, step S3 specifically includes the following steps: For the edge region, the weight adjustment amount of the red channel and the blue channel is set to times the first weight coefficient, and the first weight coefficients of the two transparent channels are respectively reduced by , where is a preset proportionality coefficient associated with edge intensity.
[0051] In this embodiment, in step S2, the gradient magnitude of each pixel has been calculated through the Sobel operator, and this value reflects the intensity of the edge.
[0052] Calculate the mean and standard deviation of the gradient magnitude of the entire image, and use the mean plus twice the standard deviation as the threshold to distinguish strong edges and weak edges.
[0053] Determine the proportionality coefficient related to edge intensity , specifically including: Set a minimum value and a maximum value , and these two values can be adjusted according to the actual application requirements. For example, can be set to 0.1, indicating that a certain enhancement effect should be retained even at weak edges; can be set to 0.5, indicating the maximum enhancement effect at strong edges.
[0054] For each pixel, according to the magnitude of its edge intensity, it is proportionally mapped to and If the edge intensity is closer to the maximum value in the entire image, then is closer to ; if the edge intensity is closer to the minimum value, then is closer to .
[0055] Use to calculate the weight reduction amount of the transparency channel. Specifically, the reduction amount of the transparency channel is the average of the first weight coefficients of the red channel and the blue channel multiplied by .
[0056] Adjust the weights of each channel: Increase the weights of the red channel and the blue channel by a certain proportion (determined by ), and at the same time, reduce the weights of the two transparency channels by the corresponding reduction amounts.
[0057] For the texture area, increase the first weight coefficients of the two transparency channels by , and reduce the first weight coefficients of the red channel and the blue channel by , where C is the local contrast, T is the texture complexity of the current pixel, and are respectively preset proportionality coefficients, and are respectively the increments of the first weight coefficients of the red channel and the blue channel, is the maximum value of the calculated local contrast.
[0058] In this embodiment, calculate the local contrast and texture complexity: The local contrast is calculated through the gray-level co-occurrence matrix, reflecting the degree of light and dark changes within the current area. The average value of the contrast eigenvalue in four directions is taken to represent the local contrast.
[0059] The texture complexity is a normalized index, ranging from 0 to 1, and the larger the value, the more complex the texture.
[0060] Determine the proportionality coefficient and : Initialize two proportionality coefficients and . For example, , which is used to control the enhancement of the transparency channel; , which is used to control the weakening of the red and blue channels.
[0061] Adjust the weight increment of the transparency channel: Calculate the weight increment of the transparency channel according to the magnitude of the local contrast. When the local contrast is low, increase the weight of the transparency channel more; when the local contrast is high, increase it less.
[0062] Adjust the weight decrement of the red and blue channels: Calculate the weight decrement of the red channel and the blue channel according to the magnitude of the texture complexity. The more complex the texture, the more the weight is reduced.
[0063] Adjust the weights of each channel: Increase the weights of the two transparency channels by the corresponding increments respectively, and decrease the weights of the red channel and the blue channel by the corresponding decrements respectively.
[0064] For smooth regions, increase the first weight coefficients of the two transparency channels by respectively, and decrease the first weight coefficients of the red channel and the blue channel by respectively, where is the brightness value of the current pixel point, and are preset brightness compensation coefficients, is the maximum brightness value among all pixel points.
[0065] In this embodiment, determine the brightness compensation coefficients and : Initialize two proportionality coefficients and . For example, , which is used to control the enhancement of the transparency channel; , which is used to control the weakening of the red and blue channels.
[0066] Calculate the weight increment of the transparency channel : Calculate the weight increment of the transparency channel according to the brightness value of the current pixel. The lower the brightness, the more the weight increases; the higher the brightness, the less the weight increases.
[0067] Calculate the weight decrement of the red and blue channels: According to the brightness value of the current pixel, calculate the weight decrement of the red channel and the blue channel, that is . The lower the brightness, the less the weight decreases; the higher the brightness, the more the weight decreases.
[0068] Adjust the weights of each channel: Increase the weights of the two transparency channels by the corresponding increments respectively, and decrease the weights of the red channel and the blue channel by the corresponding decrements respectively.
[0069] S4: Re-weight and calculate the brightness value of each pixel according to the second weight coefficient, and perform gain adjustment on the recalculated brightness value through a preset non-linear gain function, and output the enhanced RAW image based on the brightness value after gain adjustment.
[0070] Specifically, step S4 specifically includes the following steps: S41: Multiply the original pixel values of the red channel, the first transparency channel, the second transparency channel, and the blue channel by the corresponding second weight coefficients respectively, and sum them to obtain a new brightness value.
[0071] In this embodiment, for each pixel, extract the original pixel values of its red channel, the first transparency channel, the second transparency channel, and the blue channel respectively. These values are usually RAW data stored with a 12-bit or higher bit width.
[0072] Multiply the original pixel value of each channel by its corresponding second weight coefficient. For example, for the red channel, multiply its original pixel value by the second weight coefficient of the red channel; for the two transparency channels, multiply by their respective second weight coefficients respectively; for the blue channel, also multiply by the second weight coefficient of the blue channel.
[0073] Add the weighted results of the four channels to obtain the new brightness value of this pixel. This new brightness value is the result of comprehensively considering the contribution degrees of each channel and the regional characteristics.
[0074] S42: Use the sigmoid function to perform gain adjustment on the new brightness value.
[0075] In this embodiment, in order to further improve the visual effect of the image, especially the detail performance in the low illumination area, it is necessary to perform non-linear gain adjustment on the new brightness value. Here, the Sigmoid function is used to achieve the gain adjustment. Its characteristic is that it can provide a higher gain when the input value is low, and gradually saturate when the input value is high, so as to achieve the effect of dynamic range compression and contrast enhancement. The specific implementation process is as follows: First, set the form of the Sigmoid function as , where: is the new input brightness value; is the gain control parameter used to adjust the steepness of the curve; is the offset parameter used to adjust the center position of the curve.
[0076] According to the results of experimental calibration, select appropriate and values.
[0077] Substitute the new brightness value of each pixel point into the Sigmoid function to calculate its brightness value after gain adjustment. Since the output range of the Sigmoid function is from 0 to 1, it is necessary to map it back to the original data bit width range.
[0078] During the mapping process, a scaling factor A can be introduced so that the final output value satisfies . The scaling factor A can be determined through experimental calibration to ensure a reasonable overall brightness distribution of the image.
[0079] S43: Use the brightness value after gain adjustment as a reference to reallocate the pixel values of each channel and output the enhanced RAW image.
[0080] In this embodiment, after completing the gain adjustment of the brightness value, it is necessary to use the adjusted brightness value as a reference to reallocate the pixel values of each channel to generate the enhanced RAW image. The specific implementation process is as follows: For each pixel point, first calculate the difference between its brightness value after gain adjustment and the original brightness value. This difference reflects the impact of gain adjustment on brightness.
[0081] Allocate this difference proportionally to the four channels. The specific allocation ratio can be adjusted according to the second weight coefficient of each channel. For example, if a certain channel has a larger weight, more difference will be allocated to that channel.
[0082] Update the pixel value of each channel to reflect the brightness change after gain adjustment. It should be noted that during the update process, it is necessary to ensure that the pixel values of each channel remain within the original data bit width range.
[0083] Finally, merge the updated four-channel data of all pixel points to generate the enhanced RAW image. The image at this time has higher detail clarity in the low illuminance area and retains good color fidelity in the high brightness area.
[0084] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of flows and / or blocks in the flowchart and / or block diagram can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate means for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0085] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.
[0086] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent in such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the element.
Claims
1. A RAW domain low illumination enhancement method for RCCB image sensor, characterized in that: The method comprises the following steps: A first weight coefficient is allocated based on the brightness contribution of each channel of the RAW image in RCCB format, and an initial brightness value of each pixel is generated through weighted calculation; Identify the edge of the image by using an edge detection method, and divide the RAW image into an edge area, a texture area, and a smooth area in combination with a texture complexity analysis method; For each pixel point, dynamically adjust the preset first weight coefficient in combination with the area where the pixel point is located and the calculated pixel point features to obtain a second weight coefficient; The brightness value of each pixel is re-weighted and calculated according to the second weight coefficient, and the re-calculated brightness value is gain-adjusted by a preset nonlinear gain function, and an enhanced RAW image is output based on the brightness value after gain adjustment.
2. A RAW domain low illumination enhancement method for RCCB image sensor according to claim 1, characterized in that: The method of acquiring four-channel data of a RAW image in RCCB format, allocating a first weight coefficient according to the brightness contribution of each channel, and generating an initial brightness value of each pixel by weighted calculation specifically includes the following steps: Based on the photoelectric response characteristics of the RCCB image sensor, the brightness contribution ratios of the four channels are calculated respectively; Mapping the brightness contribution ratio of each channel to a first weight coefficient through normalization processing; The initial brightness value is calculated by weighted calculation, wherein the calculation formula of the initial brightness value is: in, represents the initial brightness value, , , and are the original pixel values of the red channel, the first transparent channel, the second transparent channel, and the blue channel in the four channels, , , and They are the first weight coefficients corresponding to the red channel, the first transparent channel, the second transparent channel and the blue channel respectively.
3. A RAW domain low illumination enhancement method for RCCB image sensor according to claim 2, characterized in that: The identifying the edge of the image by the edge detection method comprises: The RAW image is processed using a Sobel operator to calculate the gradient magnitude and direction of each pixel; Applying threshold processing to the gradient magnitude, marking pixels above a dynamic threshold as potential edge points, wherein the dynamic threshold is obtained by the mean value of the gradient magnitude and the standard deviation of the gradient magnitude; The non-maximum suppression method is applied to refine the edge, and the edge area and non-edge area are determined by comparing each pixel with its neighbors in the gradient direction to determine whether it is part of the edge.
4. The RAW domain low illumination enhancement method for RCCB image sensor according to claim 3, characterized in that: The method of combining the texture complexity analysis method to divide the RAW image into an edge area, a texture area and a smooth area includes: For non-edge areas, within the preset neighborhood, the grayscale co-occurrence matrix is extracted along the horizontal, vertical, left diagonal and right diagonal directions, and the weighted sum of the grayscale differences of adjacent pixels in each direction is calculated to obtain four contrast eigenvalues; Normalize the contrast feature values in each direction, and take the average of the normalized results in four directions as the texture complexity of the current pixel; The area type is divided according to a preset first threshold and a preset second threshold, wherein a pixel point with a texture complexity greater than the preset first threshold is identified as a texture area, a pixel point with a texture complexity less than the preset second threshold is identified as a smooth area, and the preset second threshold is less than the preset first threshold.
5. A RAW domain low illumination enhancement method for RCCB image sensor according to claim 4, characterized in that: The step of dynamically adjusting the preset first weight coefficient for each pixel point in combination with the region where the pixel point is located and the calculated pixel point features to obtain the second weight coefficient includes: For the edge area, the weight adjustment of the red channel and the blue channel is set to the first weight coefficient. times, and reduce the first weight coefficients of the two transparent channels respectively. ,in A preset scaling factor associated with edge strength; For the texture area, increase the first weight coefficients of the two transparent channels by , and reduce the first weight coefficients of the red channel and the blue channel by , where C is the local contrast, T is the texture complexity of the current pixel, and are preset proportional coefficients, and are the increments of the first weight coefficients of the red channel and the blue channel respectively, is the calculated local contrast maximum; For the smooth area, increase the first weight coefficients of the two transparent channels by , the first weight coefficients of the red channel and the blue channel are reduced respectively ,in is the brightness value of the current pixel, and is the preset brightness compensation coefficient, is the maximum brightness value of all pixels.
6. A RAW domain low illumination enhancement method for RCCB image sensor according to claim 5, characterized in that: The step of re-weighting and calculating the brightness value of each pixel point according to the second weight coefficient, performing gain adjustment on the re-calculated brightness value by a preset nonlinear gain function, and outputting an enhanced RAW image based on the brightness value after the gain adjustment includes: Multiply the original pixel values of the red channel, the first transparent channel, the second transparent channel and the blue channel by the corresponding second weight coefficients respectively, and sum them up to obtain a new brightness value; Use the sigmoid function to adjust the gain of the new brightness value; The brightness value after gain adjustment is used as a reference to redistribute the pixel values of each channel and output the enhanced RAW image.
Citation Information
Patent Citations
Image processing method and device, equipment and storage medium
CN113902644A
Denoising device and method for raw image based on Bayer format
CN114519676A
Method for fusing low-illumination camera image and infrared image
CN118195921A
Method for reducing image noise
KR1020100052185A
Edge-enhancement device and edge-enhancement method
US20090016635A1