Under-screen camera sensor, image processing method, electronic device and storage medium

By introducing an anti-glare microlens unit into the under-screen camera sensor, anti-glare RAW images are collected and ordinary RAW images are de-glare processed, solving the glare problem in strong light scenes and achieving better anti-glare effects.

CN114640763BActive Publication Date: 2024-10-29BEIJING JIGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210192672.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2024-10-29
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

In the existing technology, the anti-glare algorithm for the under-screen camera area cannot effectively cover the glare problem in strong light source scenes, resulting in poor anti-glare effect and often introducing abnormal light band problems.

Method used

An under-screen camera sensor containing an ordinary microlens unit and an anti-glare microlens unit is used. Anti-glare RAW images are collected through the anti-glare microlens unit, and ordinary RAW images are deglare processed to generate glare-free RAW images.

Benefits of technology

In various light source scenarios including strong light scenes, the glare problem is eliminated, the glare removal effect is good, and the brightness of the anti-glare RAW image is low without abnormal glare and fog, ensuring complete information of the shooting scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114640763B_ABST
    Figure CN114640763B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an under-screen camera sensor, an image processing method, an electronic device and a storage medium. The under-screen camera sensor includes a pixel array, a color filter array and a microlens array located above the pixel array. The microlens array includes a first microlens unit and a second microlens unit, and the second microlens unit is an anti-glare microlens. The image processing method includes: acquiring an original RAW image collected by the under-screen camera sensor; extracting a first pixel value of each pixel corresponding to the first microlens unit from the original RAW image, and generating a first RAW image based on the first pixel value; extracting a second pixel value of each pixel corresponding to the second microlens unit from the original RAW image, and generating a second RAW image based on the second pixel value; performing glare repair processing on a first area in the first RAW image based on the second RAW image to obtain a third RAW image, and the brightness value of each pixel in the first area is greater than the first value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision technology, and in particular to an under-screen camera sensor, an image processing method, an electronic device, and a storage medium. Background Art

[0002] In recent years, with the popularization of electronic devices, users have an increasingly strong demand for full-screen displays. In order to realize the front-facing shooting function of full-screen electronic devices, device manufacturers have designed a variety of schemes for the screen pixel sorting method and screen pixel size in the camera area under the screen of full-screen electronic devices. Various design schemes have balanced the screen display effect of the camera area under the screen and the amount of light entering the camera area under the screen to a certain extent, but there are also some problems. For example, the interference or diffraction of light by the screen pixels in the camera area under the screen will produce a strong sense of fog and irregular light spots, resulting in screen glare problems.

[0003] In the prior art, the glare problem of the picture is mainly improved by fusing multiple frames of images with different brightness and then running a separate deglare algorithm. However, the deglare algorithm mainly improves the foggy feeling of the overall picture and the glare problem of some surface light sources, line light sources and small point light sources, and cannot cover all light sources. For example, the glare improvement for the sun or slightly stronger light sources is not significant, and abnormal light band problems are often introduced, resulting in poor deglare effect. Summary of the invention

[0004] The embodiments of the present application provide an under-screen camera sensor, an image processing method, an electronic device, and a storage medium to solve the technical problem of poor image de-glare effect existing in the prior art.

[0005] According to a first aspect of the present application, an under-screen camera sensor is disclosed, comprising a pixel array, a color filter array, and a microlens array;

[0006] The color filter array and the microlens array are both located above the pixel array, the microlens array includes a first microlens unit and a second microlens unit, and the second microlens unit is an anti-glare microlens.

[0007] Optionally, as an embodiment, the color filter array is located above the pixel array, and the microlens array is located above the color filter array; or,

[0008] The microlens array is located above the pixel array, and the color filter array is located above the microlens array.

[0009] Optionally, as an embodiment, the color filter array includes a plurality of groups of repeatedly arranged filter units, each group of filter units includes a plurality of different filter units, and one filter unit covers one microlens unit in the microlens array;

[0010] The M filter units in each group of filter units are covered with M first microlens units, and the N filter units in each group of filter units are covered with N second microlens units, wherein M is greater than N, and both are integers greater than 1;

[0011] The positions of the M filter units in different groups of filter units are the same, and the positions of the N filter units in different groups of filter units are the same.

[0012] Optionally, as an embodiment, each group of filter units is arranged in any of the following ways:

[0013] and

[0014] Optionally, as an embodiment, the arrangement of each group of filter units is as follows: In the case of , M is 12 and N is 4;

[0015] The N filter units in each group of filter units include: R in the i-th row and j-th column, G in the i-th row and j+2-th column, G in the i+2-th row and j+2-th column, and B in the i+2-th row and j+2-th column, where 1≤i≤2, 1≤j≤2.

[0016] According to a second aspect of the present application, an image processing method is disclosed for performing de-glare processing on a RAW image collected by the under-screen camera sensor in the first aspect, the method comprising:

[0017] Obtain the original RAW image captured by the under-screen camera sensor;

[0018] Extracting, from the original RAW image, a first pixel value of each pixel point corresponding to a first microlens unit in the under-screen camera sensor, and generating a first RAW image based on the first pixel value;

