Image sensor, camera module, electronic equipment, shooting method and shooting device

By adjusting the color filter array and grating layer in the image sensor to adjust the amount of light, the problem of false colors in the quad-bayer array's color guessing processing is solved, the clarity and quality of the image are improved, and the requirements of high-pixel sensors in dark light and Performance requirements in bright environments.

CN118488331APending Publication Date: 2024-08-13VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410419303.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-09
Publication Date
2024-08-13

AI Technical Summary

Technical Problem

In the existing technology, the quad-bayer array often exhibits false color phenomena after color guessing processing, which affects the image quality. Moreover, existing optimization methods such as lens optimization and false color correction algorithms have drawbacks and are difficult to meet the requirements of photosensitivity and clarity at the same time. .

Method used

By adjusting the color filter array in the image sensor to increase the proportion of green pixels, and using the grating layer to adjust the amount of light entering the pixels, the risk of false colors is reduced and the accuracy of color guessing processing and image clarity are improved.

Benefits of technology

It effectively reduces the risk of false color in images after color guessing processing, improves the clarity and quality of images, and enhances shooting performance in low-light and high-brightness environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118488331A_ABST
    Figure CN118488331A_ABST
Patent Text Reader

Abstract

The invention discloses an image sensor, a camera module, electronic equipment, a shooting method and a shooting device, and belongs to the technical field of image processing. The image sensor comprises at least two pixel units, each pixel unit comprises a first pixel area, a second pixel area and a third pixel area, the second pixel area is arranged around the first pixel area, and the third pixel area is arranged around the second pixel area; the first pixel area comprises at least one green pixel, the second pixel area comprises a red pixel, a blue pixel and a green pixel, and the third pixel area comprises a red pixel, a blue pixel and a green pixel. The number of the green pixels in the pixel units is larger than the sum of the number of the red pixels and the number of the blue pixels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to an image sensor, a camera module, an electronic device, a shooting method and a shooting device. Background Art

[0002] The camera sensor is the core of the camera and the most critical technology in the camera.

[0003] In the related art, in addition to the conventional Bayer array sensor, a new type of all-in-one sensor has also emerged. Take the 4in1 sensor as an example. It has two modes, 4in1 mode and single pixel mode, which can be switched. Due to the special arrangement relationship of the pixels of the 4in1 sensor: four pixels of the same color are arranged together, which is the so-called quad-Bayer arrangement.

[0004] When every four small pixels of the same color in the quad-bayer array are viewed as a whole, the classic Bayer array (ie, RGGB) structure is satisfied. Since every 4 pixels are merged into 1 pixel, the image size is reduced to 1 / 4 of the original size.

[0005] When these colors are rearranged and combined, every four pixels are rearranged to form an RGGB structure. At this time, the entire image is a Bayer array and the image size is full size. This processing method is called pixel remosaic.

[0006] For example, a 4in1 sensor with a maximum output size of 48M, when it needs to be 4in1, the output size is 12M. When it needs to be output in full size, it needs to be remosaiced, and then it can output a 48M image. Of course, in order to get a normal image, demosaicing is required after remosaicing.

[0007] The remosaic algorithm involves a color guessing algorithm, which often guesses the wrong color. After combined with subsequent demosaic and image signal processing (ISP) processing, false color phenomena will appear in the image. Summary of the invention

[0008] The purpose of the embodiments of the present application is to provide an image sensor, a camera module, an electronic device, a shooting method and a shooting device, which can reduce the risk of false color in images after color guessing processing.

[0009] In a first aspect, an embodiment of the present application provides an image sensor comprising at least two pixel units, the pixel unit comprising a first pixel region, a second pixel region and a third pixel region, the second pixel region being arranged around the first pixel region, and the third pixel region being arranged around the second pixel region; the first pixel region comprising at least one green pixel, the second pixel region comprising a red pixel, a blue pixel and a green pixel, the third pixel region comprising a red pixel, a blue pixel and a green pixel, and the number of the green pixels in the pixel unit is greater than the sum of the number of the red pixels and the blue pixels.

[0010] In a second aspect, an embodiment of the present application provides a camera module, comprising: the image sensor as described in the first aspect, wherein the camera module further comprises a grating layer;

[0011] The grating layer is arranged on the photosensitive side of the image sensor;

[0012] The grating layer includes a grating component corresponding to each pixel one by one, and the grating component is used to adjust the amount of light entering the pixel.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, which includes the camera module as described in the second aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a shooting method, which is performed by the electronic device according to the third aspect, and the method includes:

[0015] capturing a first image, wherein the first image is obtained based on color guessing processing and includes a false color area;

[0016] Determining a first pixel for which the amount of incoming light needs to be adjusted based on a color guessing method corresponding to the color guessing processing, wherein the first pixel is a reference pixel when performing color guessing processing on a second pixel in the pseudo-color area;

[0017] adjusting the amount of light entering the first pixel based on the target grating component in the grating layer;

[0018] A second image is captured.

[0019] In a fifth aspect, an embodiment of the present application provides a shooting device, including the camera module as described in the second aspect, and the shooting device also includes:

[0020] A shooting module, configured to obtain a first image by shooting with the camera module, wherein the first image is obtained based on color guessing processing, and the first image includes a false color area;

[0021] A determination module, configured to determine a first pixel for which the amount of incoming light needs to be adjusted based on a color guessing method corresponding to the color guessing process, wherein the first pixel is a reference pixel when performing color guessing process on a second pixel in the pseudo-color area;

[0022] An adjustment module, used for adjusting the amount of light entering the first pixel based on a target grating component in the grating layer;

[0023] The shooting module is also used to obtain a second image by shooting with the camera module.

[0024] In the sixth aspect, an embodiment of the present application also provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the shooting control method described in the fourth aspect.

[0025] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps in the shooting control method described in the fourth aspect.

[0026] In an eighth aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps in the shooting control method described in the fourth aspect.

[0027] In the embodiment of the present application, the image sensor includes three pixel areas, and the first pixel area includes green pixels, and the second pixel area and the third pixel area both include red pixels, blue pixels and green pixels, so that the image sensor reduces the possibility of interference compared to the traditional Bayer array, can improve the probability of finding accurate reference pixels for interpolation pixels in the guessing color processing, can reduce the risk of false colors in the image after the guessing color processing, and in addition, the proportion of green pixels in the pixel unit is increased, which can improve the interpolation accuracy of the green pixels in the guessing color processing, thereby improving the clarity of the image after the guessing color processing.

[0028] In an embodiment of the present application, when shooting, the pixels that need to adjust the amount of light entering are determined based on the color guessing method corresponding to the color guessing processing, and the amount of light entering the corresponding pixels is adjusted based on the grating component, which can reduce the risk of false color and improve image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a schematic diagram of a quad-bayer arrangement in the related art;

[0030] Figure 2 is a schematic diagram of performing array conversion (remosaic processing) on ​​pixels arranged in a quad-Bayer manner in the related art;

[0031] Figure 3 This is a schematic diagram of the 16 directions that need to be referenced for interpolation pixels;

[0032] Figure 4 It is a flow chart of the guessing color process;

[0033] Figure 5 This is a schematic diagram of false colors caused by incorrect direction estimation during the color guessing process;

[0034] Figure 6 is a CFA schematic diagram of a pixel unit in an image sensor provided in an embodiment of the present application;

