Image sensor, image focusing method, electronic device and storage medium

By using filter units with different transmittances in the image sensor and adjusting the transmittance of the filter unit of the pixel unit, the problem in the existing technology that the image sensor is difficult to achieve high dynamic range phase focusing in HDR image output is solved. Higher phase signal dynamic range and image quality are achieved.

CN118102133BActive Publication Date: 2024-09-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410406088.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-07
Publication Date
2024-09-27
Estimated Expiration
2044-04-07

AI Technical Summary

Technical Problem

It is difficult for existing image sensors to achieve high dynamic range phase focusing during the high dynamic range (HDR) image rendering process, which affects the quality of the imaging image.

Method used

By arranging filter units with different transmittances in the image sensor, the transmittance of the filter unit of the pixel unit is adjusted to read the phase signals corresponding to the filter units with different transmittances and expand the dynamic range of the phase signal. , achieving high dynamic range phase focusing.

Benefits of technology

It effectively expands the dynamic range of the output phase signal, improves the accuracy and image quality of phase focusing, and solves the problem that phase focusing is difficult to achieve in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118102133B
    Figure CN118102133B
Patent Text Reader

Abstract

The embodiment of the present application provides an image sensor, an image focusing method, an electronic device and a storage medium. The image sensor includes: a pixel array and a filter array, the filter array is covered on the pixel array, the pixel array includes a plurality of pixel units, the filter array includes a plurality of filter units, and the filter units in the filter array correspond to the pixel units in the pixel array one by one; wherein the filter array includes filter units with different transmittances. By adjusting the transmittance of the filter units corresponding to some pixel units, the filter array includes filter units with different transmittances, so that when reading the phase signal required for phase focusing, the phase signal output by the pixel unit corresponding to the filter unit with different transmittances can be read. Since the pixel units with different transmittances have different light capture capabilities, the phase information of the bright and dark areas can be better obtained, thereby effectively expanding the dynamic range of the output phase signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to an image sensor, an image focusing method, an electronic device and a storage medium. Background Art

[0002] In digital images, dynamic range represents the ratio between the maximum brightness and the minimum brightness within the displayable range of the image, that is, the number of gray levels from the "brightest" pixel to the "darkest" pixel in the image. The larger the dynamic range of an image, the richer the brightness levels it can represent, and the more realistic the visual effect of the image. High dynamic range (HDR) images can provide more dynamic range and image details, and therefore can better reflect the visual effects in a real environment.

[0003] At present, it is difficult for image sensors to achieve phase focusing in a high dynamic range during the HDR image output process due to the timing of image output. Summary of the invention

[0004] The embodiments of the present application provide an image sensor, an image focusing method, an electronic device, and a storage medium, which can effectively expand the dynamic range of an output phase signal and achieve phase focusing with a high dynamic range.

[0005] In a first aspect, an embodiment of the present application provides an image sensor, comprising: a pixel array and a filter array, wherein the filter array is covered on the pixel array, the pixel array includes filter units with different transmittances, the filter array includes a plurality of filter units, and the filter units in the filter array correspond one-to-one to the pixel units in the pixel array.

[0006] Here, the filter array includes filter units with different transmittances, so that different pixel units can correspond to different sensitivities. The filter array may include filter units with high transmittance characteristics, ordinary RGB filter units, and filter units with low transmittance characteristics. The filter units with high transmittance characteristics can enhance the corresponding pixel units' ability to capture dark light scenes, and the filter units with low transmittance characteristics can enhance the corresponding pixel units' ability to capture bright light scenes.

[0007] In this way, by adjusting the transmittance of the filter units corresponding to some pixel units, the filter array includes filter units with different transmittances, so that when reading the phase signal required for realizing phase focusing, the phase signal output by the pixel units corresponding to the filter units with different transmittances can be read. Since the pixel units with different transmittances have different light capture capabilities, the phase information of the bright and dark areas can be better acquired, thereby effectively expanding the dynamic range of the output phase signal.

[0008] In a possible implementation, the filter array includes a first filter unit, a second filter unit, and a third filter unit; the pixel array includes a first pixel unit corresponding to the first filter unit, a second pixel unit corresponding to the second filter unit, and a third pixel unit corresponding to the third filter unit;

[0009] The transmittance of the first filter unit is smaller than the transmittance of the second filter unit, and the transmittance of the second filter unit is smaller than the transmittance of the third filter unit.

[0010] Here, the first filter unit may be a filter unit with low transmittance characteristics, the third filter unit may be a filter unit with high transmittance characteristics, and the second filter unit may be a color filter unit used in a traditional image sensor, specifically an RGB filter unit.

[0011] In this way, the dynamic range of the phase signal can be expanded by the phase signal output by the first pixel unit and the phase signal output by the third pixel unit.

[0012] In a possible implementation manner, the number of the second filter units is greater than the number of the first filter units.

[0013] In a possible implementation manner, the number of the second filter units is greater than the number of the second filter units.

[0014] Exemplarily, the coverage rate of the first filter unit may be 1 / 32 of the number of all filter units in the filter array, the coverage rate of the third filter unit may also be 1 / 32 of the number of all filter units in the filter array, and the remaining filter units are all the second filter units.

[0015] In this way, only a small number of special filter units may be provided, thereby reducing implementation costs.

[0016] In a possible implementation manner, the first filter unit and the third filter unit are arranged in different rows and columns of a filter array.

[0017] The row where the first pixel unit is located is different from the row where the third pixel unit is located, and the column where the first pixel unit is located is different from the column where the third pixel unit is located, thereby achieving staggered distribution of the first pixel unit and the third pixel unit to reduce image breakage, jaggedness, etc.

[0018] In a possible implementation manner, the first filter unit and the third filter unit include neutral density attenuation filters.

[0019] In a possible implementation manner, the third filter unit includes a transparent filter.

[0020] In a second aspect, an embodiment of the present application provides an image focusing method, which is applied to an image sensor as described in any one of the first aspects, the method comprising: acquiring a phase signal output by a pixel array; wherein filter units with different transmittances are set in a filter array corresponding to the pixel array; determining a target phase signal for each focusing pixel unit in the pixel array based on the phase signal output by the pixel array and the brightness area of ​​the image; and performing a phase focusing operation based on the target phase signal of the focusing pixel unit.

[0021] By using the phase signals output by pixel units with different transmittances to determine the target phase signals of focus pixel units in different brightness areas, the phase information of bright and dark areas can be better acquired, effectively expanding the dynamic range of the phase signal used for phase focusing.

[0022] In a possible implementation, the phase signal output by the pixel array includes first phase data output by a first pixel unit, second phase data output by a second pixel unit, and third phase data output by a third pixel unit, wherein the first pixel unit is a pixel unit corresponding to a first filter unit, the second pixel unit is a pixel unit corresponding to a second filter unit, the third pixel unit is a pixel unit corresponding to a third filter unit, the transmittance of the first filter unit is less than the transmittance of the second filter unit, and the transmittance of the second filter unit is less than the transmittance of the third filter unit;

