Image sensor, image processing method, device and system

By adjusting the proportion of W pixels and color pixels in the RGBW image sensor and performing image processing, the problem of poor resolution and color effects of the RGBW image sensor in the existing technology is solved, and better image resolution and color are achieved. Effect.

CN118590776APending Publication Date: 2024-09-03BRIGATES MICROELECTRONICS (KUNSHAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410711395.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Although existing RGBW image sensors can improve sensitivity under low illumination, there is still room for improvement in resolution and color effects, especially poor resolution performance caused by an excessively high proportion of W pixels.

Method used

The proportion of W pixels in the RGBW color filter array is designed to be 5/8, and the proportions of R, G, and B pixels are all 1/8. The W pixel interpolation sequence at the color pixel position is determined through image processing methods, and the W channel image is calculated. , and perform demosaic processing on each color channel based on the complete W channel image to obtain an RGB image.

Benefits of technology

The resolution capability and color interpolation effect of the W channel are improved, the resolution and color effects of the image are balanced, and the overall image quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590776A
    Figure CN118590776A
Patent Text Reader

Abstract

The invention discloses an image sensor, an image processing method, an image processing device and an image processing system, the image sensor comprises an RGBW color filter array, the ratio of W pixels in the RGBW color filter array is 5 / 8, and the ratio of R, G and B pixels in the RGBW color filter array is 1 / 8. The method for processing the image acquired based on the image transmission sensor comprises the following steps: acquiring an original mosaic image shot by using the image sensor; determining a channel sequence for inserting W pixel values at R, G and B color pixel positions in the original mosaic image; sequentially calculating W pixel interpolations at the positions of the three color pixels in the original mosaic image according to the determined channel sequence, and inserting the corresponding W pixel interpolations to obtain a complete W channel image; and demosaicing each color channel based on the complete W channel image to obtain an RGB image. The image sensor provided by the invention can better balance the color interpolation effect and the resolution capability of the W channel, so that the image has better resolution and color effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image sensor, an image processing method and a device. Background Art

[0002] Color image sensors install color filters on pixels and arrange them into a color filter array (CFA) according to certain rules to achieve color imaging. In order to achieve color imaging under low illumination, the existing technology adds transparent color filters (W) to the image sensor to form an RGBW color filter array. The RGBW image sensor replaces some R / G / B pixels in the CFA with W (white / colorless) pixels to form a unique RGBW array.

[0003] Since W pixels can transmit R, G, B, and near-infrared bands, they can increase the number of photons entering the pixel and improve the signal-to-noise ratio of the image. Compared with ordinary sensors, RGBW sensors have absolute advantages, not only can they improve sensitivity, but also can avoid color cast problems.

[0004] In the existing RGBW image sensor array, W pixels account for 50%. Figure 1 , which is a schematic diagram of pixels in the existing RGBW image sensor color filter array with W pixels accounting for 50%. Although the solution with W pixels accounting for 50% can achieve better color effects, the resolution performance is poor and the image effect needs to be improved. Summary of the invention

[0005] The embodiments of the present invention provide an image sensor, an image processing method and an image processing device to balance the color interpolation effect and the resolution capability of the W channel, so that the image has both good resolution and color effect.

[0006] On the one hand, an embodiment of the present invention provides an image sensor, comprising: an RGBW color filter array, wherein W pixels account for 5 / 8, and R, G, and B pixels account for 1 / 8 respectively.

[0007] Optionally, pixels in the RGBW color filter array are arranged in a period of 4×4.

[0008] Optionally, the W pixel color filter can transmit light in the visible to near infrared wavelength range.

[0009] Optionally, the R pixel filter can transmit light within a red wavelength range; the B pixel filter can transmit light within a blue wavelength range; and the G pixel filter can transmit light within a green wavelength range.

[0010] On the other hand, an embodiment of the present invention further provides an image processing method for processing an image acquired by the above-mentioned image transmission sensor, the method comprising:

[0011] Acquire an original mosaic image captured by the image sensor;

[0012] Determine the channel order of inserting W pixel values ​​at the positions of three color pixels R, G, and B in the original mosaic image;

[0013] Calculating W pixel interpolation values ​​at the three color pixel positions in the original mosaic image in sequence according to the determined channel order, and inserting the corresponding W pixel interpolation values ​​to obtain a complete W channel image;

[0014] Based on the complete W channel image, each color channel is demosaiced to obtain an RGB image.

[0015] Optionally, determining the order of inserting W pixel values ​​at the positions of three color pixels R, G, and B in the original mosaic image comprises:

[0016] Counting the number of W pixels around the three color pixels of R, G, and B in the original mosaic image;

[0017] The order of inserting W pixel values ​​at the positions of the three color pixels R, G, and B is determined from large to small according to the number of W pixels.

[0018] Optionally, the calculating interpolation values ​​at the three color pixel positions in the original mosaic image includes:

[0019] Determine the color pixel position to be interpolated;

[0020] Calculate the difference between the maximum value and the minimum value of W pixels around the color pixel;

[0021] If the difference is less than a first threshold, calculating an interpolation value according to W pixel values ​​around the color pixel;

[0022] Otherwise, the horizontal gradient and the vertical gradient around the color pixel are calculated, and the interpolation value is determined according to the gradient calculation result.

[0023] Optionally, determining the interpolation value according to the gradient calculation result includes:

[0024] If the difference between the horizontal gradient and the vertical gradient is greater than the second threshold, and the smaller gradient value is less than the third threshold, the interpolation is calculated based on the W pixel values ​​adjacent to the direction of the smaller gradient value;

[0025] Otherwise, the interpolated value is calculated based on the surrounding W pixel values ​​in the vertical and horizontal directions.

[0026] Optionally, based on the complete W channel image, demosaicing each color channel to obtain an RGB image includes:

[0027] Perform pixel-by-pixel subtraction processing on the original mosaic image and the complete W-pixel image to obtain a slowly varying mosaic image;

[0028] Performing interpolation processing on each color channel of the slowly varying mosaic image to obtain a slowly varying color channel image;

[0029] The slowly varying color channel image and the complete W channel image are added pixel by pixel to obtain an RGB image.

[0030] Optionally, based on the complete W channel image, demosaicing each color channel to obtain an RGB image includes:

[0031] Downsampling the color channels in the original mosaic image by a factor of 2 to obtain a color downsampled image; downsampling the complete W channel image by a factor of 2 corresponding to the pixel position in the color downsampled image to obtain a W channel downsampled image;

[0032] Performing interpolation processing on the color down-sampled image according to the W channel down-sampled image to obtain an interpolated color down-sampled image;

[0033] Performing upsampling of the interpolated color downsampled image by a factor of 2 along the horizontal axis or the vertical axis to obtain a first color upsampled image; performing sampling of the complete W channel image aligned with the pixel position in the first color upsampled image to obtain a first reference sampled image; performing interpolation processing on the first color upsampled image based on the value of the W pixel in the first reference sampled image to obtain a first color channel image;

[0034] The first color channel image is upsampled by a factor of 2 along the longitudinal or transverse direction to obtain a second color upsampled image; the complete W channel image is sampled to align with the pixel position in the second color upsampled image to obtain a second reference sampled image; and the second color upsampled image is interpolated based on the value of the W pixel in the second reference sampled image to obtain a complete color channel image.

[0035] Optionally, the proportion of color pixels in the color down-sampled image is 1 / 2, and the proportion of color pixels in the color up-sampled image is 1 / 2.

[0036] Optionally, based on the complete W channel image, demosaicing each color channel to obtain an RGB image includes:

[0037] For each color channel, based on the complete W channel image, the color channel pixels at different color pixel positions are first interpolated, and then the color channel pixels at white pixel positions are interpolated to obtain the color channel image.

[0038] Optionally, interpolating color channel pixels includes:

[0039] Calculate the low-frequency information of the pixel to be interpolated according to the values ​​of the color pixels around the pixel to be interpolated;

[0040] Calculate the difference information of the pixel to be interpolated based on W pixels around the pixel to be interpolated;

[0041] An interpolation value of the pixel to be interpolated is calculated according to the low-frequency information and the difference information.

[0042] Optionally, calculating the difference information of the pixel to be interpolated according to W pixels around the pixel to be interpolated includes:

[0043] Calculate the mean of W pixels around the pixel to be interpolated;

[0044] The difference between the mean value and the W pixel value at the center of the pixel to be interpolated is used as the difference information of the pixel to be interpolated.

[0045] Optionally, the method further comprises:

[0046] Convert the RGB image into a color space with brightness and color separated to obtain a brightness channel image and two color channel images;

[0047] Using the W channel image to perform noise reduction processing on the brightness channel image;

[0048] The denoised brightness channel image and the two color channel images are converted into RGB images.

[0049] Optionally, the using the W channel image to perform noise reduction processing on the brightness channel image includes: using the W channel image as a guide image and performing guided filtering on the brightness channel image.

[0050] Optionally, the performing noise reduction processing on the brightness channel image by using the W channel image includes: fusing the brightness channel image with the W channel image.

[0051] On the other hand, an embodiment of the present invention further provides an image processing device for processing an image acquired by the above-mentioned image transmission sensor, the device comprising:

[0052] An image acquisition module, used to acquire an original mosaic image captured by the image sensor;

[0053] A sequence determination module, used to determine the channel sequence of inserting W pixel values ​​at the positions of three color pixels R, G, and B in the original mosaic image;

[0054] A W channel interpolation module, used for sequentially calculating W pixel interpolation values ​​at the three color pixel positions in the original mosaic image according to a determined channel order, and inserting corresponding W pixel interpolation values ​​to obtain a complete W channel image;

[0055] The color channel interpolation module is used to demosaic each color channel based on the complete W channel image to obtain an RGB image.

[0056] On the other hand, an embodiment of the present invention further provides an image processing system, the system comprising: the above-mentioned image sensor, and an image processing device;

[0057] The image sensor is used to generate an original mosaic image;

[0058] The image processing device is used to demosaic the original mosaic image to obtain an RGB image.

[0059] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned image processing method are executed.

[0060] On the other hand, an embodiment of the present invention further provides an image processing device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the steps of the aforementioned image processing method when running the computer program.

[0061] The image sensor provided by the embodiment of the present invention is designed to have W pixels in the RGBW color filter array account for 5 / 8, and R, G, and B pixels account for 1 / 8. For the original mosaic image obtained by the image sensor with this structure, the image processing method, device, and system provided by the embodiment of the present invention, when processing the original mosaic image, first determine the channel order of inserting W pixel values ​​at the three color pixel positions of R, G, and B in the original mosaic image; calculate the W pixel interpolation values ​​at the three color pixel positions in the original mosaic image in turn according to the determined channel order, and insert the corresponding W pixel interpolation values ​​to obtain a complete W channel image; then, based on the complete W channel image, demosaic each color channel to obtain an RGB image. Using the scheme of the present invention, the resolution capability of the W channel can be improved, and by making full use of the resolution capability of the W channel, a better color interpolation effect can be obtained, thereby balancing and ensuring the overall effect of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The accompanying drawings are used to provide a clearer understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0063] Figure 1 It is a schematic diagram of pixels in the existing RGBW image sensor color filter array in which W pixels account for 50%;

