Real-time parallax upsampling for phase detection autofocus in digital imaging systems

Improving PDAF resolution in digital imaging systems through real-time parallax upsampling technology solves the cost and efficiency issues caused by increasing the number of sensors and achieves fast and accurate autofocus.

CN115623327BActive Publication Date: 2024-10-22SHENZHEN GOODIX TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111644620.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-07-13
Filing Date
2021-12-29
Publication Date
2024-10-22
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

When improving the autofocus speed and resolution of the phase detection autofocus (PDAF) method in existing digital imaging systems, increasing the number of physical PDAF sensors will lead to increased hardware costs, extended processing time, reduced imaging resolution, and reduced low-light focusing efficiency. question.

Method used

By using real-time parallax upsampling technology without adding a physical PDAF sensor, the simulated PDAF sensor is used to generate local parallax and contrast values ​​at the upsampled position, and the upsampled parallax value is calculated by weighting to generate an upsampled parallax image. to support PDAF autofocus.

Benefits of technology

It effectively improves PDAF data resolution, reduces hardware costs and processing time, and improves autofocus speed and accuracy while maintaining imaging resolution and low-light focusing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115623327B_ABST
    Figure CN115623327B_ABST
Patent Text Reader

Abstract

Techniques for real-time disparity upsampling for phase detection autofocus (PDAF) in a digital imaging system are described. For example, an imaging sensor array includes multiple physical PDAF sensors that provide a PDAF resolution that is a fraction of the resolution of the imaging sensor itself. By generating simulated PDAF sensors at upsampled locations, the PDAF resolution is upsampled without relying on adding physical PDAF sensors. For each upsampled location, an embodiment may calculate a local disparity value and a local contrast value for each of a plurality of adjacent physical PDAF sensors. The upsampled disparity value for the upsampled location may be calculated by weighting adjacent local disparity values ​​based at least on adjacent local contrast values. The upsampled disparity values ​​may produce higher resolution information for PDAF operations.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to US application No. 17 / 373,789, filed with the United States Patent and Trademark Office on July 13, 2021, and entitled “REAL-TIME DISPARITY UPSAMPLING FOR PHASE DETECTION AUTOFOCUS IN DIGITAL IMAGING SYSTEMS,” the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present disclosure relates to digital imaging systems, and more particularly, to real-time disparity upsampling for phase detection autofocus in digital imaging systems, such as for smartphone cameras and / or other digital cameras. Background Art

[0003] Many electronic devices include digital imaging systems. For example, most modern smartphones include one or more digital cameras. Almost all modern digital cameras (as well as many other digital imaging systems) include autofocus functionality implemented according to various different autofocus methods. Two common methods are contrast detection autofocus (CDAF) and phase detection autofocus (PDAF). The principle of CDAF is that higher contrast is generally associated with better focus. Therefore, CDAF methods generally involve an iterative process of measuring contrast, adjusting the focus setting, and measuring contrast again until the optimal focus setting is found (e.g., when the highest contrast image is formed). CDAF tends to produce very sharp focus, but iterative methods are often too slow to work well in applications such as tracking moving objects, focusing during video capture, and so on.

[0004] PDAF tends to produce significantly faster autofocus solutions than CDAF. The principle of PDAF is that even a slight shift in the viewpoint from which the image is captured tends to cause the relative position of each point to shift by a certain amount and distance (i.e., parallax), which corresponds to the distance of that point from the focal length of the imaging system. For example, a "focused" point may not have any parallax, closer points may show positive (or negative) parallax, and farther points may show negative (or positive) parallax. Therefore, PDAF methods typically form an imaging sensor array using PDAF sensors, also called pixels, to capture the same image simultaneously from slightly different viewpoints, and the data from the different viewpoints is used to calculate the parallax measurement. The imaging system can quickly adjust the focus to the optimal focus setting based on the amount and direction of the parallax measurement.

[0005] Conventionally, the effectiveness of a PDAF method may be related to the number of PDAF sensors used to obtain data from different viewpoints. For example, a greater number of PDAF sensors may provide higher data resolution for different viewpoints, which may tend to provide more information for the PDAF system to perform more accurate autofocus. However, increasing the number of sensors may also result in increased hardware cost, increased processing time, reduced imaging resolution, reduced low-light focusing efficiency, and / or other undesirable consequences. Summary of the invention

[0006] Embodiments provide systems and methods for real-time disparity upsampling for phase detection autofocus (PDAF) in digital imaging systems. For example, an imaging sensor array includes multiple physical PDAF sensors that provide a PDAF resolution that is a fraction of the resolution of the imaging sensor itself. By generating simulated PDAF sensors at upsampled positions, the PDAF resolution is upsampled without relying on adding physical PDAF sensors. For each upsampled position, an embodiment may calculate a local disparity value and a local contrast value for each of a plurality of adjacent physical PDAF sensors. The upsampled disparity value of the upsampled position may be calculated by weighting the adjacent local disparity values ​​based on adjacent local contrast values ​​(e.g., and additional information, such as the relative distance between the upsampled position and the adjacent physical PDAF sensor position). The upsampled disparity value of the upsampled position may be combined with the local disparity value of the physical PDAF sensor position to generate an upsampled disparity image to support PDAF. Some embodiments use the upsampled disparity values ​​to generate simulated pixel image values ​​that will be obtained by an additional physical PDAF sensor located at the upsampled position.

[0007] According to a set of embodiments, a method for real-time upsampling in a phase detection autofocus (PDAF) system is provided. The method includes: obtaining a phase detection (PD) disparity map indicating a local disparity value for each of a plurality of physical phase detection pixels (pPDPs) of an image sensor, calculating each local disparity value based on raw image data obtained by the image sensor, the image sensor including an array of pixel blocks, each pixel block being a respective photodetector array, wherein a subset of the pixel blocks is used as a PD block, and for each of the subsets of the pixel blocks, by configuring a portion of the respective photodetector array to form at least one of the plurality of pPDPs, so that each of the plurality of pPDPs is associated with one of a plurality of pPDP positions in the PD block; calculating a local contrast value for each of the plurality of pPDP positions based on spatial contrast information generated from the raw image data; identifying a plurality of upsampling upsampled phase detection pixel (uPDP) positions, each upsampled phase detection pixel position being a position in the respective photodetector array of one of the respective pixel blocks outside the PD block; and for each uPDP position of at least some of the plurality of uPDP positions: identifying at least a first and a second pPDP position of the plurality of pPDP positions as being proximal to the uPDP position; calculating a set of upsampled weights based at least on the local contrast value of each of at least the first pPDP position and the second pPDP position; and calculating an upsampled disparity value of the uPDP position based on the set of upsampled weights and the local disparity values ​​in the plurality of pPDPs associated with at least the first pPDP position and the second pPDP position as indicated by the PD disparity map.

[0008] According to another set of embodiments, a phase detection autofocus (PDAF) resolution upsampling system is provided. The system includes: a disparity mapping interface for coupling with a pixel to disparity converter to obtain a phase detection (PD) disparity map indicating a local disparity value of each of a plurality of physical phase detection pixels (pPDP) of an image sensor, each local disparity value being calculated based on raw image data obtained by the image sensor, the image sensor including an array of pixel blocks, each pixel block being a respective photodetector array, wherein a subset of the pixel blocks is used as a PD block, and for each of the subsets of the pixel blocks, at least one of the plurality of pPDPs is formed by configuring a portion of the respective photodetector array, so that each of the plurality of pPDPs is associated with one of a plurality of pPDP positions in the PD block; a contrast mapping interface for coupling with a contrast mapper to obtain the plurality of pPDP positions based on spatial contrast information generated from the raw image data a local contrast value for each of the non-PD blocks; a disparity upsampler coupled to the disparity mapping interface and the contrast mapping interface and comprising: a weight generator for calculating, for each upsampled phase detection pixel (uPDP) position of a plurality of uPDP positions corresponding to a physical position within the respective photodetector array of a respective one of the non-PD blocks, a set of upsampling weights based at least on the local contrast value of each of at least a first pPDP position and a second pPDP position determined to be close to the uPDP position; and an upsampling filter for calculating, for each uPDP position, an upsampled disparity value of the uPDP position based on the set of upsampling weights calculated for the uPDP position and based on the local disparity value in the pPDP associated with at least the first pPDP position and the second pPDP position indicated by the PD disparity map.