[0035] Figure 7 is a CFA schematic diagram of an image sensor provided in an embodiment of the present application;

[0036] Figure 8 is a schematic diagram of a four-in-one color array in the related art;

[0037] Fig. 9 It is a photo with a regular pattern collected by a four-in-one Bayer sensor array in the related art;

[0038] Fig.10 A schematic diagram of the relative position relationship between interpolation pixels and reference pixels in the process of guessing color of an image acquired by an image sensor in an embodiment of the present application;

[0039] Fig.11 is a structural schematic diagram of a camera module provided in an embodiment of the present application;

[0040] Fig.12 It is a structural schematic diagram of a pixel and its corresponding grating component in a camera module provided in an embodiment of the present application;

[0041] Fig.13 It is a schematic diagram of the grating component diffracting the light from the pixels on both sides to the middle pixel;

[0042] Fig.14 It is a comparison diagram of the light diffraction before and after adjusting the grating parameters of the target grating component;

[0043] Fig.15 It is a schematic diagram of the diffraction principle of the diffraction grating;

[0044] Fig.16 It is a schematic diagram of the structure of the grating layer;

[0045] Fig.17 It is a schematic diagram of the diffraction principle of the surface relief grating;

[0046] Fig.18ais one of the schematic diagrams of the liquid crystal unit provided in the embodiment of the present application;

[0047] Fig.18b This is the second schematic diagram of the liquid crystal unit provided in the embodiment of the present application;

[0048] Fig.18c This is the third schematic diagram of the liquid crystal unit provided in the embodiment of the present application;

[0049] Fig.18d This is the fourth schematic diagram of the liquid crystal unit provided in the embodiment of the present application;

[0050] Fig.19 is a flow chart of a photographing method provided in an embodiment of the present application;

[0051] Fig. 20 It is a scene map where false colors are caused by interpolating interpolated pixels based on reference pixels;

[0052] Fig.21 It is a grayscale image with false colors caused by interpolating interpolated pixels based on reference pixels;

[0053] Fig. 22 It is a schematic diagram of diffracting the light of the R pixel to other surrounding pixels to reduce the amount of light entering the R pixel;

[0054] Fig.23 is a schematic diagram of a photographing device provided in an embodiment of the present application;

[0055] Fig.24 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0056] Fig.25 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0058] The terms "first", "second", etc. in the specification of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0059] The camera sensor is the core of the camera and the most critical technology in the camera. There are two types of sensors, one is the widely used Charge-Coupled Device (CCD), and the other is the Complementary Metal Oxide Semiconductor (CMOS) device. Compared with traditional cameras, traditional cameras use "film" as the carrier of their information recording, while the "film" of digital cameras is its imaging photosensitive element. The photosensitive element is the "film" of digital cameras that does not need to be replaced and is integrated with the camera.

[0060] The mainstream device currently used is CMOS, which, like CCD, is a semiconductor that can record light changes in digital cameras. The general working process of CMOS is to sense light signals through a large number of photodiodes (pixels), convert light signals into electrical signals, and then form a digital signal matrix (i.e., image) through an amplification circuit and an analog-to-digital (AD) conversion circuit, which is then processed by image signal processing (ISP) and compressed and stored.

[0061] The image sensor in the embodiment of the present application may be a CMOS image sensor (CIS), or a CCD image sensor, or any other type of image sensor, which are not exhaustively listed here.

[0062] For ease of explanation, in the embodiments of this application, CIS is usually used as an example. CMOS natively supports remosaic, and through independent signal processing to transform the pixel structure, it can be restored to the standard RGGB arrangement. This is a hardware-level rearrangement, which is completed on the CMOS side, and the data handed over to the ISP is already in the RGGB arrangement.

[0063] Currently, mobile phone cameras have more and more photo-taking functions, and consumers have higher and higher requirements for the mobile phone photo-taking experience, which poses a huge challenge to the functions, performance and effects of mobile phone cameras.

[0064] Among them, the two dimensions that have relatively high requirements for cameras are photosensitivity and clarity.

[0065] In order to meet these two requirements at the same time, high-pixel sensors came into being, such as: Figure 1 In the quad-bayer arrangement shown, four adjacent pixels use the same color filter. In this case, the maximum number of pixels can reach 48 million.

[0066] For example: Figure 2 As shown in the figure, assume that the size of a single pixel in an image sensor is 0.8μm, and after four-in-one, it is 1.6μm. In a dark environment, the four-in-one mode is used, so that the pixel area is larger, the ability to receive light signals is stronger, and the night scene photography effect will be better. In a bright environment, the light energy is strong enough, and the single pixel mode (i.e. full size mode) is used at this time, so that the sampling frequency is higher and the clarity of the photo is higher. Then the image is processed and output through the remosaic algorithm, demosaic algorithm and other algorithms.

[0067] However, the remosaic algorithm is a color guessing algorithm after all, and it often guesses the wrong color. After combined with the subsequent demosaic and ISP processing, false color will appear in the image. For example, in high-dynamic range (HDR) scenes, highlight areas and scenes with large field of view (FoV), purple edges often appear at the edges of objects. There are many factors that cause purple fringing, such as remosaic, demosaic, dispersion, some mapping of light in the sensor, chromatic aberration of the lens, etc.

[0068] In related technologies, the following two methods can be used to alleviate false color:

[0069] 1) Hardware optimization methods, such as optimizing the lens. Since false colors are often caused by light energy in the red and blue bands, lens optimization can reduce the transmittance of short wavelengths (blue) and long wavelengths (red), thereby reducing the risk of false colors.

[0070] 2) Software optimization methods, such as using a false color correction algorithm. Generally, there are two false color removal modules in the ISP module, namely the Chromatic Aberration Correction (CAC) module and the color calibration module. Among them, CAC corrects the purple fringing and edge false colors caused by lens chromatic aberration. Some are processed in the RAW (an image format) domain, and some are processed in the YUV (an image format) domain (most ISPs have them); the color calibration module transforms the color in the YUV color space to make the color more accurate. It is used to process the false colors that appear when the hardware of the former is not processed cleanly, or for other reasons (not necessarily every ISP has them), and further processing is required. In addition, the remosaic color guessing algorithm can also be further optimized. The current industry is developing an artificial intelligence (AI) remosaic algorithm to make the color more accurate.

[0071] Both methods have their drawbacks. Lens optimization cuts off some of the short-wavelength and long-wavelength transmittance. Although it helps with purple fringing, it also affects the perception of other colors, resulting in a decrease in the color and photosensitivity of the pixels. Overall, the disadvantages outweigh the advantages. The false color correction algorithm, on the one hand, will increase the amount of computation done by the ISP, resulting in a decrease in overall performance and fluency in taking photos. On the other hand, the saturation after processing by the false color correction algorithm often decreases, which makes the image feel unnatural and sometimes even worse than before correction.

[0072] In the embodiments of the present application, the risk of false colors in the image obtained based on the guessed color processing is reduced by adjusting the color filter array (Color Filter Array, CFA) used in the image sensor and changing the pixel distribution in the image sensor. For example, the red pixels, blue pixels and green pixels in the image sensor are distributed more evenly, which can improve the probability of finding accurate reference pixels for interpolation pixels in the guessed color processing, and can reduce the risk of false colors in the image after the guessed color processing. In addition, the proportion of green pixels in the image sensor is increased, which can improve the interpolation accuracy of green pixels in the guessed color processing, thereby improving the clarity of the image after the guessed color processing.