[0019] Extracting a second pixel value of each pixel point corresponding to a second microlens unit in the under-screen camera sensor from the original RAW image, and generating a second RAW image based on the second pixel value, wherein the second microlens unit is an anti-glare microlens;

[0020] Determine a first area in the first RAW image, wherein a brightness value of each pixel in the first area is greater than a first value;

[0021] Based on the second RAW image, glare restoration processing is performed on the first area in the first RAW image to obtain a third RAW image.

[0022] Optionally, as an embodiment, performing glare restoration processing on the first area in the first RAW image based on the second RAW image to obtain a third RAW image includes:

[0023] determining a second area in the second RAW image corresponding to the first area;

[0024] For each pixel point Pi in the first area, a weighted sum operation is performed on the original pixel value of Pi and the original pixel value of the pixel point Ri at the corresponding position in the second area to obtain the target pixel value of Pi, wherein the weight value of Ri is greater than the weight value of Pi;

[0025] For each pixel point Pj in an area outside the first area in the first RAW image, perform a weighted sum operation on the original pixel value of Pj and the original pixel value of the pixel point Rj at the corresponding position in the second image to obtain a target pixel value of Pj, wherein the weight value of Pj is greater than the weight value of Rj;

[0026] The original pixel value of each Pi in the first RAW image is replaced with the corresponding target pixel value, and the original pixel value of each Pj is replaced with the corresponding target pixel value, so as to obtain a third RAW image.

[0027] Optionally, as an embodiment, the method further includes:

[0028] Reconstructing the third RAW image to obtain a first full-color image;

[0029] The first full-color image is displayed on a photo preview interface of the electronic device.

[0030] Optionally, as an embodiment, the method further includes:

[0031] storing the first RAW image and the second RAW image in a cache queue, wherein the cache queue stores first RAW images and corresponding second RAW images of multiple different exposure levels in the same photographing scene;

[0032] When a photographing instruction for a target scene is received, first RAW images and corresponding second RAW images of a plurality of different exposure levels under the target scene are read from the cache queue;

[0033] generating a fourth RAW image according to the first RAW images with multiple different exposure levels under the target scene and the corresponding second RAW images;

[0034] The fourth RAW image is reconstructed to obtain a second full-color image.

[0035] According to a third aspect of the present application, an image processing device is disclosed, for performing de-glare processing on a RAW image collected by the under-screen camera sensor in the first aspect, the device comprising:

[0036] An acquisition module, used to acquire the original RAW image captured by the under-screen camera sensor;

[0037] A first generating module, configured to extract, from the original RAW image, a first pixel value of each pixel point corresponding to a first microlens unit in the under-screen camera sensor, and generate a first RAW image based on the first pixel value;

[0038] A second generating module, configured to extract, from the original RAW image, a second pixel value of each pixel point corresponding to a second microlens unit in the under-screen camera sensor, and generate a second RAW image based on the second pixel value, wherein the second microlens unit is an anti-glare microlens;

[0039] A determination module, configured to determine a first area in the first RAW image, wherein a brightness value of each pixel in the first area is greater than a first value;

[0040] The restoration module is used to perform glare restoration processing on the first area in the first RAW image based on the second RAW image to obtain a third RAW image.

[0041] Optionally, as an embodiment, the repair module includes:

[0042] A region determination submodule, configured to determine a second region in the second RAW image corresponding to the first region;

[0043] a first calculation submodule, configured to perform a weighted sum operation on an original pixel value of Pi and an original pixel value of a corresponding pixel point Ri in the second area for each pixel point Pi in the first area, so as to obtain a target pixel value of Pi, wherein a weight value of Ri is greater than a weight value of Pi;

[0044] a second calculation submodule, configured to perform a weighted sum operation on an original pixel value of Pj and an original pixel value of a pixel point Rj at a corresponding position in the second image for each pixel point Pj in an area outside the first area in the first RAW image, so as to obtain a target pixel value of Pj, wherein the weight value of Pj is greater than the weight value of Rj;

[0045] The replacement submodule is used to replace the original pixel value of each Pi in the first RAW image with the corresponding target pixel value, and replace the original pixel value of each Pj with the corresponding target pixel value to obtain a third RAW image.

[0046] Optionally, as an embodiment, the device further includes:

[0047] A first reconstruction module, used for performing image reconstruction on the third RAW image to obtain a first full-color image;

[0048] The display module is used to display the first full-color image on the photo preview interface of the electronic device.

[0049] Optionally, as an embodiment, the device further includes:

[0050] A storage module, used to store the first RAW image and the second RAW image in a cache queue, wherein the cache queue stores first RAW images and corresponding second RAW images of multiple different exposure levels in the same photographing scene;

[0051] A reading module, configured to read, when receiving a photographing instruction for a target scene, first RAW images and corresponding second RAW images of a plurality of different exposure levels under the target scene from the cache queue;

[0052] A third generating module, configured to generate a fourth RAW image according to the first RAW images with a plurality of different exposure levels under the target scene and the corresponding second RAW images;

[0053] The second reconstruction module is used to reconstruct the fourth RAW image to obtain a second full-color image.