[0009] According to another set of embodiments, a system for real-time upsampling in a phase detection autofocus (PDAF) system is provided. The system includes: one or more processors; and a non-volatile processor-readable memory having instructions stored thereon, which, when executed, causes the one or more processors to perform steps. The steps include: obtaining a phase detection (PD) disparity map indicating a local disparity value for each of a plurality of physical phase detection pixels (pPDPs) of an image sensor, calculating each local disparity value based on raw image data obtained by the image sensor, the image sensor including an array of pixel blocks, each pixel block being a respective photodetector array, wherein a subset of the pixel blocks is used as a PD block, and for each of the subsets of the pixel blocks, by configuring a portion of the respective photodetector array to shape at least one of the plurality of pPDPs, each of the plurality of pPDPs is associated with one of a plurality of pPDP positions in the PD block; calculating a local contrast value for each of the plurality of pPDP positions based on spatial contrast information generated from the raw image data; identifying a plurality of upsampling upsampled phase detection pixel (uPDP) positions, each upsampled phase detection pixel position being a position in the respective photodetector array of one of the respective pixel blocks outside the PD block; and for each uPDP position of at least some of the plurality of uPDP positions: identifying at least a first and a second pPDP position of the plurality of pPDP positions as being proximate to the uPDP position; calculating a set of upsampled weights based at least on the local contrast value of each of at least the first pPDP position and the second pPDP position; and calculating an upsampled disparity value of the uPDP position based on the set of upsampled weights and the local disparity values ​​in the plurality of pPDPs associated with at least the first pPDP position and the second pPDP position as indicated by the PD disparity map. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings, which are incorporated herein and constitute a part of this document, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present invention.

[0011] Figure 1 is a block diagram illustrating an imaging sensor environment as context for various embodiments described herein.

[0012] Figure 2 A more detailed view of an example implementation of an imaging sensor array configured for a phase detection autofocus (PDAF) feature is shown.

[0013] Figure 3A block diagram of an illustrative PDAF resolution upsampling system is shown in accordance with various embodiments described herein.

[0014] Figure 4 An illustrative portion of a pixel block array having two phase detection (PD) blocks separated by two non-PD blocks is shown.

[0015] Figure 5 A flow chart of an illustrative method for real-time upsampling in a PDAF system is shown in accordance with various embodiments described herein.

[0016] In the accompanying drawings, similar components and / or features may have the same reference number. In addition, individual components of the same type may be distinguished by following the reference number with a second reference number that is used to distinguish between similar components. If only the first reference number is used in the specification, the description may apply to any of the similar components having the same first reference number without regard to the second reference number. DETAILED DESCRIPTION

[0017] In the following description, many specific details are provided to provide a thorough understanding of the present invention. However, it will be appreciated by those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, for the purpose of brevity, features and techniques known in the art will not be described again.

[0018] Steering Figure 1 , which shows a block diagram of an imaging sensor environment 100 as a context for various embodiments described herein. The imaging sensor 100 is shown as including a processor 110 in communication with a processor control system 120 and a complementary metal-oxide semiconductor (CMOS) imaging sensor (CIS) system 130. The imaging sensor environment 100 can be used to implement a digital imaging system in any suitable application context. For example, the processor 110, the processor control system 120, and the CIS system 130 can all be implemented in a smartphone, a digital camera, a wearable device, an implantable device, a laptop, a tablet, an e-reader, an Internet of things (IoT) device, or any other suitable context.

[0019] Processor control system 120 is generally intended to represent any suitable system to provide any suitable features of imaging sensor environment 100, rather than features of CIS system 130. For example, in a smart phone, processor control system 120 may include subsystems for providing phone features and communication features, display features, user interaction features, application processing features, etc. Embodiments of imaging sensor environment 100 may include one or more processors 110. In some embodiments, one or more processors 110 are shared between processor control system 120 and CIS system 130. In other embodiments, processor control system 120 uses one or more processors 110, and CIS system 130 has its own one or more dedicated processors 110.

[0020] An embodiment of the CIS system 130 includes a sensor array 140 and a sensor control circuit 150. As described below, the sensor array 140 and the sensor control circuit 150 can communicate via an interface channel 145. The sensor array 140 can be implemented as an array of photodetector elements 142, which can be implemented by any suitable photosensitive component or group of components. In some embodiments, each photodetector element 142 may include a photodiode configured to detect light energy in one or more frequency bands. For example, the photodetector elements 142 implement a color filter array so that the sensor array 140 can detect light energy within a color range of at least the visible spectrum and can output corresponding electrical signals. As described herein, a portion of the photodetector elements 142 are implemented as phase detection pixels to facilitate phase-detection autofocus (PDAF) features, including those described herein.

[0021] The sensor control circuit 150 may include any suitable processor and / or circuitry for directing the operation of the sensor array 140, processing signals received from the sensor array 140, and interacting with other systems (e.g., the processor 110). Some embodiments of the sensor control circuit 150 are implemented as or include a companion integrated circuit (IC) having integrated interface components, storage components, and processing components. For example, the processing components of the sensor control circuit 150 may include one or more central processing units (CPU), application-specific integrated circuits (ASIC), application-specific instruction-set processors (ASIP), graphics processing units (GPU), physics processing units (PPU), digital signal processors (DSP), field-programmable gate arrays (FPGA), programmable logic devices (PLD), controllers, microcontroller units, reduced instruction set computers (RISC) processors, complex instruction set computers (CISC) processors, microprocessors, etc., or any combination thereof.

[0022] As described herein, the CIS system 130 is configured to provide a novel autofocus feature. Autofocus features are ubiquitous in digital imaging systems, and many such autofocus features are implemented according to a contrast detection autofocus (CDAF) method or a phase detection autofocus (PDAF) method. The principle of CDAF is that higher contrast is generally associated with better focus (e.g., blurred edges in an image may appear as lower overall contrast in the image). Therefore, the CDAF method generally involves an iterative process of measuring contrast, adjusting focus settings, and measuring contrast again until the best focus setting is found (e.g., when the highest contrast image is formed). For example, the sensor array 140 obtains imaging data, and the imaging data can be downsampled and high-pass filtered to obtain a contrast image indicating the contrast level of the entire image. The CDAF method can analyze the contrast image by performing global and local searches of pixels to effectively determine the blur level of the image. In each of multiple subsequent iterations, the focus setting can be adjusted, an updated contrast image can be obtained, and the updated contrast image can be reanalyzed to determine whether the image appears to be increasingly blurred.

[0023] While CDAF can produce very sharp focus, it typically has various limitations. One limitation is that the contrast information for any individual iteration does not indicate how out-of-focus the image is, or in what direction (i.e., which direction of focus adjustment will improve focus). As a result, CDAF may initially adjust the focus setting in the wrong direction, initially making focus worse before detecting the error and changing direction, and finding the correct focus setting may require multiple iterations, with small setting changes required at each iteration. Furthermore, the contrast information in any particular iteration may not indicate whether the optimal focus setting has been reached. As a result, CDAF typically continues to adjust focus until it reaches the optimal focus setting and then passes the optimal focus, at which point CDAF can determine that focus has deteriorated again and can respond by backtracking to the optimal focus setting. For at least these reasons, CDAF tends to be too slow to work well in many applications, such as tracking moving objects, focusing during video capture, and so on. For example, CDAF may consume about 30 frames to determine the optimal focus setting, by which time many moving objects will have changed position and become out of focus again. Even with still image capture, users can be frustrated by the delays in taking pictures caused by CDAF.

[0024] PDAF is based on completely different principles than CDAF and tends to achieve optimal focus settings faster than CDAF. In general, PDAF works similar to human depth perception. Because human eyes are horizontally separated, each eye sees a slightly different image (i.e., each eye sees the same scene from a slightly different viewpoint). In particular, when both eyes are focused on a specific point in space, that point is actually located in the same position in the left and right eye images. However, any point that is closer or farther away from the eyes will tend to be spatially offset in one eye's image relative to the other eye's image. The amount and direction of the offset is mathematically (e.g., geometrically) related to the separation between the eyes and the distance of the object from the eyes (e.g., or to the focal length). The amount and direction of the spatial (phase) offset between two viewpoints is called "parallax."

[0025] PDAF exploits this principle by configuring the PDAF sensors to capture the same image from slightly different viewpoints simultaneously, and calculating disparity measurements using the data from the different viewpoints. For example, masks and / or lenses are used to configure some sensors to detect a first viewpoint, and other sensors to simultaneously detect a second viewpoint. Typically, the different viewpoints are configured to be complementary left-right, top-bottom, etc. Instead of repeatedly trying different settings to find the best amount and direction of focus adjustment as with CDAF, the disparity measurements calculated in the PDAF method directly dictate the amount and direction of focus adjustment to apply for optimal focus.

[0026] Figure 2 A more detailed view of an example implementation of an imaging sensor array 140 configured for a PDAF feature is shown. As described above, the imaging sensor array 140 includes an array of photodetector elements 142, such as photodiodes. An embodiment of the imaging sensor array 140 arranges the photodetector elements 142 into an array of pixel blocks 210, such that each pixel block 210 is an instance of an N×M photodiode array, where N and M are positive integers. In some embodiments, N can be equal to M, such that each pixel block is a square photodiode array. In some embodiments, each pixel block 210 has the same number of photodetector elements 142. In some embodiments, each pixel block 210 can generally be arranged according to the same color filter array (CFA) pattern (e.g., a Bayer pattern, etc.).