[0073] In order to facilitate understanding of the embodiments of the present application, the color guessing process in the related art is first described as follows:

[0074] In the related art, Figure 2 In the process of converting the four-in-one color array into the Bayer array, Figure 2Taking the 4 pixels in the upper left corner as an example, since these 4 pixels in the 4-in-1 color array are all red pixels, and the Bayer array requires one red pixel, two green pixels and one blue pixel, at this time, 3 of the 4 pixels in the upper left corner need to be interpolated into two green pixels and one blue pixel.

[0075] Among them, the interpolated pixels need to be determined based on other reference pixels, for example: Figure 3 As shown in FIG. 1 , if the middle R pixel is a pixel that needs to be interpolated, then Figure 3 Reference pixels are selected in 16 directions to calculate the interpolated R pixels based on the reference pixels.

[0076] For example: Figure 4 As shown, taking the conversion of quad-Bayer image to Bayer image as an example, the process of remosaic color guessing algorithm includes:

[0077] 1. Perform direction detection on the three-channel images (i.e., R, G, and B channel images) of the quad-Bayer image to detect the direction of the object. In this step, the main direction in the corresponding area is determined according to the general direction of the texture in each area of ​​the quad-Bayer image.

[0078] 2. According to the direction information, the G channel is supplemented completely (guess color interpolation), because the clarity mainly comes from the G channel. Ensuring the accuracy of the green channel interpolation determines whether the clarity of the entire image is excellent;

[0079] In this step, the weight of each direction can be determined according to the direction information, for example, the weight of the direction matching the object direction in the G channel image is greater than the weight of the direction not matching the object direction in the G channel image; then the reference pixels in each direction are weighted and summed to obtain the supplemented G pixels;

[0080] 3. Use the same method as the G channel to interpolate and complete the R and B channels, and then convert the three RGB images to the YUV domain for color calculation to obtain the color information of the entire image.

[0081] Among them, in the YUV domain, the Y component is the brightness, and the UV component represents the color. At this time, it is necessary to reduce the noise of the brightness (Luma) and the chroma (Chroma) respectively, because when converted to the YUV domain, brightness noise (LumaNoise) will appear in the Y domain, and chroma noise (ChromaNoise) will appear in the UV domain.

[0082] 4. After obtaining the clarity information and color information of the entire image, the original quad raw image is interpolated into an RGB bayer image based on the clarity information and color information.

[0083] The interpolation refers to demosaic processing, that is, after obtaining the quadraw information of the image through the remosaic processing of steps 1 to 3, the demosaic processing can refer to the accurate information on the quad raw for interpolation.

[0084] In this process, the interpolation error caused by directional information is the most important reason for the false color in the high-frequency area, that is, the false color caused by the wrong direction estimation.

[0085] For example: Figure 5 As shown, assuming the correct image is Figure 5 However, due to the inaccurate estimation of the pixel direction, the interpolated pixels do not match the actual pixels, which will lead to the following Figure 5 False color in the upper center image.

[0086] It should be noted that in the embodiment of the present application, after the remosaic processing, the demosaic processing will inevitably be performed. In the embodiment of the present application, the description of the demosaic processing is omitted. The specific process of the demosaic processing can refer to the demosaic processing in the related technology, which will not be repeated here.

[0087] The image sensor, camera module, electronic device, shooting method and shooting device provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0088] See also Figure 6 and Figure 7 The image sensor provided by the embodiment of the present application includes at least two pixel units, wherein: Figure 6 is the CFA pattern of a pixel unit, Figure 7 The CFA pattern of the image sensor is obtained by splicing at least two pixel units.

[0089] like Figure 6 As shown, the pixel unit includes a first pixel region, a second pixel region and a third pixel region, wherein the first pixel region is as shown in FIG. Figure 6 The pixel area covered by the frame of the middle rectangular frame 10 and the second pixel area are as follows: Figure 6 The pixel area covered by the frame of the rectangular frame 20 is as follows: Figure 6The pixel area covered by the border of the rectangular frame 30. The second pixel area is arranged around the first pixel area, and the third pixel area is arranged around the second pixel area; the first pixel area includes at least one green (Gr or Gb) pixel, the second pixel area includes a red (R) pixel, a blue (B) pixel and a green (Gr or Gb) pixel, and the third pixel area includes a red (R) pixel, a blue (B) pixel and a green (Gr and Gb) pixel, and the number of the green pixels in the pixel unit is greater than the sum of the number of the red pixels and the blue pixels.

[0090] It should be noted that the pixel unit in the embodiment of the present application represents a pixel corresponding to the smallest unit of the CFA pattern adopted by the image sensor, and the pixel unit includes multiple pixels.

[0091] In addition, the CFA pattern corresponding to the pixel unit in the embodiment of the present application can be multiple, for example: the first pixel area includes 1 green pixel, 2 green pixels or 4 green pixels, or each side of the second pixel area includes a red pixel, a green pixel and a blue pixel, or the entire second pixel area includes a red pixel, a green pixel and a blue pixel, or each side of the third pixel area includes a red pixel, a green pixel and a blue pixel, or the entire third pixel area includes a red pixel, a green pixel and a blue pixel, etc. Figure 6 The pixel units shown are only examples, and for the sake of convenience, in the following embodiments of the present application, Figure 6 The pixel unit shown is taken as an example for illustration and does not constitute a specific limitation herein.

[0092] In some embodiments, the embodiments of the present application provide Figure 6 The CFA pattern of the pixel unit shown has the following advantages over the color array in the related art:

[0093] 1) It has a unique 6×6 photosite pattern. Compared with the traditional 4-in-1 Bayer color array, this layout reduces the number of R pixels and B pixels, which can minimize the moiré effect and thus improve the resolution by eliminating the need for a low-pass filter.

[0094] Among them, related technologies such as Figure 8 The 4-in-1 Bayer sensor array shown has a repeating 2×2 pattern of RGB photosites. Fig. 9 As shown, when it overlaps with the regular pattern being captured, a new interference pattern that does not exist in real life may appear. Figure 6The image sensor with the CFA pattern of the pixel unit shown has a more irregular RGB light spot pattern than the traditional Bayer array sensor, and the proportion of R pixels and B pixels is smaller, which can play a role of low-pass filtering, reduce the possibility of interference, and eliminate the need for a low-pass filter that will reduce image resolution.

[0095] 2) The four-in-one Bayer sensors in the related art also produce false colors because they do not have R and B photosensors on some horizontal and vertical lines, while the four-in-one Bayer sensors in the embodiments of the present application do not have R and B photosensors on some horizontal and vertical lines. Figure 6 In the CFA pattern of the pixel unit shown, there are pixels of three colors, R, G, and B, in each row and column, making the distribution of pixels of three colors, R, G, and B, more uniform. Therefore, in the interpolation calculation, the probability of finding the accurate reference pixel in each direction will be higher, and the position of the reference pixel is closer to the interpolation pixel (the weight of the reference pixel is negatively correlated with the distance of the reference pixel value to the interpolation pixel), making the remosaic restoration effect more accurate, with fewer false colors and line breaks.

[0096] In the embodiment of the present application, the red pixels, blue pixels and green pixels in the image sensor are distributed more evenly, which can improve the probability of finding accurate reference pixels for interpolation pixels in the color guessing process, and can reduce the risk of false colors in the image after the color guessing process. In addition, the proportion of green pixels in the pixel unit is increased, which can improve the interpolation accuracy of green pixels in the color guessing process, thereby improving the clarity of the image after the color guessing process.