[0054] According to a fourth aspect of the present application, an electronic device is disclosed, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the image processing method in the second aspect.

[0055] According to a fifth aspect of the present application, a computer-readable storage medium is disclosed, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the image processing method in the second aspect is implemented.

[0056] According to a sixth aspect of the present application, a computer program product is disclosed, comprising a computer program / instruction, which implements the image processing method in the second aspect when executed by a processor.

[0057] In the embodiment of the present application, the hardware structure of the under-screen camera sensor in the full-screen electronic device can be improved. The microlens array of the improved under-screen camera sensor includes not only ordinary microlens units but also anti-glare microlens units, so that when capturing images of the shooting scene, a normal RAW image can be captured by the ordinary microlens units in the microlens array, and an anti-glare RAW image can be captured by the anti-glare microlens units in the microlens array, wherein the normal RAW image and the anti-glare RAW image contain complete information of the shooting scene, and then the anti-glare RAW image is used to perform de-glare processing on the normal RAW image to obtain a glare-free RAW image. Compared with the prior art, in the embodiment of the present application, since the brightness of the anti-glare RAW image is lower than that of the normal RAW image, and the anti-glare RAW image does not have the problem of abnormal glare and obvious fog, the anti-glare RAW image is used to perform de-glare processing on the normal RAW image, and the obtained image contains complete information of the shooting scene and does not have the glare problem, which can solve the glare problem in various light source scenes including strong light scenes, and the de-glare effect is good. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a structural diagram of an under-screen camera sensor according to an embodiment of the present application;

[0059] Figure 2 is a structural diagram of an under-screen camera sensor according to another embodiment of the present application;

[0060] Figure 3 is a first exemplary diagram of an arrangement of filter units in a color filter array according to an embodiment of the present application;

[0061] Figure 4 is a second exemplary diagram of an arrangement of filter units in a color filter array according to an embodiment of the present application;

[0062] Figure 5 is a third exemplary diagram of an arrangement of filter units in a color filter array according to an embodiment of the present application;

[0063] Figure 6 is an example diagram of an arrangement of microlens units in a microlens array of one embodiment of the present application;

[0064] Figure 7 is a flowchart of an image processing method according to an embodiment of the present application;

[0065] Figure 8 is an example diagram of an image processing method according to an embodiment of the present application;

[0066] Fig. 9 is a structural schematic diagram of an image processing device according to an embodiment of the present application;

[0067] Fig.10 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0069] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0070] In recent years, research on computer vision, deep learning, machine learning, image processing, image recognition and other technologies based on artificial intelligence has made important progress. Artificial Intelligence (AI) is an emerging science and technology that studies and develops theories, methods, technologies and application systems for simulating and extending human intelligence. Artificial intelligence is a comprehensive discipline involving many types of technologies such as chips, big data, cloud computing, the Internet of Things, distributed storage, deep learning, machine learning, neural networks, etc. Computer vision, as an important branch of artificial intelligence, specifically allows machines to recognize the world. Computer vision technology usually includes face recognition, liveness detection, fingerprint recognition and anti-counterfeiting verification, biometric recognition, face detection, pedestrian detection, target detection, pedestrian recognition, image processing, image recognition, image semantic understanding, image retrieval, text recognition, video processing, video content recognition, behavior recognition, 3D reconstruction, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), computational photography, robot navigation and positioning and other technologies. With the research and advancement of artificial intelligence technology, this technology has been applied in many fields, such as security, urban management, traffic management, building management, park management, facial access, facial attendance, logistics management, warehouse management, robots, intelligent marketing, computational photography, mobile phone imaging, cloud services, smart homes, wearable devices, unmanned driving, automatic driving, smart medical care, facial payment, facial unlocking, fingerprint unlocking, identity verification, smart screens, smart TVs, cameras, mobile Internet, live streaming, beauty, makeup, medical beauty, and smart temperature measurement.

[0071] Taking the field of computational photography as an example, at present, in order to balance the screen display effect of the under-screen camera area of ​​full-screen electronic devices and the amount of light entering the under-screen camera, equipment manufacturers have designed a variety of schemes for the screen pixel arrangement and size of the camera area. A variety of design schemes have balanced the screen display effect of the under-screen camera area and the amount of light entering the under-screen camera area to a certain extent, but there are also some problems. For example, the interference or diffraction of light by screen pixels in the under-screen camera area will produce a strong sense of fog and irregular light spots, resulting in screen glare problems.

[0072] In the prior art, the glare problem of the picture is mainly improved by fusing multiple frames of images with different brightness and then running a separate deglare algorithm. However, the deglare algorithm mainly improves the foggy feeling of the overall picture and the glare problem of some surface light sources, line light sources and small point light sources, and cannot cover all light sources. For example, the glare improvement for the sun or slightly stronger light sources is not significant, and abnormal light band problems are often introduced, resulting in poor deglare effect.

[0073] In order to solve the above technical problems, the embodiments of the present application provide an under-screen camera sensor, an image processing method, an electronic device and a storage medium.

[0074] The following first introduces the under-screen camera sensor in the embodiment of the present application.