[0027] As described above, a portion of the pixels of the imaging sensor array 140 are configured to form a PDAF sensor (referred to herein as a physical phase detection pixel, or pPDP 220). As shown, a subset of the pixel blocks 210 are PD blocks 212, indicating that each PD block 212 includes at least one pPDP 220. The other pixel blocks 210 that are not PD blocks 212 are indicated as non-PD blocks 214. In the configuration shown, one-sixth of the pixel blocks 210 are PD blocks 212, while the remaining five-sixths of the pixel blocks 210 are non-PD blocks 214. As shown, each non-PD block 214 is arranged according to a so-called "HexD-W" block, such that each is a 16×16 photodetector array (i.e., 256 pixels) that follows the "RGGBW" CFA pattern (red, green, green, blue, white).

[0028] Each PD block 212 can be arranged in substantially the same manner as the non-PD blocks 214, except that some of the photodetector elements 142 in each PD block 212 are configured to form a pPDP 220. As shown, each PD block 212 is implemented as a HexD-W block, with 16 of its photodetector elements 142 configured to form four pPDPs 220. In some embodiments, each pPDP 220 is formed by implementing an on-chip lens (OCL) 226 on top of a square grouping of photodetector elements 142. The OCL 226 is configured to form multiple viewpoints from the perspective of the pPDP 220. In the illustrated configuration, each pPDP 220 includes a 2x2 OCL 226 disposed on a 2x2 grouping of photodetector elements 142, effectively forming a 2x1 left viewpoint element 222 and a 2x1 right viewpoint element 224.

[0029] The above description follows the convention of referring to a single pPDP 220 as a 2x2 grouping of photodetector elements 142 with a 2x2 OCL 226 disposed thereon. Other embodiments may implement the pPDP 220 in other ways, and / or may follow other conventions with respect to the pPDP 220. For example, each photodetector element 142 used for PD sensing may be independently referred to as a pPDP 220, so that the embodiment shown may be viewed as a grouping of four pPDPs 220 with a 2x2 OCL 226 disposed thereon. In other embodiments, a 2x1 OCL 226 is disposed above a grouping of two photodetector elements 142, and each grouping of two photodetector elements 142 with its 2x1 OCL 226 is referred to as a pPDP 220. In other embodiments, the pPDP 220 is formed by blocking certain photodetector elements 142 or portions of photodetector elements 142 using a metal shield (or any suitable opaque substance). The techniques described herein may generally operate without relying on or requiring any particular type of pPDP 220 implementation, any particular imaging sensor array 140 size, etc.

[0030] As described above, the PDAF method involves calculating disparity measurements using data from a PDAF sensor (i.e., from the pPDP 220). Calculating disparity measurements involves complex calculations, including accurate pattern recognition and matching between different viewpoints. Conventionally, the effectiveness of the PDAF method may be related to the number of PDAF sensors used to obtain data from different viewpoints. More PDAF sensors can provide higher data resolution for pattern matching and disparity calculations for different viewpoints, which can often provide more information for the PDAF system to perform more accurate autofocus. For example, some conventional PDAF methods configure approximately five to ten percent of the imaging sensor array 140 pixels as pPDP 220, while other conventional methods have configured up to one hundred percent of the imaging sensor array 140 pixels as pPDP 220. Although such a large number of pPDP 220 provides certain features, increasing the number of pPDP 220 can also result in increased hardware costs, increased processing time, reduced imaging resolution, reduced low-light focusing efficiency, and / or other undesirable consequences. For example, forming a large number of pPDPs 220 using a large number of OCLs may be relatively expensive and complex to manufacture, alternatively, forming a large number of pPDPs 220 using a large number of metal shields may reduce the amount of light reaching the photodetector elements 142 and may degrade imaging quality.

[0031] Some embodiments may include additional restrictions on the actual number of pPDPs 220 in imaging sensor array 140. Figure 1, the illustrated imaging sensor environment 100 shows the sensor control circuit 150 communicating with the imaging sensor array 140 via the interface channel 145, and the maximum number of conventional pPDPs 220 that can be implemented in the sensor array 140 may be limited by the speed and / or bandwidth of the interface channel 145. In one example embodiment, the imaging sensor array 140 has tens of millions of photodetector elements 142 (e.g., a 42 megapixel sensor array), and the imaging sensor array 140 communicates via a relatively low bandwidth interface channel 145 (e.g., a mobile industry processor interface, or ) communicates with a companion IC of the sensor control circuit 150. In such an embodiment, each additional percentage of pixels implemented as pPDP 220 may result in hundreds of thousands of additional pPDP 220 outputs being communicated over the interface channel 145.

[0032] For these and other reasons, the embodiments described herein are assumed to have a relatively low percentage of pPDP 220. Figure 2 In the illustrated embodiment, only one sixth of the pixel blocks 210 of the imaging sensor array 140 are PD blocks 212, and Figure 2 Each PD block 212 uses only 16 of its 256 photodetector elements 142 to form the pPDP 220. Thus, in the illustrated embodiment, only approximately one percent of the photodetector elements 142 are used to form the pPDP 220. As described above, although implementing such a small percentage of the pPDP 220 is desirable in terms of cost, manufacturability, data communication, etc., the relatively small percentage of the pPDP 220 also provides relatively low resolution data for performing PDAF.

[0033] As described herein, embodiments provide a novel PDAF method that effectively increases PDAF data resolution without increasing the number of pPDPs 220 . Figure 3 A block diagram of an illustrative PDAF resolution upsampling system 300 is shown in accordance with various embodiments described herein. The PDAF resolution upsampling system 300 is configured for real-time, contrast-weighted disparity upsampling to effectively increase the amount of useful phase detection (PD) information available for performing PDAF. Embodiments of the PDAF resolution upsampling system 300 may be implemented using one or more processors. For example, the PDAF resolution upsampling system 300 may be implemented in a companion IC coupled to the imaging sensor array 140, such as by Figure 1The sensor control circuit 150 of the CIS system 130. In such an embodiment, the PDAF resolution upsampling system 300 includes one or more memories (not explicitly shown) that include instructions stored thereon, which, when executed, cause one or more processors to perform various functions described herein. For example, such instructions may be implemented in firmware, a state machine, and / or any other suitable manner.

[0034] As shown, the PDAF resolution upsampling system 300 includes at least a disparity upsampler 340. In some embodiments, the PDAF resolution upsampling system 300 also includes a pixel to disparity converter 310, a contrast mapper 320, a disparity to pixel converter 360, and / or an output subsystem 380. For context, the imaging sensor array 140 is shown as outputting raw image data 305. The raw image data 305 may include pixel image values ​​corresponding to the detection outputs of all photodiodes in the imaging sensor array 140. For example, in an embodiment where each pPDP 220 is implemented using a 2×2 block (i.e., four) of photodetectors, the raw image data 305 may include four corresponding pixel image values. In some embodiments, the raw image data 305 includes individual data for each photodetector in the imaging sensor array 140. In other embodiments, the sensor output from the imaging sensor array 140 is reduced by pixel merging or some other downsampling type of operation. For example, based on the CFA pattern used to implement imaging sensor array 140, pixels of the same color may be binned together before being output as part of raw image data 305. Similarly, pixel image values ​​from multiple photodetectors may be combined and / or reconfigured to generate an output that conforms to a particular standard, such as by converting to a standard RGB output for transmission over a MIPI interface.

[0035] Embodiments of the pixel-to-disparity converter 310 may use the raw image data 305 to generate a map of disparity values ​​for the pPDPs 220 of the imaging sensor array 140. As shown, embodiments of the pixel-to-disparity converter 310 may include a local disparity calculator 315. The local disparity calculator 315 may receive and / or obtain a map (e.g., a list) of pPDP locations 312 and calculate the disparity of each pPDP 220 for each of the pPDP locations 312 based on calculating a phase shift (e.g., a spatial offset) between different viewpoints detected by the pPDP 220 in that pPDP location 312. Each pPDP 220 uses an OCL or other optical component to effectively receive multiple viewpoints at its component photodetectors. For example, referring to Figure 2As described, each pPDP 220 may include one or more left viewpoint elements 222 and one or more right viewpoint elements 224. In some embodiments, photodetectors contributing to the same viewpoint may be merged together. For example, each pPDP 220 may output a single pixel image value for each viewpoint (e.g., a single left viewpoint pixel image value and a single right viewpoint pixel image value). Multi-viewpoint pixel image values ​​may be used to calculate the amount of spatial offset between viewpoints. For example, all left viewpoint pixel image values ​​from all pPDPs 220 across the imaging sensor array 140 may be used to generate a left viewpoint image, and all right viewpoint pixel image values ​​from all pPDPs 220 across the imaging sensor array 140 may be used to generate a right viewpoint image. Pattern and / or template matching and / or other image processing is performed between the left viewpoint image and the right viewpoint image to find common features for determining the amount and direction of the local spatial offset (i.e., the amount of parallax).