[0064] Figure 2 Schematic diagram of an arrangement of pixels in a color filter array of an RGBW image sensor provided by an embodiment of the present invention;

[0065] Figure 3 Schematic diagram of another pixel arrangement manner of pixels in a color filter array of an RGBW image sensor provided by an embodiment of the present invention;

[0066] Figure 4 Schematic diagram of another pixel arrangement manner of pixels in a color filter array of an RGBW image sensor provided by an embodiment of the present invention;

[0067] Figure 5 is a flow chart of an image processing method provided by an embodiment of the present invention;

[0068] Figure 6 is a flowchart of W pixel interpolation for determining a color pixel position in an embodiment of the present invention;

[0069] Figure 7 yes Figure 2 A schematic diagram of a pixel to be interpolated in the W channel at an R pixel in the pixel array shown;

[0070] Figure 8 yes Figure 2 Schematic diagram of a pixel to be interpolated in channel W at pixel G in the pixel array shown;

[0071] Fig. 9 It is a schematic diagram of determining the gradient direction based on W pixels within a distance range of 2 pixel units around R0;

[0072] Fig.10 It is a schematic diagram comparing the de-mosaicing effect of W pixels with a W pixel ratio of 62.5% using the solution of the present invention with the de-mosaicing effect of the existing 50% W pixels;