[0023] The step of determining a target phase signal of each focusing pixel unit in the pixel array according to the phase signal output by the pixel array and the brightness area of ​​the image comprises:

[0024] Determine the light level threshold and the dark level threshold;

[0025] Determining pixel data, wherein the pixel data is used for brightness area division;

[0026] Divide the image into brightness areas according to the bright level threshold, dark level threshold and pixel data, and divide the image into an overexposed area, an underexposed area and an intermediate area;

[0027] Determine phase data of a focus pixel unit in an overexposed area according to the first phase data and the second phase data;

[0028] Determine phase data of a focus pixel unit in the underexposed area according to the second phase data and the third phase data;

[0029] Determine the second phase data as the phase data of the focus pixel unit in the middle area;

[0030] The phase data of the focus pixel unit in the overexposed area, the phase data of the focus pixel unit in the underexposed area, and the phase data of the focus pixel unit in the middle area are fused to obtain a target phase signal of the focus pixel unit.

[0031] Here, the above-mentioned bright color threshold can be set according to an empirical value, and can be specifically an upper limit value corresponding to the value range of the bright color threshold and the value range of the dark color threshold. For example, assuming that the value range of the bright color threshold and the value range of the dark color threshold are [0, 1023LSB], the above-mentioned bright color threshold can be set to 1023LSB. The value of the dark color threshold can be determined according to the transmittance of the second filter unit and the transmittance of the third filter unit. For example, the value of the above-mentioned dark color threshold can be expressed as: L2=256*T PDAF3 / T PDAF2 , where L2 represents the value of the dark level threshold, T PDAF3 represents the transmittance of the third filter unit, T PDAF2 represents the transmittance of the second filter unit. Assuming that the transmittance of the third filter unit is 95% and the transmittance of the second filter unit is 50%, the dark level threshold can be set to 486.4.

[0032] The second pixel unit may be a pixel unit used to detect phase to achieve phase focusing, or may be a pixel unit used for imaging. Therefore, the second phase data may be used as pixel data for brightness area division.

[0033] In a possible implementation, dividing the image into brightness areas according to the bright level threshold, the dark level threshold and the pixel data includes:

[0034] Dividing pixel units whose brightness is greater than or equal to the bright color level threshold as overexposed areas;

[0035] Dividing pixel units whose brightness is less than or equal to the dark level threshold as underexposed areas;

[0036] Pixel units whose brightness is less than the bright color level threshold and greater than the dark color level threshold are divided into a middle area.

[0037] In a possible implementation manner, determining the phase data of the focus pixel unit in the overexposed area according to the first phase data and the second phase data includes:

[0038] The second phase data is interpolated and filled using the first phase data to obtain phase data of the focus pixel unit in the overexposed area.

[0039] Since the light intensity in the overexposed area of ​​the image is strong, the first phase data output by the first pixel unit with strong ability to capture high-brightness scenes can be used to interpolate the second phase data to determine the phase data of the second pixel unit in the overexposed area. Specifically, the first phase data can be used to perform bilinear interpolation filling on the second phase data to obtain the phase data of the overexposed area.

[0040] In a possible implementation manner, determining the phase data of the focus pixel unit in the underexposed area according to the second phase data and the third phase data includes:

[0041] The second phase data is interpolated and filled using the third phase data to obtain phase data of the focus pixel unit in the underexposed area.

[0042] Since the light intensity in the underexposed area of ​​the image is weak, for the second pixel unit in the underexposed area, the third phase data output by the third pixel unit with strong dark light scene capture capability can be used to interpolate and fill the second data, thereby determining the phase data of the underexposed area. Specifically, the third phase data can be used to perform bilinear interpolation filling on the second phase data, thereby obtaining the phase data of the underexposed area.

[0043] In a possible implementation manner, after acquiring the phase signal output by the pixel array, the method further includes:

[0044] Brightness compensation is performed on the phase signal output by the pixel array according to the gain compensation coefficient.

[0045] The gain compensation coefficients corresponding to pixel units at different positions are different, and the gain compensation coefficients at different positions can be determined through calibration tests. Specifically, shooting can be performed in a standard color temperature and standard brightness environment, and then the gain compensation coefficients of the pixel units at each position are determined based on the pixel signals obtained by shooting and the calibration parameters.

[0046] In a possible implementation manner, performing brightness compensation on the phase signal output by the pixel array according to the gain compensation coefficient includes:

[0047] Determining a pixel unit to be compensated according to the coordinates of the first pixel unit and the coordinates of the third pixel unit;

[0048] Loading a gain compensation coefficient corresponding to the pixel unit to be compensated;

[0049] Brightness compensation is performed on the phase signal output by the pixel unit to be compensated according to the gain compensation coefficient corresponding to the pixel unit to be compensated.

[0050] The filter units of some pixel units are set as high-transmittance filter units or low-transmittance filter units. These pixel units break the original uniform arrangement of the pixel array, and thus will cause certain crosstalk to other adjacent pixel units. The pixel units corresponding to the high-transmittance filter units (i.e., the third pixel units mentioned above) will increase the brightness of the adjacent pixel units, and the pixel units of the low-transmittance filter units (i.e., the first pixel units mentioned above) will reduce the brightness of the adjacent pixel units. Therefore, the surrounding affected pixel units, i.e., the pixel units to be compensated, can be determined based on the coordinates of the first pixel unit and the coordinates of the second pixel unit, and then the gain compensation coefficients corresponding to the pixel units to be compensated are loaded. When outputting pixel signals, the output pixel signals can be gain compensated based on the gain compensation coefficients to reduce the crosstalk of special pixel units to other pixel units.

[0051] In a third aspect, an embodiment of the present application provides an electronic device, one or more processors, and a memory, wherein the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute a method as described in any one of the second aspects above.

[0052] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes instructions, and when the instructions are executed on an electronic device, the electronic device executes any one of the methods in the second aspect above.

[0053] In a fifth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes a method such as any one of the second aspects.

[0054] In a sixth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the above methods in the second aspect.

[0055] It can be understood that the beneficial effects of the third to sixth aspects mentioned above can be found in the relevant description of the second aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A schematic diagram of the timing of image output of an image sensor;

[0057] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0058] Figure 3 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;

[0059] Figure 4 A schematic diagram of a graphical user interface involved in some application scenarios provided in the embodiments of the present application;

[0060] Figure 5 A schematic diagram of the structure of an image sensor provided in an embodiment of the present application;

[0061] Figure 6 A schematic diagram of the structure of the filter array and pixel array of the image sensor provided in the embodiment of the present application;

[0062] Figure 7 A schematic diagram of a corresponding relationship curve between pixel signals output by pixel units corresponding to filter units with different transmittances and light intensity provided in an embodiment of the present application;