[0075] An embodiment of the present application provides an under-screen camera sensor, comprising: a pixel array, a color filter array and a microlens array; wherein the color filter array and the microlens array are both located above the pixel array, the microlens array comprises a first microlens unit and a second microlens unit, and the second microlens unit is an anti-glare microlens.

[0076] In some embodiments, Figure 1 As shown, the color filter array in the under-screen camera sensor is located above the pixel array, and the microlens array is located above the color filter array.

[0077] In other embodiments, Figure 2 As shown, the microlens array in the under-screen camera sensor is located above the pixel array, and the color filter array is located above the microlens array.

[0078] The under-screen camera sensor is a device that converts light signals into electrical signals. Each photosensitive unit on the sensor is called a pixel, thus forming a pixel array. The pixel value of a pixel is used to characterize the intensity of light sensed by the pixel, but it cannot characterize the color.

[0079] In order to represent the color, a color filter array (CFA) is covered on the surface of the pixel array. The color filter array includes multiple color filter units, each of which corresponds to a pixel point in the pixel array. Each color filter unit only allows a single color of light to pass through and be captured by the corresponding pixel point. After the above processing, the pixel value of the pixel point can be used to represent the light intensity of a specific color of light.

[0080] In order to converge the light signal, a layer of microlens array is covered on the surface of the pixel array. The microlens array includes multiple microlens units, each of which corresponds to a color filter unit in the color filter array and a pixel point in the pixel array. That is, there is a one-to-one correspondence between the pixel points, color filter units and microlens units in the sensor.

[0081] In the embodiment of the present application, the first microlens unit is an ordinary microlens, that is, a microlens without anti-glare function. The second microlens unit can be a microlens with anti-glare coating or a microlens made of anti-glare material, that is, a microlens with anti-glare function.

[0082] In some embodiments, the color filter array includes multiple groups of repeatedly arranged filter units, each group of filter units includes multiple different filter units, and one filter unit is covered with a microlens unit in the microlens array; M filter units in each group of filter units are covered with M first microlens units, and N filter units in each group of filter units are covered with N second microlens units, wherein M is greater than N and both are integers greater than 1; positions of the M filter units in different groups of filter units are the same, and positions of the N filter units in different groups of filter units are the same.

[0083] In some embodiments, the arrangement of each group of filter units may be any of the following:

[0084] and

[0085] For ease of understanding, combined Figures 3 to 6 The example diagram shown is used for explanation.

[0086] In an example, Figure 3 As shown, each group of filter units may be arranged in a quad-Bayer array arrangement. In the quad-Bayer array arrangement, each group of filter units includes 16 color filter units, namely, 4 adjacent red filter units (indicated by "R"), 4 adjacent green filter units (indicated by "G"), 4 adjacent green filter units (indicated by "G"), and 4 adjacent blue filter units (indicated by "B"). The red filter unit only allows red light to pass through, the green filter unit only allows green light to pass through, and the blue filter unit only allows blue light to pass through. In the captured illumination information in this arrangement, red light information accounts for 25%, green light information accounts for 50%, and blue light information accounts for 25%.

[0087] In an example, Figure 4 As shown, the arrangement of each group of filter units can be an RCCC arrangement. In the RCCC arrangement, each group of filter units includes 4 filter units, namely 1 red filter unit (indicated by "R") and 3 brightness filter units (indicated by "C"). The red filter unit only allows red light to pass through, and the brightness filter unit allows all wavelengths of light to pass through. In this arrangement, the brightness information accounts for 75% of the light information captured, and the red light information accounts for 25%.

[0088] In an example, Figure 5 As shown, the arrangement of each group of filter units can be an arrangement including a red filter unit, a green filter unit, a blue filter unit and a brightness filter unit. In this arrangement, the brightness information accounts for 50%, the green light information accounts for 25%, the blue light information accounts for 12.5%, and the red light information accounts for 12.5%.

[0089] In addition, in the embodiment of the present application, the arrangement of the color filter array may also be other modes besides the above three modes, which is not limited in the embodiment of the present application.

[0090] In some embodiments, the arrangement of each group of filter units is as follows: In case,

[0091] M is 12, N is 4; the N filter units in each group of filter units include: R in the i-th row and j-th column, G in the i-th row and j+2-th column, G in the i+2-th row and j+2-th column, and B in the i+2-th row and j+2-th column, where 1≤i≤2, 1≤j≤2.

[0092] In an example, Figure 6 As shown, Figure 6 An example diagram of the arrangement of the microlens array corresponding to the filter units in each group of filter units is shown, where the microlens units corresponding to the filter units R, G and B are first microlens units, and the microlens units corresponding to the filter units R_deflare, G_deflare and B_deflare are second microlens units.

[0093] Next, an image processing method provided in an embodiment of the present application is introduced.

[0094] Figure 7 is a flowchart of an image processing method according to an embodiment of the present application, which is used to perform de-glare processing on the RAW image collected by the above-mentioned under-screen camera sensor. Figure 7 As shown, the method may include the following steps: step 701, step 702, step 703, step 704 and step 705, wherein:

[0095] In step 701, the original RAW image captured by the under-screen camera sensor is obtained.

[0096] In the embodiment of the present application, the original RAW image is a full-size RAW image, that is, the original RAW image contains as many pixels as the pixel array. For example, the pixel array of the under-screen camera sensor contains 3000*4000 pixels, and the corresponding number of pixels in the original RAW image is also 3000*4000.

[0097] In an embodiment of the present application, the pixel value of each pixel in the pixel array of the under-screen camera sensor can be obtained, and the original RAW image can be generated based on the obtained pixel value and the arrangement of the pixels in the pixel array.

[0098] In step 702, the first pixel value of each pixel point corresponding to the first microlens unit in the under-screen camera sensor is extracted from the original RAW image, and a first RAW image is generated based on the first pixel value.

[0099] In the embodiment of the present application, since the first microlens unit is an ordinary microlens, the illumination information can be normally irradiated to the pixel points of the under-screen camera sensor via the first microlens unit and the color filter unit. Therefore, the first RAW image separated from the original RAW image is a normal RAW image, but there will be a glare problem therein.

[0100] In step 703, the second pixel value of each pixel point corresponding to the second microlens unit in the under-screen camera sensor is extracted from the original RAW image, and a second RAW image is generated based on the second pixel value.

[0101] In the embodiment of the present application, since the second microlens unit is an anti-glare microlens, the reflected and refracted light signals will be filtered out after the light information passes through the second microlens unit, and then irradiated to the pixel points of the under-screen camera sensor through the color filter unit. Therefore, the second RAW image separated from the original RAW image is an anti-glare RAW image (also called a glare-free RAW image), in which there is no glare problem, but its image brightness is lower than that of a normal RAW image.

[0102] In the embodiment of the present application, since the original RAW image records all the information of the photographing scene, the first RAW image and the second RAW image separated from the original RAW image also contain all the information of the photographing scene.

[0103] In step 704, a first region in the first RAW image is determined, wherein the brightness value of each pixel in the first region is greater than a first value.

[0104] In the embodiment of the present application, since the glare problem mainly occurs in the highlight area in the image, it is necessary to detect the highlight area in the first RAW image, that is, the first area where the brightness value of each pixel is greater than the first value.

[0105] In an embodiment of the present application, the value of the first numerical value can be set. After the value of the first numerical value is set, the value of the first numerical value is used as a comparison standard, and any image area detection method in the prior art is adopted to compare the pixel value of each pixel point in the first RAW image with the first numerical value to determine the first area in the first RAW image.

[0106] In step 705, based on the second RAW image, glare restoration processing is performed on the first area in the first RAW image to obtain a third RAW image.

[0107] In the embodiment of the present application, the second RAW image without glare problem is used to perform glare repair processing on the highlight area of ​​the first RAW image with glare problem, so as to obtain a third RAW image with glare problem removed.

[0108] In some embodiments, the above step 705 may specifically include the following steps (not shown in the figure): step 7051, step 7052, step 7053 and step 7054, wherein:

[0109] In step 7051, a second area corresponding to the first area in the second RAW image is determined.

[0110] In step 7052, for each pixel point Pi in the first area, a weighted sum operation is performed on the original pixel value of Pi and the original pixel value of the corresponding position pixel point Ri in the second area to obtain the target pixel value of Pi, where the weight value of Ri is greater than the weight value of Pi.

[0111] In step 7053, for each pixel point Pj in the area outside the first area in the first RAW image, a weighted sum operation is performed on the original pixel value of Pj and the original pixel value of the corresponding position pixel point Rj in the second image to obtain the target pixel value of Pj, wherein the weight value of Pj is greater than the weight value of Rj.

[0112] In step 7054, the original pixel value of each Pi in the first RAW image is replaced with the corresponding target pixel value, and the original pixel value of each Pj is replaced with the corresponding target pixel value to obtain a third RAW image.

[0113] For ease of understanding, Figure 6 The arrangement of the microlens array shown and Figure 8 Taking the RAW image shown in FIG. 1 as an example, the image de-glare process is described.

[0114] The arrangement of the microlens array in the under-screen camera sensor is as follows Figure 6 As shown, after obtaining the original RAW image from the camera sensor under the screen, for example, the size of the original RAW image is 16*16, the pixel values ​​of the corresponding pixels of the filter units R_deflare, G_deflare and B_deflare are extracted from the original RAW image to generate the following Figure 8The second RAW image of 4*4 size is shown; the pixel values ​​of the pixels corresponding to the filter units R, G and B are extracted from the original RAW image. Taking the pixel values ​​of the three pixels corresponding to the three filter units R in each group of filter units as an example, the pixel values ​​of the three pixels are subjected to three-in-one binning processing to obtain an R pixel value. Similarly, the three pixels corresponding to the filter unit G and the three pixels corresponding to the filter unit B are subjected to three-in-one binning processing to obtain two G pixel values ​​and one B pixel value. Finally, as shown in FIG. Figure 8 As shown, a first RAW image of 4*4 size is generated.