[0073] Fig.11 is a flow chart of a method for demosaicing a color channel in an embodiment of the present invention;

[0074] Fig.12 is a flow chart of another method for demosaicing a color channel in an embodiment of the present invention;

[0075] Fig.13is a schematic diagram of a process of downsampling and interpolating a color channel in an embodiment of the present invention;

[0076] Fig.14 is a schematic diagram of a process of upsampling an interpolated color downsampled image in an embodiment of the present invention;

[0077] Fig.15 is a flow chart of another method for demosaicing a color channel in an embodiment of the present invention;

[0078] Fig.16 yes Fig.15 A schematic diagram of interpolation in a color channel demosaicing method is shown;

[0079] Fig.17 It is a schematic diagram of the effect of de-mosaicing the original mosaic image by using the solution of the present invention;

[0080] Fig.18 is another flow chart of the image processing method provided by an embodiment of the present invention;

[0081] Fig.19 is a structural schematic diagram of an image processing device provided by an embodiment of the present invention;

[0082] Fig. 20 It is a schematic diagram of the hardware structure of the image processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0083] The principle and spirit of the present invention will be described below with reference to the exemplary embodiments shown in the accompanying drawings. It should be understood that these embodiments are described only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way.

[0084] In view of the shortcomings of the existing RGBW image sensor in which W pixels account for 50% of the color filter array in terms of color restoration and resolution, an embodiment of the present invention provides an image sensor, which includes: an RGBW color filter array, in which W pixels account for 5 / 8, and R, G, and B pixels account for 1 / 8. Among them, the R pixel is covered with an R color filter to receive red light; the G pixel is covered with a G color filter to receive green light; the B pixel is covered with a B color filter to receive blue light; the W pixel receives photons in the entire wavelength range of red light, green light, blue light and near-infrared light. In other words, the W pixel color filter can transmit light in the visible light to near-infrared light band. The R pixel color filter can transmit light in the red band; the B pixel color filter can transmit light in the blue band; and the G pixel color filter can transmit light in the green band.

[0085] In the embodiment of the present invention, the pixels in the RGBW color filter array are arranged in a period of 4×4. In each period of CFA, the proportion of various pixels only needs to meet the above requirements, and the arrangement of the pixels is not limited and can be arranged arbitrarily.

[0086] Figure 2 , Figure 3 , Figure 4 Three different pixel arrangement modes of RGBW image sensor color filter arrays provided by embodiments of the present invention are shown.

[0087] exist Figure 2 In each cycle of , the pixels are arranged as follows:

[0088] The pixels in the first row are: R / W / B / W;

[0089] The pixels in the second row are: W / G / W / W;

[0090] The pixels in the third row are: B / W / R / W;

[0091] The pixels in the fourth row are: W / W / W / G.

[0092] exist Figure 3 In each cycle of , the pixels are arranged as follows:

[0093] The pixels in the first row are: B / W / R / W;

[0094] The pixels in the second row are: W / G / W / W;

[0095] The pixels in the third row are: R / W / B / W;

[0096] The pixels in the fourth row are: W / W / W / G.

[0097] exist Figure 4 In each cycle of , the pixels are arranged as follows:

[0098] The pixels in the first row are: B / W / G / W;

[0099] The pixels in the second row are: W / R / W / W;

[0100] The pixels in the third row are: G / W / B / W;

[0101] The pixels in the fourth row are: W / W / W / R.

[0102] Of course, the arrangement of pixels is not limited to the above Figures 2 to 4 There are three methods shown, and there may be other methods, which will not be listed one by one.

[0103] The image sensor provided by the embodiment of the present invention sets the proportion of W pixels in the RGBW color filter array to 5 / 8, and the proportions of R, G, and B pixels are all set to 1 / 8. By adjusting the proportion of W pixels, the image obtained based on the image sensor can better balance the color interpolation effect and the resolution of the W channel, so that the image has both good resolution and color effect.

[0104] Correspondingly, an embodiment of the present invention also provides an image processing method for processing an original mosaic image obtained based on the above-mentioned image sensor, firstly obtaining a complete W channel image by demosaicing W pixels, and then demosaicing each color channel based on the complete W channel image to obtain an RGB image.

[0105] Specifically, each channel may be demosaiced by interpolation.

[0106] like Figure 5 FIG. 1 is a flow chart of an image processing method provided by an embodiment of the present invention, and the method comprises the following steps:

[0107] Step 501: Acquire an original mosaic image captured by the image sensor.

[0108] Step 502, determining the order of inserting W pixel values ​​at the positions of the three color pixels R, G, and B in the original mosaic image.

[0109] For example, the order of inserting W pixel values ​​at the positions of the three color pixels of R, G, and B may be determined according to the number of W pixels around the three color pixels of R, G, and B, in descending order of the number of W pixels.

[0110] Specifically, for pixel arrays with different arrangements, the number of W pixels around the pixels of the corresponding color channels will be different. Figures 2 to 4 Provide explanation.

[0111] by Figure 2 Taking the pixel array shown as an example, the number of W pixels around the R pixel is 6, the number of W pixels around the B pixel is 6, and the number of W pixels around the G pixel is 4. Therefore, W pixels can be inserted at each pixel position of the corresponding channel in the order of R, B, G or B, R, G.

[0112] by Figure 3 Taking the pixel array shown as an example, the number of W pixels around the R pixel is 6, the number of W pixels around the B pixel is 6, and the number of W pixels around the G pixel is 4. Therefore, W pixels can be inserted at each pixel position of the corresponding channel in the order of R, B, G or B, R, G.

[0113] by Figure 4Taking the pixel array shown as an example, the number of W pixels around R pixels is 4, the number of W pixels around B pixels is 6, and the number of W pixels around G pixels is 6. Therefore, W pixels can be inserted at each pixel position of the corresponding channel in the order of B, G, R or G, B, R.

[0114] Step 503, sequentially calculating the W pixel interpolation values ​​at the three color pixel positions in the original mosaic image according to the determined order, and inserting the corresponding W pixel interpolation values ​​to obtain a complete W channel image.

[0115] In the embodiment of the present invention, interpolation can be performed according to the gradient direction. For the W channel, the W pixel positions to be interpolated are the positions occupied by the R, G, and B pixels, so it is necessary to perform W pixel interpolation on these positions, that is, it is necessary to determine the W pixel interpolation of each position. The specific calculation process of W pixel interpolation will be described in detail later.