[0063] Figure 8 A schematic diagram of the structure of a sub-pixel block in a pixel array of an image sensor provided in an embodiment of the present application;

[0064] Fig. 9 A schematic diagram of a process of outputting data by an image sensor according to an embodiment of the present application;

[0065] Fig.10 A schematic diagram of the structure of a basic readout unit provided in an embodiment of the present application;

[0066] Fig.11 A schematic diagram of the data structure of data output by the image sensor provided in an embodiment of the present application;

[0067] Fig.12 A schematic diagram of an implementation flow of an image focusing method provided in an embodiment of the present application;

[0068] Fig.13 A schematic diagram of a specific implementation process of S1202 in an image focusing method is provided for an embodiment of the present application;

[0069] Fig.14 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0070] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0071] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0072] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0073] The following describes some concepts involved in the embodiments of the present application:

[0074] 1. High dynamic range (HDR) image (hereinafter referred to as HDR image) refers to an image obtained based on high dynamic range imaging technology.

[0075] In digital images, dynamic range represents the ratio between the maximum brightness and the minimum brightness within the displayable range of the image, that is, the number of gray levels from the "brightest" pixel to the "darkest" pixel in the image. The larger the dynamic range of an image, the richer the brightness levels it can represent, and the more realistic the visual effect of the image. High dynamic range (HDR) images (hereinafter referred to as HDR images) have a larger dynamic range than ordinary digital images, so they can provide more dynamic range and image details, and thus better reflect the visual effects in real environments.

[0076] Current methods for generating HDR images include dual conversion gain (DCG) technology and single frame stagger technology.

[0077] Among them, DCG technology refers to the technology of using two signal gain circuits to generate two pictures (i.e. high gain gear and low gain gear) under the same shutter speed and exposure conditions through dual native ISO, and using the two generated pictures to synthesize HDR images. Stagger technology refers to the technology of synthesizing HDR images by converting the output unit from frame to line, and performing long, medium and short exposures line by line based on three sets of readout circuits.

[0078] 2. Phase detection auto focus (PDAF) refers to the process of calculating the phase difference based on the focus data output by the pixel array in the image sensor, and then controlling the lens to move to the appropriate position for focusing based on the phase difference.

[0079] 3. Image sensor (IS) is a device that uses the photoelectric conversion function of photoelectric devices to convert the optical image on the photosensitive element into an electrical signal proportional to the optical image. It is widely used in electronic devices such as digital cameras and smart phones. Image sensors can include charge coupled device (CCD) image sensors and complementary metal oxide semiconductor (CMOS) image sensors.

[0080] 4. Complementary metal oxide semiconductor (CMOS) image sensor is a highly integrated, low-power image signal processor. CMOS sensors usually include pixel arrays, filter arrays, row drivers, column drivers, timing logic control units, analog signal processing units, analog-to-digital converters, etc. The timing logic control unit may include row selection logic units and column selection logic units. The working principle of CMOS image sensors is:

[0081] When external light irradiates the pixel array, a photoelectric effect occurs, and corresponding charges are generated in the pixel units of the pixel array. The row selection logic unit in the timing logic control unit can select the corresponding row pixel unit according to the needs of the image output timing. The pixel signals in the row pixel unit are transmitted to the corresponding analog signal processing unit and analog-to-digital converter through the signal bus of each column, and converted into digital image signals for output. The row selection logic unit can scan the pixel array row by row or interlaced. The row selection logic unit and the column selection logic unit can be used together to realize the window extraction function of the image and output the image data required by the CMOS sensor.

[0082] 5. Transmittance refers to the ratio of the radiant energy projected and transmitted through an object to the total radiant energy projected onto the object during the process of the incident light flux leaving from the illuminated surface or the incident surface of the medium to the other side. The transmittance in the embodiment of the present application refers to the transmittance of the filter unit, that is, the ratio of the radiant energy transmitted and transmitted through the filter unit to the total radiant energy transmitted to the filter unit.

[0083] At present, in the process of HDR image output, it is difficult for image sensors to achieve phase focusing in a high dynamic range due to the timing of image output, which affects the quality of the image.

[0084] The following takes the timing of generating HDR images based on DCG technology using a 4T pixel structure CMOS image sensor as an example to explain why it is difficult for current image sensors to achieve high dynamic range phase focusing during the process of outputting a single frame of HDR images:

[0085] See also Figure 1 , Figure 1 FIG. 1 shows a schematic diagram of the timing sequence of a CMOS image sensor outputting an image. Figure 1 As shown, the image output timing of the above CMOS image sensor is:

[0086] S101: Correlated double sampling reset.

[0087] S102: Correlated double sampling low gain gear noise reading.

[0088] S103: Correlated double sampling high gain gear noise reading.

[0089] S104: Reading the high-gain phase signal of the correlated double sampling.

[0090] Here, the above-mentioned phase signal can be derived from the pixel signal of the left half or the pixel signal of the right half of the pixel unit (the pixel unit can be a focus pixel unit, i.e., a PD pixel unit), and the image signal can be derived from the merging of the left and right parts of the pixel signal. Therefore, the image output timing of the image sensor must first read out the phase signal. After the readout is completed, the pixel signals of the left and right parts can be merged to read the merged pixel signals of the left and right parts as image signals. In this example, the phase signal of the left half of the pixel unit is the read high-gain phase signal.

[0091] S105: Reading high-gain gear image signals by correlated double sampling.

[0092] At this time, the left and right parts of the pixel signal have been merged, that is, the high-gain-position image signal includes the pixel signal of the high-gain position of the left half and the pixel signal of the high-gain position of the right half.

[0093] S106: Reading the low-gain gear image signal of correlated double sampling.

[0094] At this time, the left and right parts of the pixel signal have been merged, that is, the low-gain-position image signal includes the low-gain-position pixel signal of the left half and the low-gain-position pixel signal of the right half.

[0095] S107: Fusing the high-gain gear image signal and the low-gain gear image signal, and outputting the signals to an HDR image signal processing unit for image signal processing to obtain a synthesized HDR image.

[0096] S108: Restore the phase signal of the other half of the pixel units that have not been sampled according to the high-gain shift image signal obtained by correlated double sampling and the high-gain phase signal obtained by correlated double sampling.

[0097] Here, in this embodiment, the phase signal of the other half pixel unit is the phase signal of the right half.

[0098] It should be noted that the above-mentioned correlated double sampling (CDS) refers to that the image sensor samples two levels of the output signal of the pixel unit respectively, that is, once for sampling the reset level and another time for sampling the signal level, that is, within one signal cycle, two sampling pulse overshoots are generated. The specific implementation methods of each operation step (that is, the above-mentioned S101 to S108) of the correlated double sampling in the image output timing of the above-mentioned CMOS image sensor can refer to the implementation methods of the existing CMOS image sensor, and the present application will not elaborate on them here.