[0036] In some embodiments, the local disparity calculator 315 may be configured with specific settings (e.g., template size, search range, etc.) and may use a Sum-of-Absolute-Difference (SAD) operation to obtain the disparity value at each pPDP position 312. Some embodiments further perform a confidence level check. For example, a quality check may be performed on the calculated SAD curve to ensure a valid disparity output. In some embodiments, various conditions are evaluated to determine whether the SAD curve passes the confidence level check, such as: determining that the length of the SAD vector corresponding to the SAD curve calculation is at least a minimum length (e.g., implying a minimum search range), determining that the SAD curve has a local minimum (e.g., and there is only one local minimum), determining that the local minimum of the SAD curve is located at or near the middle of the SAD curve (e.g., the local minimum is not one of the first two or last two SAD values), and determining that the difference in SAD values ​​between the local minimum and its nearest neighbor is greater than a predetermined (e.g., configurable) threshold. Some embodiments perform sub-pixel interpolation by deriving disparity in sub-pixel precision using a curve fitting technique applied to the calculated SAD curve. For example, the curve fit may identify the SAD global minimum point with sub-pixel accuracy. In some embodiments, the confidence level check is used to determine whether to ignore (i.e., not use) certain disparity values ​​for upsampling (e.g., and / or for other PDAF functions). For example, for any pPDP position 312 that does not pass the confidence level check, some embodiments may ignore the disparity in that position, while other embodiments may set the disparity in that position to zero.

[0037] The local disparity calculator 315 may calculate a single disparity value for each pPDP 220 (e.g., at each pPDP location 312), which may be output as a physical PD disparity map 317. For example, an imaging sensor array 140 having a resolution of X (e.g., 48 million) pixels is configured with Y percent (e.g., one percent) of its photodetectors used to form pPDPs 220, with each pPDP 220 formed using a block of Z (e.g., four) photodetectors. The local disparity calculator 315 may calculate at most X*Y / Z (e.g., approximately one quarter of one percent of the full resolution of the imaging sensor array 140, or 124,500 disparity values ​​associated with 124,500 pPDP locations 312). The physical PD disparity map 317 may effectively be an array of values, such that each position in the array corresponds to one of the pPDP locations 312, and the array value assigned to each array position is the disparity calculated for the pPDP 220 at the corresponding pPDP location 312.

[0038] Some embodiments of the local disparity calculator 315 may include additional features to support the calculation of pixel-level disparity. For example, the local disparity calculator 315 may include a merging module to convert each pPDP 220 into a single value for each viewpoint (e.g., a 2×2 pPDP 220 that originally has four values ​​can be transformed into a 1×2 block representing a first viewpoint value and a second viewpoint value). Some embodiments of the local disparity calculator 315 may include a sensitivity correction module. For example, due to optical system manufacturing tolerances, sensitivity differences between pixels used for imaging and pixels used for pPDP 220, the sensitivity correction module can implement gain compensation to ensure that different pixels have similar sensitivities. Such a sensitivity correction module can be used to reduce or eliminate problems with optical system (e.g., imaging lenses and microlenses) manufacturing tolerances, and / or to normalize pPDP220 levels to other optical imaging pixel levels. As described below, such sensitivity correction can be used to perform a disparity-to-pixel transformation via a disparity-to-pixel converter 360. In some embodiments, the sensitivity correction module multiplies each view element (eg, each left view or right view element of pPDP 220) by a separate gain that is pre-calibrated into a locally stored knot table and extended by bilinear interpolation.

[0039] Some embodiments of the local disparity calculator 315 may include a low pass filtering module to perform denoising operations across the pPDP 220, such as performing simple horizontal denoising on a pPDP 220 configured to provide horizontal disparity. For example, a one-dimensional filter may be configured through registers in terms of filter length and weight to perform simple denoising. In such embodiments, the disparity values ​​in the physical PD disparity map 317 may be sensitivity correction values.

[0040] Some embodiments of the local disparity calculator 315 include a contrast detection module to detect pixel-level contrast. For example, local window pixel information can be used to obtain mean and deviation statistics related to contrast and output a binary decision, for example, as a flag for adaptive selection, where pPDP 220 is used for upsampling. The focus operation described herein uses contrast information and phase information. Therefore, a simple detection of scene contrast by a contrast detection module can improve the robustness of local disparity calculation. In some embodiments, local window pixel information is determined by a selected search range, and multi-viewpoint (e.g., left and right) information is aggregated together. Mean and deviation statistics can be calculated based on the current local information, and a decision boundary can be set for decision making. Some embodiments can be gain-based. For example, in low-gain applications (e.g., in the presence of high illumination), local pixel changes tend to be mainly from scene content information, while in high-gain applications (e.g., in the presence of low illumination), local pixel changes tend to be mainly from noise, rather than image content. Therefore, the contrast detection module can be configured to operate differently in high-gain and low-gain applications.

[0041] An embodiment of the disparity upsampler 340 includes a weight generator 345 and an upsampling filter 350. The upsampling filter 350 is configured to upsample disparity values ​​from the physical PD disparity map 317 using weighting based at least on local contrast values. The upsampling filter 350 may perform upsampling based on an identified set of upsampled phase detection pixel (uPDP) positions (also referred to herein as "upsampling positions"). In some embodiments, the upsampling filter 350 identifies the uPDP positions by obtaining the uPDP positions from a predefined template or other stored information. In other embodiments, the upsampling filter 350 identifies them by calculating the uPDP positions from the pPDP positions 312 (e.g., identified in the physical PD disparity map 317). Each uPDP position corresponds to a position within a respective photodetector array of a non-PD block 214. In some embodiments, the uPDP position is at the same relative position within its non-PD block 214 as its adjacent pPDP position within its respective PD block 212. The number of uPDP positions determines the amount of upsampling. For example, in a case where Figure 2In the array of pixel blocks 210 shown, each group of six pixel blocks 210 includes one PD block 212 and five non-PD blocks 214, and each PD block 212 uses one sixteenth of its 256 photodetectors to form four pPDPs. This can be considered as a PDAF resolution of approximately one percent (i.e., 16 / 256*1 / 6≈0.01). If a single uPDP position in the non-PD block 214 is identified for each pPDP in each PD block 212, the PDAF resolution can be effectively doubled (e.g., from approximately one percent to approximately two percent). If the pPDPs in the PD blocks 212 are used to identify the same density of uPDP positions in all non-PD blocks 214, the resolution can be effectively increased by a factor of six (depending on the total number and configuration of pixel blocks 210, there may not be five non-PD blocks 214 for each PD block 212, in which case the resolution may be increased by less than a factor of six).

[0042] Embodiments of the weight generator 345 may generate any suitable contrast-based weights for generating upsampled disparity values ​​for each of the uPDP locations based on the calculated local disparity values ​​indicated by the physical PD disparity map 317. Some embodiments of the weight generator 345 may obtain and / or calculate local contrast values ​​for each of the pPDP locations 312 based on spatial contrast information generated from the original image data 305. Some embodiments of the weight generator 345 calculate local contrast values ​​from a received contrast map 322. Other embodiments of the weight generator 345 receive the contrast map 322 in a manner indicating local contrast values ​​without relying on further calculations.

[0043] For example, some embodiments of the PDAF resolution upsampling system 300 include a contrast mapper 320 that uses the raw image data 305 to generate a contrast map 322. The contrast map 322 can be generated to have a higher resolution than the physical PD disparity map 317 and equal to or lower than the resolution of the raw image data 305. Some CFA patterns include interspersed white pixels, and some embodiments can generate the contrast map 322 by high pass filtering the white pixel output. For example, in the hexadecimal CFA pattern described above, the imaging sensor array 140 is a 6000×8000 photodetector array that alternates between RGB pixels and white pixels. Therefore, the initial high pass filtering operation in such an implementation can produce 3000×4000 contrast values. Some embodiments can output the entire array of contrast values ​​as the contrast map 322. Other embodiments of the contrast mapper 320 can subsample the contrast values ​​according to predefined pixel locations. Such embodiments may use a subsampling operation to generate contrast values ​​at least at each of the pPDP locations 312, such that the contrast map 322 may be output at least at the same resolution (e.g., and array structure) as the physical PD disparity map 317. Some such embodiments also use a subsampling operation to generate contrast values ​​for upsampled locations that are output as part of upsampled PDAF data, as further described below (e.g., the contrast map 322 may be output at least at the same resolution and / or array structure as the upsampled PD disparity map 375 described below).