[0097] As an optional implementation manner, the pixel unit satisfies at least one of the following:

[0098] Each row includes red pixels, blue pixels, and green pixels;

[0099] Each column includes red pixels, blue pixels, and green pixels;

[0100] The pixels adjacent to each red pixel include at least 3 green pixels;

[0101] The pixels adjacent to each blue pixel include at least three green pixels.

[0102] For example: Figure 6 The pixel unit shown satisfies: each row includes red pixels, blue pixels and green pixels, each column includes red pixels, blue pixels and green pixels, each red pixel is adjacent to at least 3 green pixels, and each blue pixel is adjacent to at least 3 green pixels. Fig.10 When the red pixel marked in yellow needs to be interpolated, some of its reference directions are as follows Fig.10As shown in directions 1' to 9' marked in the figure, at this time, for the blue or green pixels that need to be interpolated, blue or green reference pixels can be found in most reference directions, so the probability of finding accurate reference pixels for the interpolated pixels can be increased.

[0103] It should be noted that, in some other implementations, the pixel unit may only meet part of the above conditions, and it is not specifically required that the pixel unit meet all of the above conditions.

[0104] In order to make the pixel unit better meet the above conditions, the pixels in each pixel area of ​​the pixel unit may be arranged in at least one of the following ways:

[0105] 1) The first pixel area is entirely green pixels; the number of green pixels, blue pixels and red pixels in the second pixel area is equal; the number of green pixels in the third pixel area is greater than the sum of the number of red pixels and blue pixels;

[0106] 2) The first pixel region includes four green pixels; the second pixel region includes four red pixels, four blue pixels and four green pixels; the third pixel region includes four red pixels, four blue pixels and 12 green pixels.

[0107] For example: Figure 6 As shown, the first pixel region includes 4 green pixels, the second pixel region includes 4 green pixels, 4 red pixels and 4 blue pixels, and the third pixel region includes 12 green pixels, 4 red pixels and 4 blue pixels.

[0108] 3) The pixel units are arranged in a 6×6 structure.

[0109] 4) The red pixels and blue pixels in the pixel unit are distributed in a mirror image. Figure 6 As shown, the 2nd column of the 1st row is a red pixel, and the horizontal mirror image position of the red pixel is the 5th column of the 1st row, which is a blue pixel.

[0110] 5) The green pixels in the pixel unit are symmetrically distributed, for example: Figure 6 As shown, the green pixels in the pixel unit are symmetrically distributed on opposite sides of the transverse symmetry axis, and symmetrically distributed on opposite sides of the longitudinal symmetry axis.

[0111] In some embodiments, the green pixels in the pixel unit include Gb pixels and Gr pixels.

[0112] In some embodiments, by making the pixel unit satisfy the following conditions: each row includes red pixels, blue pixels and green pixels and / or each column includes red pixels, blue pixels and green pixels, the probability of finding accurate reference pixels in all directions can be higher in the interpolation calculation, and the position of the reference pixel is closer to the interpolation pixel (the weight of the reference pixel is negatively correlated with the distance between the reference pixel value and the interpolation pixel), so that the remosaic restoration effect is more accurate, and there are fewer phenomena such as false colors and broken lines.

[0113] In other embodiments, Fig.11 As shown, the image sensor 2 provided in the embodiment of the present application can be combined with a grating layer 4, and the grating layer 4 is arranged on the photosensitive side of the image sensor 2;

[0114] The grating layer 4 includes a grating component corresponding to each pixel one by one, and the grating component is used to adjust the amount of light entering the pixel.

[0115] The grating constant of the grating component is adjustable. By adjusting the grating constant of the grating component, the diffraction angle of the grating component to the light can be changed or the color of the light diffracted through the grating component to the photosensitive area of ​​the pixel can be selected.

[0116] In some embodiments, when it is determined that a reference pixel will cause false color in the interpolated pixel, the grating constant of the grating component corresponding to the reference pixel can be adjusted to reduce the amount of light entering the reference pixel. In this way, when the interpolated pixel is calculated based on the reference pixel, the influence of the reference pixel on the interpolated pixel can be reduced, thereby alleviating the false color of the interpolated pixel.

[0117] For example: assuming that a certain R pixel will cause false color of the interpolated pixel, the grating constant of the grating component corresponding to the R pixel can be changed to diffract at least part of the red light in the photosensitive area of ​​the R pixel to the photosensitive area of ​​the surrounding G pixel or B pixel. At this time, the energy of the red light received by the R pixel is weakened, so that the pixel value of the R pixel is reduced, and the color filter layer of the G pixel or B pixel will filter out the red light, so the red light diffracted into the photosensitive area of ​​the G pixel or B pixel will not affect the pixel value of the G pixel or B pixel.

[0118] At this time, by designing the pixel unit of the image sensor, for one pixel unit, there are at least 3 green pixels among the pixels adjacent to each red pixel, or there are at least 3 green pixels among the pixels adjacent to each blue pixel, so that it can better cooperate with the grating layer 4.

[0119] It is worth mentioning that grating diffraction is mainly used for R pixels and B pixels. In the four-in-one bayer pattern in the related art, there are only two G pixels next to each R pixel or B pixel that can be used for diffraction. However, the pixel unit in the embodiment of the present application enables at least three G pixels next to each R pixel or B pixel that can be used for diffraction, which can greatly improve the diffraction effect and enhance the dynamic adjustment range of CIS for exposure energy.

[0120] See also Fig.11 The camera module provided in the embodiment of the present application includes: the image sensor 2 provided in the aforementioned embodiment of the present application, and the camera module also includes a grating layer 4.

[0121] The grating layer 4 is arranged on the photosensitive side of the image sensor 2;

[0122] The grating layer 4 includes a grating component corresponding to each pixel one by one, and the grating component is used to adjust the amount of light entering the pixel.

[0123] like Fig.12 As shown, each pixel on the image sensor 2 includes a microlens 101, a color filter layer 102, a grid material 103, a front end deep trench isolation (FDTI) 104, a photodiode (PD) 105 and other structures, and a corresponding grating component 31 is arranged above the pixel. When the grating component 31 is not working, such as in a plane lens state, the light in the photosensitive area of ​​the pixel will pass through the grating component 31 and the microlens 101, and after color filtering by the color filter layer 102, it will be photosensitive by the PD 105 to obtain exposure energy.

[0124] In some embodiments, by changing the grating parameters of the target grating component, the diffraction function of the target grating component can be used to change the propagation direction of light of a specific wavelength.

[0125] For example: Fig.13 As shown, for the left and right PDs, after the visible light is transmitted, the micro-nano structure can refract light of a specific wavelength band from the left and right pixels to the middle pixel to enhance the photosensitivity of the middle pixel.

[0126] In some embodiments, Fig.14 By changing the grating parameters of the grating component above the pixel, the light in the photosensitive area of ​​the pixel can be diffracted into the photosensitive areas of other pixels to reduce the amount of light entering the pixel, thereby reducing the pixel value of the pixel. Thereafter, when the interpolation pixel is calculated based on the pixel as a reference pixel, the influence of the pixel can be reduced.