[0099] It can be clearly seen from the above image output timing that the above HDR image is formed based on the fusion of high-gain gear image signal and low-gain gear image signal, and the phase signal used to achieve phase focus only involves the high-gain gear phase signal, that is, phase focus with high dynamic range is not achieved.

[0100] At present, to achieve phase focus with a high dynamic range, it is necessary to change the image sensor's image output timing, add steps such as reading the phase signal of the low gain gear and fusing the phase signals of the high and low gain gears. Since the time it takes for the image sensor to process a frame of image is certain, adding the steps of reading the phase signal of the low gain gear and fusing the phase signals of the high and low gain gears will inevitably affect the processing time of HDR fusion, and thus affect the quality of the generated HDR image.

[0101] Based on this, the embodiments of the present application provide an image sensor, an image focusing method, an electronic device and a storage medium. By adjusting the transmittance of the filter unit of some pixel units, when reading the phase signal required for realizing phase focusing, the phase signal output by the pixel unit corresponding to the filter unit with different transmittance can be read. Since the pixel units with different transmittances have different light capture capabilities, the phase information of the bright and dark areas can be better acquired, thereby effectively expanding the dynamic range of the output phase signal, and realizing phase focusing with a high dynamic range without changing the hardware architecture of the existing image sensor and the signal readout timing of the image sensor.

[0102] The image sensor and image focusing method provided in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are proposed to facilitate a thorough understanding of the embodiments of the present application.

[0103] In some embodiments, the execution subject of the above-mentioned image focusing method can be an electronic device. The above-mentioned electronic device can also be called a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The electronic device can be a mobile phone, a smart TV, a wearable device (such as a smart bracelet, a smart watch, smart glasses, etc.), a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in transportation safety, a wireless terminal in a smart city, a cloud server, and other devices that can perform the task of generating a training plan. The embodiments of the present application do not limit the specific technology and specific device form adopted by the electronic device.

[0104] In order to better understand the embodiments of the present application, the structure of the electronic device in the embodiments of the present application is introduced below:

[0105] Figure 2 1 shows a schematic diagram of the structure of the electronic device 100. Figure 2As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0106] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0107] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0108] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0109] In some embodiments, the processor 110 is implemented by a system on chip (SOC), that is, the processor 110 mentioned in some embodiments of the present application may specifically refer to a SOC chip.

[0110] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0111] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0112] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0113] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), Bluetooth (BT), global navigation satellite system (GNSS), wireless local area network (WLAN), near field communication (NFC), and / or infrared (IR) technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0114] The electronic device 100 implements audio functions such as music playing, audio collection, and recording through the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0115] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0116] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0117] The mobile phone 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0118] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, skin color, sharpness, and color of the image, such as denoising, de-mosaicing, color adjustment, brightness adjustment, etc. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0119] The camera 193 is used to capture still images or videos. The object is projected onto the photosensitive element by generating an optical image through the lens.

[0120] In an embodiment of the present application, the photosensitive element of the camera can be the above-mentioned image sensor, or it can be a photosensitive device in the image sensor, and the photosensitive device can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.

[0121] In some embodiments, the mobile phone 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.

[0122] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the mobile phone 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0123] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device detects the touch operation intensity according to the pressure sensor 180A. The electronic device can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0124] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. Exemplarily, the motion posture of the user during motion can be obtained based on the gyro sensor 180B. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0125] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0126] The electronic device 100 having the above hardware structure can have a software system that adopts a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0127] Figure 3 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0128] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, system layer, and kernel layer.

[0129] The application layer can include a series of application packages. Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, video, instant chat, reading, etc.

[0130] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. For example, it may include activity manager, window manager, content provider, view system, resource manager, notification manager, camera service and face recognition service.

[0131] The system layer includes system libraries, Android runtime, core libraries, and media libraries.

[0132] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0133] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0134] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection. It can include a surface manager, a 3D graphics processing library, a 2D graphics engine, and a sports health data processing middle platform.

[0135] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0136] The image sensor provided in the embodiment of the present application can be applied to the above-mentioned electronic device 100, and can be specifically set in the camera 193. The above-mentioned camera 193 can be a front camera or a rear camera. The above-mentioned camera 193 can include a lens and an image sensor. When a user uses the electronic device 100 to take a picture, after the light passes through the lens and reaches the image sensor, the corresponding phase signal can be output through the image sensor, which can specifically include a phase signal output by pixel units with different transmittances, and the phase automatic detection and focusing during the shooting process can be realized based on the image focusing method provided in the embodiment of the present application.

[0137] The following uses the electronic device 100 as a mobile phone and a scenario in which a user uses the mobile phone to capture a person as an example to exemplify the application scenario of the image sensor and the image focusing method provided in the embodiments of the present application.

[0138] It is understandable that the above-mentioned image sensor and image focusing method can also be applied in other scenarios, such as pet capture, sports capture, security detection, image-based operations in medical equipment, etc.

[0139] See also Figure 4 , which is a schematic diagram of some graphical user interfaces (GUIs) that may be involved in the scene of capturing people. Figure 4 As shown, the main interface of the phone includes applications such as App Store, Camera, Memo, Gallery, and Music.

[0140] After the user clicks the icon 41 of the camera application, the mobile phone can detect the click operation based on the touch sensor 180K and / or the pressure sensor 180A. After detecting the click operation, the mobile phone will respond to the click operation, open the camera application, start the camera 193, and display the viewfinder interface 42 at the same time. At this time, the user can choose his favorite people, objects, scenery, etc. to take pictures or videos (here, take character snapshots as an example). When the user clicks the screen to focus, the mobile phone will respond to the operation, display the operation control 43, and perform automatic phase focus based on the focus position 43 selected by the user to obtain the image information in the viewfinder interface 42. Specifically, the optical image in the viewfinder interface 42 can be obtained based on the image sensor and converted into a corresponding electrical signal, thereby obtaining the image information of the image in the viewfinder interface 42, such as a phase signal for phase focus, and perform phase focus based on the phase signal to adjust the camera lens to a suitable position.

[0141] It should be noted that when the user starts the camera application and aims the viewfinder interface 42 at the object to be photographed, the image sensor can obtain the electrical signal corresponding to the optical image in the viewfinder interface 42. The image sensor can automatically focus according to the phase signal corresponding to the obtained optical image, without the user manually selecting the focus point.

[0142] In an embodiment of the present application, the phase signal output by the above-mentioned image sensor may include phase signals output by pixel units with different transmittances.

[0143] It should be noted that the specific method of the above-mentioned phase focusing can be full-pixel focusing, dual-core imaging focusing, and of course other methods that can achieve phase focusing.

[0144] In combination with the accompanying drawings, the application scenarios to which the image focusing method provided in the embodiment of the present application is applicable are introduced above. The image sensor provided in the embodiment of the present application is described below:

[0145] See also Figure 5 , Figure 5 FIG. 4 shows a schematic diagram of the structure of an image sensor provided by an embodiment of the present application. Figure 5 As shown, the image sensor may include a pixel array 51 and a filter array 52, wherein the pixel array 51 includes a plurality of pixel units 51a, the filter array 52 may include a plurality of filter units 52a, the filter array 52 may be arranged over the pixel array 51, the filter units 52a in the filter array 52 correspond one to one with the pixel units 51a in the pixel array 51, and the filter units 52a may include filter units with different transmittances, so that the pixel units 51a can correspond to different sensitivities.

[0146] For example, Figure 6 As shown, the filter unit 52a includes a first filter unit 52a1, a second filter unit 52a2 and a third filter unit 52a3. The pixel array 51 includes a first pixel unit PDAF1 corresponding to the first filter unit 52a1, a second pixel unit PDAF2 corresponding to the second filter unit 52a2, and a third pixel unit PDAF3 corresponding to the third filter unit 52a3.

[0147] Among them, the above-mentioned second filter unit 52a2 can be a color filter unit used in a traditional image sensor, specifically an RGB filter unit, the above-mentioned first filter unit 52a1 can be a filter unit with a low transmittance characteristic, and the above-mentioned third filter unit 52a3 can be a filter unit with a high transmittance characteristic, wherein the transmittance of the first filter unit 52a1 is less than the transmittance of the second filter unit 52a2 and less than the transmittance of the third filter unit 52a3.

[0148] In a specific implementation, the first filter unit 52a1 and the third filter unit 52a3 may use filters that exhibit neutral density attenuation in the range of 420 nm to 680 nm. The first filter unit 52a1 may use a filter with a transmittance of about 12.5%, and the third filter unit 52a3 may use a transparent filter with a transmittance of more than 90%.

[0149] For example, taking the transmittance of the first filter unit 52a1 as 12.5%, the transmittance of the second filter unit 52a2 as 50%, and the transmittance of the third filter unit 52a3 as 90%, Figure 7 The corresponding relationship curves of the intensity of the pixel unit output signal and the light intensity corresponding to the filter units with different transmittances are shown, wherein L1 represents the relationship curve of the third pixel unit PDAF3 corresponding to the third filter unit 52a3, L2 represents the relationship curve of the second pixel unit PDAF2 corresponding to the second filter unit 52a2, and L3 represents the relationship curve of the first pixel unit PDAF1 corresponding to the first filter unit 52a1. Figure 7 It can be seen that a filter unit with a low transmittance characteristic can enhance the corresponding pixel unit's ability to capture bright scenes (i.e., scenes with strong light intensity), and a filter unit with a high transmittance characteristic can enhance the corresponding pixel unit's ability to capture dark scenes (scenes with weak light intensity).

[0150] Therefore, the image sensor provided in the embodiment of the present application adjusts the transmittance of the filter units corresponding to some pixel units so that the filter array includes filter units with different transmittances, so that when reading the phase signal required for realizing phase focusing, the phase signal output by the pixel units corresponding to the filter units with different transmittances can be read. Since the pixel units with different transmittances have different light capture capabilities, the phase information of the bright and dark areas can be better acquired, thereby effectively expanding the dynamic range of the output phase signal.

[0151] In some embodiments, the number of the second filter units 52a2 is greater than the number of the first filter units 52a1, and the number of the second filter units 52a2 is also greater than the number of the third filter units 52a3, that is, only a small number of special filter units can be provided, which can reduce the implementation cost. Exemplarily, the coverage rate of the first filter units 52a1 can be 1 / 32 of the number of all filter units in the filter array, and the coverage rate of the third filter units 52a3 can also be 1 / 32 of the number of all filter units in the filter array, and the remaining filter units are all the second filter units 52a2.

[0152] In one embodiment, the pixel array in the above-mentioned image sensor can be divided into a plurality of sub-pixel blocks, each of which can have the same structure, that is, the above-mentioned pixel array can be formed by splicing the above-mentioned plurality of sub-pixel blocks, and each sub-pixel block includes the above-mentioned first pixel unit PDAF1, the second pixel unit PDAF2 and the third pixel unit PDAF3. Among them, the first pixel unit PDAF1, the second pixel unit PDAF2 and the third pixel unit PDAF3 can all be focus pixel units (PD pixel units). In order to reduce the occurrence of broken lines, jagged edges and the like in the image, the above-mentioned first pixel unit PDAF1 and the third pixel unit PDAF3 need to be staggered, that is, the first pixel unit PDAF1 and the third pixel unit PDAF3 are set in different rows and different columns.

[0153] It should be noted that the above-mentioned image sensor may also include devices such as a microlens array, a row driver, a column driver, a timing logic control unit, an analog signal processing unit, and an analog-to-digital converter.

[0154] Taking a sub-pixel block including 16*16 pixel units as an example, the arrangement of the pixel array of the image sensor provided in the embodiment of the present application is described as follows:

[0155] See also Figure 8 , Figure 8 FIG. 1 is a schematic diagram of the structure of a sub-pixel block in the pixel array of the image sensor in the embodiment of the present application. Figure 8As shown, the distribution coordinates of the first pixel unit PDAF1 are: (4, 3), (8, 3), (12, 3), (16, 3), (4, 11), (8, 11), (12, 11), (16, 11), and the distribution coordinates of the third pixel unit PDAF3 are: (2, 7), (6, 7), (10, 7), (14, 7), (2, 15), (6, 15), (10, 15), (14, 15). That is, the row where the first pixel unit PDAF1 is located is different from the row where the third pixel unit PDAF3 is located, and the column where the first pixel unit PDAF2 is located is different from the column where the third pixel unit PDAF3 is located, thereby achieving staggered distribution of the first pixel unit PDAF1 and the third pixel unit PDAF3 to reduce the occurrence of line breaks, jagged edges, etc. in the image.

[0156] It should be noted that the number of pixel units included in each sub-pixel block can be set according to actual application requirements, and this application does not impose any specific restrictions on this.

[0157] The following Figure 6 The image sensor described above is taken as an example to illustrate the process of outputting data of the image sensor provided in the embodiment of the present application. Fig. 9 , Fig. 9 FIG. 1 is a schematic diagram showing a process of outputting data from an image sensor provided in an embodiment of the present application. Fig. 9 As shown, the process of the image sensor outputting data includes the following steps:

[0158] S901: The image sensor is powered on.

[0159] S902: Loading the burning data into the image sensor.

[0160] The burning data includes the coordinates of the first pixel unit PDAF1, the coordinates of the second pixel unit PDAF2, and the coordinates of the third pixel unit PDAF3. The burning data may also include the gain compensation coefficient of the neighboring points of the first pixel unit PDAF1 and the gain compensation coefficient of the neighboring points of the third pixel unit PDAF3.