[0116] After inserting the calculated W pixel interpolation into the positions occupied by R, G, and B pixels, a complete W channel image can be obtained.

[0117] Step 504: based on the complete W channel image, demosaic each color channel to obtain an RGB image.

[0118] There are many methods for demosaicing each color channel, such as using existing technologies. In addition, the present invention also provides a variety of different demosaicing methods, which will be described in detail later.

[0119] like Figure 6 As shown, the determination process of the W pixel interpolation corresponding to a color pixel position includes the following steps:

[0120] Step 601, determine the color pixel position to be interpolated.

[0121] by Figure 2 Take the R pixel in the pixel array as an example, Figure 7 A schematic diagram of a pixel to be interpolated in the W channel at an R pixel is shown.

[0122] For the convenience of subsequent description, Figure 7 The R pixel position to be interpolated is marked as R0, and the surrounding W pixels are also numbered.

[0123] Unless otherwise specified, the following examples are based on Figure 2 The R pixel in the pixel array shown is taken as an example for description.

[0124] Step 602: Calculate the difference between the maximum value and the minimum value of W pixels around the color pixel.

[0125] Reference Figure 7, the difference delta between the maximum and minimum values of the W pixels around the R0 pixel is calculated as follows:

[0126]

[0127] Step 603, determine whether the difference is less than the first threshold thr1; if so, execute step 604; otherwise, execute step 605.

[0128] Step 604, calculate the interpolation based on the W pixel values around the color pixel.

[0129] If delta < thr1, it indicates that this area is a smooth area. Therefore, the interpolation can be calculated based on the W pixel values around the color pixel.

[0130] For example, the average value of the W pixels adjacent vertically and horizontally to R0 can be used as the W pixel interpolation W at R0 R0 , that is:

[0131]

[0132] Or the average value of all the W pixels around R0 can also be used as the W pixel interpolation W at R0 R0 , that is:

[0133]

[0134] Step 605, calculate the horizontal gradient and vertical gradient around the color pixel, and determine the interpolation according to the gradient calculation result.

[0135] If the above threshold condition is not met, it indicates that there is a gradient change in this area. Usually, the high-frequency information of the image only appears in one direction. Therefore, the W pixel interpolation of R0 can be realized according to the gradient information around R0.

[0136] Continue to refer to Figure 7 , calculate the horizontal gradient D h and the vertical gradient D v :

[0137] D h = abs(w1 - w2) + abs(w4 - w5) + abs(w3 - w6)

[0138] D v = abs(w3 - w2) + abs(w6 - w5) + abs(w1 - w4)

[0139] The basic criterion for interpolation is to interpolate along the direction with a small gradient change.

[0140] In a non - restrictive embodiment, the magnitudes of the horizontal gradient and the vertical gradient can be compared. If the horizontal gradient is less than the vertical gradient, the mean value of the W pixels adjacent horizontally can be used as the value to be interpolated; otherwise, the mean value of the W pixels adjacent vertically can be used as the value to be interpolated.

[0141] Furthermore, considering that in regions with a large amount of high - frequency information, the magnitudes of the vertical and horizontal gradients may not necessarily truly reflect the gradient change direction at R0. Therefore, in another non - restrictive embodiment, when determining the pixel gradient direction, corresponding threshold parameters can also be introduced, namely the second threshold thr2 and the second threshold thr3.

[0142] Specifically, if the difference between the horizontal gradient and the vertical gradient is greater than the second threshold, and the smaller of the two gradient values is less than the third threshold, the interpolation is calculated based on the values of the W pixels adjacent in the direction corresponding to the smaller gradient value among the surrounding pixels; otherwise, the interpolation is calculated based on the values of the W pixels adjacent in the vertical and horizontal directions among the surrounding pixels.

[0143] Continuing with the example of R0 shown Figure 7 as follows, there are the following three cases:

[0144] (1) D v -D h >thr2, and D h <thr3, then the interpolation of the W pixel at R0 is: W R0 =(W3 + W6) / 2;

[0145] (2) D h -D v >thr2, and D v <thr3, then the interpolation of the W pixel at R0 is: W R0 =(W1 + W4) / 2;

[0146] (3) If neither of the above two conditions is satisfied, it means that the gradients at this R0 are similar in the vertical and horizontal directions. At this time, the mean value of the four W pixels adjacent vertically and horizontally around it can be used as the value to be interpolated, that is: W R0 =(w3 + w6 + w1 + w4) / 4.

[0147] It should be noted that after obtaining the interpolated W pixel values calculated by inserting at the positions of the R pixels and the B pixels, the interpolated W pixel value at the position of the G pixel is then inserted. At this time, since the W pixels have been inserted at the positions of the R pixels and the B pixels, a pixel array with 7 / 8 of the W pixels is obtained, and each G pixel is surrounded by 8 W pixels, as Figure 8 shown.

[0148] Calculate the gradient direction around G0 according to a similar gradient method.

[0149] The horizontal gradient around G0 is:

[0150] D h =abs(w1-w2)+abs(w2-w3)+abs(w4-w5)+abs(w6-w7)+abs(w7-w8)

[0151] The vertical gradient around G0 is:

[0152] D v =abs(w1-w4)+abs(w4-w6)+abs(w2-w7)+abs(w3-w5)+abs(w5-w8)

[0153] Then choose the direction with smaller gradient for interpolation. There are three cases:

[0154] (1) If D h >D v , then the pixel value of W to be interpolated at G0 is: W G0 =(W2+W7) / 2;

[0155] (2) If D h <D v , then the pixel value of W to be interpolated at G0 is: W G0 =(W4+W5) / 2;

[0156] (3) If D h =D v , then the pixel value of W to be interpolated at G0 is: W G0 =(w2+w4+w5+w7) / 4.

[0157] When the W pixel interpolation at each color pixel is calculated, the horizontal gradient and the vertical gradient are calculated based on the W pixels in the distance range of 1 pixel unit around the color pixel. In specific implementation, it is not limited to the distance range of 1 pixel unit, and more surrounding W pixels can be used to calculate the horizontal gradient and the vertical gradient, for example Fig. 9 As shown, the W pixel interpolation at R0 is calculated based on the W pixels in the distance range of 2 pixel units around R0.