[0115] When performing glare repair processing, for each pixel point (Pi1, Pi2, Pi3, Pi4) in the first area, the original pixel value of Pi1 is weighted summed with the original pixel value of the pixel point Ri1 in the second area to obtain the target pixel value of Pi1. Similarly, the target pixel values ​​of Pi2~Pi4 can be calculated.

[0116] For each pixel point (Pj1, Pj2, Pj3, Pj4, Pj5, Pj6, Pj7, Pj8, Pj9, Pj10, Pj11, Pj12) in the area outside the first area in the first RAW image, a weighted sum operation is performed on the original pixel value of Pj1 and the original pixel value of Rj1 in the second image to obtain the target pixel value of Pj1. Similarly, the target pixel values ​​of Pj2~Pj12 can be calculated.

[0117] Afterwards, the original pixel values ​​of Pi1 to Pi4 in the first RAW image are replaced with the target pixel values ​​of Pi1 to Pi4, and the original pixel values ​​of Pj1 to Pj12 in the first RAW image are replaced with the target pixel values ​​of Pj1 to Pj12, and finally a third RAW image is obtained.

[0118] It can be seen from the above embodiments that in this embodiment, the hardware structure of the under-screen camera sensor in the full-screen electronic device can be improved, and the microlens array of the improved under-screen camera sensor includes not only ordinary microlens units but also anti-glare microlens units, so that when capturing images of the shooting scene, a normal RAW image can be captured by the ordinary microlens units in the microlens array, and an anti-glare RAW image can be captured by the anti-glare microlens units in the microlens array, wherein the normal RAW image and the anti-glare RAW image contain complete information of the shooting scene, and then the anti-glare RAW image is used to de-glare the normal RAW image to obtain a glare-free RAW image. Compared with the prior art, in the embodiment of the present application, since the brightness of the anti-glare RAW image is lower than that of the normal RAW image, and the anti-glare RAW image does not have the problems of abnormal glare and obvious fog, the anti-glare RAW image is used to perform de-glare processing on the normal RAW image. The obtained image contains complete information of the shooting scene and does not have the glare problem. It can solve the glare problem in various light source scenes including strong light scenes, and the de-glare effect is better.

[0119] Considering that the de-glare algorithm solutions introduced by equipment manufacturers in the prior art are mainly used in the photo process, no corresponding algorithm is added to improve the effect during photo preview, resulting in a large difference between the image displayed in the photo preview interface and the image actually taken (mainly reflected in the fact that the de-glare and de-fogging effects of the preview image are much worse than those of the photo image).

[0120] In order to solve the above technical problem, in another embodiment provided in the present application, it is also possible to Figure 7 On the basis of the method embodiment shown, the following steps are added:

[0121] The third RAW image is reconstructed to obtain a first full-color image; and the first full-color image is displayed on a photo preview interface of the electronic device.

[0122] In the embodiment of the present application, glare has been removed from the third RAW image, but considering that the third RAW image is in mosaic form, in order to obtain a full-color image from incomplete color sampling, it is necessary to reconstruct the incomplete color sampling, that is, it is necessary to perform demosaicing on the third RAW image.

[0123] In practical applications, any de-mosaicing method in the prior art may be used to perform de-mosaicing on the third RAW image to obtain a corresponding first full-color image, wherein the image format of the first full-color image may be a YUV format.

[0124] It can be seen that in the embodiment of the present application, a corresponding algorithm can be added to improve the effect when previewing a photo, and the same algorithm can be reused when taking a photo, so that the preview and photo effects are consistent, and because there is no need to add a special de-glare algorithm module, the processing time of the entire algorithm flow is reduced.

[0125] In order to reduce the time of image processing during the shooting process and improve the image processing efficiency, the first RAW image and the second RAW image generated previously can be reused during the actual shooting. Accordingly, in another embodiment provided in the present application, Figure 7 On the basis of the method embodiment shown, the following steps are added:

[0126] The first RAW image and the second RAW image are stored in a cache queue, wherein the cache queue stores the first RAW images and the corresponding second RAW images of multiple different exposure levels in the same photographing scene;

[0127] When a photo-taking instruction for a target scene is received, first RAW images and corresponding second RAW images of a plurality of different exposure levels under the target scene are read from the cache queue;

[0128] generating a fourth RAW image according to the first RAW images with multiple different exposure levels under the target scene and the corresponding second RAW images;

[0129] The fourth RAW image is reconstructed to obtain a second full-color image.

[0130] In the embodiment of the present application, the fourth RAW image may be a RAW image without glare and with HDR effect.

[0131] In the embodiment of the present application, the second full-color image is a color image corresponding to the target scene, and the format of the second full-color image may be a JPEG format.

[0132] In an example, the target scene corresponds to three groups of RAW images with different exposure levels, namely: (a first RAW image at a first exposure level, a second RAW image at the first exposure level), (a first RAW image at a second exposure level, a second RAW image at the second exposure level), and (a first RAW image at a third exposure level, a second RAW image at the third exposure level).