[0044] To illustrate, Figure 4An illustrative portion of an array of pixel blocks 210 having two PD blocks 212 separated by two non-PD blocks 214 is shown. Each pixel block 210 is shown in an enlarged but simplified form without any CFA information. In each of the PD blocks 212, only a single pPDP 220 is shown (i.e., a single grouping of four photodetector elements 142 with OCL 226 arranged thereon to effectively form two 2x1 viewpoint images). As described herein, embodiments seek to use imaging information received from the pPDP 220 (i.e., a physical PD pixel) and its surroundings to calculate an upsampled phase detection pixel (uPDP) 420 (i.e., a simulated PD pixel represented as a uPDP 420 in a specific specified location). Each uPDP 420 is associated with a location in a non-PD block 214, which may be the location of a photodetector element 142 or a block of photodetector elements 142. However, the uPDP 420 is not physically implemented. For example, there is no specific OCL, metal shielding, or dedicated set of photodetector elements 142 that physically constitutes a uPDP 420. Instead, each uPDP 420 is an upsample of an adjacent pPDP 220, and if a pPDP existed at the location of the uPDP 420, a representation of the output would be generated by the pPDP 220 in the location of the uPDP 420. In fact, the uPDP 420 provides higher PDAF data resolution without increasing the number of physical PDAF sensors (e.g., and without the associated cost, complexity, data interface requirements, etc.).

[0045] therefore, Figure 4The uPDP 420 shown in is intended to indicate an illustrative representation of a uPDP 420 in an associated illustrative uPDP location. As shown, each uPDP 420 can be associated with an upsampled location in an associated non-PD block 214 that corresponds to the physical location of an adjacent pPDP 220 in its PD block 212. For example, the location of a pPDP 220 can be identified by the location of its lower leftmost photodetector element 142 relative to a two-dimensional grid of photodetector elements 142 starting from the lower leftmost photodetector element 142 in the PD block 212. For example, each illustrated 16×16 PD block 212 includes a single pPDP 220 at location (13, 11). In the illustrated embodiment, each uPDP 420 is similarly assigned to location (13, 11) in its respective non-PD block 214. Continuously positioning pPDPs 220 and uPDPs 420 can provide certain features, such as simplifying physical implementation, simplifying certain calculations, etc. However, other embodiments may implement pPDP 220 at different physical locations in different PD blocks 212, and / or calculate uPDP 420 to have different upsampling locations in different non-PD blocks 214, different from neighboring pPDP 220, and so on.

[0046] For ease of comparison, a simple way to increase the resolution of the PDAF data is to interpolate the pixel image values ​​and / or disparity values ​​from the pPDP220. For example, if the left viewpoint element 222 of the first pPDP 220a in the first PD block 212a outputs a value of 50 (an arbitrary value chosen purely for illustration), and the left viewpoint element 222 in the second pPDP 220b in the second PD block 212b outputs a value of 70 (also an arbitrary value chosen purely for illustration), the interpolated value 60 can be assigned to the position between the pPDP220a and the pPDP220b. While this approach technically generates more PDAF data points, the interpolated data points cannot reliably provide additional useful information for PDAF. As an extreme illustrative example, assume that the imaging system is trying to focus on a surface with deep, regularly spaced waves, and the resolution (density, spacing, etc.) of the pPDP220 is just enough so that each pPDP 220 "sees" (receives light from reflections) the respective peaks of the wavy surface. The pPDP 220 may incorrectly detect a plane (due to its insufficient resolution), but simple interpolation will only produce a higher resolution version of the same plane. In reality, the PDAF system loses information between the peaks of the surface texture, and higher data density does not really provide better PDAF resolution.

[0047] Back to Figure 3, the disparity upsampler 340 attempts to effectively increase the PDAF data resolution without increasing the number of pPDPs 220 by utilizing the disparity values ​​of the pPDP 220 and the local contrast data around the pPDP 220 to generate the uPDP 420 in real time. As described above, the physical PD disparity map 317 is a low-resolution map indicating the local disparity values ​​of each pPDP 220. The contrast map 322 can be generated (e.g., by the contrast mapper 320) by sub-sampling the local contrast information of the pPDP 220 position. For example, referring to Figure 4 , the local contrast information of each pPDP 220 may be subsampled from its surrounding dashed area 430 (e.g., the dashed area 430 is intended only to generally represent the surrounding area, and the size and shape of the dashed area 430 is not intended to indicate actual size or shape, or otherwise be limiting).

[0048] Returning to the weight generator 345, embodiments may also obtain and / or calculate distance measurements between each uPDP location and multiple adjacent pPDP locations in the pPDP locations 312. For example, in some embodiments, the distance measurements may be pre-programmed, hard-coded, etc. based on the known geometry of the imaging sensor array 140 and the respective locations of the pPDPs 220 in the imaging sensor 140. Such distance measurements may be retrieved from a lookup table or in any other suitable manner. In other embodiments, the weight generator 345 calculates the distance measurements based on identifying adjacent pPDP locations 312 as being proximal to each uPDP location and calculating the distances to those neighbors. Some embodiments may obtain (e.g., find, retrieve, calculate, etc.) the distance measurement for each uPDP location based on its two neighbors. Other embodiments may obtain the distance measurement for each uPDP location based on a geometrically consistent set of two or more neighbors, which may or may not be neighbors that are the distance measurement for that uPDP location.

[0049] For ease of explanation, Figure 4 In the illustrated array of pixel blocks 210, each non-PD block 214 has a first PD block 212 directly adjacent thereto (e.g., non-PD block 214a has PD block 212a immediately to its left, and non-PD block 214b has PD block 212b immediately to its right), and a second PD block 212 one block away in the opposite direction (e.g., non-PD block 214a has PD block 212b one block away to its right, and non-PD block 214b has PD block 212a one block away to its left). As another example, in Figure 2 In the illustrated array of pixel blocks 210, the uPDP locations in non-PD block 214c can be upsampled using the pPDPs from PD block 212a and PD block 212c. Figure 2In the array of pixel blocks 210 shown, the pPDPs from PD blocks 212a, 212b, and 212c can be used to upsample the uPDP positions in non-PD block 214d. Figure 4 As shown, each uPDP 420 location is separated from its neighboring pPDP 220 location by some distance measurement 440. For example, the upsampled location of uPDP 420a is at a physical location 440aa from pPDP 220a and at a physical location 440ba from pPDP 220b, and the upsampled location of uPDP 420b is at a physical location 440ab from pPDP 220a and at a physical location 440bb from pPDP 220b.

[0050] Some embodiments of weight generator 345 use local contrast values ​​from contrast map 322 and a distance measure (e.g., Figure 4 440) to calculate and output a set of upsampling weights 347. Some embodiments include additional values ​​in the calculation of the upsampling weights 347, such as a normalization factor. One or more upsampling weights 347 can be calculated to pair the uPDP position with the respective neighboring pPDP position 212. For example, for embodiments using two neighbors for each uPDP position, each uPDP position will be associated with two upsampling weights 347. For example, the upsampling weights 347 for each uPDP-pPDP position pair can be calculated by multiplying (or otherwise combining) a first weighting factor based on the respective local contrast value at the pPDP position, a second weighting factor based on the respective distance between the uPDP position and the pPDP position, and a normalization factor.

[0051] The upsampling filter 350 may use the upsampling weights 347 and the local disparity values ​​from the physical PD disparity map 317 to calculate upsampled disparity values ​​352, including the upsampled disparity value 352 for each uPDP position. The calculation of the upsampled disparity value 352 by the upsampling filter 350 may be performed using any suitable upsampling filter algorithm, such as a joint bilateral filter. For example, the upsampled disparity value 352 for a particular uPDP position may be calculated based on a weighted sum of the local disparity values ​​of the first neighboring pPDP position weighted by the upsampling weight 347 calculated for the first neighboring pPDP position, and the local disparity values ​​of the second neighboring pPDP position weighted by the upsampling weight 347 calculated for the second neighboring pPDP position, and so on.

[0052] Some embodiments may pass the upsampled disparity values ​​352 directly to the output subsystem 380 (e.g., for performing PDAF). For example, some application contexts expect the output of the CIS system 130 to be a set of disparity values. In some such embodiments, the upsampled disparity values ​​352 and the local disparity values ​​from the physical PD disparity map 317 may be combined to generate an upsampled PD disparity map 375. For example, the upsampled PD disparity map 375 is an array including disparity values ​​for each pPDP position and each uPDP position. The physical PD disparity map 317 is a relatively low-resolution physical PD disparity map that indicates only the disparity values ​​for the pPDP positions. For example, the raw image data 305 may have a full resolution of 48 megapixels (based on the number of photodetectors in the imaging sensor array 140), and the full output of the plurality of pPDPs 220 may have a resolution of 1500×332 pixels (i.e., 498,000 pixels, based on approximately one percent of the photodetectors used to form the plurality of pPDPs 220). In some embodiments, the physical PD disparity map 317 may assign a disparity value to each of those photodetectors such that the physical PD disparity map 317 has the same 1500×332 resolution. In other embodiments, the physical PD disparity map 317 may assign a single disparity value to each pPDP 220 (e.g., each group of four photodetectors, such as two first viewpoint elements and two second viewpoint elements), such that the resolution of the physical PD disparity map 317 is reduced to 750×166 (i.e., 124,500 disparity values ​​associated with 124,500 pPDP locations, or approximately one-quarter of one percent of the resolution of the full imaging sensor array 140). The upsampled PD disparity map 375 may include the original physical PD disparity map 317 information and the upsampled disparity values ​​352. Thus, the resolution of the upsampled PD disparity map 375 is higher than the resolution of the physical PD disparity map 317 by a factor corresponding to the amount of upsampling. For example, the resolution of the physical PD disparity map 317 is 750×166, and the resolution of the upsampled PD disparity map 375 is 750×496 (a factor increase of slightly less than three times). Other resolutions may be achieved using different image sensor sizes, different numbers and / or arrangements of pixel blocks 210, different numbers and / or arrangements of pPDPs 220 in pixel blocks 210, different amounts of upsampling, etc. For example, embodiments may typically use a low-resolution physical PD disparity map 317 (e.g., less than five percent of the full image sensor resolution) and may output an upsampled PD disparity map 375 to be at least twice the resolution of the physical PD disparity map 317.