[0158] Reference Fig. 9 , the horizontal gradient D at pixel R0 h and vertical gradient D v The calculation is as follows:

[0159] D h =abs(w3-w4)+abs(w4-w5)+abs(w5-w6)+abs(w7-w8)+abs(w9-w10)+abs(w10-w11)+abs(w11-w12)

[0160] D v =abs(w1-w7)+abs(w7-w10)+abs(w10-w13)+abs(w4-w11)+abs(w2-w5)+abs(w5-w8)+abs(w8-w14)

[0161] Then, the direction with smaller gradient is selected for interpolation. There are three cases:

[0162] (1) When D h >D v When the W pixel value to be interpolated is: W R0 ′=(W4+W11) / 2;

[0163] (2) When D h <D v When the W pixel value to be interpolated is: W R0 ′=(W7+W8) / 2;

[0164] (3) When D h =D v When the W pixel value to be interpolated is: W R0 ′=(w4+w7+w8+w11) / 4.

[0165] Of course, the pixel gradient direction may also be determined by introducing the second threshold thr2 and the second threshold thr3 as described in the above example, which is not limited in this embodiment of the present invention.

[0166] Although the participation of more W pixels consumes more resources, more accurate interpolation results can be obtained.

[0167] Fig.10 The schematic diagram is a comparison between the de-mosaicing effect of W pixels with a W pixel ratio of 62.5% and the existing de-mosaicing effect of 50% W pixels using the solution of the present invention. The left side is a mosaic image taken by an image sensor with 50% W pixels, and the effect of de-mosaicing the W channel is shown. The right side is a mosaic image taken by an image sensor with 62.5% W pixels, and the effect of de-mosaicing the W channel is shown.

[0168] The two adopt the same interpolation algorithm. From the comparison between the two, it can be seen that in the solution of the present invention, compared with the image of 50% W pixels, there are more W pixels participating in the calculation of the algorithm, so its ability to resolve lines is better than the prior art.

[0169] After obtaining the complete W channel image, the complete R, G, and B channels can be obtained by demosaicing based on the W channel. There are many ways to demosaic the R, G, and B channels, which are described below with examples.

[0170] Example 1

[0171] Reference Fig.11 , is a flow chart of a method for demosaicing a color channel in an embodiment of the present invention.

[0172] Step 111 , performing pixel-by-pixel subtraction processing on the original mosaic image and the complete W-pixel image to obtain a slowly varying mosaic image.

[0173] Since the slowly varying mosaic image has the characteristic of slow pixel space variation, the slowly varying mosaic image can be subsequently interpolated more accurately, so that the several color channel images obtained thereby have less pseudo colors, which can effectively improve the quality of the processed image.

[0174] Step 112: performing interpolation processing on each color channel of the slowly varying mosaic image to obtain a slowly varying color channel image.

[0175] Specifically, some existing interpolation algorithms may be used, such as bilinear interpolation processing, bicubic interpolation processing, mean filter interpolation processing or median filter interpolation processing, etc., which are not limited in the embodiments of the present invention.

[0176] Step 113, performing pixel-by-pixel addition processing on the slowly varying color channel image and the complete W channel image to obtain an RGB image.

[0177] Example 2

[0178] Reference Fig.12 , is a flow chart of another method for demosaicing a color channel in an embodiment of the present invention, comprising the following steps:

[0179] Step 121, down-sample the color channels in the original mosaic image by 2 times to obtain a color down-sampled image; down-sample the complete W channel image by 2 times corresponding to the pixel position in the color down-sampled image to obtain a W channel down-sampled image.

[0180] It should be noted that the color down-sampled image is for each color channel, that is, for each color channel, 2 times down-sampling is performed to obtain the color down-sampled image of the color channel.

[0181] For example, for Fig.13 The original mosaic image shown in (a) has a 2x downsampled image for the R and B channel images. Fig.13 As shown in (d), for the G channel image, its 2x downsampled image is as follows Fig.13 As shown in (f).

[0182] In the color downsampled image, the proportion of color pixels is 1 / 2.

[0183] When downsampling the W channel image, the positions of the W pixels need to be aligned with the positions of the color pixels in the original mosaic image.

[0184] For example, for Fig.13 The original mosaic image shown in (a) is interpolated to obtain the complete W channel image as shown in Fig.13 As shown in (b).

[0185] When the complete W channel image is downsampled by 2 times, the positions of the R and B pixels are aligned, and the resulting W channel downsampled image is as follows: Fig.13 As shown in (c); aligned with the position of G pixels, the W channel downsampled image is obtained as Fig.13 As shown in (e).

[0186] The size of the W channel 2x downsampled image is 1 / 4 of the full W channel image. If the size of the full W channel image is W×H, the size of the W channel 2x downsampled image is 1 / 2×W×1 / 2×H.

[0187] Step 122: interpolate the color down-sampled image according to the W channel down-sampled image to obtain an interpolated color down-sampled image.

[0188] That is to say, Fig.13 The 0 pixel bits in the color downsampled images shown in (d) and (f) are interpolated.

[0189] In a non-limiting embodiment, the weight of the color pixel in the color down-sampled image corresponding to the position thereof may be determined according to the W pixel in the W channel down-sampled image.

[0190] Specifically, taking the R channel downsampled image as an example, assuming that R1 to R4 are four R pixels around R0 in the color downsampled image, when calculating the interpolation of R0, the existing interpolation algorithm can be used and the weights of the surrounding pixels can be considered for calculation. For example, for the interpolation of R0, the weighted average of the four R pixels around R0 can be calculated using but not limited to the following formula:

[0191] R0=(R1×ω R1 +R2×ω R2 +R3×ω R3 +R4×ω R4 ) / 4

[0192] Among them, ω R1 ~ω R4 is the weight of pixels R1 to R4.

[0193] In a non-limiting embodiment, the weights ω of pixels R1, R2, R3, and R4 may be calculated based on the values ​​of W pixels corresponding to the positions of pixels R1, R2, R3, and R4 in the corresponding W channel downsampled image. R1 ~ω R4 .

[0194] For example, the weight for pixel R1 is calculated as follows:

[0195]

[0196] Among them, W0, W1, W2, W3, and W4 are the values ​​of W pixels in the W channel downsampled image corresponding to the positions of pixels R0, R1, R2, R3, and R4 in the R channel downsampled image.