[0127] In some embodiments, by changing the grating parameters of the target grating component, it is possible to diffract light within the photosensitive areas of other pixels into the photosensitive area of ​​the current pixel to increase the amount of light entering the pixel, thereby increasing the pixel value of the pixel. Thereafter, when calculating the interpolated pixel based on the pixel as a reference pixel, the influence of the pixel can be increased.

[0128] For example: taking the case where the left pixel of two adjacent pixels is an R pixel and the right pixel is a B pixel, when the grating parameters of the grating component corresponding to the B pixel are not adjusted, the blue light passing through the grating component and the blue light filtering layer is irradiated into the photosensitive area of ​​the B pixel; by adjusting the grating parameters of the grating component corresponding to the B pixel, the blue light diffracted by the grating component can be irradiated into the photosensitive area of ​​the R pixel. At this time, the photosensitivity of the B pixel is reduced, and the red light filtering layer in the R pixel will filter out the blue light. Therefore, diffracting the blue light into the photosensitive area of ​​the R pixel will not affect the photosensitivity of the R pixel.

[0129] In some embodiments, the grating layer 4 may be a nano-grating structure, one of the functions of which is to diffract light in the three primary color bands to change the light energy distribution under the nano-grating structure, thereby changing the amount of light entering each pixel.

[0130] The principle of diffraction of the grating layer 4 is as follows:

[0131] like Fig.15 As shown in the figure, the diffraction grating can perform spatial periodic modulation on the amplitude or phase of the incident light wave. According to the working mode, it can be divided into transmission type and reflection type. The most important application of diffraction grating in optics is as a beam splitter. It can be seen from the following multi-beam interference factor of grating diffraction that when That is, when dsinθ=λm, interference superposition occurs when the phase difference between adjacent light beams is an integer multiple of 2π, forming a main maximum. The above formula can determine the position of the main maximum of each level of interference. Among them, δ is the diffraction factor, λ is the wavelength of the incident light, θ is the incident angle of the light wave, and m is the spectral line order, that is, the diffraction order, m=0, ±1, ±2,….

[0132] In the embodiment of the present application, the main purpose is to diffract the light of the three primary color bands so that part of the light in the photosensitive area of ​​a pixel can be sensed by other pixels. We use a nano grating structure to achieve this purpose. A nano grating is an optical element with a periodic structure, such as Fig.16 As shown, this period can be the peaks and valleys embossed on the surface of the material, causing a periodic change in the refractive index n (refractive index) in the material.

[0133] This period is generally at the micro-nano level, which is the same order of magnitude as the wavelength of visible light (~450-700nm), in order to produce effective deflection and control of light. The "spectroscopy" principle of the diffraction grating is shown in the figure below. Assuming that the incident light is a single-wavelength green light, it will be divided into several diffraction orders by the diffraction grating. Each diffraction order continues to propagate in different directions, including reflective diffraction (R0, R±1, R±2, ...) and transmissive diffraction (T0, T±1, T±2, ...) light. The diffraction angle (θm, m=±1, ±2, ...) corresponding to each diffraction order is determined by the incident angle (θ) of the light and the period (Λ) of the grating. By designing the parameters of the grating (material refractive index n, grating shape, thickness, duty cycle, etc.), the diffraction efficiency of a certain diffraction order (i.e., a certain direction) can be optimized to the maximum, so that most of the light propagates mainly in this direction after diffraction.

[0134] After the incident light is diffracted, the 0th order diffraction is refracted, and this part of the energy does not change. The other orders of diffraction can be changed by controlling the grating parameters to concentrate the energy on a certain order, generally mainly on the 1st order.

[0135] like Fig.17 As shown, the diffraction angle and diffraction efficiency are both controlled by the grating parameters, so we can design a grating with variable parameters to achieve the effect of controlling the splitting.

[0136] Specifically, the grating equation is as follows:

[0137] m = dG (sinα + sinβ)

[0138] Among them, d G is the grating spacing, also known as the grating constant; m is the diffraction order, and m = 0, ±1, ±2, ...; the diffraction angle is βm; α is the incident angle; λ is the wavelength of light.

[0139] Taking m=1, 30° incident angle, 31° diffraction angle, and 400nm band light as an example, the following equation can be obtained: 0.515+0.5=0.4 / d, then d=0.394μm. It can be seen that after determining the incident angle of light, the diffraction angle, the wavelength of light to be diffracted, and the diffraction order (usually 1), the required grating constant d can be determined.

[0140] In some embodiments, adjusting the grating parameters of the target grating component can change the diffraction angle of the target grating component to the light, select the wavelength of the light diffracted by the target grating component, change the intensity of the light diffracted by the target grating component, etc.

[0141] In some implementations, based on the diffraction principle of the grating layer 4 , the grating component in the grating layer 4 in the embodiment of the present application may be set to an electrically controlled liquid crystal material with a controllable grating constant d.

[0142] As an optional implementation, Figures 18a to 18d As shown, the grating assembly includes: liquid crystal units arranged in an array;

[0143] By adjusting the input voltage of at least part of the liquid crystal cells in the target grating component, the grating parameters of the target grating component can be changed;

[0144] Wherein, at least part of the liquid crystal units are in a light-transmitting state, a light-opaque state or a semi-light-transmitting state under the action of an input voltage.

[0145] For example, each grating component is composed of small liquid crystal units. By controlling the voltage of each liquid crystal unit, the liquid crystal unit can be in a light-transmitting state, a light-opaque state, or a semi-light-transmitting state.

[0146] In some embodiments, the liquid crystal unit can be connected to a controller or a voltage generator in the image sensor 2, or to a controller or a voltage generator outside the camera module, so as to adjust the grating constant of the grating component through the image sensor 2 or an external controller or voltage generator.

[0147] exist Fig.18a In the figure, the first liquid crystal unit on the left is in an opaque state, the second liquid crystal unit on the left is in a transparent state, and the states of the subsequent liquid crystal units are arranged periodically. At this time, if it is assumed that the thickness of each liquid crystal unit is 10nm, it can be concluded that the grating constant d of the grating component is 10×2=20nm.

[0148] Fig.18b The grating constant d of the grating assembly shown in is 10×4=40nm; Fig.18c The grating constant d of the grating assembly shown in is 10×6=60nm.

[0149] Of course, in the case where diffraction is not required, such as Fig.18d As shown, all liquid crystal units can be adjusted to a light-transmitting state. At this time, the grating components in the grating layer 4 are equivalent to flat lenses.

[0150] In this embodiment, the grating component is configured as liquid crystal units arranged in an array. By periodically changing the transparent and opaque states of at least some of the liquid crystal units, the grating constant of the grating component can be changed, thereby achieving flexible selection of at least one of the diffraction angle and the diffraction wavelength.

[0151] In some embodiments, Fig.11As shown, the camera module provided in the embodiment of the present application also includes a lens group 1, a filter layer 3, a motor 5, a base 6 and other electronic components 7, and the grating layer 4 is arranged between the lens group 1 and the image sensor 2.

[0152] The lens group 1 can be used for focusing and condensing. The filter layer 3 is an infrared filter (IR filter), and the IR filter is located between the grating layer 4 and the image sensor 2. The IR filter is used to filter out unnecessary light (such as infrared light) projected toward the image sensor 2, to prevent the image sensor 2 from generating false colors / ripples, so as to improve its effective resolution and color reproduction. The light passing through the IR filter can be sensed by the image sensor 2.