[0053] Other embodiments of the PDAF resolution upsampling system 300 may use a disparity-to-pixel converter 360 to convert the upsampled disparity values ​​352 into upsampled pixel image values ​​at uPDP locations. The upsampled pixel image values ​​may be calculated to simulate different viewpoint pixel image values ​​obtained at each uPDP location if there is a pPDP at that location. Embodiments of the disparity-to-pixel converter 360 include a local reference generator 365 and a uPDP image value generator 370. The local reference generator 365 may generate, for each uPDP location, one or more reference (i.e., first viewpoint) pixel image values ​​367 for the uPDP location based on one or more pixel image values ​​obtained by one or more photodetectors at locations corresponding to the uPDP location (e.g., based on the raw image data 305). For example, a uPDP location may be used to identify a particular 2×2 block of photodetectors correspondingly located in the non-PD block 214, and pixel image values ​​(e.g., obtained from the raw image data 305) of one or more of those 2×2 photodetectors are used to form one or more reference pixel image values ​​367 (e.g., or reference image) for that uPDP location, as received by the first viewpoint element of the pPDP 220.

[0054] The uPDP image value generator 370 may then calculate one or more second viewpoint uPDP values ​​for each uPDP location based on the reference pixel image values ​​367 and the upsampled disparity values ​​352 for that uPDP location. As described herein, the upsampled disparity values ​​352 indicate the amount of disparity (i.e., spatial displacement) between different viewpoint pixel image values ​​that would have been apparent if the pPDP 220 were at the same location. Thus, the upsampled disparity values ​​352 for the uPDP location may be used to indicate the amount and direction of the spatial displacement to apply to the reference pixel image values ​​367 to obtain the second viewpoint uPDP values. The reference pixel image values ​​367 and the second viewpoint uPDP values ​​at each uPDP location together form the upsampled pixel image values ​​for the uPDP location because they effectively simulate what the multi-viewpoint output of the pPDP 220 would be if the pPDP 220 were actually located at the uPDP location.

[0055] Embodiments of the disparity-to-pixel converter 360 may output upsampled pixel image values ​​to an output subsystem 380. In some embodiments, the output from the disparity-to-pixel converter 360 is combined with pPDP 220 pixel image output data (e.g., obtained from the raw image data 305) to generate an upsampled PD pixel map 372. For example, the upsampled PD pixel map 372 includes: for each uPDP position, generating a respective first viewpoint uPDP image value for the uPDP position, and calculating a respective second viewpoint uPDP image value for the uPDP position, and for each pPDP position, the respective first viewpoint pPDP image value and the respective second viewpoint pPDP image value correspond to the pixel image value obtained by the pPDP 220 associated with the pPDP position as part of capturing the raw image data 305. The upsampled PD pixel map 372 may be output to the output subsystem 380, for example, to support PDAF. For example, some application contexts expect to see pixel image values ​​as output from the CIS system 130.

[0056] Some embodiments of the disparity to pixel converter 360 include additional features. For example, a pre-processing module may be included to prepare data prior to conversion. In some embodiments, the disparity to pixel converter 360 includes an adaptive selection module (e.g., as part of the uPDP image value generator 370). The adaptive selection module may adaptively select output pixel data based on local disparity quality decisions, such as the contrast and confidence decisions described above with reference to the pixel to disparity converter 310. For example, upsampled pixel image values ​​are used in the upsampled PD pixel map 372 only when local contrast and / or confidence flags indicate that good quality disparity data was used to calculate those upsampled pixel image values. If a particular upsampled pixel image value in a particular uPDP position is not used, some embodiments may use a different technique to approximate that value, such as linear interpolation based on pixel image values ​​from adjacent pPDPs 220.

[0057] Figure 5A flow chart of an illustrative method 500 for implementing upsampling in a phase detection autofocus (PDAF) system according to various embodiments described herein is shown. Embodiments of method 500 may be performed using any suitable system, including the systems described herein. Embodiments of method 500 begin at stage 504 by obtaining a phase detection (PD) disparity map indicating a local disparity value for each of a plurality of physical phase detection pixels (pPDPs) of an image sensor. Each local disparity value is calculated from raw image data obtained from the image sensor. As described herein, the image sensor includes an array of pixel blocks, each pixel block being a respective photodetector array. A subset of the pixel blocks are configured as PD blocks, and for each of the subset of pixel blocks, at least one of the pPDPs is formed by configuring a portion of the respective photodetector array so that each of the pPDPs is associated with a particular pPDP position in a particular one of the PD blocks.

[0058] At stage 508, embodiments may calculate local contrast values ​​for each of the pPDP locations based on the spatial contrast information generated from the raw image data. In some embodiments, a contrast map is calculated from the raw image data indicating the spatial contrast information at stage 506. As described herein, the contrast map has a higher resolution than the PD disparity map, and may have the same or lower resolution than the raw image data.

[0059] At stage 512, embodiments may identify upsampled phase detection pixel (uPDP) locations (also referred to herein as upsampled locations), each of which is a location in a respective photodetector array in a respective pixel block outside of a PD block (i.e., a non-PD block). In some embodiments, a uPDP location is at the same relative location within its non-PD block as its adjacent pPDP location within its respective PD block. The number of uPDP locations determines the amount of upsampling. For example, in a case such as Figure 2In the illustrated array of pixel blocks 210, each group of six pixel blocks 210 includes one PD block 212 and five non-PD blocks 214, and each PD block 212 uses one sixteenth of its 256 photodetectors to form four pPDPs. This can be considered to be approximately one percent of PDAF resolution (i.e., 16 / 256*1 / 6≈0.01). If a single uPDP location in the non-PD block 214 is identified for each pPDP in each PD block 212, the PDAF resolution can be effectively doubled (e.g., from approximately one percent to approximately two percent). If the pPDPs in the PD blocks 212 are used to identify the same density of uPDP locations in all non-PD blocks 214, the resolution can be effectively increased by a factor of six (depending on the total number and configuration of the pixel blocks 210, there may not be five non-PD blocks 214 for each PD block 212, in which case the resolution may be increased by less than a factor of six).

[0060] For each uPDP position (some or all of the uPDP positions), the method 500 may iteratively perform stages 516-528 to generate upsampled disparity values ​​at those uPDP positions. For example, after each iteration of stages 516-524, it is determined at stage 528 whether there are additional uPDP positions to be processed. The method 500 may continue to iterate until the determination at stage 528 indicates that there are no more uPDP positions for which upsampled disparity values ​​are to be generated. In some embodiments, the method 500 iterates all uPDP positions. In other embodiments, techniques may be used to determine whether certain uPDP positions are not good candidates for upsampling, such as by determining that certain pPDP data and / or contrast data do not seem to be suitable for performing upsampling with high confidence in a particular area, etc., in which case the method 500 may determine not to generate upsampled disparity values ​​at those uPDP positions that are determined not to be good upsampling candidates.

[0061] At stage 516, embodiments may identify adjacent pPDP locations as being proximal to the uPDP location. In some embodiments, stage 516 identifies two neighbors of the uPDP location (a first and a second pPDP location). In other embodiments, stage 516 identifies a set of two or more geometrically consistent neighbors that may or may not be neighbors. For example, Figure 4In the illustrated array of pixel blocks 210, each non-PD block 214 has a first PD block 212 directly adjacent thereto (e.g., non-PD block 214a has PD block 212a immediately to its left, and non-PD block 214b has PD block 212b immediately to its right), and a second PD block 212 one block away in the opposite direction (e.g., non-PD block 214a has PD block 212b one block away to its right, and non-PD block 214b has PD block 212a one block away to its left). As another example, in Figure 2 In the array of pixel blocks 210 shown, the uPDP locations in non-PD block 214c may be upsampled using the pPDPs from PD block 212a and PD block 212c. In other embodiments, stage 516 identifies other suitable geometrically consistent sets of two or more neighbors that may or may not be neighbors. For example, in Figure 2 In the illustrated array of pixel blocks 210, the uPDP locations in non-PD block 214d may be upsampled using the pPDPs from PD blocks 212a, 212b, and 212c.