[0197] Of course, the calculation of the weight is not limited to the above formula, and there may be other calculation methods, which are not limited in the embodiment of the present invention.

[0198] Similarly, the interpolation processing of the downsampled images of the B channel and the G channel is similar to the above, which will not be repeated here.

[0199] After the interpolation operation is completed, three complete color downsampled images with a size of 1 / 4 of the original mosaic image are obtained.

[0200] Step 123, upsampling the interpolated color down-sampled image by a factor of 2 along the horizontal axis or the vertical axis to obtain a first color up-sampled image; sampling the complete W channel image to align with the pixel position in the first color up-sampled image to obtain a first reference sampled image; and interpolating the first color up-sampled image based on the value of the W pixel in the first reference sampled image to obtain a first color channel image.

[0201] Specifically, when upsampling, 0 pixels are inserted. For example, 2 times upsampling in the horizontal direction is performed. Fig.14 As shown, for the three color down-sampled images obtained in the above step 123, that is, Fig.14 As shown in (a), the upsampled image after 2 times upsampling is Fig.14 As shown in (b), the color pixel ratio is 1 / 2, and the color upsampled image size is 1 / 2 of the complete W channel image.

[0202] Accordingly, referring to the pixel position in the color upsampled image, Fig.14 The complete W channel image shown in (c) is sampled to align the pixel positions in the color upsampled image to obtain a reference sampled image, as shown in FIG. Fig.14 As shown in (d), its size is 1 / 2 of the complete W channel image.

[0203] The interpolation algorithm for the color up-sampled image may be the same as or different from that for the color down-sampled image, which is not limited in the embodiment of the present invention.

[0204] After the interpolation process in this step, three color images with a size of 1 / 2 of the complete W image are obtained, namely, the first color channel images corresponding to the three color channels of R, G, and B respectively.

[0205] Step 124: upsample the first color channel image by a factor of 2 along the longitudinal or transverse direction to obtain a second color upsampled image; sample the complete W channel image so as to align the pixel positions with those in the second color upsampled image to obtain a second reference sampled image; and interpolate the second color upsampled image based on the value of the W pixel in the second reference sampled image to obtain a complete color channel image.

[0206] Similarly, the interpolation algorithm for the color up-sampled image may be the same as or different from the interpolation algorithm for the color down-sampled image, which is not limited in the embodiment of the present invention.

[0207] After the above step 124, a complete color channel image corresponding to the three channels of R, G, and B is obtained.

[0208] It should be noted that in the above steps 123 and 124, the process of upsampling and interpolating the interpolated color down-sampled image can first perform upsampling and interpolation calculations along the horizontal axis, and then perform upsampling and interpolation calculations on the interpolated color image along the vertical axis; or vice versa, first perform upsampling and interpolation calculations along the vertical axis, and then perform upsampling and interpolation calculations on the interpolated color image along the horizontal axis, which is not limited in this embodiment of the present invention.

[0209] Fig.14 A schematic diagram showing upsampling of a downsampled image after R channel interpolation.

[0210] Example 3

[0211] In this embodiment, for each color channel, based on the complete W channel image, the color channel pixels at different color pixel positions are first interpolated, and then the color channel pixels at white pixel positions are interpolated to obtain the color channel image.

[0212] Reference Fig.15 , is a flow chart of another method for demosaicing a color channel in an embodiment of the present invention, comprising the following steps:

[0213] Step 151, calculating low-frequency information of the pixel to be interpolated according to the values ​​of the color pixels around the pixel to be interpolated.

[0214] like Fig.16 As shown, Figure 2 Take the pixel array shown as an example, for the R channel pixel, calculate Fig.16 The low-frequency information of the pixel to be interpolated at the central green pixel position in (a), for example, taking a range of 3×3 pixels as an example, the average of the two R pixels around R0 in (b), namely R1 and R2 in the figure (denoted as ) as the low-frequency information of R0.

[0215] Step 152: Calculate difference information of the pixel to be interpolated based on W pixels around the pixel to be interpolated.

[0216] Specifically, the mean of the 4 W pixels around R0 is calculated, that is, Then the difference between the mean and the W pixel value (denoted as W0) at the center of the pixel to be interpolated is As the difference information of the pixel to be interpolated.

[0217] Step 153: Calculate the interpolation value of the pixel to be interpolated according to the low-frequency information and the difference information.

[0218] For example, the low frequency information and the difference information are added together, that is,

[0219] After the R channel pixel interpolation at the G pixel and B pixel positions is completed, the R channel pixel interpolation at other positions is calculated similarly to the above. Fig.16 The example shown in (c) is illustrated.

[0220] Assume that the interpolation of R5 is calculated as follows:

[0221] First, calculate its low-frequency information:

[0222] Then, calculate the difference information:

[0223] Then the interpolated value of R5 is:

[0224] It should be noted that, in specific implementation, the above calculation method is not limited thereto, and other interpolation calculation methods may also be used to achieve the purpose of de-mosaicing and obtain similar effects.

[0225] The image processing method provided by the embodiment of the present invention is based on the original mosaic image obtained by the image sensor in which the W pixels in the RGBW color filter array are designed to account for 5 / 8 and the R, G, and B pixels account for 1 / 8. The complete W channel image is fully utilized to realize the interpolation calculation of each color channel, which can improve the resolution capability of the W channel. Moreover, by fully utilizing the resolution capability of the W channel, a better color interpolation effect can be obtained, thereby balancing and ensuring the overall effect of the image.

[0226] Fig.17 The schematic diagram of the effect of de-mosaicing the original mosaic image by using the solution of the present invention is shown. It can be seen from the figure that the color image after de-mosaicing is naturally smooth, no obvious pseudo color appears at the edge of the object, and a smooth transition can be achieved.

[0227] like Fig.18 , which is another flow chart of the image processing method provided by an embodiment of the present invention.

[0228] and Figure 5 Compared with the embodiment shown in FIG. 1 , in this embodiment, after obtaining the RGB image, the RGB image may be further subjected to noise reduction processing, that is, the following steps are also included:

[0229] Step 505: convert the RGB image into a color space in which brightness and color are separated, to obtain a brightness channel image and two color channel images.

[0230] The color space may be, for example, a YUV, Lab, or HSL color space, which is not limited in this embodiment of the present invention.