[0153] Optionally, the motor 5 can be a voice coil motor, and the lens group 1 is wrapped and fixed by the voice coil motor, and the upper and lower ends of the voice coil motor are connected to the spring. When focusing, the voice coil motor is energized to generate an electromagnetic force, which ultimately pushes the spring to deform and maintains a balance with the elastic force of the spring. In this way, the position of the voice coil motor can be controlled by the amount of power, thereby achieving the purpose of pushing the voice coil motor and the lens group 1 to the focusing position.

[0154] In some embodiments, the color array used by the image sensor 2 may be Figure 6 As shown in the color array, in the embodiment of the present application, the image sensor 2 can convert the color array of the image captured by the image sensor 2 into a Bayer array by performing remosaic processing, demosaic processing, etc. on the captured image.

[0155] In an embodiment of the present application, a new camera module is provided, which is equipped with a grating layer. At the same time, the image sensor can be equipped with a new CFA (color filter array). The new CFA has a stronger perception of color and clarity, a more precise remosaic effect, and is more suitable for combination with a grating than the traditional Bayer CFA. The photosensitivity of the pixel can be changed by controlling the grating constant, which helps to greatly improve the camera's picture clarity, color accuracy and dynamic range, and enhance the user experience.

[0156] An embodiment of the present application also provides an electronic device, which includes the camera module provided in the aforementioned embodiment of the present application.

[0157] In some embodiments, the electronic device provided in the embodiments of the present application may be a terminal, or may be other devices other than a terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and may also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiments of the present application.

[0158] The electronic device provided in the embodiments of the present application can realize the various functions of the camera module provided in the aforementioned embodiments of the present application, and can achieve the same beneficial effects as the camera module provided in the aforementioned embodiments of the present application. To avoid repetition, it will not be repeated here.

[0159] See also Fig.19 The present application provides a shooting method, and its execution subject may be the electronic device provided in the above-mentioned embodiment of the present application, such as Fig.19 As shown, the shooting method includes the following steps:

[0160] Step 1901: photograph and obtain a first image, wherein the first image is obtained based on color guessing processing, and the first image includes a false color area.

[0161] Step 1902: Determine a first pixel for which the amount of incoming light needs to be adjusted based on a color guessing method corresponding to the color guessing processing, wherein the first pixel is a reference pixel when performing color guessing processing on a second pixel in the pseudo-color area.

[0162] Step 1903: adjust the amount of light entering the first pixel based on the target grating component in the grating layer.

[0163] Step 1904: capture and obtain a second image.

[0164] The second pixel represents a pixel that needs to be interpolated and is located in the false color area, and the first pixel can be understood as a reference pixel used for interpolation calculation of the second pixel during the remosaic processing.

[0165] In some embodiments, the first image is an image used to determine a scheme for adjusting the amount of light entering each reference pixel. For example, if, after color guessing processing is performed on the first image, it is found that an interpolated pixel determined based on a certain reference pixel has a false color, it is determined that the amount of light entering the reference pixel needs to be reduced; or, if, after color guessing processing is performed on the first image, it is found that an interpolated pixel determined based on a certain reference pixel does not have a false color, it is determined that the amount of light entering the reference pixel does not need to be reduced or needs to be enhanced.

[0166] In some embodiments, the second image is an image captured after adjusting the light input amount of each reference pixel using a grating layer based on the above-mentioned light input amount adjustment scheme, that is, the purpose of the embodiment of the present application is to reduce the risk of false color in the second image.

[0167] In some embodiments, the first image is an image captured by the camera module during a shooting preview phase; the second image is an image officially shot by the camera module.

[0168] In some embodiments, the first image is an image taken first by the camera module, and the second image is an image taken later by the camera module.

[0169] In some embodiments, the color array used by the image sensor can be compared with the color array after guessed color processing (such as a Bayer array or a quad-Bayer array, etc.) to determine the pixels that need to be interpolated, and the original image captured by the image sensor can be processed by guessing color to determine the false color area from the first image after the guessed color processing. In this way, it can be determined that the interpolated pixel in the false color area is the second pixel.

[0170] In some embodiments, if it is desired to determine whether a first pixel is a reference pixel that generates false color for an interpolated pixel, after determining that a second pixel is needed, it is possible to determine whether reference pixels in each reference direction cause false color phenomena in the interpolated pixel based on the grayscale change frequency of the region where the reference pixels in each reference direction of the second pixel are located. For example, it can be considered that in the high-frequency region where the grayscale change rate in the first image exceeds the Nyquist frequency, interpolation is prone to errors and false color will basically occur. Accordingly, the amount of light entering the reference pixel in the wrong reference direction (i.e., the reference direction that will cause the false color problem of the interpolated pixel) can be weakened based on the detected direction information, and / or the amount of light entering the reference pixel in the correct reference direction (i.e., the reference direction that will not cause the false color problem of the interpolated pixel) can be enhanced.

[0171] As an optional implementation manner, the color guessing method includes a first reference direction during the color guessing processing, the first reference direction is a texture direction of the false color area, and the determining of the first pixel for which the amount of incoming light needs to be adjusted based on the color guessing method corresponding to the color guessing processing includes at least one of the following:

[0172] Determine the first pixel for which the amount of incoming light needs to be reduced, where the first pixel is a pixel in the first reference direction;

[0173] The first pixel whose light input amount needs to be enhanced is determined, where the first pixel is a pixel in a second reference direction, wherein the second reference direction is different from the first reference direction.

[0174] The first reference direction can be understood as an incorrect reference direction, such as a reference direction corresponding to a high-frequency region where the grayscale change rate exceeds the Nyquist frequency. The second direction can be understood as a correct reference direction, such as a reference direction corresponding to a low-frequency region where the grayscale change rate is less than or equal to the Nyquist frequency.

[0175] The above-mentioned Nyquist frequency is related to the sampling frequency of the image sensor.

[0176] In this embodiment, it is considered that interpolation based on reference pixels in a high-frequency region where the grayscale change rate in the first image exceeds the Nyquist frequency is prone to error, and false colors will basically appear. Accordingly, the amount of light entering the reference pixels in the wrong reference direction (i.e., the reference direction that will cause the false color problem of the interpolated pixels) can be weakened according to the detected direction information, or the amount of light entering the reference pixels in the correct reference direction (i.e., the reference direction that will not cause the false color problem of the interpolated pixels) can be enhanced.

[0177] In some embodiments, during the interpolation calculation of the second pixel, the weights of each direction can be determined based on the direction information of each pixel in the first image, and the reference pixels in each direction can be weighted summed according to the weights of each direction to obtain the interpolation of the second pixel.

[0178] In some embodiments, in order to reduce the false color of the second pixel determined based on the first pixel, the amount of light entering the first pixel can be adjusted based on at least one of the following: the directional information of the first pixel compared to the second pixel, and whether the first pixel will cause false color of the second pixel. The purpose is to enhance the importance of the first pixel in an important direction or that will not cause false color of the second pixel, and weaken the importance of the first pixel in a secondary direction or that will cause false color of the second pixel.

[0179] In some embodiments, when determining whether a first pixel is a reference pixel that causes a false color problem in an interpolated pixel, after determining an interpolated pixel (i.e., a second pixel) within a false color region, it is possible to determine whether there are reference pixels with the same color as the second pixel in all directions of the second pixel, and determine that the reference pixels with the same color as the second pixel are reference pixels that will not generate false colors, and determine that the reference pixels with a different color from the second pixel are reference pixels that will generate false colors.