[0133] In some embodiments, reference may be made to Figure 7In step 705 of the illustrated embodiment, a fifth RAW image at the first exposure level is generated based on the first RAW image at the first exposure level and the second RAW image at the first exposure level. Similarly, a sixth RAW image at the second exposure level is generated based on the first RAW image at the second exposure level and the second RAW image at the second exposure level. A seventh RAW image at the third exposure level is generated based on the first RAW image at the third exposure level and the second RAW image at the third exposure level. Thereafter, a fourth RAW image is generated based on the fifth RAW image, the sixth RAW image and the seventh RAW image.

[0134] In other embodiments, all of the first RAW images and part of the second RAW images may be selected from three groups of RAW images with different exposure levels corresponding to the target scene, and a fourth RAW image may be generated based on all of the first RAW images and part of the second RAW images.

[0135] It can be seen that in the embodiment of the present application, during actual shooting, the previously generated first RAW image and the second RAW image can be reused, thereby reducing the image processing time during the shooting process and improving the image processing efficiency.

[0136] Fig. 9 is a schematic diagram of the structure of an image processing device according to an embodiment of the present application. Fig. 9 As shown, the image processing device 900 may include: an acquisition module 901, a first generation module 902, a second generation module 903, a determination module 904 and a repair module 905, wherein:

[0137] An acquisition module 901 is used to acquire the original RAW image captured by the under-screen camera sensor;

[0138] A first generating module 902 is used to extract a first pixel value of each pixel point corresponding to a first microlens unit in the under-screen camera sensor from the original RAW image, and generate a first RAW image based on the first pixel value;

[0139] A second generating module 903 is used to extract, from the original RAW image, a second pixel value of each pixel point corresponding to a second microlens unit in the under-screen camera sensor, and generate a second RAW image based on the second pixel value, wherein the second microlens unit is an anti-glare microlens;

[0140] A determination module 904 is configured to determine a first region in the first RAW image, wherein a brightness value of each pixel in the first region is greater than a first value;

[0141] The restoration module 905 is configured to perform glare restoration processing on the first area in the first RAW image based on the second RAW image to obtain a third RAW image.

[0142] It can be seen from the above embodiments that in this embodiment, the hardware structure of the under-screen camera sensor in the full-screen electronic device can be improved, and the microlens array of the improved under-screen camera sensor includes not only ordinary microlens units but also anti-glare microlens units, so that when capturing images of the shooting scene, a normal RAW image can be captured by the ordinary microlens units in the microlens array, and an anti-glare RAW image can be captured by the anti-glare microlens units in the microlens array, wherein the normal RAW image and the anti-glare RAW image contain complete information of the shooting scene, and then the anti-glare RAW image is used to de-glare the normal RAW image to obtain a glare-free RAW image. Compared with the prior art, in the embodiment of the present application, since the brightness of the anti-glare RAW image is lower than that of the normal RAW image, and the anti-glare RAW image does not have the problems of abnormal glare and obvious fog, the anti-glare RAW image is used to perform de-glare processing on the normal RAW image. The obtained image contains complete information of the shooting scene and does not have the glare problem. It can solve the glare problem in various light source scenes including strong light scenes, and the de-glare effect is better.

[0143] Optionally, as an embodiment, the repair module 905 may include:

[0144] A region determination submodule, configured to determine a second region in the second RAW image corresponding to the first region;

[0145] a first calculation submodule, configured to perform a weighted sum operation on an original pixel value of Pi and an original pixel value of a corresponding pixel point Ri in the second area for each pixel point Pi in the first area, so as to obtain a target pixel value of Pi, wherein a weight value of Ri is greater than a weight value of Pi;

[0146] a second calculation submodule, configured to perform a weighted sum operation on an original pixel value of Pj and an original pixel value of a pixel point Rj at a corresponding position in the second image for each pixel point Pj in an area outside the first area in the first RAW image, so as to obtain a target pixel value of Pj, wherein the weight value of Pj is greater than the weight value of Rj;

[0147] The replacement submodule is used to replace the original pixel value of each Pi in the first RAW image with the corresponding target pixel value, and replace the original pixel value of each Pj with the corresponding target pixel value to obtain a third RAW image.

[0148] Optionally, as an embodiment, the image processing device 900 may further include:

[0149] A first reconstruction module, used for performing image reconstruction on the third RAW image to obtain a first full-color image;

[0150] The display module is used to display the first full-color image on the photo preview interface of the electronic device.

[0151] Optionally, as an embodiment, the image processing device 900 may further include:

[0152] A storage module, used to store the first RAW image and the second RAW image in a cache queue, wherein the cache queue stores first RAW images and corresponding second RAW images of multiple different exposure levels in the same photographing scene;

[0153] A reading module, configured to read, when receiving a photographing instruction for a target scene, first RAW images and corresponding second RAW images of a plurality of different exposure levels under the target scene from the cache queue;

[0154] A third generating module, configured to generate a fourth RAW image according to the first RAW images with a plurality of different exposure levels under the target scene and the corresponding second RAW images;

[0155] The second reconstruction module is used to reconstruct the fourth RAW image to obtain a second full-color image.

[0156] Any step in the embodiment of the image processing method provided in the present application and the specific operation in any step can be completed by the corresponding module in the image processing device. The process of the corresponding operation completed by each module in the image processing device refers to the process of the corresponding operation described in the embodiment of the image processing method.

