Image sensor, image processing method and device thereof, and computer readable storage medium
By designing a combination of high-proportion transparent pixels and infrared color filters in the color image sensor, the problem of low signal-to-noise ratio and the influence of near-infrared light under low illumination is solved, and high signal-to-noise ratio and color recovery of color images are achieved.
Patent Information
- Application Number
- CN202410606045.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-27
AI Technical Summary
The signal-to-noise ratio of existing color image sensors is not high under low illumination, especially the dilution of color images by near-infrared light, which limits the improvement of the signal-to-noise ratio.
Design an image sensor in which the transparent pixel group accounts for 75% of the total pixels. It can receive visible light and near-infrared light, and remove the influence of near-infrared light through an infrared color filter to restore the image color. The sensor includes a plurality of photosensitive pixel groups, transparent pixels and color/infrared pixels, and there is at least one transparent pixel between adjacent second pixels along the row and column direction to improve the signal-to-noise ratio.
By increasing the number of transparent pixels and using infrared color filters, the signal-to-noise ratio of the image sensor is significantly improved, ensuring that the color recovery of color images is close to human visual effects and maintaining high-quality images under low-light conditions.
Smart Images

Figure CN118555503A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image acquisition, and in particular to an image sensor and an image processing method and device thereof, and a computer-readable storage medium. Background Art
[0002] In a color image sensor, each pixel has a color filter of a specific color to form a color pixel (such as R pixel, G pixel and B pixel). The array composed of color filters is called a "color filter array" (CFA). Each pixel is only responsible for collecting one color information corresponding to its color filter. Therefore, the color image sensor collects a mosaic image.
[0003] In order to achieve color imaging under low illumination, a transparent color filter (white, W) is introduced into the color image sensor to form an RGBW color filter array. In this image sensor, the pixel with a transparent color filter is a transparent pixel (W pixel). Since the W pixel can transmit visible light (R, G, B) and near-infrared bands, the number of photons entering the pixel can be increased, thereby improving the signal-to-noise ratio of the image. For example, Figure 1 FIG. 4 is a schematic diagram showing the structure of a pixel array in an image sensor in which W pixels account for 50%.
[0004] However, the signal-to-noise ratio of existing color image sensors is often not high. Summary of the invention
[0005] The problem solved by the present invention is how to improve the signal-to-noise ratio of an image sensor while realizing color imaging under low illumination.
[0006] To solve the above problems, the present invention provides an image sensor, comprising: a plurality of photosensitive pixel groups, wherein the plurality of photosensitive pixel groups are arranged in an array; the photosensitive pixel groups comprise: a plurality of first pixels and a plurality of second pixels, wherein the first pixels are transparent pixels, and the second pixels are color pixels or infrared pixels; along any one of the row direction and the column direction, there is at least one first pixel between adjacent second pixels, and in the photosensitive pixel group, the total number of the first pixels accounts for 75% of the total number of pixels in the photosensitive pixel group.
[0007] Moreover, the present invention also provides an image processing method, comprising: obtaining a mosaic image, the mosaic image is obtained by the image sensor of the present invention, the mosaic image comprises: a transparent channel and a color filter channel; performing de-mosaic processing on the transparent channel to obtain a transparent channel image; and obtaining a color filter channel image based on the transparent channel image and the color filter channel.
[0008] In addition, the present invention also provides an image processing device, characterized in that it includes: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the processor executes the steps of the image processing method of the present invention.
[0009] A computer-readable storage medium is a non-volatile storage medium or a non-transient storage medium, on which computer instructions are stored. When the computer instructions are executed, the steps of the image processing method of the present invention are executed.
[0010] Correspondingly, the present invention also provides an image processing device, comprising: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the processor performs the steps of the image processing method of the present invention.
[0011] In addition, the present invention also provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transient storage medium, on which computer instructions are stored, and when the computer instructions are executed, the steps of the image processing method of the present invention are executed.
[0012] Compared with the prior art, the technical solution of the present invention has the following advantages:
[0013] The technical solution of the present invention, the image sensor includes: a plurality of photosensitive pixel groups, the plurality of photosensitive pixel groups are arranged in an array; the photosensitive pixel group includes: a plurality of first pixels and a plurality of second pixels, the first pixels are transparent pixels, and the second pixels are color pixels or infrared pixels; along any direction of the row direction and the column direction, there is at least one first pixel between adjacent second pixels, and in the photosensitive pixel group, the total number of the first pixels accounts for 75% of the total number of pixels in the photosensitive pixel group. The first pixels are transparent pixels, which can receive light in the visible light band and the near-infrared band, and the total number of the first pixels accounts for up to 75%, which can better improve the signal-to-noise ratio of the image sensor; a part of the second pixels are infrared pixels, which can only receive light in the near-infrared band, which can provide a basis for removing the influence of light in the near-infrared band on color, so as to restore the image color.
[0014] In the image processing method of the present invention, a complete W channel image is obtained by mosaic processing the W channel of the mosaic image; and a color filter channel image is obtained according to the W channel image and the color filter channel. Since the W channel of the mosaic image is obtained by the first pixel in the image sensor of the present invention, the W channel includes light in the wavelength range from near infrared to visible light, and the W channel has a higher signal-to-noise ratio; based on the W channel, the color filter channel image obtained can also have a better signal-to-noise ratio, thereby effectively improving the signal-to-noise ratio of the color image finally obtained.
[0015] In an optional solution of the present invention, the infrared channel of the mosaic image is obtained by the second pixel which is an infrared pixel in the image sensor of the present invention; based on the color filter channel and the W channel with a high signal-to-noise ratio, the color channel image of the complete channel obtained has a high signal-to-noise ratio, and can also remove the influence of near-infrared light in the color channel image to restore a color image that is close to human vision. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic diagram of a top view of an image sensor according to an embodiment of the present invention;
[0017] Figure 2 is a schematic diagram of a top view of another embodiment of an image sensor of the present invention;
[0018] Figure 3 is a schematic diagram of a top view of the structure of another embodiment of the image sensor of the present invention;
[0019] Figure 4 It is a flowchart of an embodiment of an image processing method of the present invention;
[0020] Figure 5 yes Figure 4 A schematic flow chart of the step of performing a demosaicing process on the transparent channel in the embodiment of the image processing method shown;
[0021] Figure 6 Yes Yes Figure 5 A schematic flow chart of steps of performing interpolation operation in an embodiment of the image processing method shown;
[0022] Figure 7 yes Figure 6 In the interpolation calculation step in the embodiment of the image processing method shown, the transparent pixel bits to be interpolated are transparent interpolation arrays of B pixel bits;
[0023] Figure 8 is a flow chart of steps for obtaining a color filter channel image in another embodiment of the image processing method of the present invention;
[0024] Fig. 9 yes Figure 4A schematic flow chart of the steps of calculating the connected domain in the embodiment of the image processing method shown;
[0025] Fig.10 yes Figure 4 A schematic flow chart of the steps of space conversion calculation in the embodiment of the image processing method shown;
[0026] Fig.11 yes Figure 4 A schematic flow chart of the steps of correcting the transparent channel image in the embodiment of the image processing method shown. DETAILED DESCRIPTION
[0027] As can be seen from the background technology, the signal-to-noise ratio of color image sensors in the prior art is often not high. Now, the reasons for the low signal-to-noise ratio problem are analyzed in combination with the structure of the color image sensor:
[0028] When performing color imaging, near-infrared light will dilute the color of the image. For example, green leaves will strongly reflect near-infrared light, causing the grass and leaves photographed on a sunny day to appear white like snow. Therefore, in the color image array, an infrared cut-off filter (IRCUT) is also installed on the pixels to filter out the near-infrared light entering the color pixels and restore a color image close to human vision.
[0029] However, although the installation of IRCUT can filter out the near-infrared light entering the color pixels, it also filters out the near-infrared light entering the W pixels, thereby making it impossible for the image sensor to improve the signal-to-noise ratio by using near-infrared light, thereby limiting the improvement of the signal-to-noise ratio of the image sensor.
[0030] In order to solve the technical problem, the present invention provides an image sensor, comprising: a plurality of photosensitive pixel groups, wherein the plurality of photosensitive pixel groups are arranged in an array; the photosensitive pixel groups include: a plurality of first pixels and a plurality of second pixels, wherein the first pixels are transparent pixels, and the second pixels are color pixels or infrared pixels; along any one of the row direction and the column direction, there is at least one first pixel between adjacent second pixels, and in the photosensitive pixel group, the total number of the first pixels accounts for 75% of the total number of pixels in the photosensitive pixel group.
[0031] In the technical solution of the present invention, the first pixels are transparent pixels, which can receive light in the visible light band and the near-infrared band, and the total number of first pixels accounts for as high as 75%, which can better improve the signal-to-noise ratio of the image sensor; a part of the second pixels are infrared pixels, which can only receive light in the near-infrared band, and can provide a basis for removing the influence of light in the near-infrared band on color, so as to restore the image color.
[0032] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0033] refer to Figure 1 , shows a schematic diagram of a top view structure of an image sensor according to an embodiment of the present invention.
[0034] The image sensor includes: a plurality of photosensitive pixel groups 110, and the plurality of photosensitive pixel groups 110 are arranged in an array; the photosensitive pixel group 110 includes: a plurality of first pixels 111 and a plurality of second pixels 112, the first pixels 111 are transparent pixels, and the second pixels 112 are color pixels or infrared pixels; along any one of the row direction and the column direction, there is at least one first pixel 111 between adjacent second pixels 112, and in the photosensitive pixel group 110, the total number of the first pixels 111 accounts for 75% of the total number of pixels in the photosensitive pixel group 110.
[0035] The technical solution of the image sensor embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
[0036] The photosensitive pixel group 110 is a repeating unit of the pixel array of the image sensor. A plurality of the photosensitive pixel groups 110 are arranged in an array to form a pixel array of the image sensor. Each photosensitive pixel group 110 has a plurality of pixels. A plurality of pixels in the same photosensitive pixel group 110 are arranged in an array along the row direction and the column direction of the pixel array.
[0037] Different pixels in the same photosensitive pixel group 110 receive light of different wavelength ranges. Based on the wavelength band of the light received by the pixels, the plurality of pixels in the photosensitive pixel group 110 are divided into a first pixel 111 and a second pixel 112.
[0038] The first pixel 111 is a transparent pixel (W pixel). The first pixel 111 can receive light in the entire wavelength range. The first pixel 111 can receive light in the infrared (IR) band to the visible light (R, G, B) band.
[0039] In some embodiments of the present invention, the first pixel 111 has a transparent color filter to transmit light in the visible light band and the near infrared band. Light from the infrared light (IR) band to the visible light (R, G, B) band can all be received through the transparent color filter. In other embodiments of the present invention, the first pixel does not have a color filter. Light from the infrared light (IR) band to the visible light (R, G, B) band will not be affected and will be received.
[0040] The second pixel 112 is a color pixel or an infrared pixel. The color pixel can receive light in the visible light band, and the IR pixel 112ir can receive light in the near infrared band.
[0041] In some embodiments of the present invention, the second pixel 112 has a color filter or an infrared filter. Some of the second pixels 112 are color pixels with a color filter. Some of the second pixels 112 are infrared pixels (IR pixels 112ir) with an infrared filter.
[0042] In some embodiments of the present invention, the color filter is one of a red light filter, a blue light filter, and a green light filter. Specifically, the red filter is configured to transmit light in the red band and light in the near-infrared band; the blue filter is configured to transmit light in the blue band and light in the near-infrared band; and the green filter is configured to transmit light in the green band and light in the near-infrared band.
[0043] like Figure 1 As shown, the R pixel 112r has a red light filter, which can receive light in the red band and the near-infrared band; the G pixel 112g has a green light filter, which can receive light in the green band and the near-infrared band; and the B pixel 112b has a blue light filter, which can receive light in the blue band and the near-infrared band.
[0044] In some embodiments of the present invention, the infrared filter is configured to transmit light in the near infrared band. In some exemplary embodiments, the infrared filter may be a superposition of a red light filter and a blue light filter. The red light filter and the blue light filter may suppress each other in the visible light wavelength band and have a greater transmittance in the near infrared band. The superimposed red light filter and the blue light filter may transmit only light in the near infrared band to realize the function of an infrared cutoff filter.
[0045] It should be noted that the method of forming the infrared filter by superimposing a red light filter and a blue light filter is only an example. The infrared filter may also be other filters capable of achieving an infrared cutoff function.
[0046] like Figure 1 In some embodiments shown, a photosensitive pixel group 110 has red pixels (R pixels 112r), green pixels (G pixels 112g), blue pixels (B pixels 112b), and infrared pixels (ir pixels 112ir), wherein the R pixels 112r are second pixels 112 with red color filters, the G pixels 112g are second pixels 112 with green color filters, the B pixels 112b are second pixels 112 with blue color filters, and the ir pixels 112ir are second pixels 112 with infrared color filters. Specifically, the second pixels 112 of the same photosensitive pixel group 110 are divided into four types, namely red pixels, green pixels, blue pixels, and infrared pixels.
[0047] In some embodiments, the numbers of the red pixels, the green pixels, the blue pixels, and the infrared pixels in the same photosensitive pixel group 110 are respectively equal. Specifically, the numbers of the four types of second pixels in the same photosensitive pixel group 110 are all equal.
[0048] In some embodiments, in the photosensitive pixel group 110, the total number of the second pixels 112 accounts for 25% of the total number of pixels in the photosensitive pixel group 110. Specifically, in the photosensitive pixel group 110, the total number of the first pixels 111 accounts for 75%, that is, the photosensitive pixel 110 is composed of the first pixels 111 and the second pixels 112.
[0049] In some embodiments, the number of the red pixels, the green pixels, the blue pixels, and the infrared pixels in the same photosensitive pixel group 110 respectively accounts for 1 / 16 of the total number of pixels in the photosensitive pixel group 110. In a photosensitive pixel group 110, the total number of the second pixels 112 accounts for 25%, and a photosensitive pixel group 110 includes 4 types of second pixels 112, each type of second pixel 112 accounts for 25% / 4, that is, each type of second pixel 112 accounts for 1 / 16.
[0050] In some embodiments of the present invention, in a photosensitive pixel group 110, second pixels 112 with different color filters are evenly distributed, that is, second pixels 112 of different types are evenly distributed, so as to reduce the difficulty of subsequent image processing and ensure image processing accuracy.
[0051] In some embodiments of the present invention, the photosensitive pixel group 110 has 16 pixels arranged in a 4×4 array. The photosensitive pixel group 110 is an array with 4 pixels in each row and column, including 12 first pixels 111 and 4 second pixels 112; the 4 second pixels 112 are red pixels (R pixels 112r), green pixels (G pixels 112g), blue pixels (B pixels 112b) and infrared pixels (ir pixels 112ir).
[0052] In some embodiments, in a photosensitive pixel group 110, second pixels 112 located on the same diagonal line have different color filters. Setting the second pixels 112 on the same diagonal line as different types of second pixels can effectively ensure uniform distribution of the second pixels 112.
[0053] In some embodiments, with respect to the entire pixel array, any second pixel 112 is surrounded by a plurality of the first pixels 111. Figure 1 As shown, in the entire pixel array, eight first pixels 111 surround one second pixel 112 to form a 3×3 array.
[0054] In some embodiments, along any one of the row direction, the column direction and the diagonal direction, there is a first pixel 111 between two adjacent second pixels 112 .
[0055] As far as the entire pixel array is concerned, a row without a second pixel 112 is arranged between two adjacent rows with second pixels 112 along the column direction, and in a row with second pixels 112, a first pixel 111 is arranged between two adjacent second pixels 112, and a second pixel 112 is arranged between two adjacent first pixels 111; a column without a second pixel 112 is arranged between two adjacent columns with second pixels 112 along the row direction, and in a column with second pixels 112, a first pixel 111 is arranged between two adjacent second pixels 112, and a second pixel 112 is arranged between two adjacent first pixels 111.
[0056] like Figure 1 As shown, in a photosensitive pixel group, the pixel bits in the 2nd row and the 2nd column are B pixels; the pixel bits in the 2nd row and the 4th column are G pixels; the pixel bits in the 4th row and the 2nd column are IR pixels; the pixel bits in the 4th row and the 4th column are R pixels; and the remaining pixel bits are W pixels.
[0057] In other embodiments of the present invention, different types of second pixels 112 may also have different arrangements. Figure 2 As shown, in a photosensitive pixel group, the pixel bits in the 1st row and the 2nd column are B pixels; the pixel bits in the 2nd row and the 4th column are G pixels; the pixel bits in the 3rd row and the 1st column are IR pixels; the pixel bits in the 4th row and the 3rd column are R pixels; and the remaining pixel bits are transparent pixels.
[0058] In other embodiments of the present invention, the first pixel and the second pixel may also have other arrangements. Specifically, in some embodiments of the present invention, in the same photosensitive pixel group 210, any row has one second pixel 212, and any column has one second pixel 212. In some embodiments, in the same photosensitive pixel group 110, second pixels 112 in different rows are in different columns, and second pixels 112 in different columns are in different rows. Figure 3 As shown, in a photosensitive pixel group, the pixel bits in the 1st row and the 2nd column are B pixels; the pixel bits in the 1st row and the 4th column are G pixels; the pixel bits in the 3rd row and the 2nd column are IR pixels; the pixel bits in the 3rd row and the 4th column are R pixels; and the remaining pixel bits are transparent pixels.
[0059] Correspondingly, the present invention also provides an image processing method.
[0060] refer to Figure 4 , shows a flow chart of an embodiment of an image processing method of the present invention.
[0061] The image processing method comprises: step S110, obtaining a mosaic image, wherein the mosaic image is obtained by the image sensor of the present invention, and the mosaic image comprises: a W channel and a color filter channel; step S120, performing a de-mosaic process on the W channel to obtain a W channel image; and step S130, obtaining a color filter channel image according to the W channel image and the color filter channel.
[0062] like Figure 4 As shown, the image processing method includes: first, step S110, obtaining a mosaic image.
[0063] The mosaic image is collected by the image sensor of the present invention. The specific technical solution of the image sensor refers to the technical solution of the aforementioned image sensor, and the present invention will not repeat it here.
[0064] like Figure 1 As shown, the photosensitive pixel group of the image sensor has a first pixel and a plurality of second pixels, wherein the first pixel is a transparent pixel without a color filter or with a transparent color filter (such as Figure 1 As shown in the blank squares in the figure), the second pixels are respectively an R pixel 112r with a red light filter, a G pixel 112g with a green light filter, a B pixel 112b with a blue light filter and an IR pixel 112ir with an infrared filter.
[0065] In the mosaic image, each pixel bit corresponds to a pixel of the image sensor, and each pixel bit has only one pixel value.
[0066] The mosaic image has multiple channels, each of which includes pixel values of multiple pixel bits. The mosaic image of one channel is obtained by pixels with the same structure in the image sensor. The pixel bits of the pixel values included in the same channel correspond to the pixels with the same structure in the image sensor.
[0067] Specifically, the mosaic image includes: a transparent channel (W channel) and a color filter channel. The W channel is obtained by the first pixel in the image sensor. The W channel has a transparent pixel bit (W pixel bit), and the W pixel bit corresponds to the W pixel in the image sensor. The pixel value of the W pixel bit is obtained by the first pixel in the image sensor.
[0068] In some embodiments of the present invention, in step S110, in the step of obtaining a mosaic image, the W channel further has a transparent pixel bit to be interpolated (a W pixel bit to be interpolated). The W pixel bit to be interpolated is a pixel bit whose pixel value is missing in the W channel. The W pixel bit to be interpolated corresponds to the second pixel in the image sensor.
[0069] The color filter channel is obtained from a second pixel in the image sensor. The pixel position of the color filter channel is obtained from a second pixel in the image sensor having a color filter or an infrared filter.
[0070] In some embodiments of the present invention, in step S110, in the step of obtaining a mosaic image, the mosaic image includes a plurality of color filter channels, and the plurality of color filter channels include: a color channel.
[0071] The color channel is obtained by a second pixel having a color filter in the image sensor. The mosaic image has three color channels. Different color channels are obtained by different second pixels in the image sensor.
[0072] In some embodiments of the present invention, in step S110, in the step of obtaining a mosaic image, the color channel has a color pixel bit. Different color channels have different color pixel bits, and the color pixel bits correspond to color pixels in the image sensor. The pixel value of a color pixel in a color channel is obtained by a second pixel having the same color filter in the image sensor.
[0073] Specifically, the mosaic image includes three color channels, namely, an R channel, a G channel, and a B channel. The R channel is obtained from an R pixel in an image sensor, and the R channel has an R pixel bit, and the R pixel bit corresponds to an R pixel in the image sensor. The pixel value of the R pixel bit in the R channel is obtained from the R pixel in the image sensor. The G channel is obtained from a G pixel in an image sensor, and the G channel has a G pixel bit, and the G pixel bit corresponds to the G pixel in the image sensor. The pixel value of the G pixel bit in the G channel is obtained from the G pixel in the image sensor. The B channel is obtained from a B pixel in an image sensor, and the B channel has a B pixel bit, and the B pixel bit corresponds to the B pixel in the image sensor. The pixel value of the B pixel bit in the B channel is obtained from the B pixel in the image sensor.
[0074] In some embodiments of the present invention, in step S110, in the step of obtaining a mosaic image, the mosaic image includes a plurality of color filter channels, and the plurality of color filter channels include: an infrared channel (IR channel). The IR channel is obtained by a second pixel having an infrared filter in the image sensor. The pixel bits of the pixel values included in the IR channel correspond to the IR pixels in the image sensor.
[0075] The IR channel is obtained from an IR pixel in an image sensor, the IR channel has IR pixel bits, the IR pixel bits correspond to the IR pixels in the image sensor, and the pixel values of the IR pixel bits in the IR channel are obtained from the IR pixels in the image sensor.
[0076] It should be noted that the mosaic image is composed of a W channel, an R channel, a G channel, a B channel and an IR channel, so a W pixel bit to be interpolated in the W channel corresponds to one of an R pixel bit, a G pixel bit, a B pixel bit and an IR pixel bit.
[0077] It should also be noted that, in the photosensitive pixel group, the total number of the first pixels accounts for 75% of the total number of pixels in the photosensitive pixel group, and in the W channel, the number of W pixel bits accounts for 75% of the total number of pixel bits in the mosaic image; the total number of the second pixels accounts for 25% of the total number of pixels in the photosensitive pixel group, and in the W channel, the number of W pixel bits to be interpolated accounts for 25% of the total number of pixel bits in the mosaic image.
[0078] Continue to refer Figure 4 The image processing method further includes: step S120, performing a demosaicing process on the transparent channel (W channel) to obtain a W channel image.
[0079] The W channel is demosaiced to obtain a complete W channel, that is, to obtain a W channel image. The W pixel bit quantity of the W channel accounts for up to 75%, and the W channel image obtained by demosaicing has a high signal-to-noise ratio.
[0080] In some embodiments of the present invention, in the step of performing a demosaicing process on the transparent channel (W channel), the W channel is demosaiced according to the gradient information to obtain the transparent channel image (W channel image). Specifically, in the step of performing a demosaicing process on the transparent channel (W channel), the W channel is interpolated according to the gradient information to obtain the pixel value of the W pixel position to be interpolated to obtain the W channel image.
[0081] like Figure 5 As shown, in some embodiments, step S120, the step of de-mosaicing the transparent channel (W channel) includes: step S121, performing an interpolation operation according to the W channel and the color filter channel to obtain an interpolated pixel value of each W pixel position to be interpolated; step S122, obtaining the W channel image according to the W channel and the interpolated pixel values of all the W pixel positions to be interpolated.
[0082] In the mosaic image, the W channel has a plurality of W pixel positions to be interpolated (W pixel positions to be interpolated). In the step of performing the interpolation operation, the interpolation operation is performed on the plurality of W pixel positions to be interpolated of the W channel to obtain interpolated pixel values of the plurality of W pixel positions to be interpolated.
[0083] Combined with reference Figure 6In some embodiments of the examples, the step of performing the interpolation operation includes: Step S121a, performing interpolation calculation on a W pixel position to be interpolated to obtain an interpolated pixel value of the W pixel position to be interpolated. During the interpolation operation, interpolation calculation is performed on each W pixel position to be interpolated in the W channel to obtain an interpolated pixel value of each W pixel position to be interpolated.
[0084] Specifically, the steps of performing interpolation calculation include: step S1211, obtaining a W pixel position to be interpolated and a transparent interpolation array of the W pixel position to be interpolated, wherein the W pixel position to be interpolated is located at the center of the transparent interpolation array; step S1212, obtaining the row direction gradient and the column direction gradient of the W pixel position to be interpolated according to the pixel value of each pixel position in the transparent interpolation array; step S1213, obtaining the interpolation direction according to the relative size of the row direction gradient and the column direction gradient, wherein the interpolation direction is the direction with the smaller gradient in the row direction and the column direction; step S1214, obtaining the interpolation pixel value of the W pixel position to be interpolated according to the pixel values of the adjacent pixel positions of the W pixel position to be interpolated in the W channel along the interpolation direction.
[0085] Step S1211, obtaining a W pixel position to be interpolated and a transparent interpolation array surrounding the W pixel position to be interpolated. For example, in some embodiments, the image sensor for obtaining the mosaic image is as follows: Figure 2 The W pixel bits to be interpolated are B pixel bits, and the transparent interpolation array 310 of the B pixel bits is a 3×3 array. The B pixel bits are located in the transparent interpolation array 310 (as shown in FIG. Figure 7 shown) center.
[0086] like Figure 1 In the image sensor for obtaining the mosaic image, any second pixel 112 is surrounded by a plurality of the first pixels 111; Figure 7 As shown, in the transparent interpolation array 310 of B pixel bits, the B pixel bits are surrounded by 8 W pixel bits.
[0087] After determining the W pixel position (B pixel position) to be interpolated, in step S1212 and step S1213, the row direction gradient and the column direction gradient are obtained to determine the interpolation direction.
[0088] Specifically, in step S1212, in the step of obtaining the row direction gradient and the column direction gradient, the row direction gradient D of the W pixel position to be interpolated is obtained according to the absolute value of the difference between the pixel values of the adjacent pixel positions along the row direction in the pixel positions surrounding the W pixel position to be interpolated in the transparent interpolation array 310. hAccording to the absolute value of the difference between the pixel values of the adjacent pixel positions along the column direction in the pixel positions surrounding the pixel position to be interpolated W in the transparent interpolation array 310, the column direction gradient D of the pixel position to be interpolated W is obtained. v .
[0089] like Figure 7 As shown, in the transparent interpolation array 310, the W pixel bit to be interpolated is the B pixel bit, and the pixel bits surrounding the B pixel bit are respectively W1 pixel bit, W2 pixel bit, W3 pixel bit, W4 pixel bit, W5 pixel bit, W6 pixel bit, W7 pixel bit and W8 pixel bit.
[0090] Therefore, the row direction gradient D of the W pixel positions to be interpolated is h for:
[0091] D h =abs(w1-w2)+abs(w2-w3)+abs(w4-w5)+abs(w6-w7)+abs(w7-w8)
[0092] The column direction gradient D of the W pixel positions to be interpolated v for:
[0093] D v =abs(w1-w4)+abs(w4-w6)+abs(w2-w7)+abs(w3-w5)+abs(w5-w8)
[0094] Among them, wi represents Figure 7 The pixel value of Wi pixel positions, i is a positive integer from 1 to 8.
[0095] Continue to refer Figure 6 After obtaining the row direction gradient and column direction gradient of the W pixel positions to be interpolated, step S1213 obtains the interpolation direction.
[0096] During the interpolation calculation, the interpolation is performed in the direction where the gradient of the W pixel position (B pixel position) to be interpolated is smaller. Therefore, step S1213, the step of obtaining the interpolation direction includes: comparing the relative magnitudes of the row direction gradient and the column direction gradient; and taking the direction with the smaller gradient as the interpolation direction.
[0097] like Figure 6 As shown, after the interpolation direction is obtained, step S1214 obtains the interpolation pixel value of the W pixel position to be interpolated based on the interpolation direction and the W channel.
[0098] Specifically, the interpolation pixel value of the W pixel to be interpolated is obtained according to the average of the pixel values of the W pixels adjacent to the W pixel to be interpolated along the interpolation direction. Figure 7 As shown, when Dh >D V When the interpolation pixel value w of the W pixel position to be interpolated is B :w B =(w2+w7) / 2; when D h <D V When the interpolation pixel value w of the W pixel position to be interpolated is B :w B =(w4+w5) / 2.
[0099] In some embodiments of the present invention, Figure 6 The step of performing the interpolation operation also includes: when the row direction gradient and the column direction gradient are equal, executing step S1215, obtaining the interpolation pixel value of the transparent pixel to be interpolated according to the pixel values of the transparent pixel bits adjacent to the transparent pixel bit to be interpolated along the row direction and the pixel values of the transparent pixel bits adjacent to the transparent pixel bit to be interpolated along the column direction in the transparent interpolation array.
[0100] like Figure 7 As shown, when D h =D V When the interpolation pixel value w of the W pixel positions to be interpolated is: w=(w2+w4+w5+w7) / 4.
[0101] Since the calculation of the row direction gradient and the column direction gradient are respectively based on 5 groups of gradients of 8 pixel positions adjacent to the W pixel positions to be interpolated, the calculation results are more accurate, the obtained row direction gradient and column direction gradient are more accurate, and the obtained interpolation direction is more accurate, which is conducive to obtaining more accurate de-mosaicing results, especially can effectively improve the resolution of lines in the image.
[0102] Continue to refer Figure 5 The step of performing the interpolation operation includes: performing interpolation calculation on a W pixel position to be interpolated to obtain the interpolation pixel value of the W pixel position to be interpolated; step S121, in the step of performing the interpolation operation, the interpolation calculation is also traversed over each W pixel position to be interpolated to obtain the interpolation pixel value of each W pixel position to be interpolated.
[0103] For example, in some embodiments, the image sensor for obtaining the mosaic image is as follows: Figure 1 Specifically, the step of obtaining the interpolation pixel value of each W pixel position to be interpolated includes: Figure 7 Based on the transparent interpolation array shown in FIG. 1 , the interpolation calculation traverses each corresponding W pixel position to be interpolated in the W channel; Figure 7 Based on the transparent interpolation array shown, the interpolation calculation traverses each to-be-interpolated W pixel bit corresponding to one of the B pixel bit, the G pixel bit, the R pixel bit and the IR pixel bit.
[0104] After obtaining the interpolated pixel values of all the W pixel positions to be interpolated, step S122 is to obtain the W channel image. Specifically, the transparent channel image is obtained according to the interpolated pixel values of the transparent channel and all the transparent pixel positions to be interpolated.
[0105] The W channel image is a complete W channel. The W channel image, i.e., a complete W channel, can be obtained by combining the interpolation pixel values of all W pixel positions to be interpolated obtained by interpolation calculation with the pixel values of W pixel positions in the W channel, wherein the W channel image includes: the pixel values of all pixel positions in the W channel.
[0106] Continue to refer Figure 4 After obtaining the W channel image, the image processing method further includes: step S130, obtaining a color filter channel image according to the W channel image and the color filter channel.
[0107] In some embodiments, the mosaic image includes multiple color filter channels, and the multiple color filter channels include: three color channels and an infrared channel; in the step of obtaining the color filter channel image, based on the transparent channel image, three color channel images and an infrared channel image are respectively obtained according to the three color channels and the infrared channel.
[0108] For example, the mosaic image includes: an R channel, a G channel, a B channel and an IR channel; in the step of obtaining the color filter channel image, an R color channel image, a G color channel image, a B color channel image and an IR channel image are obtained.
[0109] like Figure 4 As shown, step S130, the step of obtaining a color filter channel image includes: step S131, performing a demosaicing process on a color channel to obtain a corresponding color channel image; step S132, performing a demosaicing process on the infrared channel to obtain an infrared channel image.
[0110] In some embodiments, the step of performing a demosaicing process on a color channel to obtain a corresponding color channel image includes: obtaining a color channel; based on the assumption that the ratio of the pixel value at the W pixel position to the pixel value of the pixel position of the obtained color channel is equal to the ratio of the corresponding low-frequency signal, performing a demosaicing process on the color channel to obtain the corresponding color channel image.
[0111] Specifically, in the step of obtaining the color filter channel image, the three color channels are respectively subjected to demosaic processing to obtain three color channel images. Specifically, the step of obtaining the color filter channel image includes: performing demosaic processing on the R channel, the G channel and the B channel respectively to obtain the R channel image, the G channel image and the B channel image.
[0112] In some embodiments, in the step of obtaining the IR channel image, the IR channel may be de-mosaiced based on the assumption that the ratio of the pixel value at the W pixel position to the pixel value at the pixel position of the infrared channel is equal to the ratio of the corresponding low-frequency signal to obtain the IR channel image.
[0113] In other embodiments of the present invention, in the step of obtaining the color filter channel image, the color filter channel image can also be obtained by utilizing the characteristic that the color difference channel has a lower spatial frequency. Specifically, the step of obtaining the color filter channel image includes: utilizing the characteristic that the color difference channel has a lower spatial frequency, performing de-mosaic processing on the R channel, the G channel, the B channel, and the IR channel, respectively, to obtain the R channel image, the G channel image, the B channel image, and the IR channel image.
[0114] Because in the step of obtaining a mosaic image, the image sensor for obtaining the mosaic image is the image sensor of the present invention, and no infrared cutoff filter is provided in the image sensor, the first pixel in the image sensor can receive near-infrared light, and the W channel of the mosaic image includes infrared information; the W channel image obtained by de-mosaicing the W channel has a higher signal-to-noise ratio, and the color filter channel image obtained by de-mosaicing the W channel image with a high signal-to-noise ratio also has a higher signal-to-noise ratio.
[0115] Continue to refer Figure 4 In some embodiments, the image processing method further includes: step S140, obtaining a color image based on all color channel images.
[0116] Specifically, in step S140, in the step of obtaining a color image, all color channel images are fused to obtain the color image. For example, the image sensor for obtaining the mosaic image is as follows: Figure 2 In the step of obtaining a color image, the R channel image, the G channel image and the B channel image are fused to obtain the color image.
[0117] It should be noted that, in some embodiments of the present invention, step S130, the step of obtaining a color filter channel image also includes: step S133, based on a color channel image and the infrared channel image, combined with a preset infrared correction coefficient, performing infrared correction on the color channel image to obtain a corresponding corrected color channel image.
[0118] The infrared correction coefficient can characterize the magnitude of the influence of near infrared light in the color channel image. Different color channels are affected differently by near infrared light. Each color channel image has a corresponding infrared correction coefficient. The infrared correction coefficient corresponds to the color channel image one by one.
[0119] The step of performing infrared correction on the color channel image can remove the influence of near infrared light in the color channel image, eliminate the influence of near infrared light on the image color, avoid the image color deviation caused by near infrared light, and obtain a color image with normal color.
[0120] For example, the image sensor for obtaining the mosaic image is as follows: Figure 1 As shown. The corrected color channel images obtained are:
[0121] R'=Rk R *IR
[0122] G'=Gk G *IR
[0123] B'=Bk B *IR
[0124] After obtaining the corrected color channel images, in step S140, in the step of obtaining a color image, the color image is obtained based on all the corrected color channel images.
[0125] Specifically, in step S140, in the step of obtaining a color image, all corrected color channel images are fused to obtain the color image. For example, the image sensor for obtaining the mosaic image is as follows: Figure 1 In the step of obtaining a color image, the R' channel image, the G' channel image and the B' channel image are fused to obtain the color image.
[0126] Continue to refer Figure 4 In some embodiments of the present invention, after obtaining the color image, the image processing method further includes: step S150, denoising the color image to obtain a denoised color image.
[0127] In some specific embodiments, step S150, the step of denoising the color image includes: step S151, performing spatial transformation on the color image to obtain a brightness channel image and two color channel images in a denoised space, wherein the denoised space is a space in which brightness information and color information are separated; step S152, performing denoising on the brightness channel image using the W channel image to obtain a denoised brightness channel image; step S153, performing spatial inverse transformation based on the denoised brightness channel image and the two color channel images to obtain a denoised color image.
[0128] The noise reduction space is a space where brightness information and color information are separated. By performing spatial conversion and converting the color image into the noise reduction space, the brightness information and color information of the color image can be separated. In some exemplary embodiments, the noise reduction space is one of a YUV space, a Lab space, or a HSL space.
[0129] In some embodiments, the color image is an image in a color space (RGB space), and the color image includes: an R channel image, a G channel image, and a B channel image; in the step of performing space conversion, the color image in the RGB space is converted to an image in the denoising space to obtain a brightness channel image and two color channel images.
[0130] The W channel image has image information in the wavelength range from infrared light to visible light, and the signal-to-noise ratio of the W channel image is higher. Using the W channel image to reduce the noise of the brightness channel image can better improve the signal-to-noise ratio of the brightness channel image.
[0131] In some embodiments, in step 152, in the step of using the W channel image to reduce the noise of the brightness channel image, a guided filtering technique is used to reduce the noise of the brightness channel image. Specifically, in the step of using the guided filtering technique to reduce the noise of the brightness channel image, the W channel image is used as a guide image, the brightness channel image is used as a target image to be filtered, and the brightness channel image is reduced in noise, so as to obtain a brightness channel image after noise reduction.
[0132] Perform spatial inverse conversion to convert the denoised brightness channel image and the two color channel images back to the original color space to obtain a denoised color image.
[0133] In some embodiments, the color image before denoising is an image in RGB space. In the step of performing spatial inverse conversion, the denoised brightness channel image and two color channel images in the denoised space are converted to RGB space to obtain the denoised color image.
[0134] refer to Figure 8 , shows a flow chart of another embodiment of the image processing method of the present invention.
[0135] The present invention will not repeat the same points as the above-mentioned embodiments. The difference from the above-mentioned embodiments is that in some embodiments of the present invention, in the step of obtaining the color filter channel image, based on the transparent channel image, the three color channels are combined by calculating the connected domain to obtain three color channel images respectively. Since the spatial frequency of color information is much lower than the spatial frequency of brightness information, parts of an object are likely to have the same color. Therefore, by calculating the connected domain in the transparent channel according to the grayscale, three color channels are obtained, which can effectively overcome the interference of brightness information on color information.
[0136] like Figure 8As shown, in some embodiments of the present invention, step S230, the step of obtaining a color filter channel image includes: step S231, performing connected domain division according to the transparent channel image to obtain a same-color connected domain for each pixel; step S232, performing a space conversion operation according to the three color channels to obtain two chromaticity information of each same-color connected domain in the processing space to obtain corresponding two color channel images, wherein the processing space is a color space in which brightness and color are separated; step S233, performing a deflection correction on the transparent channel image according to the infrared channel to obtain a brightness channel image; step S234, performing a space inverse conversion according to the brightness channel image and the two color channel images to obtain three color channel images.
[0137] A connected component refers to an image region (Region, Blob) composed of pixels with the same properties in an image. In some exemplary embodiments, the same-color connected domain of each pixel obtained in the step of connecting domain division refers to a region composed of pixels with the same grayscale and adjacent to each other in the image.
[0138] In some embodiments, Fig. 9 As shown, in step S231, in the step of connecting domain division, a connecting domain calculation is performed on a starting point pixel to obtain a same-color connected domain of the starting point pixel; wherein, the step of connecting domain calculation includes: step S231a, comparing the pixel value of the starting point pixel with the pixel values of the surrounding pixels, wherein the positional relationship between the surrounding pixels and the starting point pixel conforms to the basic structure of the connected domain; step S231b, when the difference between the pixel value of the starting point pixel and the pixel value of the surrounding pixels is less than a preset connected domain threshold, marking the surrounding pixels as belonging to the same-color connected domain of the starting point pixel.
[0139] By calculating the connected domain of a starting pixel, a connected domain with the starting pixel can be obtained, that is, a region composed of pixels connected to the position of the starting pixel and having the same grayscale. It should be noted that, when noise is taken into account, the obtained connected domain is a region composed of pixels close to the position of the starting pixel and having similar grayscale.
[0140] Objects usually occupy a certain number of pixels in an image. Generally speaking, the highest frequency color information in an image is colored lines. In some embodiments, the number of pixel bits in the connected domain is not less than 3, that is, the number of pixels constituting a line should be not less than three, and most of the color information is low frequency information. For example, the adjacency of the connected domain is one of a four-neighborhood, a D-neighborhood, or an eight-neighborhood.
[0141] By comparing the difference between the pixel value of the starting pixel and the pixel value of the surrounding pixels, the transparent channel image is binarized according to the grayscale value of the starting pixel and the connected domain threshold, and the same-color connected domain is marked according to the four-neighborhood adjacency. The connected domain threshold is set based on the bit depth and noise intensity of the image.
[0142] In step S231, in the step of dividing the connected domain, the connected domain calculation is also performed to traverse all pixel positions of the transparent channel image to obtain the same-color connected domains of all pixel positions.
[0143] It should be noted that in some embodiments, in the step of connecting domain division, the connected domain calculation is performed on multiple starting pixel positions at the same time to obtain the same color connected domain of each starting pixel position. Connected domain calculation is performed on multiple starting pixel positions at the same time to speed up the calculation speed of connected domain division.
[0144] Continue to refer Figure 8 After the connected domain is divided and the same-color connected domain of each pixel is obtained, step S232 is executed to perform a spatial conversion operation to obtain two chromaticity information of each same-color connected domain, thereby obtaining two color channel images.
[0145] In some embodiments of the present invention, step S232, the step of performing a space conversion operation includes: performing a space conversion calculation on a same-color connected domain to obtain two chromaticity information of the same-color connected domain in the processing space; Fig.10 As shown, the step of spatial conversion calculation includes: step S232a, obtaining the color pixel mean of the same-color connected domain, and the color pixel mean is the mean of the pixel values of a color channel in the same-color connected domain; step S232b, performing spatial conversion calculation according to the three color pixel means of the same-color connected domain to obtain two chromaticity information of the same-color connected domain.
[0146] Specifically, the mosaic image obtained by the image sensor is in RGB color space. The processing space is a color space in which brightness and color are separated. The spatial frequency of the processing space is low and is not easily affected by infrared light.
[0147] For example, the processing space may be a chromaticity space, for example, the chromaticity space is a YUV color space, that is, in step S232, in the step of performing a space conversion operation, information in the RGB color space is converted into the YUV color space.
[0148] The pixels in the same connected domain have the same color information; step S232a, obtaining the color pixel mean corresponding to the color channel of the same color connected domain according to all pixel values of a color channel in the same color connected domain.
[0149] For example, according to the pixel values of all R pixels in the same-color connected domain, the mean value of R pixels of the same-color connected domain is obtained; according to the pixel values of all G pixels in the same-color connected domain, the mean value of G pixels of the same-color connected domain is obtained; according to the pixel values of all B pixels in the same-color connected domain, the mean value of B pixels of the same-color connected domain is obtained.
[0150] When the same-color connected domain has three types of pixels: R pixels, G pixels, and B pixels, step S232b is executed to obtain two chromaticity information of the same-color connected domain.
[0151] For example, the color space is a YUV space. The conversion method between the YUV space and the RGB space can be:
[0152] U=(-43*R-85*G+128*B) / 256+128
[0153] V=(128*R-107*G-21*B) / 256+128
[0154] Among them, the sum of the conversion weight coefficients of the R channel, the G channel and the B channel in the U channel and the V channel is 0; and in the Y channel, the sum of the conversion weight coefficients of the R channel, the G channel and the B channel is 1.
[0155] It should be noted that the sum of the weight coefficients of the UV channel in the YUV space and RGB space conversion method is 0, which means that when the RGB space is affected by similar infrared light, the color space is less affected by near-infrared light.
[0156] Specifically, based on the conversion method between the YUV space and the RGB space, the U chromaticity value and the V chromaticity value of the same-color connected domain are obtained according to the R pixel mean value, the G pixel mean value and the B pixel mean value of the same-color connected domain.
[0157] In step S232a, in the step of obtaining the color pixel means corresponding to the color channel of the same-color connected domain, the number of the obtained color pixel means is related to the type of pixels in the same-color connected domain. For example, if the same-color connected domain only has R pixels and B pixels and lacks G pixels, the same-color connected domain only has the mean values of R pixels and B pixels, but does not have the mean value of G pixels; or if the same-color connected domain only has G pixels and B pixels and lacks R pixels, the same-color connected domain only has the mean values of G pixels and B pixels, but does not have the mean value of R pixels.
[0158] Therefore, when there are fewer types of pixels in the same-color connected domain, and the same-color connected domain has only two or even one type of pixels, in step S232a, in the step of obtaining the color pixel means corresponding to the color channel of the same-color connected domain, the number of color pixel means obtained is also smaller, only two or one. Therefore, when the number of color pixel means of the same-color connected domain is less than three, the number of pixel types in the same-color connected domain is less than three, and it is impossible to have R pixels, B pixels, and G pixels at the same time.
[0159] like Fig.10 In some of the embodiments shown, the step of spatial conversion calculation also includes: when the number of color pixel means of the same-color connected domain is less than three, step S232c, recalculating the connected domain for the starting pixel of the same-color connected domain with eight neighborhoods to obtain the recalculated connected domain of the starting pixel; step S232d, obtaining the color pixel mean of the recalculated connected domain; step S232e, performing spatial conversion calculation based on the three color pixel means of the recalculated connected domain to obtain two chromaticity information of the recalculated connected domain.
[0160] The number of color pixel types of the same-color connected domain is less than three, and the same-color connected domain cannot satisfy the condition of having three types of pixels at the same time, so step S232c is executed.
[0161] The connected domain is recalculated for the starting pixel position corresponding to the same-color connected domain according to the adjacency of the eight neighborhoods to obtain a recalculated connected domain.
[0162] Specifically, in step S232c, in the step of obtaining the recalculated connected domain of the starting point pixel, the method of recalculating the connected domain for the starting point pixel of the same-color connected domain can refer to the aforementioned step S231, the step of dividing the connected domain; except that in step S232c, in the step of obtaining the recalculated connected domain of the starting point pixel, the adjacency of the connected domain adopted is judged as eight neighborhoods.
[0163] After obtaining the recalculated connected domain, two chromaticity information of the recalculated connected domain are obtained according to the same method as in the step of obtaining two chromaticity information of the same-color connected domain. Specifically, after obtaining the R pixel mean, G pixel mean and B pixel mean of the recalculated connected domain, the U chromaticity value and V chromaticity value of the recalculated connected domain are obtained according to.
[0164] Similarly, when there are fewer types of pixels in the recalculated connected domain, the recalculated connected domain has only two or even one type of pixels, the number of color pixels of the recalculated connected domain is less than three, or the recalculated connected domain has only two or one color pixel.
[0165] like Fig.10As shown, the step of spatial conversion calculation also includes: when the number of color pixel means of the recalculated connected domain is less than three, according to the color pixel means of the recalculated connected domain, step S232f, combines the color pixel means of the pixel positions adjacent to the starting pixel position of the recalculated connected domain, performs spatial conversion calculation, and obtains two chromaticity information of the recalculated connected domain.
[0166] The number of color pixel types of the recalculated connected domain is less than three, and the recalculated connected domain cannot satisfy the condition of having three types of pixels at the same time, so the chromaticity information is calculated by replacing the most adjacent color information.
[0167] It should be noted that after obtaining two chromaticity information of each same-color connected domain or recalculated connected domain in the processing space, two color channel images are correspondingly obtained according to the two chromaticity information of all same-color connected domains or recalculated connected domains.
[0168] Specifically, the chromaticity space is a YUV color space, and the two chromaticity information of all connected domains of the same color or recalculated connected domains are U chromaticity values and V chromaticity values, and correspondingly, a U channel image and a V channel image are obtained respectively.
[0169] Continue to refer Figure 8 , step S230, the step of obtaining the color filter channel image also includes: based on the infrared channel, correcting the transparent channel image to obtain a brightness channel image.
[0170] Step S233, the step of correcting the transparent channel image can remove the near-infrared information contained in the transparent channel image to avoid color deviation caused by near-infrared light.
[0171] like Fig.11 As shown, in some embodiments of the present invention, step S233, the step of correcting the transparent channel image includes: step S233a, de-mosaicing the infrared channel to obtain an infrared channel image; step S233b, based on the transparent channel image and the infrared channel image, combined with a preset infrared correction coefficient, performing infrared correction on the transparent channel image to obtain a corrected transparent channel image; step S233c, based on the corrected transparent channel image, obtaining a brightness channel image.
[0172] In step S233a, in the step of performing de-mosaic processing on the infrared channel, the IR channel can be de-mosaiced based on the assumption that the ratio of the pixel value at the W pixel position to the pixel value of the pixel position of the infrared channel is equal to the ratio of the corresponding low-frequency signal to obtain an IR channel image.
[0173] Step S233b, in the step of performing infrared correction on the transparent channel image, the near infrared light information is subtracted from the W channel image in combination with the infrared correction coefficient to obtain a corrected transparent channel image. The corrected transparent channel image is:
[0174] L=Wk W *IR
[0175] Among them, k w is the infrared correction factor.
[0176] Step S233c, in the step of obtaining the brightness channel image, the corrected transparent channel image L is used as the L channel image.
[0177] Continue to refer Figure 8 After obtaining the brightness channel image and the two color channel images, execute step S234 to perform spatial inverse conversion to obtain three color channel images.
[0178] Specifically, according to the U channel image and the V channel image obtained in step S232 and the L channel image obtained in step S233, the YUV space is converted into the RGB space to obtain three color channel images, and the three color channel images are: a complete R channel image, a complete G channel image and a complete B channel image.
[0179] It should be noted that, in some embodiments, the step of obtaining the brightness channel image also includes: fusing the corrected transparent channel image with the transparent channel image based on a fusion coefficient; and obtaining the brightness channel image based on the result of fusing the corrected transparent channel image with the transparent channel image.
[0180] The W channel includes information in all wavelength ranges from visible light to near-infrared light; among all channels of the mosaic image, the W channel image has the highest signal-to-noise ratio; and the signal-to-noise ratio of the brightness channel image can be further improved by fusing the corrected transparent channel image with the transparent channel image.
[0181] The result of the fusion of the corrected transparent channel image and the transparent channel image is L w :
[0182] L W =L+α·W
[0183] Among them, α is the fusion coefficient.
[0184] In some embodiments, the step of obtaining the brightness channel image further includes: setting the fusion coefficient. The fusion coefficient can represent the ambient illumination during the process of the image sensor obtaining the Marseille image. For example, in the step of setting the fusion coefficient, the fusion coefficient is set according to the ambient illumination.
[0185] For example, when the ambient illumination is low and the ISO is large, the image noise is large. In the step of setting the fusion coefficient, a larger fusion coefficient α is set to increase the proportion of the W channel image in the brightness channel image to improve the image signal-to-noise ratio; when the ambient illumination is high and the ISO is small, the image noise is small. In the step of setting the fusion coefficient, a smaller fusion coefficient can be set without too much proportion of the W channel image.
[0186] Correspondingly, the present invention also provides an image processing device, comprising: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the processor executes the steps of the image processing method of the present invention.
[0187] The processor of the image processing device executes the steps of the image processing method of the present invention. The specific technical solution of the image processing device refers to the embodiment of the above-mentioned image processing method, and the present invention will not repeat it here.
[0188] In addition, the present invention also provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transient storage medium, on which computer instructions are stored, and when the computer instructions are executed, the steps of the image processing method of the present invention are executed.
[0189] The computer instructions stored in the readable storage medium execute the steps of the image processing method of the present invention when they are executed. The specific technical solution of the readable storage medium refers to the embodiment of the above-mentioned image processing method, and the present invention will not be repeated here.
[0190] In summary, the image sensor includes: a plurality of photosensitive pixel groups, the plurality of photosensitive pixel groups are arranged in an array; the photosensitive pixel group includes: a plurality of first pixels and a plurality of second pixels, the first pixels are transparent pixels, and the second pixels are color pixels or infrared pixels; along any one of the row direction and the column direction, there is at least one first pixel between adjacent second pixels, and in the photosensitive pixel group, the total number of the first pixels accounts for 75% of the total number of pixels in the photosensitive pixel group. The first pixels are transparent pixels, which can receive light in the visible light band and the near-infrared band, and the total number of the first pixels accounts for up to 75%, which can better improve the signal-to-noise ratio of the image sensor; a portion of the second pixels are infrared pixels, which can only receive light in the near-infrared band, which can provide a basis for removing the influence of light in the near-infrared band on color, so as to restore the image color.
[0191] In the image processing method, a complete W channel image is obtained by mosaic processing the W channel of the mosaic image; and a color filter channel image is obtained according to the W channel image and the color filter channel. Since the W channel of the mosaic image is obtained by the first pixel in the image sensor of the present invention, the W channel includes light in the wavelength range from near infrared to visible light, and the W channel has a higher signal-to-noise ratio; based on the W channel, the color filter channel image obtained can also have a better signal-to-noise ratio, thereby effectively improving the signal-to-noise ratio of the color image finally obtained.
[0192] The infrared channel of the mosaic image is obtained by the second pixel which is an infrared pixel in the image sensor of the present invention; based on the color filter channel and the W channel with a high signal-to-noise ratio, the color channel image of the complete channel obtained has a high signal-to-noise ratio, and can also remove the influence of near-infrared light in the color channel image to restore a color image close to human vision.
[0193] Although the present invention is disclosed as above, the present invention 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 invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. An image sensor, characterized in that: include: A plurality of photosensitive pixel groups, wherein the plurality of photosensitive pixel groups are arranged in an array; The photosensitive pixel group includes: a plurality of first pixels and a plurality of second pixels, the first pixels are transparent pixels, and the second pixels are color pixels or infrared pixels; Along any one direction of the row direction and the column direction, there is at least one first pixel between adjacent second pixels, and in the photosensitive pixel group, the total number of the first pixels accounts for 75% of the total number of pixels in the photosensitive pixel group.
2. The image sensor according to claim 1, wherein: The first pixel has a transparent color filter or the first pixel has no color filter to transmit light in the visible light band and the near infrared band; The second pixel has a color filter or an infrared filter.
3. The image sensor according to claim 2, wherein: The color filter is one of a red filter, a blue filter, and a green filter.
4. The image sensor according to claim 3, wherein: The red color filter is configured to transmit light in the red wavelength band and light in the near infrared wavelength band; The blue color filter is configured to transmit light in the blue wavelength band and light in the near infrared wavelength band; The green color filter is configured to transmit light in a green wavelength band and light in a near infrared wavelength band.
5. The image sensor according to claim 2, wherein: The infrared filter is a superposition of a red filter and a blue filter.
6. The image sensor according to claim 2, wherein: The infrared filter is configured to transmit light in the near infrared band.
7. The image sensor according to any one of claims 1 to 6, wherein: A photosensitive pixel group has a red pixel, a green pixel, a blue pixel and an infrared pixel, wherein the red pixel is a second pixel with a red filter, the green pixel is a second pixel with a green filter, the blue pixel is a second pixel with a blue filter, and the infrared pixel is a second pixel with an infrared filter.
8. The image sensor according to claim 7, wherein: The numbers of the red pixels, the green pixels, the blue pixels and the infrared pixels in the same photosensitive pixel group are respectively equal.
9. The image sensor according to claim 7, wherein: In the photosensitive pixel group, the total number of the second pixels accounts for 25% of the total number of pixels in the photosensitive pixel group.
10. The image sensor according to claim 9, wherein: The number of the red pixels, the green pixels, the blue pixels and the infrared pixels in the same photosensitive pixel group respectively accounts for 1 / 16 of the total number of pixels in the photosensitive pixel group.
11. The image sensor according to claim 7, wherein: In a photosensitive pixel group, second pixels with different color filters are evenly distributed.
12. The image sensor according to claim 7, wherein: In the same photosensitive pixel group, any row has one second pixel, and any column has one second pixel.
13. The image sensor according to claim 12, wherein: In the same photosensitive pixel group, second pixels in different rows are in different columns, and second pixels in different columns are in different rows.
14. The image sensor according to claim 7, wherein: In the image sensor, any second pixel is surrounded by a plurality of the first pixels.
15. The image sensor according to claim 14, wherein: In any one direction of the row direction, the column direction and the diagonal direction, there is a first pixel between two adjacent second pixels.
16. The image sensor according to claim 14, wherein: In a photosensitive pixel group, second pixels arranged along a diagonal direction have different color filters.
17. The image sensor according to claim 7, wherein: The photosensitive pixel group has 16 pixels arranged in a 4×4 array.
18. The image sensor according to claim 17, wherein: In a photosensitive pixel group, The pixel at row 2 and column 2 is a blue pixel; The pixel in row 2 and column 4 is a green pixel; The pixel in row 4 and column 2 is an infrared pixel; The pixel at row 4 and column 4 is a red pixel; The remaining pixel bits are transparent pixels.
19. The image sensor according to claim 17, wherein: In a photosensitive pixel group, The pixel in row 1 and column 2 is a blue pixel; The pixel in row 2 and column 4 is a green pixel; The pixel in row 3 and column 1 is an infrared pixel; The pixel at row 4 and column 3 is a red pixel; The remaining pixel bits are transparent pixels.
20. The image sensor according to claim 17, wherein: In a photosensitive pixel group, The pixel in row 1 and column 2 is a blue pixel; The pixel in row 1 and column 4 is a red pixel; The pixel position in the 3rd row and the 2nd column is an infrared pixel; The pixel in row 3 and column 4 is a green pixel; The remaining pixel bits are transparent pixels.
21. An image processing method, characterized in that: include: Obtaining a mosaic image, wherein the mosaic image is obtained by the image sensor according to any one of claims 1 to 20, and the mosaic image comprises: a transparent channel and a color filter channel; Performing a demosaicing process on the transparent channel to obtain a transparent channel image; A color filter channel image is obtained according to the transparent channel image and the color filter channel.
22. The image processing method according to claim 21, characterized in that: In the step of performing a demosaicing process on the transparent channel, the demosaicing process is performed on the transparent channel according to the gradient information to obtain the transparent channel image.
23. The image processing method according to claim 21 or 22, characterized in that: In the step of obtaining a mosaic image, the transparent channel has transparent pixel bits and transparent pixel bits to be interpolated; The step of performing demosaicing on the transparent channel comprises: According to the transparent channel, an interpolation operation is performed to obtain an interpolation pixel value of each transparent pixel to be interpolated; The transparent channel image is obtained according to the transparent channel and the interpolated pixel values of all the transparent pixel bits to be interpolated.
24. The image processing method according to claim 23, characterized in that: The step of performing the interpolation operation includes: performing interpolation calculation on a transparent pixel position to be interpolated to obtain an interpolation pixel value of the transparent pixel position to be interpolated; The steps for interpolation calculation include: Obtain a transparent pixel position to be interpolated and a transparent interpolation array of the transparent pixel position to be interpolated, wherein the transparent pixel position to be interpolated is located at the center of the transparent interpolation array; Obtaining, according to the pixel value of each pixel bit in the transparent interpolation array, a row direction gradient and a column direction gradient of the transparent pixel bit to be interpolated; Obtaining an interpolation direction according to the relative magnitudes of the row direction gradient and the column direction gradient, wherein the interpolation direction is a direction having a smaller gradient between the row direction and the column direction; The interpolation pixel value of the transparent pixel bit to be interpolated is obtained according to the pixel values of the transparent pixel bits adjacent to the transparent pixel bit to be interpolated along the interpolation direction.
25. The image processing method according to claim 24, characterized in that: The steps of interpolation operation also include: When the row direction gradient and the column direction gradient are equal, the interpolation pixel value of the transparent pixel bit to be interpolated is obtained according to the pixel values of the pixel bits adjacent to the transparent pixel bit to be interpolated along the row direction and the pixel values of the pixel bits adjacent to the transparent pixel bit to be interpolated along the column direction in the transparent interpolation array.
26. The image processing method according to claim 21, characterized in that: In the step of obtaining a mosaic image, the mosaic image includes a plurality of color filter channels, and the plurality of color filter channels include: three color channels and an infrared channel; In the step of obtaining the color filter channel image, based on the transparent channel image, three color channel images and an infrared channel image are obtained respectively according to the three color channels and the infrared channel; The image processing method further comprises: obtaining a color image according to all color channel images.
27. The image processing method according to claim 26, characterized in that: The steps of obtaining the color filter channel image include: Performing a demosaicing process on the infrared channel to obtain an infrared channel image; Performing demosaicing processing on a color channel to obtain a corresponding color channel image; According to a color channel image and the infrared channel image, combined with a preset infrared correction coefficient, infrared correction is performed on the color channel image to obtain a corresponding corrected color channel image; In the step of obtaining a color image, the color image is obtained based on all corrected color channel images.
28. The image processing method according to claim 27, characterized in that: Also includes: De-noising the color image to obtain a de-noised color image.
29. The image processing method according to claim 28, characterized in that: The step of reducing noise on the color image comprises: Performing spatial transformation on the color image to obtain a brightness channel image and two color channel images in a noise reduction space, wherein the noise reduction space is a space where brightness information and color information are separated; Using the transparent channel image to reduce noise on the brightness channel image to obtain a brightness channel image after noise reduction; According to the denoised brightness channel image and the two color channel images, spatial inverse transformation is performed to obtain a denoised color image.
30. The image processing method according to claim 26, characterized in that: In the step of obtaining the color filter channel image, based on the transparent channel image, the three color channels are combined by calculating the connected domain to obtain three color channel images respectively.
31. The image processing method according to claim 30, characterized in that: The steps of obtaining the color filter channel image include: According to the transparent channel image, connected domain division is performed to obtain a same-color connected domain for each pixel; According to the three color channels, a space conversion operation is performed to obtain two chromaticity information of each same-color connected domain in the processing space to obtain corresponding two color channel images, wherein the processing space is a color space separated by brightness and color; According to the infrared channel, the transparent channel image is corrected to obtain a brightness channel image; A spatial inverse conversion is performed according to the brightness channel image and the two color channel images to obtain three color channel images.
32. The image processing method according to claim 31, characterized in that: In the step of dividing the connected domain, a connected domain calculation is performed on a starting point pixel to obtain a same-color connected domain of the starting point pixel; The steps for computing the connected domain include: Comparing the pixel value of the starting pixel with the pixel values of surrounding pixels, wherein the positional relationship between the surrounding pixels and the starting pixel conforms to the basic structure of a connected domain; When the difference between the pixel value of the starting pixel and the pixel value of the surrounding pixels is less than a preset connected domain threshold, the surrounding pixels are marked as belonging to the same-color connected domain of the starting pixel.
33. The image processing method according to claim 32, characterized in that: The number of pixel bits in the basic structure of the connected domain is not less than 3.
34. The image processing method according to claim 33, characterized in that: The adjacency of the connected domain is one of four-neighborhood, D-neighborhood or eight-neighborhood.
35. The image processing method according to claim 32, characterized in that: In the step of dividing the connected domain, the connected domain is calculated for multiple starting pixel positions at the same time to obtain the same-color connected domain of each starting pixel position.
36. The image processing method according to claim 31, characterized in that: The step of performing the space conversion operation includes: performing space conversion calculation on a same-color connected domain to obtain two chromaticity information of the same-color connected domain in the processing space; The steps of space transformation calculation include: Obtaining a color pixel mean value of the same-color connected domain, wherein the color pixel mean value is a mean value of pixel values of a color channel in the same-color connected domain; A space conversion calculation is performed according to the color pixel means of each of the three color channels of the same-color connected domain to obtain two chromaticity information of the same-color connected domain.
37. The image processing method according to claim 36, characterized in that: The step of spatial conversion calculation also includes: when the number of color pixel means of the same-color connected domain is less than three, recalculating the connected domain for the starting pixel of the same-color connected domain with eight neighborhoods to obtain the recalculated connected domain of the starting pixel; Obtaining a color pixel mean value of the recalculated connected domain; A space conversion calculation is performed according to the mean values of the three color pixels of the recalculated connected domain to obtain two chromaticity information of the recalculated connected domain.
38. The image processing method according to claim 37, characterized in that: The step of spatial conversion calculation also includes: when the number of color pixel means of the recalculated connected domain is less than three, spatial conversion calculation is performed based on the color pixel mean of the recalculated connected domain and combined with the color pixel mean of the pixel positions adjacent to the starting pixel position of the recalculated connected domain to obtain two chromaticity information of the recalculated connected domain.
39. The image processing method according to claim 31, characterized in that: The step of correcting the transparent channel image comprises: Performing a demosaicing process on the infrared channel to obtain an infrared channel image; According to the transparent channel image and the infrared channel image, combined with a preset infrared correction coefficient, infrared correction is performed on the transparent channel image to obtain a corrected transparent channel image; A brightness channel image is obtained according to the corrected transparent channel image.
40. The image processing method according to claim 39, characterized in that: The step of obtaining the brightness channel image also includes: Based on the fusion coefficient, the corrected transparent channel image is fused with the transparent channel image; The brightness channel image is obtained according to the result of fusing the corrected transparent channel image with the transparent channel image.
41. The image processing method according to claim 40, characterized in that: The step of obtaining the brightness channel image also includes: setting the fusion coefficient.
42. The image processing method according to claim 41, characterized in that: In the step of setting the fusion coefficient, the fusion coefficient is set according to the ambient illumination.
43. An image processing device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and wherein when the processor executes the program, the processor executes the steps of the image processing method described in any one of claims 21 to 42.
44. A computer-readable storage medium, wherein the computer-readable storage medium is a non-volatile storage medium or a non-transient storage medium, and wherein computer instructions are stored thereon, wherein: When the computer instructions are executed, the steps of the image processing method according to any one of claims 21 to 42 are executed.