[0062] At stage 520, an embodiment may calculate a set of upsampling weights based at least on the local contrast values ​​of each of the neighboring pPDP positions (i.e., at least the first pPDP position and the second pPDP position). In some embodiments, for each uPDP position, the calculation of the upsampling weights at stage 520 is further based on the distance between the uPDP position and each of the neighboring pPDP positions. For example, for each pPDP position, the contrast value, the distance measurement to the uPDP position, and the normalization factor are used to calculate the upsampling weights.

[0063] At stage 524, an embodiment may calculate an upsampled disparity value for the uPDP position based on a set of upsampled weights and the local disparity values ​​of those pPDPs in the pPDPs associated with the neighboring pPDP positions as indicated by the PD disparity map. The calculation of the upsampled disparity values ​​352 at stage 524 may be performed using any suitable upsampled filter algorithm, such as a joint bilateral filter. For example, the local disparity values ​​of a first neighboring pPDP position are weighted by the upsampled weights calculated for the first neighboring pPDP position, the local disparity values ​​of a second neighboring pPDP position are weighted by the upsampled weights calculated for the second neighboring pPDP position, and so on, to determine the upsampled disparity value for the uPDP position.

[0064] Having completed the calculation of upsampled disparity values ​​for the uPDP locations (the determination at stage 528 is that there are no more uPDP locations for which upsampled disparity values ​​are to be generated), some embodiments may perform one or more additional stages. At stage 532, some embodiments may generate and output an upsampled PD disparity map. The PD disparity map used in stage 504 is a relatively low resolution physical PD disparity map indicating disparity values ​​for the pPDP locations. For example, the raw image data may have a raw resolution of 48 megapixels (based on the image sensor resolution), and the full output of the pPDP may have a resolution of 1500×332 pixels (i.e., 498,000 pixels, based on approximately one percent of the photodetectors used to form the pPDP). In some embodiments, the physical PD disparity map may assign disparity values ​​to each of those pixels so that the physical PD disparity map has the same 1500×332 resolution. In other embodiments, the physical PD disparity map may assign a single disparity value to each pPDP (e.g., each group of four photodetectors, such as two first viewpoint elements and two second viewpoint elements), such that the resolution of the physical PD disparity map is reduced to 750×166 (i.e., 124,500 disparity values ​​associated with 124,500 pPDP positions, or approximately one-quarter of one percent of the image sensor resolution). The upsampled PD disparity map generated and output at stage 532 may include the original physical PD disparity map information (i.e., disparity values ​​for pPDP positions, such as disparity values ​​for 124,500 pPDP positions) and the upsampled disparity value for each uPDP position. Thus, the resolution of the upsampled PD disparity map is higher than the resolution of the physical PD disparity map by a factor corresponding to the amount of upsampling. For example, the resolution of the physical PD disparity map is 750×166 and the resolution of the upsampled PD disparity map is 750×496 (a factor increase of slightly less than three times). Other resolutions may be achieved using different image sensor sizes, different numbers and / or arrangements of pixel blocks 210, different numbers and / or arrangements of pPDPs in pixel blocks 210, different amounts of upsampling, etc. For example, embodiments may typically use a low-resolution physical PD disparity map (e.g., less than five percent of the full image sensor resolution) and may output an upsampled PD disparity map to be at least twice the resolution of the physical PD disparity map.

[0065] Some embodiments transform the upsampled disparity values ​​for the uPDP positions into upsampled pixel image values ​​at stage 536. The upsampled pixel image values ​​may be calculated to simulate different viewpoint pixel image values ​​obtained at each uPDP position if there is a pPDP at that position. In some embodiments, for each uPDP position, one or more first viewpoint uPDP values ​​are generated for the uPDP position based on one or more pixel image values ​​obtained by one or more photodetectors at a position corresponding to the uPDP position. For example, the uPDP position may be used to identify a particular 2×2 block of photodetectors correspondingly located in a non-PD block, and the pixel image values ​​of one or more of those 2×2 photodetectors (e.g., obtained from the original image data) are used to form the pixel image values ​​for the uPDP position as if from a first viewpoint (e.g., or a reference image). One or more second viewpoint uPDP values ​​may then be calculated for each uPDP position based on the first viewpoint uPDP value and the upsampled disparity values ​​for the uPDP position. As described herein, the upsampled disparity values ​​indicate the amount of disparity between different viewpoint pixel image values ​​that would have been apparent if the pPDP were at the same position. Thus, the upsampled disparity value of the uPDP position may be used to indicate the amount and direction of a spatial shift to apply to the first viewpoint uPDP value to obtain the second viewpoint uPDP value.

[0066] Some embodiments may output an upsampled PD pixel map at stage 540. In some embodiments, the upsampled PD pixel map includes, for each uPDP position, generating a respective first-viewpoint uPDP value for the uPDP position, and calculating a respective second-viewpoint uPDP value for the uPDP position. In some embodiments, the upsampled PD pixel map also includes, for each pPDP position, one or more respective first-viewpoint pPDP values ​​and one or more respective second-viewpoint pPDP values ​​corresponding to the pixel image value obtained from the pPDP associated with the pPDP position as part of capturing the original image data.

[0067] In some embodiments, one or more outputs may be used to perform PDAF at stage 544. In some embodiments, the upsampled PF disparity map generated and output at stage 532 is used to perform PDAF at stage 544. In some embodiments, additionally or alternatively, the upsampled PD pixel map generated and output at stage 540 is used to perform PDAF at stage 544.

[0068] Although this disclosure contains many details, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular inventions. Certain features described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented separately in multiple embodiments or in any suitable subcombination. In addition, although the features described above may be described as working in certain combinations or even initially claimed, in some cases one or more features from the claimed combination may be deleted from the combination, and the claimed combination may be directed to a subcombination or a variation of a subcombination.

[0069] Similarly, while operations are depicted in a particular order in the drawings, this should not be understood as requiring that the operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, in order to achieve the desired results. Furthermore, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

[0070] Only a few implementations and examples are described, and other implementations, enhancements, and variations can be made based on what is described and illustrated in this patent document.

[0071] Unless there is a clear indication to the contrary, the expression "a", "an" or "the" is intended to mean "one or more". Ranges may be expressed herein as from "about" a specified value and / or to "about" another specified value. The term "about" is used herein to mean approximately, in the region of, roughly or around. When the term "about" is used in conjunction with a numerical range, it modifies the range by extending the boundaries above and below the specified numerical value. In general, the term "about" is used herein to modify the numerical value above or below the specified value with a variance of 10%. When such a range is expressed, another embodiment includes from one specific value and / or to another specific value. Similarly, when a value is expressed as an approximation, by using the antecedent "about", it will be understood that the specified value forms another embodiment. It will be further understood that the endpoints of each range are included in the range.

[0072] All patents, patent applications, publications, and descriptions mentioned herein are incorporated by reference in their entirety for all purposes. None is admitted to be prior art.

Claims

1. A method for real-time upsampling in a phase detection autofocus (PDAF) system, the method comprising: obtaining a phase detection PD disparity map indicating a local disparity value for each of a plurality of physical phase detection pixels pPDP of an image sensor, each local disparity value being calculated based on raw image data obtained by the image sensor, the image sensor comprising an array of pixel blocks, each pixel block being a respective photodetector array, wherein a subset of the pixel blocks is used as a PD block, and for each of the subset of the pixel blocks, at least one of a plurality of pPDPs is formed by configuring a portion of the respective photodetector array such that each of the plurality of pPDPs is associated with one of a plurality of pPDP locations in the PD block; obtaining a local contrast value for each of the plurality of pPDP locations based on spatial contrast information generated from the raw image data; identifying a plurality of upsampled phase detection pixel uPDP locations, each upsampled phase detection pixel location being a location in said respective photodetector array of a respective one of said pixel blocks outside of said PD block; and For each uPDP location of at least some of the plurality of uPDP locations: identifying at least a first pPDP location and a second pPDP location of the plurality of pPDP locations as being proximate to the uPDP location; calculating a set of upsampling weights based at least on the local contrast value for each of at least the first pPDP location and the second pPDP location; and An upsampled disparity value for the uPDP position is calculated based on the set of upsampling weights and the local disparity values ​​of the plurality of pPDPs associated with at least the first pPDP position and the second pPDP position indicated by the PD disparity map.

2. The method according to claim 1, wherein the obtaining the local contrast value comprises calculating a contrast map based on the original image data indicating the spatial contrast information, the contrast map having a higher resolution than the PD disparity map.

3. The method of claim 2, wherein the contrast map has a lower resolution than the original image data.