[0161] In a specific application, the gain compensation coefficient of the neighboring point is used to perform brightness compensation on the pixel signal output by the adjacent pixel unit.

[0162] Since in the embodiment of the present application, the filter units of some pixel units are set as high-transmittance filter units or low-transmittance filter units, these pixel units break the original uniform arrangement of the pixel array, and thus will cause certain crosstalk to other adjacent pixel units. The pixel units corresponding to the high-transmittance filter units (i.e., the third pixel unit PDAF3 mentioned above) will increase the brightness of the adjacent pixel units, and the pixel units of the low-transmittance filter units (i.e., the first pixel unit PDAF1 mentioned above) will reduce the brightness of the adjacent pixel units. Therefore, the surrounding affected pixel units, i.e., the pixel units to be compensated, can be determined based on the coordinates of the first pixel unit PDAF1 and the coordinates of the second pixel unit PDAF3, and then the gain compensation coefficients corresponding to the pixel units to be compensated are loaded. When outputting the pixel signal, the output pixel signal can be gain compensated based on the gain compensation coefficients.

[0163] In a specific implementation, the gain compensation coefficients corresponding to pixel units at different positions are different, and the gain compensation coefficients at different positions can be determined through calibration tests. Specifically, shooting can be performed in a standard color temperature and standard brightness environment, and then the gain compensation coefficient of the pixel unit at each position is determined based on the pixel signal obtained by shooting and the calibration parameters, that is, the calibration result is obtained. According to the calibration result, the gain compensation coefficients of the neighboring pixel units of the first pixel unit PDAF1 and the gain compensation coefficients of the neighboring pixel units of the third pixel unit PDAF3 can be determined.

[0164] It can be understood that the gain compensation coefficient of the neighboring pixel unit of the first pixel unit PDAF1 is a positive number, and the gain compensation coefficient of the neighboring pixel unit of the third pixel unit PDAF3 is a negative number.

[0165] S903: Outputting an HDR image.

[0166] In a specific application, the above HDR image is output by an image sensor. The specific implementation of outputting the HDR image can be found in Figure 1 The relevant descriptions of S101 to S108 are not repeated in this application.

[0167] S904: Separate the phase signal output by the pixel unit according to the coordinates of the first pixel unit, the coordinates of the second pixel unit, and the coordinates of the third pixel unit to obtain first phase data, second phase data, and third phase data.

[0168] In a specific application, the first phase data is a phase signal corresponding to the first pixel unit PDAF1, the second phase data is a phase signal corresponding to the second pixel unit PDAF2, and the third phase data is a phase signal corresponding to the third pixel unit PDAF3.

[0169] See also Fig.10 , Fig.10 A schematic diagram of the structure of a basic readout unit is shown. Fig.10 An 8*4 pixel unit area is used as a basic readout unit, wherein the pixel unit with coordinates (2, 7) is the first pixel unit, the pixel unit with coordinates (4, 3) is the third pixel unit, and the remaining pixel units are the second pixel units. When the phase signals of the pixel units are separated, the first phase data can be determined as the phase signal output by the pixel unit with coordinates (2, 7), and the third phase data can be determined as the pixel unit with coordinates (4, 3). For the second phase data, the phase signal corresponding to the first pixel unit and the phase signal corresponding to the third pixel unit can be removed, and the corresponding phase signals can be extracted to form the second phase data.

[0170] In a specific implementation, since there are a large number of pixels in the pixel array, when performing phase focusing, it is not necessary to use the phase signals of all pixel units to perform focusing. In this case, the phase signals of 8 pixel units can be combined to output the second phase data. For example, Fig.10 As shown, for the eight pixel units with coordinates of (1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2), (4, 1), (4, 2), the phase signal of one of the pixel units can be randomly extracted as the combined output result of the eight pixel units. For the pixel unit region where the first pixel unit or the third pixel unit exists, when randomly extracting the phase data of the pixel unit, it is necessary to first remove the phase signal of the first pixel unit and the phase signal of the third pixel unit, and then randomly extract from the phase signals of the remaining pixel units. For example, as Fig.10 As shown, for the eight pixel units with coordinates of (1, 3), (1, 4), (2, 3), (2, 4), (3, 3), (3, 4), (4, 3), and (4, 4), it is necessary to remove the pixel unit with coordinates of (4, 3) and randomly extract the phase signal of one pixel unit from the remaining seven pixel units as the combined output result of the eight pixel units.

[0171] It should be noted that the method of combining the phase signals of 8 pixel units is only an example, and the second phase data can also be output by combining the phase signals of 16 pixel units or combining the phase signals of 4 pixel units.

[0172] S905: Pack the HDR image into HDR image data, and pack the first phase data, the second phase data, and the third phase data respectively for output.

[0173] Fig.11FIG. 2 shows a schematic diagram of the data structure of the data output by the image sensor provided in the embodiment of the present application. Fig.11 As shown, after the image sensor completes the acquisition of every 4 lines of image signals, it will output the structure output data of 4 lines of HDR image data, one line of second phase data, one line of first phase data, and one line of third phase data. Among them, the data width of the second phase data is consistent with the data width of the HDR image data, the data width of the second phase data is 1 / 8 of the data width of the second phase data, and the data width of the third phase data is also 1 / 8 of the data width of the second phase data.

[0174] In specific applications, the data output by the image sensor may be data in RAW format, that is, the HDR image data may specifically be HDR RAW data, the second phase data may be second phase RAW data, the first phase data may be first phase RAW data, and the third phase data may be third phase RAW data.

[0175] It should be noted that the above only describes the filter array using an embodiment in which the filter array has three different transmittances. The filter array in the above image sensor may also have other types of filter units with different transmittances, for example, may include filter units with two different transmittances, filter units with four different transmittances, filter units with five different transmittances, etc.

[0176] It should also be noted that the transmittance of the first filter unit 52a1, the transmittance of the second filter unit 52a2, and the transmittance of the third filter unit 52a3 can be selected according to actual application requirements, and the present application does not impose any specific restrictions on this.

[0177] The image sensor provided in the embodiment of the present application is described above. The image focusing method provided in the embodiment of the present application will be described below with reference to the accompanying drawings through the following exemplary embodiments. The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure and software architecture. The hardware structure diagram of the electronic device can be as follows: Figure 2 As shown, the software structure diagram of the electronic device can be as follows Figure 3 For the sake of convenience, the embodiments of the present application are all based on electronic devices as shown in FIG. Figure 2 Take the mobile phone shown as an example.

[0178] See also Fig.12 , Fig.12 A schematic diagram of an implementation flow of an image focusing method provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the above-mentioned image focusing method includes:

[0179] S1201: Obtain a phase signal output by a pixel array.