[0157] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0158] Fig.10 1 is a block diagram of an electronic device according to an embodiment of the present application. The electronic device includes a processing component 1022, which further includes one or more processors, and a memory resource represented by a memory 1032 for storing instructions executable by the processing component 1022, such as an application. The application stored in the memory 1032 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1022 is configured to execute instructions to perform the above method.

[0159] The electronic device may also include a power supply component 1026 configured to perform power management of the electronic device, a wired or wireless network interface 1050 configured to connect the electronic device to a network, and an input / output (I / O) interface 1058. The electronic device may operate based on an operating system stored in the memory 1032, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.

[0160] According to another embodiment of the present application, the present application further provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps in the image processing method described in any one of the above embodiments.

[0161] According to another embodiment of the present application, the present application further provides a computer program product, including a computer program / instruction, which implements the steps of the image processing method described in any one of the above embodiments when executed by a processor.

[0162] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0163] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0165] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0166] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0167] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0168] The above is a detailed introduction to an under-screen camera sensor, image processing method, electronic device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An under-screen camera sensor, characterized in that: including a pixel array, a color filter array, and a microlens array; Wherein, the color filter array and the microlens array are both located above the pixel array, the microlens array includes a first microlens unit and a second microlens unit, and the second microlens unit is an anti-glare microlens; The color filter array includes a plurality of groups of repeatedly arranged filter units, each group of filter units includes a plurality of different filter units, and one filter unit covers a microlens unit in the microlens array; The M filter units in each group of filter units are covered with M first microlens units, and the N filter units in each group of filter units are covered with N second microlens units, wherein M is greater than N, and both are integers greater than 1; The positions of the M filter units in different groups of filter units are the same, and the positions of the N filter units in different groups of filter units are the same.

2. The under-screen camera sensor according to claim 1, characterized in that: The arrangement of each group of filter units is any of the following:

3. The under-screen camera sensor according to claim 2, characterized in that: The arrangement of each group of filter units is as follows: In the case of , M is 12 and N is 4; The N filter units in each group of filter units include: R in the i-th row and j-th column, G in the i-th row and j+2-th column, G in the i+2-th row and j+2-th column, and B in the i+2-th row and j+2-th column, where 1≤i≤2, 1≤j≤2.

4. An image processing method for performing de-glare processing on a RAW image collected by the under-screen camera sensor according to any one of claims 1 to 3, characterized in that: The method comprises: Obtain the original RAW image captured by the under-screen camera sensor; Extracting, from the original RAW image, a first pixel value of each pixel point corresponding to a first microlens unit in the under-screen camera sensor, and generating a first RAW image based on the first pixel value; Extracting a second pixel value of each pixel point corresponding to a second microlens unit in the under-screen camera sensor from the original RAW image, and generating a second RAW image based on the second pixel value, wherein the second microlens unit is an anti-glare microlens; Determine a first area in the first RAW image, wherein a brightness value of each pixel in the first area is greater than a first value; Based on the second RAW image, glare restoration processing is performed on the first area in the first RAW image to obtain a third RAW image.

5. The method according to claim 4, characterized in that The step of performing glare restoration processing on the first area in the first RAW image based on the second RAW image to obtain a third RAW image includes: determining a second area in the second RAW image corresponding to the first area; For each pixel point Pi in the first area, a weighted sum operation is performed on the original pixel value of Pi and the original pixel value of the pixel point Ri at the corresponding position in the second area to obtain the target pixel value of Pi, wherein the weight value of Ri is greater than the weight value of Pi; For each pixel point Pj in an area outside the first area in the first RAW image, perform a weighted sum operation on the original pixel value of Pj and the original pixel value of the pixel point Rj at the corresponding position in the second RAW image to obtain a target pixel value of Pj, wherein the weight value of Pj is greater than the weight value of Rj; The original pixel value of each of the Pi in the first RAW image is replaced with the corresponding target pixel value, and the original pixel value of each of the Pj is replaced with the corresponding target pixel value, so as to obtain a third RAW image.

6. The method according to claim 4, characterized in that The method further comprises: Performing image reconstruction on the third RAW image to obtain a first full-color image; The first full-color image is displayed on a photo preview interface of the electronic device.

7. The method according to claim 4, characterized in that The method further comprises: storing the first RAW image and the second RAW image in a cache queue, wherein the cache queue stores first RAW images and corresponding second RAW images of multiple different exposure levels in the same photographing scene; When a photographing instruction for a target scene is received, first RAW images and corresponding second RAW images of a plurality of different exposure levels under the target scene are read from the cache queue; generating a fourth RAW image according to the first RAW images with multiple different exposure levels under the target scene and the corresponding second RAW images; The fourth RAW image is reconstructed to obtain a second full-color image.

8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method according to any one of claims 4 to 7.

9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the method according to any one of claims 4 to 7 is implemented.

Citation Information

Patent Citations

  • Image Sensor Including Partition Patterns

    CN110197832A

  • Solid state image sensor

    JP2022011504A