[0180] In an embodiment of the present application, for the interpolated pixels within the false color area of ​​the first image obtained by the color guessing process, the reference pixels that cause the false color problem of the interpolated pixels and the reference pixels that will not cause the false color problem of the interpolated pixels are distinguished according to the color guessing method corresponding to the color guessing process, and then the target grating component in the grating layer is used to adjust the amount of light entering the reference pixels to reduce the amount of light entering the reference pixels that will cause false colors, or to enhance the amount of light entering the reference pixels that will not cause false colors, thereby reducing the risk of false colors.

[0181] In some embodiments, the first image and the second image are represented by Figure 6 As shown in the pixel unit, each row and each column in the pixel unit includes pixels of three colors: R, G, and B, and the pixels adjacent to each R pixel include at least 3 G pixels, and the pixels adjacent to each B pixel include at least 3 G pixels.

[0182] By making each row or each column in the pixel unit include pixels of three colors: R, G, and B, the situation where an accurate reference pixel cannot be found in a certain reference direction of a certain interpolation pixel can be reduced.

[0183] In some embodiments, by making the pixels adjacent to each R pixel in the pixel unit include at least 3 G pixels, and the pixels adjacent to each B pixel include at least 3 G pixels, the adjustment range of the pixel input light amount can be improved.

[0184] For example: Figure 8 As shown in FIG. 1 , in the four-in-one color array of the related art, each R pixel and each B pixel has at most two adjacent G pixels. For example, if a certain R pixel needs to be enhanced, the red light in the photosensitive area of ​​at most two G pixels can only be diffracted into the photosensitive area of ​​the R pixel; while using Figure 6 In the pixel unit shown, since each R pixel and each B pixel has three adjacent G pixels, taking the need to enhance a certain R pixel as an example, the red light in the photosensitive areas of the three G pixels can be diffracted into the photosensitive area of ​​the R pixel, which can increase the amount of light entering the R pixel to a greater extent compared to the method of diffracting the red light in the photosensitive areas of at most two G pixels into the photosensitive area of ​​the R pixel.

[0185] In some embodiments, the target grating component includes at least one of the following: a grating component corresponding to the first pixel, and a grating component corresponding to a third pixel adjacent to the first pixel.

[0186] As an optional implementation, for a first pixel that causes a false color problem in a second pixel, the grating parameters of the target grating component are adjusted by controlling the input voltage of at least part of the liquid crystal units in the target grating component to diffract the light of the first color in the photosensitive area of ​​the first pixel into the photosensitive areas of other pixels, wherein the first color is the color corresponding to the first pixel.

[0187] In this embodiment, by adjusting the grating parameters of the target grating component above the first pixel to diffract part of the light energy of the first pixel, the pixel value of the first pixel can be reduced. In this way, when the interpolation of the second pixel is subsequently calculated based on the first pixel, the influence of the first pixel can be reduced, thereby reducing the risk of false color of the second pixel.

[0188] For example: Fig.10 As shown, when the interpolation calculation is performed on the middle R pixel, if there is no R pixel in the direction 5' to provide reference, and based on the wrong direction information, when the R pixel is determined based on the wrong reference pixel in the direction 5', it will cause the R pixel to produce false color. At this time, it can be confirmed that the reference pixel in the direction 5' that causes the false color needs to be weakened.

[0189] For example: Fig. 20 As shown in the figure, the blue box represents the interpolated pixel, the red box represents the reference pixel in the direction 5', and based on the wrong direction information, the weight of the reference pixel in the direction 5' is very large, which will cause false color. Because the area of ​​the interpolated pixel is the skin, and the area of ​​the reference pixel is the eyeglass frame, interpolating the pixels at the skin with reference to the eyeglass frame will inevitably cause false color.

[0190] As an optional implementation, for a first pixel that does not cause a false color problem of a second pixel, the grating parameters of the target grating component are adjusted by controlling the input voltage of at least part of the liquid crystal units in the target grating component to diffract the light of the first color in the photosensitive area of ​​the third pixel into the photosensitive area of ​​the first pixel; the color corresponding to the third pixel is different from the color corresponding to the first pixel. The first color is the color corresponding to the first pixel.

[0191] For example: Fig.10 As shown, when performing interpolation calculation on the middle R pixel, the R pixel in the direction 4' can provide a reference, and the reference R pixel will not cause the R pixel to generate false color. At this time, it can be confirmed that the reference pixel in the direction 4' that does not cause false color needs to be enhanced.

[0192] In this embodiment, it can be determined whether to enhance or weaken the first pixel based on whether the first pixel will cause false color of the second pixel when used as a reference pixel, so as to reduce the influence of the first pixel that will cause false color on the second pixel, or enhance the influence of the first pixel that will not cause false color on the second pixel, and ultimately reduce the risk of false color in the second pixel.

[0193] In order to facilitate understanding of the shooting method provided in the embodiment of the present application, the shooting method provided in the embodiment of the present application is illustrated by taking the scene in which skin pixels are interpolated with pixels on a reference eyeglass frame to cause false colors as an example.

[0194] Assumptions Fig.21 yes Fig. 20 The grayscale image of Fig.21 In the figure, it is assumed that the pixels in the green area below the arrow refer to the pixels in the yellow area in the direction 5', and the weight of the yellow pixels is large, so the pixels at the skin are interpolated with reference to the glasses frame, which will cause false color phenomenon.

[0195] In the embodiment of the present application, the grating parameters of the grating component can be adjusted to weaken the pixels in the yellow area in the direction 5', thereby reducing the influence of the pixels in the yellow area when calculating the pixels in the green area with reference to the pixels in the yellow area, thereby reducing the risk of false color of the pixels in the green area.

[0196] For example: Fig. 22 As shown in the figure, assuming that the R pixel on the right side of the second row is the reference pixel that causes false color, at this time, if you want to weaken the energy of the R pixel, you can change the grating parameters of the grating component on the R pixel, and according to the diffraction formula, let the red light of the R pixel diffract to the surrounding green or blue pixels. In this way, after diffraction, the exposure energy of the R pixel is very low, and after interpolation with reference to the R pixel, the risk of false color caused will be greatly reduced.

[0197] The shooting method provided in the embodiment of the present application is used to adjust the amount of light entering a reference pixel through a target grating component to reduce the risk of false color of an interpolated pixel determined based on the reference pixel during remosaic processing.

[0198] The shooting method provided in the embodiment of the present application can realize the various functions of the electronic device provided in the aforementioned embodiment of the present application, and can achieve the same beneficial effects as the electronic device provided in the aforementioned embodiment of the present application. To avoid repetition, it will not be described here.

[0199] The present application also provides a photographing device, such as Fig.23 As shown, the shooting device 2300 includes any one of the camera modules 2301 provided in the aforementioned embodiments of the present application, and the shooting device 2300 also includes:

[0200] The shooting module 2302 is used to obtain a first image by shooting with the camera module 2301, wherein the first image is obtained based on color guessing processing, and the first image includes a false color area;

[0201] A determination module 2303 is used to determine a first pixel whose light input amount needs to be adjusted based on a color guessing method corresponding to the color guessing processing, wherein the first pixel is a reference pixel when performing color guessing processing on a second pixel in the pseudo-color area;

[0202] An adjustment module 2304, configured to adjust the amount of light entering the first pixel based on a target grating component in the grating layer;