[0231] Step 506: Use the W channel image to perform noise reduction processing on the brightness channel image.

[0232] There are many ways to perform noise reduction.

[0233] For example, the W channel image may be used as a guide image to perform guided filtering on the brightness channel image.

[0234] For another example, the brightness channel image and the W channel image may be fused, that is:

[0235] L w =L+α·W

[0236] Among them, α is the fusion coefficient, which can be automatically adjusted according to the ambient illumination. For example, when the ISO (sensitivity) is large, it indicates that the ambient illumination is low and the image noise is large. At this time, a larger proportion of W channels need to be fused into the image to improve the image signal-to-noise ratio. Therefore, a larger α is required, and the maximum value of α is 1. When the ISO is small, it indicates that the ambient illumination is high. At this time, the brightness channel L already has a high signal-to-noise ratio, and there is no need for too many W channels to be fused in. At this time, the α value can be reduced, and the minimum value of α is 0.

[0237] Step 507: Convert the denoised brightness channel image and the two color channel images into RGB images.

[0238] Through the above noise reduction processing, a color image with a higher signal-to-noise ratio can be obtained.

[0239] Accordingly, an embodiment of the present invention further provides an image processing device, such as Fig.19 , which is a schematic diagram of the structure of an image processing device provided by an embodiment of the present invention.

[0240] The image processing device is used to process the image acquired by the image transmission sensor provided in the embodiment of the present invention. The image processing device 190 includes the following modules:

[0241] An image acquisition module 191 is used to acquire an original mosaic image captured by the image sensor;

[0242] An order determination module 192 is used to determine the channel order of inserting W pixel values ​​at the positions of the three color pixels R, G, and B in the original mosaic image;

[0243] A W channel interpolation module 193 is used to sequentially calculate W pixel interpolation values ​​at the three color pixel positions in the original mosaic image according to the determined channel order, and insert the corresponding W pixel interpolation values ​​to obtain a complete W channel image;

[0244] The color channel interpolation module 194 is used to demosaic each color channel based on the complete W channel image to obtain an RGB image.

[0245] For the specific implementation of each of the above modules, please refer to the corresponding description in the embodiment of the image processing method of the present invention, which will not be repeated here.

[0246] Accordingly, an embodiment of the present invention further provides an image processing system, comprising: the above-mentioned image processor and image processing device.

[0247] The image sensor is used to generate an original mosaic image;

[0248] The image processing device is used for demosaicing the original mosaic image to obtain an RGB image.

[0249] In a specific implementation, the above-mentioned device may correspond to a chip with corresponding functions in a network device and / or a user device, such as a SOC (System-On-a-Chip), a baseband chip, a chip module, etc.

[0250] In a specific implementation, each module / unit included in each device or product described in the above embodiments may be a software module / unit or a hardware module / unit, or may be partially a software module / unit and partially a hardware module / unit. For example, for each device or product applied to or integrated in a chip, each module / unit included therein may be implemented in the form of hardware such as circuits, or at least some of the modules / units may be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits; for each device or product applied to or integrated in a chip module, each module / unit included therein may be implemented in the form of hardware such as circuits, and different modules / units may be located in the same component (such as a chip, circuit module, etc.) or different components of the chip module, or at least some of the modules / units may be implemented in the form of hardware such as circuits. The element can be implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in the terminal, the various modules / units contained therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits.

[0251] The embodiment of the present invention further discloses a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is run, it can execute Figure 2 The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. The storage medium may also include a non-volatile memory (non-volatile) or a non-transitory memory, etc.

[0252] Accordingly, an embodiment of the present invention further provides an image processing device, such as Fig. 20 The figure shows a hardware structure diagram of the image processing device.

[0253] The image processing device includes a processor 201, a memory 202 and a transceiver 203. Among them:

[0254] Processor 201 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. Processor 201 may also include multiple CPUs, and processor 201 may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, or processing cores for processing data (such as computer program instructions).

[0255] The memory 202 may be a ROM or other types of static storage devices that can store static information and instructions, a RAM or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, and the embodiments of the present application do not impose any restrictions on this. The memory 202 may exist independently (in this case, the memory 202 may be located outside the device or inside the device), or it may be integrated with the processor 201. Among them, the memory 202 may contain a computer program code. The processor 201 is used to execute the computer program code stored in the memory 202, thereby realizing the method provided in the embodiments of the present application.

[0256] The processor 201, the memory 202 and the transceiver 203 are connected via a bus. The transceiver 203 is used to communicate with other devices or a communication network.

[0257] when Fig. 20 The schematic diagram of the structure shown in FIG. 1 is used to illustrate the structure of the image processing device involved in the above embodiment. The processor 201 is used to control and manage the actions of the image processing device. For example, the processor 201 is used to support the image processing device to execute Figure 5 or Figure 6 or Fig.11 or Fig.12 or Fig.15 or Fig.18 The processor 201 may communicate with other network entities via the transceiver 203. The memory 202 is used to store program codes and data of the image processing device.

[0258] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article indicates that the associated objects before and after are in an "or" relationship.

[0259] The "plurality" appearing in the embodiments of the present application refers to two or more.

[0260] The first, second, etc. descriptions appearing in the embodiments of the present application are only used for illustration and distinction of the description objects. There is no order, nor do they indicate any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.

[0261] The "connection" that appears in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not impose any limitations on this.

[0262] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0263] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means.

[0264] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0265] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0267] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be physically arranged separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0268] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present application.

[0269] Although the present application is disclosed as above, the present application is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application shall be subject to the scope defined by the claims.

Claims

1. An image sensor, characterized in that: include: RGBW color filter array, in which W pixels account for 5 / 8, and R, G, and B pixels account for 1 / 8.

2. The image sensor according to claim 1, characterized in that The pixels in the RGBW color filter array are arranged in a 4×4 period.

3. The image sensor according to claim 1, characterized in that The W pixel color filter is able to transmit light in the visible to near infrared wavelength range.

4. The image sensor according to claim 1, characterized in that The R pixel filter can transmit light within the red wavelength range; the B pixel filter can transmit light within the blue wavelength range; and the G pixel filter can transmit light within the green wavelength range.