4. The method according to claim 1, wherein: For each uPDP position, the calculating the set of upsampling weights is further based on a distance between the uPDP position and each of the at least first pPDP position and the second pPDP position.

5. The method of claim 1, wherein the PD disparity map is a physical PD disparity map, and further comprising: outputting an upsampled PD disparity map indicating the local disparity value for each pPDP position and indicating the upsampled disparity value for each uPDP position, wherein the original image data has a first image resolution, The physical PD disparity map has a second image resolution that is less than five percent of the first image resolution, and The upsampled PD disparity map has a third image resolution at least twice the second image resolution.

6. The method according to claim 1, further comprising: for each of the uPDP locations, generating a respective first viewpoint uPDP value based on one or more pixel image values ​​in the raw image data obtained from one or more photodetectors corresponding to the uPDP location in the image sensor; A second viewpoint uPDP value for each of the uPDP positions is calculated based on the respective first viewpoint uPDP values ​​at the uPDP positions and the upsampled disparity values ​​of the uPDP positions.

7. The method according to claim 6, further comprising: Output upsampled PD pixel map to indicate: for each pPDP position, a respective first viewpoint pPDP value and a respective second viewpoint pPDP value corresponding to a pixel image value obtained by the pPDP associated with the pPDP position as part of capturing the original image data; as well as For each uPDP position, the respective first-viewpoint uPDP value for the uPDP position is generated, and the respective second-viewpoint uPDP value for the uPDP position is calculated.

8. The method according to claim 1, wherein acquiring the PD disparity map comprises: receiving the raw image data from the image sensor as pixel image values ​​for the respective photodetection arrays of the plurality of pixel blocks; as well as The local disparity value for each of the plurality of pPDPs is calculated based on detecting local image phase shifts of the pPDP position obtained by pattern matching across a plurality of image phases generated from the pixel image values.

9. The method according to claim 1, wherein: The respective photodiode array of each pixel block is arranged according to a color filter array (CFA) pattern including white pixels; and The local contrast value is calculated based on a contrast image generated by high-pass filtering a portion of the raw image data obtained from the white pixels.

10. A method according to claim 1, wherein each of the subsets of pixel blocks includes at least one optical component, each optical component being in optical communication with a respective subarray of photodetectors of the respective photodetector array, such that the optical component causes a first element of the respective subarray to detect a respective portion of the original image data from a first viewpoint, and simultaneously causes a second element of the respective subarray to detect the respective portion of the original image data from a second viewpoint, the second viewpoint being complementary to the first viewpoint, thereby configuring the portion of the respective photodetector array to form at least one of the plurality of pPDPs.

11. A phase detection autofocus (PDAF) resolution upsampling system, comprising: a disparity mapping interface for coupling with a pixel-to-disparity converter to obtain a phase-detection PD disparity map indicating a local disparity value for each of a plurality of physical phase-detection pixels pPDP of an image sensor, each local disparity value being calculated based on raw image data obtained by the image sensor, the image sensor comprising an array of pixel blocks, each pixel block being a respective array of photodetectors, wherein a subset of the pixel blocks is used as a PD block, and for each of the subset of the pixel blocks, at least one of a plurality of pPDPs is formed by configuring a portion of the respective photodetector array such that each of the plurality of pPDPs is associated with one of a plurality of pPDP locations in the PD block; a contrast mapping interface for, coupled to the contrast mapper, obtaining a local contrast value for each of the plurality of pPDP locations based on spatial contrast information generated from the raw image data; A disparity upsampler coupled to the disparity mapping interface and the contrast mapping interface and comprising: a weight generator for calculating, for each upsampled phase detection pixel uPDP position of a plurality of uPDP positions corresponding to a physical position within said respective photodetector array of a respective one of the non-PD blocks, a set of upsampling weights based at least on said local contrast value of each of at least a first pPDP position and a second pPDP position determined to be proximate to said uPDP position; and The upsampling filter is used to, for each uPDP position, calculate an upsampled disparity value for the uPDP position based on the set of upsampling weights calculated for the uPDP position and based on the local disparity values ​​in the multiple pPDPs associated with at least the first pPDP position and the second pPDP position indicated by the PD disparity map.

12. The PDAF resolution upsampling system according to claim 11, further comprising: A pixel-to-disparity converter is used to receive the raw image data from the image sensor as pixel image values ​​of the respective photodetector arrays of the plurality of pixel blocks, and to calculate the local disparity value of each of the plurality of pPDPs based on detecting local image phase shifts of the pPDP positions obtained by pattern matching across a plurality of image phases generated from the pixel image values.

13. The PDAF resolution upsampling system according to claim 11, further comprising: The contrast mapper is configured to calculate the local contrast value by calculating a contrast map based on the original image data indicating the spatial contrast information, such that the contrast map has a higher resolution than the PD parallax map.

14. The PDAF resolution upsampling system of claim 11, wherein the weight generator is configured to calculate the set of upsampling weights for each uPDP position further based on obtaining a distance between the uPDP position and each of at least the first pPDP position and the second pPDP position.

15. The PDAF resolution upsampling system of claim 11, wherein the PD disparity map is a physical PD disparity map, and the disparity upsampler is further configured to: outputting an upsampled PD disparity map indicating the local disparity value for each pPDP position and indicating the upsampled disparity value for each uPDP position, wherein the original image data has a first image resolution, The physical PD disparity map has a second image resolution that is less than five percent of the first image resolution, and The upsampled PD disparity map has a third image resolution at least twice the second image resolution.

16. The PDAF resolution upsampling system according to claim 11, further comprising: A disparity-to-pixel converter, for each of the uPDP positions, for: generating respective first viewpoint uPDP values ​​based on one or more pixel image values ​​in the raw image data obtained from one or more photodetectors corresponding to the uPDP locations in the image sensor; as well as A second viewpoint uPDP value for each of the uPDP positions is calculated based on the respective first viewpoint uPDP values ​​at the uPDP positions and the upsampled disparity values ​​of the uPDP positions.

17. The PDAF resolution upsampling system of claim 16, wherein the disparity to pixel converter is further configured to: Output upsampled PD pixel map to indicate: for each pPDP position, a respective first viewpoint pPDP value and a respective second viewpoint pPDP value corresponding to a pixel image value obtained by the pPDP associated with the pPDP position as part of capturing the original image data; and For each uPDP position, the respective first-viewpoint uPDP value for the uPDP position is generated, and the respective second-viewpoint uPDP value for the uPDP position is calculated.

18. The PDAF resolution upsampling system of claim 11, wherein each PD block comprises at least one optical component, each optical component being in optical communication with a respective subarray of photodetectors of the respective photodetector array, such that the optical component causes a first element of the respective subarray to detect a respective portion of the raw image data from a first viewpoint, and simultaneously causes a second element of the respective subarray to detect the respective portion of the raw image data from a second viewpoint, the second viewpoint being complementary to the first viewpoint, thereby configuring the portion of the respective photodetector array to form at least one of the plurality of pPDPs.

19. A system for real-time upsampling in a phase detection autofocus (PDAF) system, the system comprising: one or more processors; as well as A non-volatile processor-readable memory having instructions stored thereon, which, when executed, causes one or more processors to perform steps, including: obtaining a phase detection PD disparity map indicating a local disparity value for each of a plurality of physical phase detection pixels pPDP of an image sensor, each local disparity value being calculated based on raw image data obtained by the image sensor, the image sensor comprising an array of pixel blocks, each pixel block being a respective photodetector array, wherein a subset of the pixel blocks is used as a PD block, and for each of the subset of the pixel blocks, at least one of a plurality of pPDPs is formed by configuring a portion of the respective photodetector array such that each of the plurality of pPDPs is associated with one of a plurality of pPDP locations in the PD block; calculating a local contrast value for each of the plurality of pPDP locations based on spatial contrast information generated from the raw image data; identifying a plurality of upsampled phase detection pixel uPDP locations, each upsampled phase detection pixel location being a location in said respective photodetector array of a respective one of said pixel blocks outside of said PD block; and For each uPDP location of at least some of the plurality of uPDP locations: identifying at least a first pPDP location and a second pPDP location of the plurality of pPDP locations as being proximate to the uPDP location; calculating a set of upsampling weights based at least on the local contrast value for each of at least the first pPDP location and the second pPDP location; and An upsampled disparity value for the uPDP position is calculated based on the set of upsampling weights and the local disparity values ​​in the plurality of pPDPs associated with at least the first pPDP position and the second pPDP position indicated by the PD disparity map.

20. The system of claim 19, wherein the PD disparity map is a physical PD disparity map, and the steps further comprise: outputting an upsampled PD disparity map indicating the local disparity value for each pPDP position and indicating the upsampled disparity value for each uPDP position, wherein the original image data has a first image resolution, The physical PD disparity map has a second image resolution that is less than five percent of the first image resolution, and The upsampled PD disparity map has a third image resolution at least twice the second image resolution.