[0203] The shooting module 2302 is also used to obtain a second image by shooting with the camera module 2301.

[0204] In some implementations, the color guessing method includes a first reference direction during the color guessing process, the first reference direction being a texture direction of the false color area, and the adjustment module 2404 is specifically configured to perform at least one of the following:

[0205] Determine the first pixel for which the amount of incoming light needs to be reduced, where the first pixel is a pixel in the first reference direction;

[0206] The first pixel whose light input amount needs to be enhanced is determined, where the first pixel is a pixel in a second reference direction, wherein the second reference direction is different from the first reference direction.

[0207] The shooting device 2300 provided in the embodiment of the present application can implement each process of the aforementioned shooting method embodiment of the present application, and can achieve the same beneficial effects as the aforementioned shooting method embodiment. To avoid repetition, it will not be described here.

[0208] Alternatively, if Fig.24 As shown, an embodiment of the present application further provides an electronic device 2400, including a processor 2401 and a memory 2402, wherein the memory 2402 stores programs or instructions that can be executed on the processor 2401, and when the program or instructions are executed by the processor 2401, the various steps of the aforementioned shooting method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described again here.

[0209] It should be noted that the electronic devices in the embodiments of the present application include mobile electronic devices and non-mobile electronic devices.

[0210] Fig.25 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0211] The electronic device 2500 includes but is not limited to: a radio frequency unit 2501, a network module 2502, an audio output unit 2503, an input unit 2504, a sensor 2505, a display unit 2506, a user input unit 2507, an interface unit 2508, a memory 2509, and a processor 2510, and also includes the camera module in the above embodiment.

[0212] Those skilled in the art will appreciate that the electronic device 2500 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 2510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.25 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0213] The processor 2510 is configured to:

[0214] Controlling the camera module to capture a first image, wherein the first image is obtained based on color guessing processing, and the first image includes a false color area;

[0215] Determining a first pixel for which the amount of incoming light needs to be adjusted based on a color guessing method corresponding to the color guessing processing, wherein the first pixel is a reference pixel when performing color guessing processing on a second pixel in the pseudo-color area;

[0216] adjusting the amount of light entering the first pixel based on the target grating component in the grating layer;

[0217] The camera module is controlled to capture a second image.

[0218] In some embodiments, the color guessing method includes a first reference direction during the color guessing processing, the first reference direction is a texture direction of the false color area, and the processor 2510 determines the first pixel that needs to adjust the amount of incoming light based on the color guessing method corresponding to the color guessing processing, including at least one of the following:

[0219] Determine the first pixel for which the amount of incoming light needs to be reduced, where the first pixel is a pixel in the first reference direction;

[0220] The first pixel whose light input amount needs to be enhanced is determined, where the first pixel is a pixel in a second reference direction, wherein the second reference direction is different from the first reference direction.

[0221] It can be understood that the implementation process of each implementation method mentioned in this embodiment can refer to the relevant description of the aforementioned shooting method embodiment, and achieve the same or corresponding technical effect. To avoid repetition, it will not be repeated here.

[0222] It should be understood that in the embodiment of the present application, the input unit 2504 may include a graphics processor (Graphics Processing Unit, GPU) 25041 and a microphone 25042, and the graphics processor 25041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 2506 may include a display panel 25061, and the display panel 25061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 2507 includes a touch panel 25071 and at least one of other input devices 25072. The touch panel 25071 is also called a touch screen. The touch panel 25071 may include two parts: a touch detection device and a touch controller. Other input devices 25072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0223] The memory 2509 can be used to store software programs and various data. The memory 2509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 2509 may include a volatile memory or a non-volatile memory, or the memory 2509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 2509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0224] The processor 2510 may include one or more processing units; optionally, the processor 2510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 2510.

[0225] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0226] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0227] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0228] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0229] An embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the various processes of the above-mentioned shooting method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0230] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0231] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0232] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image sensor, It is characterized in that The invention comprises at least two pixel units, wherein the pixel unit comprises a first pixel region, a second pixel region and a third pixel region, wherein the second pixel region is arranged around the first pixel region, and the third pixel region is arranged around the second pixel region; the first pixel region comprises at least one green pixel, the second pixel region comprises a red pixel, a blue pixel and a green pixel, the third pixel region comprises a red pixel, a blue pixel and a green pixel, and the number of the green pixels in the pixel unit is greater than the sum of the number of the red pixels and the number of the blue pixels.

2. The image sensor according to claim 1, It is characterized in that The pixel unit satisfies at least one of the following: Each row includes red pixels, blue pixels, and green pixels; Each column includes red pixels, blue pixels, and green pixels; The pixels adjacent to each red pixel include at least 3 green pixels; The pixels adjacent to each blue pixel include at least three green pixels.

3. The image sensor according to claim 1 or 2, It is characterized in that The first pixel area is entirely green pixels; the number of green pixels, blue pixels and red pixels in the second pixel area is equal; the number of green pixels in the third pixel area is greater than the sum of the number of red pixels and blue pixels.

4. The image sensor according to claim 3, It is characterized in that The first pixel region includes four green pixels; the second pixel region includes four red pixels, four blue pixels and four green pixels; the third pixel region includes four red pixels, four blue pixels and 12 green pixels.

5. The image sensor according to claim 4, It is characterized in that The pixel units are arranged in a 6×6 structure.

6. A camera module, It is characterized in that include: The image sensor according to any one of claims 1 to 5, wherein the camera module further comprises a grating layer; The grating layer is arranged on the photosensitive side of the image sensor; The grating layer includes a grating component corresponding to each pixel one by one, and the grating component is used to adjust the amount of light entering the pixel.

7. An electronic device, It is characterized in that Comprising the camera module as described in claim 6.

8. A shooting method, It is characterized in that Executed by the electronic device of claim 7, the method comprising: capturing a first image, wherein the first image is obtained based on color guessing processing and includes a false color area; Determining a first pixel for which the amount of incoming light needs to be adjusted based on a color guessing method corresponding to the color guessing processing, wherein the first pixel is a reference pixel when performing color guessing processing on a second pixel in the pseudo-color area; adjusting the amount of light entering the first pixel based on the target grating component in the grating layer; A second image is captured.

9. The photographing method according to claim 8, It is characterized in that The color guessing method includes a first reference direction during the color guessing process, the first reference direction is a texture direction of the pseudo-color area, and the determining of the first pixel for which the amount of incoming light needs to be adjusted based on the color guessing method corresponding to the color guessing process includes at least one of the following: Determine the first pixel for which the amount of incoming light needs to be reduced, where the first pixel is a pixel in the first reference direction; The first pixel whose light input amount needs to be enhanced is determined, where the first pixel is a pixel in a second reference direction, wherein the second reference direction is different from the first reference direction.

10. A photographing device, It is characterized in that The camera module according to claim 6, wherein the camera device further comprises: A shooting module, configured to obtain a first image by shooting with the camera module, wherein the first image is obtained based on color guessing processing, and the first image includes a false color area; A determination module, configured to determine a first pixel for which the amount of incoming light needs to be adjusted based on a color guessing method corresponding to the color guessing process, wherein the first pixel is a reference pixel when performing color guessing process on a second pixel in the pseudo-color area; An adjustment module, used for adjusting the amount of light entering the first pixel based on a target grating component in the grating layer; The shooting module is also used to obtain a second image by shooting with the camera module.