5. An image processing method for processing an image acquired by the image transmission sensor according to any one of claims 1 to 4, characterized in that: The method comprises: Acquire an original mosaic image captured by the image sensor; Determine the channel order of inserting W pixel values ​​at the positions of three color pixels R, G, and B in the original mosaic image; Calculating W pixel interpolation values ​​at the three color pixel positions in the original mosaic image in sequence according to the determined channel order, and inserting the corresponding W pixel interpolation values ​​to obtain a complete W channel image; Based on the complete W channel image, each color channel is demosaiced to obtain an RGB image.

6. The image processing method according to claim 5, characterized in that: The determining of the order of inserting W pixel values ​​at the positions of the three color pixels R, G, and B in the original mosaic image comprises: Counting the number of W pixels around the three color pixels of R, G, and B in the original mosaic image; The order of inserting W pixel values ​​at the positions of the three color pixels R, G, and B is determined from large to small according to the number of W pixels.

7. The image processing method according to claim 6, characterized in that: The calculating of interpolation values ​​at the positions of the three color pixels in the original mosaic image comprises: Determine the color pixel position to be interpolated; Calculate the difference between the maximum value and the minimum value of W pixels around the color pixel; If the difference is less than a first threshold, calculating an interpolation value according to W pixel values ​​around the color pixel; Otherwise, the horizontal gradient and the vertical gradient around the color pixel are calculated, and the interpolation value is determined according to the gradient calculation result.

8. The image processing method according to claim 7, characterized in that: Determining the interpolation value according to the gradient calculation result includes: If the difference between the horizontal gradient and the vertical gradient is greater than the second threshold, and the smaller gradient value is less than the third threshold, the interpolation is calculated based on the W pixel values ​​adjacent to the direction of the smaller gradient value; Otherwise, the interpolated value is calculated based on the surrounding W pixel values ​​in the vertical and horizontal directions.

9. The image processing method according to claim 5, characterized in that: De-mosaicing each color channel based on the complete W channel image to obtain an RGB image includes: Performing pixel-by-pixel subtraction processing on the original mosaic image and the complete W-pixel image to obtain a slowly varying mosaic image; Performing interpolation processing on each color channel of the slowly varying mosaic image to obtain a slowly varying color channel image; The slowly varying color channel image and the complete W channel image are added pixel by pixel to obtain an RGB image.

10. The image processing method according to claim 5, characterized in that: De-mosaicing each color channel based on the complete W channel image to obtain an RGB image includes: Downsampling the color channels in the original mosaic image by a factor of 2 to obtain a color downsampled image; downsampling the complete W channel image by a factor of 2 corresponding to the pixel position in the color downsampled image to obtain a W channel downsampled image; Performing interpolation processing on the color down-sampled image according to the W channel down-sampled image to obtain an interpolated color down-sampled image; Performing upsampling of the interpolated color downsampled image by a factor of 2 along the horizontal axis or the vertical axis to obtain a first color upsampled image; performing sampling of the complete W channel image aligned with the pixel position in the first color upsampled image to obtain a first reference sampled image; performing interpolation processing on the first color upsampled image based on the value of the W pixel in the first reference sampled image to obtain a first color channel image; The first color channel image is upsampled by a factor of 2 along the longitudinal or transverse direction to obtain a second color upsampled image; the complete W channel image is sampled to align with the pixel position in the second color upsampled image to obtain a second reference sampled image; and the second color upsampled image is interpolated based on the value of the W pixel in the second reference sampled image to obtain a complete color channel image.

11. The image processing method according to claim 10, characterized in that: The color pixels in the color down-sampled image account for 1 / 2, and the color pixels in the color up-sampled image account for 1 / 2.

12. The image processing method according to claim 5, characterized in that: De-mosaicing each color channel based on the complete W channel image to obtain an RGB image includes: For each color channel, based on the complete W channel image, the color channel pixels at different color pixel positions are first interpolated, and then the color channel pixels at white pixel positions are interpolated to obtain the color channel image.

13. The image processing method according to claim 12, characterized in that: Interpolating color channel pixels includes: Calculate the low-frequency information of the pixel to be interpolated according to the values ​​of the color pixels around the pixel to be interpolated; Calculate the difference information of the pixel to be interpolated based on W pixels around the pixel to be interpolated; An interpolation value of the pixel to be interpolated is calculated according to the low-frequency information and the difference information.

14. The image processing method according to claim 12, characterized in that: The step of calculating the difference information of the pixel to be interpolated based on W pixels around the pixel to be interpolated includes: Calculate the mean of W pixels around the pixel to be interpolated; The difference between the mean value and the W pixel value at the center of the pixel to be interpolated is used as the difference information of the pixel to be interpolated.

15. The image processing method according to any one of claims 5 to 14, characterized in that: The method further comprises: Convert the RGB image into a color space with brightness and color separated to obtain a brightness channel image and two color channel images; Using the W channel image to perform noise reduction processing on the brightness channel image; The denoised brightness channel image and the two color channel images are converted into RGB images.

16. The image processing method according to claim 15, characterized in that: The performing noise reduction processing on the brightness channel image by using the W channel image comprises: The W channel image is used as a guide image to perform guided filtering on the brightness channel image.

17. The image processing method according to claim 15, characterized in that: The performing noise reduction processing on the brightness channel image by using the W channel image comprises: The brightness channel image is fused with the W channel image.

18. An image processing device for processing an image acquired by the image transmission sensor according to any one of claims 1 to 4, characterized in that: The device comprises: An image acquisition module, used to acquire an original mosaic image captured by the image sensor; A sequence determination module, used to determine the channel sequence of inserting W pixel values ​​at the positions of three color pixels R, G, and B in the original mosaic image; A W channel interpolation module, used for sequentially calculating W pixel interpolation values ​​at the three color pixel positions in the original mosaic image according to a determined channel order, and inserting corresponding W pixel interpolation values ​​to obtain a complete W channel image; The color channel interpolation module is used to demosaic each color channel based on the complete W channel image to obtain an RGB image.

19. An image processing system, characterized in that: The system comprises: an image sensor as claimed in any one of claims 1 to 4, and an image processing device as claimed in claim 18; The image sensor is used to generate an original mosaic image; The image processing device is used to demosaic the original mosaic image to obtain an RGB image.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image processing method according to any one of claims 5 to 17 are executed.

21. An image processing device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the steps of the image processing method according to any one of claims 5 to 7 when executing the computer program.