[0180] Among them, the filter array corresponding to the pixel array is provided with filter units with different transmittances. Exemplarily, the above-mentioned filter array is respectively provided with a first filter unit, a second filter unit and a third filter unit, wherein the transmittance of the first filter unit is less than the transmittance of the second filter unit, and the transmittance of the second filter unit is less than the transmittance of the third filter unit. Accordingly, the pixel array includes a first pixel unit corresponding to the first filter unit, a second pixel unit corresponding to the second filter unit, and a third pixel unit corresponding to the third filter unit. The phase signal output by the above-mentioned pixel array may include the first phase data output by the above-mentioned first pixel unit, the second phase data output by the second pixel unit, and the third phase data output by the third pixel unit.

[0181] Here, the first phase data, the second phase data and the third phase data can be referred to as Fig. 9 The data is read by the method shown, and this application will not elaborate on it here.

[0182] S1202: Determine a target phase signal of each focusing pixel unit in the pixel array according to the phase signal output by the pixel array and the brightness area to which the pixel unit belongs.

[0183] Here, the brightness area of ​​the above-mentioned image may include an overexposed area, an underexposed area, and an intermediate area. For different brightness areas, the phase signals output by different pixel units can be selected as target phase signals. For example, for the overexposed area, the phase signal output by the pixel unit of the corresponding filter unit with lower transmittance and the phase signal output by the ordinary pixel unit (that is, the corresponding filter unit is an ordinary RGB filter) can be used to comprehensively determine the target phase signal of the focus pixel unit in the overexposed area. For the underexposed area, the phase signal output by the pixel unit of the corresponding filter unit with higher transmittance and the phase signal output by the ordinary pixel unit can be used to comprehensively determine the target phase signal of the focus pixel unit in the underexposed area. For the intermediate area, the phase signal output by the ordinary pixel unit can be used to determine the target phase signal of the focus pixel unit.

[0184] It should be noted that the above-mentioned focus pixel unit refers to a pixel unit used to achieve phase focus, and the pixel signal output by the focus pixel unit is a phase signal.

[0185] The above pixel array has the following Figure 8 As an example, the first pixel unit, the second pixel unit and the third pixel unit shown in FIG. Fig.13 The above S1202 may specifically include the following steps:

[0186] S1301: Determine a light level threshold and a dark level threshold.

[0187] In a specific application, the bright color threshold L1 can be set according to an empirical value, and can be specifically an upper limit value corresponding to the value range of the bright color threshold L1 and the value range of the dark color threshold L2. For example, assuming that the value range of the bright color threshold L1 and the value range of the dark color threshold L2 are 0-1023LSB, the bright color threshold L1 can be set to 1023LSB. The value of the dark color threshold L2 can be determined according to the transmittance of the second filter unit and the transmittance of the third filter unit. For example, the value of the dark color threshold L2 can be expressed as: L2=256*T PDAF3 / T PDAF2 , where T PDAF3 represents the transmittance of the third filter unit, T PDAF2 represents the transmittance of the second filter unit. Assuming that the transmittance of the third filter unit is 95% and the transmittance of the second filter unit is 50%, the dark level threshold L2 can be set to 486.4.

[0188] S1302: Determine pixel data.

[0189] The above pixel data is used for brightness area division.

[0190] In a specific application, the second pixel unit may be a pixel unit used to detect phase to achieve phase focusing, or a pixel unit used for imaging. Therefore, the second phase data may be used as pixel data for brightness area division.

[0191] In a specific application, the second phase data may be specifically as follows: Fig. 9 The second phase data output by the data output process shown may specifically be histogram data.

[0192] S1303: Divide the image into brightness areas according to the light level threshold, the dark level threshold and the pixel data.

[0193] The above image is an image acquired by the image sensor. By using the above bright level threshold L1 and the above dark level threshold L2 to perform threshold comparison with the brightness value corresponding to the second phase data, the overexposed area, underexposed area and middle area in the image can be identified.

[0194] In a specific application, pixel units whose brightness is greater than or equal to the bright color level threshold L1 are divided into overexposed areas, pixel units whose brightness is less than or equal to the dark color level threshold L2 are divided into underexposed areas, and pixel units whose brightness is less than the bright color level threshold L1 and greater than the dark color level threshold L2 are divided into the middle area.

[0195] S1304: Determine phase data of a second pixel unit in the overexposed area according to the first phase data and the second phase data.

[0196] Here, the second pixel unit is a focus pixel unit.

[0197] In a specific application, since the light intensity in the overexposed area of ​​the image is relatively strong, the first phase data output by the first pixel unit having a strong ability to capture high-brightness scenes can be used to interpolate the second phase data to determine the phase data of the second pixel unit in the overexposed area.

[0198] In a specific application, the first phase data may be used to perform bilinear interpolation filling on the second phase data, thereby obtaining phase data of an overexposed area.

[0199] S1305: Determine the phase data of the second pixel unit in the underexposed area according to the second phase data and the third phase data.

[0200] In a specific application, since the light intensity in the underexposed area of ​​the image is relatively weak, for the second pixel unit in the underexposed area, the third phase data output by the third pixel unit having a stronger ability to capture dark light scenes can be used to interpolate and fill the second data, thereby determining the phase data of the underexposed area.

[0201] In a specific application, the third phase data may be used to perform bilinear interpolation filling on the second phase data, thereby obtaining phase data of the underexposed area.

[0202] It should be noted that in other implementations, other interpolation methods may be used for interpolation filling, such as using cubic spline interpolation for interpolation filling, using nearest neighbor interpolation for interpolation filling, etc.

[0203] S1306: Determine the second phase data as the phase data of the second pixel unit in the middle area.

[0204] S1307: The phase data of the second pixel unit in the overexposed area, the phase data of the second pixel unit in the underexposed area, and the phase data of the second pixel unit in the middle area are merged to obtain a target phase signal of the focus pixel unit.

[0205] Here, the above fusion refers to the process of setting the phase data of each second pixel unit in each area to the phase data obtained after interpolation of the pixel unit, so as to obtain the target phase signal of the focus pixel unit, that is, PDraw.

[0206] S1203: Perform a phase focusing operation according to the target phase signal of the focusing pixel unit.

[0207] In a specific application, the specific content of performing the phase focusing operation according to the target phase signal PDraw may be: determining the focus offset value by the phase difference and change between the focus pixel units (PD pixel units), and controlling the lens to move to a suitable position according to the focus offset value, thereby achieving focus.

[0208] It should be noted that the above-mentioned implementation of the phase focusing operation according to the target phase data can be implemented by an image sensor, or by a subsequent module of the image sensor, such as an ISP, and the present application does not impose any specific restrictions on this.

[0209] From the above, it can be seen that an image focusing method provided in an embodiment of the present application can determine the target phase signals of focusing pixel units in different brightness areas by using the phase signals output by pixel units with different transmittances, thereby better acquiring the phase information of light and dark areas and effectively expanding the dynamic range of the phase signal used for phase focusing.

[0210] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should be easily aware that, in conjunction with the method steps of each example described in the embodiment provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0211] The embodiment of the present application can divide the functional modules of the device of the audio channel switching method according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0212] Fig.14 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. Fig.14 As shown, the chip 140 includes one or more (including two) processors 1401 , a communication line 1402 , a communication interface 1403 , and a memory 1404 .

[0213] In some implementations, the memory 1404 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0214] The method described in the above embodiment of the present application can be applied to the processor 1401, or implemented by the processor 1401. The processor 1401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the execution method of the above first device or second device can be completed by the hardware integrated logic circuit in the processor 1401 or the instructions in the form of software. The above processor 1401 can be a general processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 1401 can implement or execute the various methods, steps and logic block diagrams provided in the embodiments of the present application.

[0215] The steps of the method provided in conjunction with the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the art such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1404, and the processor 1401 reads the information in the memory 1404 and completes the steps of the above method in conjunction with its hardware.

[0216] The processor 1401 , the memory 1404 , and the communication interface 1403 may communicate with each other via the communication line 1402 .

[0217] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.

[0218] The embodiment of the present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium may include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0219] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.

[0220] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically using lasers.

[0221] The above combinations should also be included in the scope of computer-readable media. The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An image sensor, characterized in that: include: A pixel array and a filter array, wherein the filter array is arranged on the pixel array, the pixel array includes a plurality of pixel units, the filter array includes filter units with different transmittances, and the filter units in the filter array correspond to the pixel units in the pixel array one by one; The filter array includes a first filter unit, a second filter unit and a third filter unit; the pixel array includes a first pixel unit corresponding to the first filter unit, a second pixel unit corresponding to the second filter unit and a third pixel unit corresponding to the third filter unit; Wherein, the transmittance of the first filter unit is smaller than the transmittance of the second filter unit, and the transmittance of the second filter unit is smaller than the transmittance of the third filter unit; Among them, the first pixel unit is used to output first phase data, the second pixel unit is used to output second phase data, and the third pixel unit is used to output third phase data. The first phase data and the second phase data are used to determine the phase data of the focus pixel unit in the overexposed area, and the third phase data and the second phase data are used to determine the phase data of the focus pixel unit in the underexposed area. The second phase data is also used for the phase data of the focus pixel unit in the middle area. The phase data of the focus pixel unit in the overexposed area, the phase data of the focus pixel unit in the underexposed area, and the phase data of the focus pixel unit in the middle area are fused to obtain the target phase signal of the focus pixel unit for performing the focusing operation.

2. The image sensor according to claim 1, characterized in that The number of the second filter units is greater than the number of the first filter units.

3. The image sensor according to claim 1, characterized in that The number of the second filter units is greater than the number of the third filter units.

4. The image sensor according to claim 1, characterized in that The first filter unit and the third filter unit are arranged in different rows and columns of the filter array.

5. The image sensor according to any one of claims 1 to 4, characterized in that: The first filter unit and the third filter unit include neutral density attenuation filters.

6. The image sensor according to claim 5, characterized in that The third filter unit includes a transparent filter.

7. An image focusing method, characterized in that: Applied to the image sensor according to any one of claims 1 to 6, the method comprising: Acquiring a phase signal output by a pixel array; wherein a filter array corresponding to the pixel array is provided with filter units with different transmittances; Determining a target phase signal of each focusing pixel unit in the pixel array according to a phase signal output by the pixel array and a brightness area of ​​an image; Performing a phase focusing operation according to a target phase signal of the focusing pixel unit; The phase signal output by the pixel array includes first phase data output by the first pixel unit, second phase data output by the second pixel unit, and third phase data output by the third pixel unit, wherein the first pixel unit is a pixel unit corresponding to the first filter unit, the second pixel unit is a pixel unit corresponding to the second filter unit, the third pixel unit is a pixel unit corresponding to the third filter unit, the transmittance of the first filter unit is less than the transmittance of the second filter unit, and the transmittance of the second filter unit is less than the transmittance of the third filter unit; The step of determining a target phase signal of each focusing pixel unit in the pixel array according to the phase signal output by the pixel array and the brightness area of ​​the image comprises: Determine the light level threshold and the dark level threshold; Determining pixel data, wherein the pixel data is used for brightness area division; Divide the image into brightness areas according to the bright level threshold, the dark level threshold and the pixel data, and divide the image into an overexposed area, a middle area and an underexposed area; Determine phase data of a focus pixel unit in an overexposed area according to the first phase data and the second phase data; Determine phase data of a focus pixel unit in an underexposed area according to the second phase data and the third phase data; Determine the second phase data as phase data of the focus pixel unit in the middle area; The phase data of the focus pixel unit in the overexposed area, the phase data of the focus pixel unit in the underexposed area, and the phase data of the focus pixel unit in the middle area are fused to obtain a target phase signal of the focus pixel unit.

8. The method according to claim 7, characterized in that The step of dividing the image into brightness areas according to the bright color level threshold, the dark color level threshold and the pixel data comprises: Dividing pixel units whose brightness is greater than or equal to the bright color level threshold as overexposed areas; Dividing pixel units whose brightness is less than or equal to the dark level threshold as underexposed areas; Pixel units whose brightness is less than the bright color level threshold and greater than the dark color level threshold are divided into a middle area.

9. The method according to claim 8, characterized in that The determining the phase data of the focus pixel unit in the overexposed area according to the first phase data and the second phase data includes: The second phase data is interpolated and filled using the first phase data to obtain phase data of the focus pixel unit in the overexposed area.

10. The method according to claim 8, characterized in that The determining the phase data of the focus pixel unit in the underexposed area according to the second phase data and the third phase data includes: The second phase data is interpolated and filled using the third phase data to obtain phase data of the focus pixel unit in the underexposed area.

11. The method according to claim 7, characterized in that After acquiring the phase signal output by the pixel array, the method further includes: Brightness compensation is performed on the phase signal output by the pixel array according to the gain compensation coefficient.

12. The method according to claim 11, characterized in that The performing brightness compensation on the phase signal output by the pixel array according to the gain compensation coefficient comprises: Determining a pixel unit to be compensated according to the coordinates of the first pixel unit and the coordinates of the third pixel unit; Loading a gain compensation coefficient corresponding to the pixel unit to be compensated; Brightness compensation is performed on a phase signal output by the pixel unit to be compensated according to a gain compensation coefficient corresponding to the pixel unit to be compensated.

13. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the processor and the memory are coupled, and the memory is used to store a computer program. When the processor executes the computer program, the electronic device executes the method described in any one of claims 7 to 12.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method according to any one of claims 7 to 12.

15. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, the processors are coupled to a memory, the memory is used to store computer program instructions, and the one or more processors are used to call computer instructions so that the electronic device executes the method described in any one of claims 7 to 12.