Method and image processor unit for processing image data
By capturing data from multiple views in the image sensor and processing it using the image formation model, the problem of insufficient speed and accuracy of traditional autofocus technology is solved, and more efficient image processing and autofocus effects are achieved.
Patent Information
- Application Number
- CN202380016605.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2024-09-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional autofocus technology has shortcomings in speed and accuracy. In particular, the lens control method based on mechanical movement is slow, and it is difficult to effectively deal with the problems of crosstalk, shadow effects and exposure time changes caused by common lens and filter elements.
Capture image data from multiple views by introducing multiple lens and filter elements into the image sensor and utilize image formation models to process this data, combining operators and factors, extracting and combining sub-pixel values to eliminate crosstalk, shadowing and exposure time changes, thereby enabling more efficient image processing.
Improves the speed and accuracy of autofocus, effectively handles the effects caused by common lens and filter elements, provides higher quality image data, and does not discard the results after calculating parallax, taking advantage of multiple features of the fully focused sensor .
Smart Images

Figure CN118696544A
Abstract
Description
Technical Field
[0001] The invention relates to a method for processing image data of an image sensor, wherein the image sensor comprises a matrix of photosensitive elements and a plurality of lens elements and / or filter elements arranged in a pixel matrix before a finer sub-pixel matrix of the photosensitive elements, wherein a group of photosensitive elements are placed after a common lens element and / or a common filter element to provide sub-pixel values for corresponding positions in the pixel matrix, and wherein the image sensor (4) is suitable for capturing image data of a plurality of views, wherein each view comprises a matrix of a selected group of sub-pixel values of the pixel matrix captured by the matrix of photosensitive elements.
[0002] The invention further relates to an image processor unit for processing image data provided by an image sensor, the image sensor comprising a matrix of photosensitive elements and a plurality of lens elements and / or filter elements arranged in a pixel matrix before a finer sub-pixel matrix of the photosensitive elements, wherein a group of photosensitive elements is placed after a common lens element and / or a common filter element to provide sub-pixel values for corresponding positions in the pixel matrix. The raw image data comprises a matrix of pixel values of the pixel matrix captured by the matrix of photosensitive elements, the matrix of pixel values being divided into a set of views, each view comprising a matrix of sub-pixel values, the matrix of sub-pixel values comprising view-specific sub-pixels of the sub-pixel matrix for each position in the matrix, the view-specific sub-pixels being associated with corresponding lens elements and / or filter elements.
[0003] The invention also relates to a computer program comprising instructions causing a processing unit to perform the steps of the above-cited method when said program is executed by the processing unit. Background Art
[0004] Digital imagers are widely used in everyday products such as smartphones, tablets, laptops, cameras, cars, and valuables. Many of these imaging units have autofocus features to produce clear images or crisp videos.
[0005] Traditionally, autofocus is controlled based on contrast detection, where the lens is mechanically moved to the position where the scene contrast is highest. This control process is usually slow and requires a lens mechanism for mechanically changing the position of the lens.
[0006] The speed of autofocus and the accuracy of focusing can be improved by using the phase detection autofocus (PDAF) technology, which uses a PDAF sensor or a focus sensor that includes so-called phase detection (PD) pixels that are separated and regularly positioned over the entire image sensor area. The phase information (parallax) estimated from the phase detection pixels is used to determine the lens position in order to achieve optimal focus in a predefined region of interest (ROI) in the scene. If the parallax is accurate enough, the process is usually very fast.
[0007] For example, omnidirectional focusing sensors based on on-chip lens (OCL) technology allow the use of all image pixels for phase detection to improve the accuracy and speed of autofocus.
[0008] R. Garg, N. Wadhwa, S. Ansari, and YT Barron, “Learning Single Camera Depth Estimation Using Dual Pixels,” in Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition, 2019, pp. 1556–1565, describes a learning-based approach for processing dual-pixel images to estimate depth, until the inherent ambiguity in the estimated depth from dual pixels is used.
[0009] N. Wadhwa, R. Garg, D.E. Jacobs, B.E. Feldman, N. Kanazawa, R. Carroll, Y. Movshovitz-Attias, J.T. Barron, Y. Pritch, M. Levoy, "Synthetic Depth-of-Field with a Single-Camera Mobile Phone", ACM Trans. Graph., Vol. 37, No. 4, Article 64, pp. 64:1-64:13, describes a system for computing synthetic shallow depth-of-field images on a mobile phone by using a dual-pixel sensor per lens element. A neural network trained to segment people and accessories is combined with a sensor with dual-pixel (DP) autofocus hardware, which provides a dual-sample light field with a narrow baseline to extract a dense depth map.
[0010] "Du" by Y. Zhang, N. Wadhwa, RS SOrts-Escolano, C. Haene, S. Fanello, R. Garg 2 Net: Learning Depth Estimation from Dual Cameras and Dual Pixels 2 Net: Learning Depth Estimation from Dual Cameras and Dual-Pixels, in Computer Vision, ECCV 2020, editors: A. Vedaldi, H. Bischof, T. Brox, J.-M. Frahm, Springer International Publishing, Cham 2020, pp. 582-598, describes depth estimation using a neural network that combines stereo images from dual cameras with stereo images from a dual-pixel sensor to provide a dense depth map with sharp edges.
[0011] A. Abuolaim, MS Brown, "Defocus Deblurring Using Dual-Pixel Data," in European Conference on Computer Vision, 2020, pp. 110-126, addresses the problem of defocus blur that occurs in images captured with a shallow depth of field due to the use of a large aperture. The proposed method utilizes a dual-pixel sensor to capture two sub-apertures of a scene in a single image shot. The two sub-aperture images are used to calculate the appropriate lens position to focus on a specific scene area and are then discarded. A deep neural network architecture uses the discarded sub-aperture images to reduce defocus blur.
[0012] S.Woo, Y.H.R.Yu, and Y.O.Kim, “Ghost Free Deep High-Dynamic Range Imaging Using Focus Pixels for Complex Motion Scenes,” IEEE Transactions on Image Processing, vol. 30, pp. 5001-5016, discloses a deep learning technique for seamlessly blending multi-exposure low dynamic range images using a focused pixel sensor to simultaneously provide left and right luminance images and a full-resolution RGB image.
[0013] WO 2020 / 237366 A1 discloses a system and method for removing reflections from an image from a dual-pixel sensor by determining a first radiation of a left view and a second radiation of a right view and determining the disparity between the gradients. After iteratively minimizing the cost function, a confidence value and a weighted gradient map are determined to obtain a background layer and a reflection layer.
[0014] This method is described in more detail in A. Punnappuarath, MS Brown, "Reflection Removal Using a Dual-Pixel Sensor," in Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition, 2019, pp. 7628-7637.
[0015] SMWoo, YWHa, YOKim, “Super-Resolution Imaging Using a Focus Pixel Sensor,” in: IEEE Asia Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA-ASC), Japan, 2021, describes the fusion of multiple low-resolution focused pixel images with a normal image based on repeated channels and spatial tension layer structures.
[0016] G. Shataignier, B. Vandame, and J. Vaillant, “Joint Electromagnetic and Ray-Tracing Simulations for Quad-Pixel Sensor and Computational Imaging,” Optics Express, Vol. 27, No. 21, 14 October 2019, pp. 3046–3051, describes a design for a quad-pixel sensor with microlenses covering 2×2 subpixels, and a method for blending wave optics simulations with ray-tracing simulations to generate physically accurate synthetic images. Summary of the invention
[0017] Based on this known omnidirectional focusing sensor, in which each pixel, i.e. each common lens element and / or filter element, comprises a plurality of photosensitive elements, the object of the present invention is to provide an improved method for processing image data of such an image sensor as well as an improved image processor unit and a computer program.
[0018] The object is achieved by a method comprising the features of claim 1 and an image processor unit comprising the features of claim 13. Preferred embodiments are disclosed in the dependent claims.
[0019] A plurality of views are captured for each image, wherein each view comprises a matrix of selected sets of sub-pixel values for the matrix of pixels captured by the matrix of photosensitive elements for the image. Thus, for respective pixel positions associated with a common lens element and / or filter element, the plurality of finer sub-pixel values are assigned to and distributed over the set of views. Each view represents at least one of these finer sub-pixel values, but not all of the sub-pixel values for the pixel position, wherein the combined viewFigure 1 These multiple views of the image allow determination of different variations caused by effects such as crosstalk and shadowing effects caused by a common main lens and variations in sensitivity, brightness, exposure time associated with common lens elements and / or filter elements for pixel positions associated with a collection of sub-pixels.
[0020] According to the present invention, the method comprises the following steps:
[0021] - for each captured view of the image, determining a first change of sub-pixel values in the respective view separately from other views of the same image;
[0022] - determining a second change in sub-pixel value associated with the same position in the pixel matrix behind a corresponding lens element (7) and / or filter element (9) in a set of views of the same image;
[0023] - processing the image data of the image by using the determined first variation and second variation.
[0024] When capturing an image with sub-pixel values, the change in the sub-pixel values can be specified by using operators to determine different types of effects. Sub-pixels at common pixel positions associated with common lens elements (e.g., on-chip lenses) and / or filter elements do not behave similarly. They can differ in sensitivity and brightness. Brightness changes may also occur due to shadows from the common main lens. In addition, crosstalk may occur between photosensitive elements and their associated sub-pixel values. Exposure time also has an effect on sub-pixel values. These effects can be assigned to a set of operators, where each operator is associated with a first change in sub-pixel values in a corresponding view of the same image that is separated from other views, or is associated with a second change in sub-pixel values associated with the same position in a pixel matrix in a set of views of the same image.
[0025] The operations on the captured raw image data can be automatically performed by using a general image formation model representing the n-th view image. The general image formation model can be established by the following relationship:
[0026] Where n = 1, 2, .., N;
[0027] and
[0028] Y n =E n,m C n,m Y m , where n = 1, 2, .., N, m ≠ n;
[0029] Among them, Y n is the n-th view image pixel matrix, Fn is the color filter array subsampling operator associated with the nth view image pixel matrix, S n is a spatially varying and color-dependent lens shading operator for the n-th view image pixel matrix, X represents an unknown scene region of interest (ROI) with focal depth (D), represents a two-dimensional convolution operation, H n (D) is the point spread function associated with the n-th view image pixel matrix at constant focal depth (D), η n is the signal-dependent noise of the n-th view pixel matrix, E n,m is the color-dependent exposure change operator between the nth and mth view image pixel matrices, and C n,m is the wavelength and color-dependent crosstalk operator between the nth and mth view image pixel matrices, where C n,m Wavelength- and color-dependent crosstalk between sub-pixels that share a common position in a pixel matrix that share the same lens element and / or filter element is captured.
[0030] Processing image data captured by an on-chip lens-to-lens sensor by using the above mentioned image formation model is very efficient and allows taking into account multiple characteristics of the image sensor by correlating different matrices, operators and factors.
[0031] The processing of the image data of the image sensor may include the following steps:
[0032] - combining a set of views of an image by combining, for each position in said matrix, a plurality of sub-pixel values relating to a common position in said pixel matrix and pre-processing the combined sub-pixel values of the captured pixel matrix for the image;
[0033] - individually pre-processing the views by pre-processing the captured pixel matrix with a plurality of sub-pixel values of the respective view by evaluating the variations between sub-pixel values relating to the same position in the matrix; and
[0034] - Jointly preprocessing both the preprocessed combined pixel values of the captured pixel matrix in the set of views and the preprocessed pixel matrix of multiple sub-pixel values per position in the matrix for each view by using the evaluation results of said variations.
[0035] The image data are merged by combining a plurality of sub-pixel values. This allows determining changes between these merged image data of an image and image data in at least one view of the image.
[0036] Processing views of the image using the determined changes described by the operators of the image formation model allows pre-processing the combined view of the image, i.e. the pixel matrix comprising the combined pixel values, and the individual views of the image, i.e. the pixel matrix comprising the individual sub-pixel values, respectively. This provides an improved image processing flow that exploits the properties of the on-chip lens-omni-focus sensor.
[0037] The method exploits all image information captured by, for example, an OCL all-focusing sensor, without discarding the results after calculating the disparity.
[0038] For example, a plurality of sub-pixel values associated with a common pixel position in the set of views may be combined by automatically processing the sum of the sub-pixel values associated with the same position in the matrix to achieve a combined view comprising a summed and merged pixel matrix. Thus, sub-pixel values captured by photosensitive elements located, for example, under a common lens element and / or a common filter element are combined into one combined pixel value in the combined view by processing the sum of these pixel values.
[0039] A plurality of sub-pixel values associated with a common position in a set of views may be combined by automatically processing an average value of the sub-pixel values associated with the same pixel position in the set of views to achieve an average pixel matrix. Thus, the combined pixel value is processed for a pixel position of a pixel matrix associated with, for example, a common lens element and / or a common filter element by calculating an average value of the sub-pixel values in a set of views captured by photosensitive elements located under a common lens element and / or a common filter element.
[0040] Hence, sub-pixel values relating to a common pixel position in said pixel matrix are combined into a resulting common summed and / or averaged pixel value for the pixel position in said pixel matrix.
[0041] The pixel values in the multiple views of the combined image have the effect of increasing the brightness compared to the brightness of a single view, i.e., a sub-pixel value captured by only one photosensitive element. The combined pixel matrix reflects an image captured with a longer exposure time than a pixel matrix comprising only one sub-pixel value captured by one photosensitive element.
[0042] The captured view (i.e., the pixel matrix of the captured image) including multiple sub-pixel values for each position in the view can be preprocessed by using a set of pixel matrices, wherein each view in the set is a sub-pixel matrix including sub-pixel values of a related set of photosensitive elements. For a common position in the view related to a common lens element and / or a common filter element, each of these photosensitive elements of the related set has the same relative position in the group of photosensitive elements. Therefore, a set of sub-pixel values forms a pixel matrix of the view, i.e., the image. The sub-pixel values are captured by photosensitive elements, each of which has the same relative position relative to their associated pixel positions in the pixel matrix, i.e., the associated lens elements and / or filter elements. For example, when four photosensitive elements are placed under a common pixel position, i.e., a lens element and / or a filter element, the sub-pixels at the upper left position form a first pixel matrix, the sub-pixels at the upper right position form a second pixel matrix, the sub-pixels at the lower left position form a third pixel matrix, and the sub-pixels at the lower right position form a fourth pixel matrix.
[0043] The change in exposure characteristics may be assessed by associating a combined view of the image with at least one view of the image, the combined view representing a longer exposure time than a separate matrix of pixels each comprising a matrix of sub-pixel values, the combined view comprising combined pixel values processed from a combination of associated sub-pixel values at corresponding positions in the matrix, the pixel values each being captured by a corresponding photosensitive element.
[0044] Thus, by for example comparing the combined pixel values of the combined view with the associated sub-pixel values of the one of the views of the set, it can be used to evaluate characteristics of the image related to for example exposure time. For example, a summed and merged pixel matrix provides a set of pixel values captured by at least two image sensitive elements at pixel positions in the pixel matrix, the pixel positions being brighter, i.e. having summed increased pixel values. A pixel matrix comprising a sub-pixel value for a pixel position provides an image with characteristics like a shorter exposure time, i.e. only smaller single pixel values instead of larger merged pixel values. Differences in pixel values associated with common pixel positions in the pixel matrix are valuable information.
[0045] The view blur may be assessed by correlating relevant sub-pixel values of at least two views of the image.A first sub-pixel matrix of a first set of sub-pixel values may be correlated with a second sub-pixel matrix of a second set of sub-pixel values.
[0046] Because the scene is optically blurred based on the distance from the focal plane, there is a shift in parallax between the number N of sub-aperture (focal) views. This parallax depends on the depth at the blur shape. The parallax between the number N of views can be modeled as an explicit shift of the image content with sub-pixel precision. The shift estimation can be simplified when a common pixel position in the shared pixel matrix, i.e., sub-pixels of a common on-chip lens and / or filter element, have the same exposure. Due to the split pixel arrangement, the parallax is directional, with a specific direction for a specific view. This allows for a simpler estimation of the shift since the surge direction is known.
[0047] The sub-pixel matrices can be associated with each other by automatically processing the difference at each position in the matrix as the difference between the sub-pixel values of one sub-pixel matrix of the set of sub-pixel matrices and the sub-pixel values of another sub-pixel matrix of the same set of sub-pixel matrices.
[0048] Thus, for each pixel position in the view, i.e. the pixel matrix of interest, at least one difference value is processed from sub-pixel values associated with the same pixel position, i.e. a common lens element and / or filter element. The resulting at least one pixel matrix comprising the resulting different values for each pixel position of interest can be stored and used for further processing of the image data to achieve an improved pre-processed image of the image sequence.
[0049] The disparity between views of an image captured by the image sensor may be automatically estimated, wherein the disparity of sub-pixel values relating to the same pixel position is determined.
[0050] Hence, sub-pixel values relating to different relative positions in common pixel positions of the pixel matrix, ie sub-pixel values in different relative positions relating to common lens elements and / or filter elements, are correlated with each other in order to find the parallax.
[0051] A depth value of the captured image may be automatically estimated, the depth value representing a focal depth of the captured image in relation to a focal plane of the image sensor.
[0052] The depth value can be obtained from the difference in sub-pixel values at a common pixel position in the pixel matrix, i.e., the difference between a set of sub-pixels associated with a common lens element and / or filter element due to the relative displacement of image sensor elements below the common lens element and / or filter element.
[0053] The method can be implemented as a routine in an image processor unit, i.e. by programming the processor accordingly, or by providing the image processor unit with appropriate hardware logic to perform the above mentioned method steps. Thus, the image processor unit can be implemented as a programmed microcontroller, microprocessor, or in the form of dedicated hardware and software logic, such as an ASIC, or as hardware logic, such as an FPGA. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The present invention is further described by way of example by means of the accompanying drawings. It is shown that:
[0055] Figure 1 -Block diagram of an image camera including an image sensor and an image processor unit;
[0056] Figure 2 - a flow chart of an embodiment of a method for processing image data;
[0057] Figure 3 - a flow chart of an exemplary second part of a method for processing image data;
[0058] Figure 4 - a schematic pixel matrix captured by an image sensor and a related set of pixel matrices processed from the captured pixel matrix;
[0059] Figure 5 - A diagram of the focusing effect of the on-chip lens sensor according to the focal plane;
[0060] Figure 6 - a flow chart of an exemplary method for processing image data;
[0061] Figure 7 - A flow chart of an exemplary method for constrained block matching. DETAILED DESCRIPTION
[0062] Figure 1 An exemplary schematic block diagram of an image processor unit 1 is presented, wherein the image processor unit 1 comprises a camera 2 and a processor for processing raw image data IMG provided by an image sensor 4 of the camera 2. RAW Image processor unit 3.
[0063] The image sensor 4 includes a pixel array P x,y , that is, the pixel matrix, so that the original image IMG RAW is a dataset provided by a matrix of pixels for each image.
[0064] The camera 2 comprises an optomechanical lens system 5, such as a fixed uncontrolled lens 15 or a variable controllable lens system.
[0065] The photosensitive element group of the image sensor 4 is placed behind the common lens element 7. Therefore, light passing through one lens element 7 of the lens matrix 6 reaches at least two photosensitive elements associated with this lens element 7. For example, the photosensitive element group can be a group of two elements placed adjacent to each other in the horizontal direction, or a group of four photosensitive elements placed in two rows and two columns behind the common lens element 7.
[0066] In order to capture the colors in the image, a color filter array 8 (CFA: Colour Filter Array) comprising a matrix of filter elements 9 having alternating different filter characteristics (e.g. Bayer RGGB, RGBE, RYYB, CYYM, CYGM, RGBW, RGBW#1...3, X-Trans, Quad Bayer, RYYB Quad Bayer, Nonacell, RCCC, RCCB, etc.) may be (optionally) arranged in the light path before the image sensor 4. Preferably, the color filter array 8 is placed between the lens matrix 6 and the photosensitive elements of the image sensor 4. The color filter array 8 may also be placed before the lens matrix 6, i.e. between the lens system 5 and the lens matrix 6.
[0067] The group of photosensitive elements of the image sensor 4 assigned to a common lens element 7 may share a common filter element 9, i.e. the same color. In another embodiment, each photosensitive element of the image sensor 4 may also have its own specific filter element 9, which has the same color as a group of filter elements 9 assigned to the same lens element 7, or at least partially has another color compared to the other photosensitive elements of the group.
[0068] The image processor unit 1 may be incorporated into a handheld device such as a smartphone, a tablet, a wearable device, a camera or a camcorder or the like.
[0069] The image processor unit 1 is arranged to process the image IMG from the image sensor 4 which captures the image RAW , wherein frames are also considered to be images in the sense of the present invention.
[0070] The image processor unit 3 may be incorporated in the image camera 2 or provided as a separate unit connected to the image camera 2 by wire or wirelessly.
[0071] The image processor unit 3 is arranged to process the raw image data IMG RAW Preprocessing is performed to achieve the final image IMG FIN . This also includes the option to receive a sequence of final frame images.
[0072] Figure 2is to process the image data IMG captured by the image sensor 4 RAW An exemplary flow chart of a method of . An image sensor 4, such as a multiple on-chip lens sensor, such as a 2×2 OCL sensor, captures different information about a scene using sub-aperture views.
[0073] The camera can perform 3A control for automatic exposure, automatic balance and automatic focus control.
[0074] In the first sequence PRE_1, a plurality of sub-pixel values IMG associated with the composition in the pixel matrix TL、TR、BL、BR The sum of the pixel values of the photosensitive element groups associated with the common lens element 7 is summed to obtain the resulting summed pixel value of the pixel position in the pixel matrix associated with the common lens element 7.
[0075] In a second pre-processing procedure PRE_2, a plurality of n pixel values IMG captured by the photosensitive element group associated with the common lens element 7 are processed. TL、TR、BL、BR are preprocessed separately from each other. Therefore, a set of N pixel matrices, each including sub-pixel values for a specific position in the pixel matrix, is preprocessed separately from the combined summed merged image of step a1) in the sequence PRE_1. The captured pixel matrix including multiple sub-pixel values for each position in the pixel matrix is processed by using a set of pixel matrices in the preprocessing sequence PRE_2 starting with step a2). Each view captured by the image sensor in the set of image views includes a pixel matrix having a sub-pixel matrix for each pixel position, the sub-pixel matrix including sub-pixel values captured from a set of related photosensitive elements. For common positions in the pixel matrix, each photosensitive element of the relevant set having the same relative position in the photosensitive element group is associated with a common lens element 7 or a common filter element 9.
[0076] Both individual sequences PRE_1 and PRE_2 can provide, in steps b1) and b2), for example a black level correction of the summed combined original image (step b1)) or of the N focused images (step b2)).
[0077] In addition, each of the pre-processing procedures PRE_1 and PRE_2 may include steps c1) and c2) of performing crosstalk correction on the summed and merged original image (step c1)) and performing crosstalk correction on the N focused images respectively (step c2)).
[0078] Furthermore, the separate pre-processing flows PRE_1 and PRE_2 may include steps d1) and d2) of lens shading correction LSC for the summed and merged original image (step d1) and lens shading correction LSC for each of the N focused images (step d2).
[0079] As a result, statistical control values (3A statistics) can optionally be obtained from the results of two separate pre-processing sequences. This statistical data can be used for 3A control.
[0080] N focused images IMG TL、TR、BL、BR The preprocessing process PRE_2 may be followed by a disparity estimation step e). The result of the disparity estimation may be used for 3A control.
[0081] Furthermore, the result can be used in an additional step f) of depth estimation.
[0082] The results of the individual preprocessing PRE_1 and PRE_2 of the summed and combined raw image and the N focused images can all be used as inputs to further preprocessing steps g) for white balancing, h) for raw image denoising, i) for defective pixel correction and j) for a computational photography engine CPE. The computational photography engine CPE may include at least one of a set of image processing routines based on the results of the individual preprocessing flows and the combined preprocessing flows and the results of step e) of disparity estimation DispEst and depth estimation DepthEst.
[0083] White balance can be further controlled by 3A controls.
[0084] In 3A control, the sensor can be exposed according to the feature for the focused image of the summed image. For example, an exposure variation shift of, for example, log2(1 / N) can be controlled between the view and the summed image. Sub-pixel exposure variation is possible. For step g) of white balancing, the same white balance can be applied to the focused image and the summed image, i.e. to the results of two separate pre-processing flows.
[0085] Automatic focusing statistics can be achieved based on unidirectional parallax and multi-directional parallax.
[0086] Figure 3 Shows Figure 2 An exemplary flow chart of a continuation of the process shown in .
[0087] Step j) of computing the photography engine CPE may include at least one process from the set of processes:
[0088] Raw image demosaicing, raw image alignment, raw image fusion, synthetic bokeh, dehazing, chroma denoising, color image alignment, color image fusion, defocus deblurring, masked glare removal, and the like.
[0089] Bokeh is the aesthetic quality of blur produced by the out-of-focus portions of an image. Differences in lens aberrations and aperture shape can result in very different bokeh effects.
[0090] Step j) of the computational photography engine may be followed by a combined post-processing of the image or image sequence processed in step j). These post-processing steps may include a step k of color correction, a step l of local tone mapping LTM, a step m of global tone mapping, a step n of sharpening and the like. These post-processing steps may be provided in the form of additional separate processing routines of the processing unit. These post-processing steps may also be part of the computational photography engine CPE.
[0091] These pre-processing and post-processing steps of CPE are generally known and are currently performed based on the combination of sub-pixel values of the captured pixel matrix.
[0092] The method for processing image data may be based on a computational photography engine having as input pixel matrices a pre-processed N-focus image and a pre-processed summed merged image separated from each other. In addition, the computational photography engine may also include an estimated disparity and an estimated depth as input. This provides increased image information related to the characteristics of the on-chip lens image sensor.
[0093] The computational photography engine can provide full-color images with high quality, high dynamic range, high resolution, and noise reduction and sharpening at the output.
[0094] Figure 4 An exemplary pixel matrix comprising a matrix of 4x4 pixel positions in the matrix is presented. The pixel matrix represents a view of an original image captured by the image sensor 1, or represents a portion of a larger view of an image shown in a small segment. Each pixel position is associated with a common lens element 7. Therefore, a set of 2x2 photosensitive elements are placed behind the common lens element 7. For each pixel position, there is a top row T and a bottom row B and a left column L and a right column R. The four photosensitive elements provide pixel values of top left (TL), top right (TR), bottom left (BL) and bottom right (BR) for each sub-pixel position after the common lens element 7 in the pixel position of the pixel matrix.
[0095] The image sensor 4 captures these sub-pixel values TL, TR, BL, BR for each image and provides a pixel matrix 10 comprising sets of sub-pixel values.
[0096] In step a1), sub-pixel values associated with the components in the pixel matrix are combined to obtain a resulting combined pixel value for each pixel position in the pixel matrix. For example, the summed combined pixel matrix 11 is automatically processed by summing the pixel values for each pixel position and associated color.
[0097] For example, the summed pixel values S(red), S(green), and S(blue) are processed from the sub-pixel values TL(RGB), TR(RGB), BL(RGB), and BR(RGB) according to the following formula:
[0098] TL(R)+TR(R)+BL(R)+BR(R)=S(R)
[0099] TL(G)+TR(G)+BL(G)+BR(G)=S(G)
[0100] TL(B)+TR(B)+BL(B)+BR(B)=S(B)
[0101] Where R = red, G = green, B = blue.
[0102] Optionally, additional combined pixel values S(color) may be obtained for other colors or white depending on the color filter array.
[0103] The pixel matrix 11 represents the combined pixel values of the captured pixel matrix 10 .
[0104] Furthermore, in a separate pre-processing stream, a plurality of sub-pixel matrices 12a, 12b, 12c, 12d may be obtained.
[0105] Each of the number N sub-pixel matrices (N focal images) comprises one specific sub-pixel value for each pixel position of the pixel matrix 10 captured by the corresponding photosensitive element. Each pixel matrix 12a, 12b, 12c, 12d in the set is a sub-pixel matrix comprising sub-pixel values TL (color), TR (color), BR (color), BL (color) of a related set of photosensitive elements, which have the same relative position in the group of photosensitive elements for a common position in the pixel matrix associated with a common lens element. Thus, the first sub-pixel matrix 12a comprises the sub-pixel value TL (color) at the upper left position in the 2x2 sub-pixel matrix for each pixel position. The second sub-pixel matrix 12b comprises the upper right sub-pixel value TR (color), the third sub-pixel matrix 12c comprises the lower left sub-pixel value BL (color), and the fourth sub-pixel matrix 12d comprises the lower right sub-pixel value BR (color). The respective colors of the sub-pixel values depend on the associated lens element or, optionally, the filter element of the associated sub-pixel photosensitive element.
[0106] Independently of the combined pixel matrix 11 starting with step a1), Figure 2 The obtained set of sub-pixel matrices 12a, 12b, 12c, 12d is pre-processed in the flow starting from step a2).
[0107] These different views of the same image contain different information. Performing this individual and combined pre-processing can result in better image quality for the resulting final image.
[0108] Figure 5 A flow chart of a method for processing image data of an image sensor 4 is presented, showing the pre-processing of different views in more detail.
[0109] In step a1), the reference view V is processed using a specific color channel interpolation, for example, a green channel interpolation GCI. REF . Select N views V of the image 1、2、....、N-1 As a base view, for example, REF It can be a TR view. In this example, the color channel with the highest sampling or providing more details than other channels is selected for the reference view. In step b1), smoothing is performed, for example, by low pass filtering LPF.
[0110] In step a2), the alternative view V ALT_1、2、...、N-1 are processed separately from each other and are related to the base view V REF Separately process. Using the relevant pixel matrix, in the corresponding alternative view V ALT_1、2、...、N-1 , = V1, V2, ..., V N-1 , for example, color channel interpolation CCI is processed on TL, BL, and BR views, for example, green channel interpolation GCI.
[0111] Steps a1) and a2) may include smoothing, for example by low pass filtering. One purpose of smoothing is to make an estimate robust to noise.
[0112] Due to the positions of the TR, TL, BL and BR views in the full resolution original data, the shift directions of the alternative views are known. This allows simplification and speedup in the subsequent step b) of constrained block matching and restriction on the search direction.
[0113] This step b) is followed by a step c) of sub-pixel refinement using the result of step d) which determines a foreground and / or background map MV-R providing estimated motion model parameters. This motion model is translational.
[0114] Finally, the displacement estimate is processed in step e).
[0115] In the following, the characteristics of the OCL all-focusing sensor are explained and based on these characteristics, the proposed image formation model is described in more detail. This model helps in applications such as disparity estimation, autofocus, demosaicing, multi-view fusion and many other applications.
[0116] The on-chip lens (OCL) all-focusing sensor has a unique design. Multiple (N) sub-pixels with their own photodiodes are housed under the same shared microlens 7, and each of these photodiodes 14a, 14b can independently detect light and record a corresponding signal. The incident light through the OCL is split into N directions, so that N sub-aperture views of the scene are captured simultaneously (see Figure 5 ). In a sense, the focusing sensor is like a crude N-view light field camera.
[0117] In detail, in a dual pixel OCL sensor, where the OCL is shared by two sub-pixels, eg, left and right sub-pixels, the result is 2 views of the scene; left and right, since the incident light is split into left and right directions.
[0118] Similarly, in a quad-pixel OCL sensor, where the OCL is shared by 2x2 sub-pixel groups, the result is four views of the scene; top left (TL), top right (TR), bottom left (BL), and bottom right (BR) views, as the light is split in these four directions, and so on. Figure 4 It is shown in Figure 4 A 4x4 pixel matrix with 16 sub-pixels TL, TR, BL, BR of a 2x2 OCL all-focusing sensor is shown.
[0119] The OCL all-focusing sensor can be operated in different modes, such as native full-resolution mode, re-mosaiced full-resolution mode, or a merged version of either mode. As an example, Figure 4 The pixel matrix in depicts the summing, merging and focusing image arrangement of a 2x2 OCL sensor with a quad-Bayer color filter array (QB-CFA).
[0120] Specific operating modes are selected to achieve optimal performance in certain conditions or to enable certain features. For example, in summing mode, sub-pixels are combined into larger pixels with higher sensitivity, resulting in better low-light performance.
[0121] like Figure 6As shown, the disparity between the N sub-aperture views increases as the scene moves away from the focal plane in the forward or backward direction (in front of or behind the focal plane). Therefore, signed unidirectional / multi-directional disparity is derived from multiple views (focused images), which is then used to calculate the optimal lens position for high-precision and high-speed autofocus. Typically, the focus images (or images derived from them) are discarded by the camera hardware after the disparity is calculated. The type of data passed through the image signal processor is determined based on the operating mode selected for the intended functionality or use case.
[0122] Regardless of the specific sensor design in terms of OCL, sub-pixel color filters and their arrangement, and exposure settings, an OCL all-focusing sensor can have / provide some key characteristic In fact, these characteristics can trigger sensor vendors to adopt advanced sensor design techniques, which will allow new operation modes and thus provide differentiated features for the consumer market. In the following, these characteristics are discussed in order to lay the foundation for the proposed image formation model and the proposed image processing pipeline.
[0123] 1. Brightness changes between views
[0124] Because the N views are captured by the same sensor, they should be synchronized in time and space. However, the sub-pixels sharing the common lens element 7 (OCL) do not need to have the same exposure. They can have different per-pixel exposures, for example, a quad-Bayer filter array (QB-CFA) with short and long exposures. This is a technique often referred to as Digital Overlap HDR (High-Density-Resolution) or DOL-HDR (Digital-Overlap-HDR). Due to the camera main lens shading effect and possible per-subpixel exposure settings, the N views will experience inter-view brightness variations that need to be considered (or even exploited) in the image processing and fusion operations.
[0125] 2. Different exposures in a single shot
[0126] Due to the split sub-pixel arrangement under the OCL, the incident light is split into multiple (N) directions. When the sub-pixels sharing the OCL have the same exposure, the exposure of the focused image is approximately 1 / N of the exposure of the summed image. This is approximate because the splitting in the actual sensor will not be perfect. The result is an exposure value of the focused image EV~log2(1 / N); the focused image will actually have less exposure than the summed image, and the saturated bright areas in the summed image will not be saturated in the focused image. Therefore, the collection of the summed image and the focused image can be regarded as an image captured with two different exposures, where the exposure value EV~log2(1 / N), enabling HDR imaging from two exposures in a single shot. If M shots with M exposure times are captured by an OCL full-focus sensor, the effective number of different EVs will be ~2M, thereby enabling HDR fusion from 2M exposures.
[0127] The above can be generalized to the case where N sub-pixels have different exposures, such as the cases emphasized above for long exposure and short exposure. Therefore, in a single capture, the OCL all-focusing sensor can effectively provide multiple images with different exposures, each containing different information about the captured scene. The fusion of images captured in a single shot (or images from multiple shots) can realize various computational photography (CP) functions, such as HDR, joint demosaicing with HDR, joint HDR with SR (super resolution), to name just a few possibilities.
[0128] 3. Parallax as blur shift or pixel shift
[0129] Because the scene is optically blurred based on the distance from the focal plane, there is a shift or parallax between the N sub-aperture (focused) views, and this parallax depends on the depth and shape of the blur kernel. The parallax between the N views can be modeled as an explicit shift of the image content with sub-pixel precision. The shift estimation is simplified when the sub-pixels sharing the OCL have the same exposure (and white balance). In addition, due to the split pixel arrangement, the parallax is directional, with specific directions for certain views. This fact also simplifies the estimation of the shift because the search direction is known. The search size of possible parallax depends on the scene depth and shape of the blur kernel, but is relatively small, typically on the order of a few pixels.
[0130] For out-of-focus scene regions (far from the focal plane in the forward or backward direction), the effective (defocus) blur will vary greatly between views, and modeling the disparity as an explicit pixel shift will fail and lead to erroneous disparity estimates. In fact, it should be noted that the difference in the point spread function (PSF) of the sub-aperture views produces the disparity, not an explicit shift of the image content.
[0131] Parallax is the result of PSF differences
[0132] Without loss of generality, let us consider the case of a 2x2 OCL fully focused sensor, such as a sensor with a QB-CFA arrangement (QB = Quad Bayer). At a constant depth D, let H TL , H TR , H BL and H BR Denote the point spread functions PSF of TL, TR, BL and BR views respectively. Let X denote the unknown scene ROI with depth D. These four views can be expressed as
[0133]
[0134] η noise is the signal-dependent noise. It is assumed here that crosstalk and sensitivity as well as lens / color shading correction are performed. Then, the horizontal and vertical disparity between views can be expressed as
[0135]
[0136] As can be seen from Equations 7-10, the difference in the inter-view PSFs of the sub-aperture views produces disparity rather than an explicit shift of the image content.
[0137] When N sub-pixels have different exposures, such as the cases highlighted above for long and short exposures, the disparity estimate will be expressed not only as a pixel shift estimate and / or blur difference estimate, but will also include a photometric shift estimate due to the varying exposure of the N sub-pixels, unless brightness variations are considered before / in the disparity estimation algorithm. Whether the exposure is constant or varying for the sub-pixels sharing the OCL, the main lens shading will cause inter-view brightness variations, i.e., photometric shifts between views. This variation also needs to be considered before / in the disparity estimation solution.
[0138] The constrained displacement model described above is an example of a disparity estimation block in the pipeline. Based on the understanding of blur characteristics, the displacement model can be easily generalized to other types of sensors, such as OCL sensors that provide more than four views (N>4).
[0139] 4. Fuzzy symmetry between views
[0140] When the scene is far from the focus plane, defocus blur occurs. Due to the split sub-pixel arrangement, the defocus blur is split between views, resulting in different point spread functions for different views. As mentioned before, the difference between the set of N point spread functions is what actually causes parallax.
[0141] The point spread functions of the N views vary in a complex way and depend on multiple factors, such as the main lens focal length, aperture diameter, pixel angular response, scene depth, amount of defocus, and focus distance from the camera. That said, due to the OCL and sub-pixel splitting design, those N point spread functions will approximately exhibit symmetry.
[0142] For example, for a dual-pixel OCL full-focus sensor, the point spread function of the left view will be approximately equal to the right view point spread function flipped about the vertical axis. And for a quad-pixel OCL full-focus sensor, the TL view point spread function PSF will be approximately equal to the BL view point spread function PSF flipped about the horizontal axis, and so on. Due to imperfections in the positioning of the OCL, crosstalk between sub-pixels, and other manufacturing limitations, this symmetry is only approximate. The shape of the defocus blur and the N view point spread functions can be parameterized as a translation disk, a decaying Gaussian function, or any other shape that can be derived from factory or laboratory calibration. Regardless of the defocus blur model, splitting it into symmetric (mirror) point spread functions between N views is a very useful hint, which can enable various computational photography functions such as reflection removal, glare removal, defocus deblur, SR, HDR, to name just a few examples.
[0143] Disparity Estimation Block
[0144] In the following, by using Figure 6 To explain in more detail Figure 5 The disparity estimation block in e).
[0145] Figure 6 A schematic diagram is presented comprising a side view of an image sensor 4. A row of photosensitive elements is shown, wherein a pair of photosensitive elements 14a, 14b per row are placed adjacent to each other in a common row below a common lens element 7. A row of the pixel matrix comprises a plurality of lens elements 7 placed adjacent to each other in a row and correspondingly in a column, as shown in FIG. Figure 4 shown.
[0146] Each lens element 7 is a microlens formed integrally on the sensor chip of the image sensor 4 .
[0147] The image camera 2 further comprises an optical lens system 15 comprising at least one lens (ie an objective lens).
[0148] The lens 15 has an associated focal plane FP. The light beam that passes through the lens 15 starting from the point source P depends on the position of the point source P relative to the focal plane FP.
[0149] exist Figure 6At the left part a) of the image sensor, the point light source P is located on the focal plane FP. This causes the light beam to be focused on a microlens 7 and the associated photosensitive element 14a, 14b behind the common lens element 7. The distance between the objective 15 and the focal plane FP corresponds to the distance between the objective 15 and the plane of the lens element 7 of the image sensor.
[0150] Figure 6 The middle part b) of FIG. 1 presents the situation where the point light source P is located at a greater distance from the focal plane FP. This results in a focusing of the light beam starting from the light point P. The focal point of the objective 15 is therefore placed before the lens element 7 and between the plane of the lens element 7 and the objective 15. Therefore, the light beam is then widened and passes through a plurality of lens elements 7 and the associated photosensitive elements 14a, 14b. It can be seen that the light beam is not evenly distributed on all photosensitive elements 14a, 14b behind a common lens element. This depends on the angle of incidence of the light beam through the lens element 7.
[0151] Figure 6 c) shows the case where the point light source P is behind the focal plane and closer to the objective lens 15. The focus of the objective lens 15 is then located behind the image sensor, so that the light beam passes through multiple lens elements 7. The photosensitive elements 14a, 14b after the common lens element are affected differently depending on the angle of incidence of the light beam passing through the corresponding lens element 7.
[0152] According to the focus of the image camera 4, that is, the position of the light source point P relative to the focal plane, the displacement of the image, that is, the sub-pixel value, is generated.
[0153] For example, when each full-resolution frame can be divided into four views, top right (TR), top left (TL), bottom left (BL), and bottom right (BR), the pixel values TR, TL, BL, BR are different from each other according to displacement. One of the views, for example, the TR view, can be set as a reference frame.
[0154] When the point light source P is in front of the focal plane, the following sub-pixel level shift S results. In the following, the shift from the TR view (reference view) to the alternative views TL, BL and BR is listed:
[0155] view xShift y shift TL +s Almost negligible BL +s -s BR Almost negligible -s
[0156] In the case where the point light source P is behind the focal plane, the sub-pixel level shift s from the reference view TR to the alternative view will be as follows:
[0157] view xShift y shift TL -s Almost negligible BL -s +s BR Almost negligible +s
[0158] When the scene is in front of the focal plane or behind the focal plane, the blur kernel works in the opposite direction. The direction of the blur itself, whether + or -, is determined by the position of the view in the N sub-pixel grid and the position of the scene relative to the focal plane. Furthermore, in the ideal case, assuming perfect OCL symmetric positioning and no aberrations and no other sensor imperfections, the amplitude s is constant for the TL, BL and BR views. This assumption is OK for computing the disparity parameter s to a reasonable accuracy, which is sufficient for moving the lens for autofocus, or for multi-view fusion, or demosaicing, or any other process that requires knowledge of the disparity between views.
[0159] Basically, the displacement directions of the views are known. For a 4-view OCL sensor (N=4), they are listed in the table. Therefore, the search direction of s is known and can be constrained. This speeds up the calculation. The explained model can be generalized to any number and is not limited to the exemplary shown N=4 view OCL sensor. The method can also be applied to views N>4 accordingly.
[0160] In the following, the proposed image formation model is explained.
[0161] Proposed image formation model
[0162] Now that some of the key characteristics of OCL all-focusing sensors have been discussed, a general image formation model is outlined below. The purpose of this model is to serve as a basis for the order of operations in an image processing pipeline and, by extension, as a basis for image processing / fusion algorithms; in particular, determining the requirements for image processing by a certain algorithm.
[0163] The following symbols are used:
[0164] -Y n : The nth view (focus) original image
[0165] -Y sum : The sum of N views merged image
[0166] -E n,m : Color-dependent exposure change operator between the nth view and the mth view
[0167] -C n,m : Wavelength and color-dependent crosstalk operator between the nth view and the mth view
[0168] -S n : Spatially varying and color-dependent lens shading operator for the nth view
[0169] -H n (D): PSF associated with the nth view image at constant depth D
[0170] -F n : The color filter array subsampling operator associated with the nth view image
[0171] -η n : Signal-dependent noise for the nth view
[0172] Sum corresponds to the defocus blur kernel at a constant depth D. The collection of PSF, Reasonably subject to certain conditions:
[0173] 1. Non-negativity; H n ≥0
[0174] 2. Symmetry between views
[0175] 3. The contributions between views are equal; if the defocus blur is isotropic, then ∑H n ≈1 / N.
[0176] Let X denote the unknown scene ROI with depth D. Following the above notation, at a given exposure time, the nth view image can be represented as:
[0177]
[0178] Y n = E n,m C n,m Y m , n=1,2,..,N, m≠n (2)
[0179] in represents a 2D convolution operation. If the exposure varies for the sub-pixels sharing the OCL, the N views are related to each other by means of an exposure variation operation, which can be simplified to a linear operator if the sensor operates in a linear range. This operator is uniform when all views have the same exposure. C n,m Capturing wavelength- and color-dependent crosstalk between sub-pixels sharing the same OCL.
[0180] The proposed image formation model does not make any assumptions about the color filter arrangement under the OCL; sub-pixels sharing the same OCL can have similar or different color filters. In addition, the model does not restrict the operating mode of the OCL full-focus sensor, for example, with respect to sub-pixel exposure settings or binning types.
[0181] Constrained Multi-view Block Matching
[0182] By using the incoming multiple views or view regions of interest (ROI), constrained multi-view block matching can be handled not only for accurate registration but also for enhanced performance (see Figure 5 The output is a translation transform from the base view to the alternative view with constant shift and symmetric sign (sub-)pixel accuracy. Figure 7 The schematic diagram of constrained multi-view block matching is described in the following exemplary pseudo code:
[0183] A) Example pseudocode for constrained block matching:
[0184]
[0185]
[0186] B) Pseudocode for translation estimation:
[0187]
[0188] Constrained block matching is based on the idea of block matching algorithms and runs faster on multi-view datasets because only one direction of the search for the block is required. This constrained block matching allows the registration of three views simultaneously.
[0189] Before constrained block matching, the base view TR and the other three alternative views, namely TL, BL and BR, are interpolated through their main channels. First, for each image patch in the base view -TR, the sliding image patches of TL, BL and BR in the alternative views are calculated. For TL - only horizontal search, for BL - only diagonal search, for BR - only vertical search, a one-dimensional search is performed.
[0190] For this symmetric search, only one cycle of step_S from -max_S to max_S is used to calculate the coordinates of image blocks TL, BL and BR. The calculation of each alternative image block position is as follows:
[0191] patch_TL_X=patch_TR_X-step_s
[0192] patch_TL_Y=patch_TR_Y
[0193] patch_BR_X=patch_TR_X
[0194] patch_BR_Y=patch_TR_Y+step_s
[0195] patch_BL_X=patch_TR_X-step_s
[0196] patch_BL_Y=patch_TR_Y+step_s,
[0197] The sign of step_s is hard coded in these formulas and then the same sign of step_s is applied to form the translation matrix. In the Y direction, the sign of step_s is applied directly and in the X direction the opposite sign of step_s is applied.
[0198] To calculate best_step_s, the brightness changes of the changed image blocks are compensated using the TR image block. Then, the cost of each compensated changed image block TL / BL / BR for each step is calculated by the mean of the absolute difference (MAD: mean of absolutedifference) between the reference image block TR and the changed image block TL / BL / BR, and the image block costs are summed up to form the total cost of each step. Finally, best_step_s and min_cost_value are calculated for each image block relative to the minimum cost of all steps. For each image block from the reference frame TR, the number of best steps - best_step_counter for each image block is counted, and the sub-pixel shift of each image block with best_step_s is calculated.
[0199] Sub-pixel shift sub-block
[0200] To calculate the sub-pixel shift for each changed image block, the Taylor approximation algorithm is applied to calculate the sub-pixel refinement between TR and TL / BL / BR. The sign of the sub-pixel shift is taken relative to the larger absolute value of the sub-pixel shift in the vertical direction. Finally, the sub-pixel shift is calculated by the average between the x-shift of TL, the y-shift of BR and the x-shift and y-shift of BL.
[0201] Estimating integer global translation
[0202] Step_s_index - Step_s_index is derived from the counter array of best_step_s and then converted to a global shift integer.
[0203] Estimating the optimal sub-pixel step size
[0204] For each image block in the reference frame TR, the optimal sub-pixel step size is applied only if the image block has a global integer translation, and sub-pixel shifts greater than 1 will not be considered.
[0205] Compute global translation for sub-pixel steps
[0206] The sub-pixel global shift is calculated by taking the average of all the best sub-pixel step sizes.
[0207] Computational complexity analysis
[0208] Complexity is expressed here in big-O notation (O notation) to provide an approximate prediction of the running time of the algorithm as a function of the number of pixels to be processed.
[0209] parameter describe H×W Input frame / frame ROI size; H = height, W = width L×L The size of the block to match the square block; height = width = L P Block match search size in pixels A Change the number of views to 3
[0210] Complexity estimation of constrained and unconstrained multi-view block matching
[0211]
[0212] As can be seen from the above table, constrained block matching runs faster than the traditional global motion estimation using block matching algorithm.
[0213] Proposed image processing pipeline
[0214] In the following, the proposed image processing pipeline following the image formation model (based on the characteristics of the OCL all-focusing sensor) is explained. The image processing pipeline can be used to properly process image data to maximize image quality, SW / HW efficiency and implement various functions.
[0215] Based on the introduced image formation model, the order of operations in the image processing pipeline for processing OCL full focus data for CP development is depicted below. It is worth mentioning that not all sensor operation modes are included in this pipeline. The processing order related to CP is the main concern. In addition, the proposed data flow aims to maximize data sharing to reduce CPU cycles and minimize memory requirements. Some key operations are discussed in detail below.
[0216] A. Sensor output data
[0217] The OCL all-focusing sensor provides rich information content, which enables various CP functions in addition to the obvious advantage of autofocus. Typically, phase images (or their differences) are used for disparity estimation and are subsequently discarded by the camera hardware. However, the focused images enjoy unique characteristics relative to the non-phase summed images, and exploiting them will enable various computational photography features. Therefore, in the proposed image processing pipeline, the two data outputs from the all-focusing sensor are:
[0218] 1.N focused (phase) images
[0219] 2. Sum and merge the image (higher sensitivity, no phase information)
[0220] B.3A Control
[0221] 3A (Auto Exposure, Auto White Balance and Auto Focus) algorithms are key algorithms in most modern consumer cameras. In the proposed image processing pipeline, 3A statistics are calculated from the sensor raw data. In particular, AE (Automatic Exposure) and AWB (Automatic White Balancing) algorithms use statistics calculated from the summed image or the focused image. This method will produce an EV shift of about log2(1 / N) between the focused image and the summed image. The same white balance gain is applied to the summed image and the focused image. The AF (Automatic Focusing) algorithm will utilize statistics calculated from the unidirectional / multidirectional disparity estimation algorithm in order to decide the best lens position for focusing the ROI.
[0222] In the case where sub-pixels are allowed to have different exposures, AE / AWB statistics can be calculated from either the same exposure sum-merged image (e.g., long exposure or short exposure sum-merged image) or one of the same exposure focused images. Regardless of the approach, an EV shift will be observed between the sum-merged image(s) and the corresponding focused view.
[0223] C. Pixel data pre-processing / post-processing
[0224] In addition to black level correction, the summed and merged images and the focused image may need to be corrected for crosstalk because the separation between sub-pixels under OCL will not be perfect and light passing through one sub-pixel may leak into adjacent sub-pixels. In addition, due to the main lens shading, not only will the summed and merged image experience color lens shading, but the N views will also experience inter-view brightness variations due to the combined effects of lens shading and directional integration of light in different views (as described above). Lens shading correction is performed to compensate for brightness variations in the summed and merged images and the focused image. Image denoising (and defective pixel correction) in the original domain is also performed. The images output from the CP engine are post-processed for color correction, local / global tone mapping, sharpening, and other image enhancement and color rendering operations.
[0225] D. Disparity and Depth Estimation
[0226] After correcting the effects of lens shading (which manifests itself as color-dependent brightness variations on the image) for the N views, the inter-view unidirectional / multi-directional disparity is calculated and used to provide statistics for the AF algorithm to drive the lens motion for optimal focus of the scene focus ROI. From the estimated disparity, a depth map is constructed by the depth estimation block. The depth map is then utilized in the CP engine to implement multiple functions such as defocus deblur, synthetic bokeh, to name a few examples.
[0227] E. Computational Photography Engine
[0228] In the proposed pipeline, the computational photography engine contains a collection of algorithms that operate on one or more of the following inputs:
[0229] - Estimated scene parallax
[0230] -Estimated scene depth
[0231] - Preprocessed and merged images
[0232] - Preprocessed focused image
[0233] And the engine output undergoes image enhancement post-processing operations such as color correction and sharpening, contrast enhancement, and other image enhancement operations. The CP engine may include (but is not limited to) the blocks described below. The details of these blocks depend largely on the underlying algorithm design and are left to other independent disclosures.
[0234] The following table summarizes the possible input data for each CP block. Of course, there are dependencies between blocks; for example, image alignment is a key step for the success of several multi-image fusion functions, such as HDR and SR. Some functions can also be performed jointly. To avoid the complexity of presentation, dependencies and possible joint operations are not depicted in the pipeline. However, the data flow through the CP sub-engine should be flexible to enable dependent / joint functions in a seamless manner. In addition, data / memory sharing should always be performed to minimize CPU cycles and minimize hardware / memory costs.
[0235] It is worth noting from this table that the estimated disparity and depth as well as the focused images are valuable data that can implement various CP functions. Traditionally, the focused images are discarded by the camera hardware after disparity estimation, but in the proposed image processing pipeline, they are fully utilized.
[0236] List of examples of computing photographic features and their input data
[0237]
[0238] Processing pipelining also means enabling certain sensor modes that are not available in current OCL all-focus sensors.
Claims
1. A method for processing image data (IMG) of an image sensor (4) RAW ), wherein The image sensor (4) comprises a matrix of photosensitive elements and a plurality of lens elements (7) and / or filter elements (9) arranged in a pixel matrix before a finer sub-pixel matrix of the photosensitive elements, wherein a group of photosensitive elements is placed after a common lens element (7) and / or a common filter element (9) to provide sub-pixel values for corresponding positions in the pixel matrix, and wherein the image sensor (4) is adapted to capture image data of a plurality of views, wherein each view comprises a matrix of a selected group of sub-pixel values of the pixel matrix captured by the matrix of photosensitive elements, characterised in that the method comprises: - for each captured image view, determining a first change in sub-pixel values in the respective view separately from other views of the same image; - determining a second change in sub-pixel value associated with the same position in the pixel matrix after a corresponding lens element (7) and / or filter element (9) in a set of views of the same image; - processing the image data of the image by using the determined first variation and second variation.
2. The method according to claim 1, characterized in that The method includes automatically performing operations on captured raw image data by using a general image formation model, wherein the general image formation model expresses an n-th view image by the following relationship: Where n = 1, 2, .., N; and Y n = E n,m C n,m Y m , where n = 1, 2,.., N, m ≠ n; Among them, Y n is the n-th view image pixel matrix, F n is the color filter array subsampling operator associated with the nth view image pixel matrix, S n is a spatially varying and color-dependent lens shading operator for the n-th view image pixel matrix determined as the first variation, X represents an unknown scene region of interest (ROI) with a focal depth (D), represents a two-dimensional convolution operation, H n (D) is the point spread function associated with the n-th view image pixel matrix at constant focal depth (D), η n is the signal-dependent noise of the n-th view pixel matrix, E n,m is a color-dependent exposure change operator between the n-th and m-th view image pixel matrices determined as the second change, and C n,m is the wavelength and color-dependent crosstalk operator between the n-th and m-th view image pixel matrices determined as the second variation, where C n,m Wavelength and color dependent crosstalk between sub-pixels in a pixel matrix that share a common position of the same lens element (7) and / or filter element (9) is captured.
3. The method according to claim 1 or 2, characterized in that The method comprises: - assembling a set of views of an image by combining, respectively for each position in said matrix, a plurality of sub-pixel values relating to a common position in said pixel matrix and pre-processing the combined sub-pixel values of the captured pixel matrix for the image; - individually pre-processing the views by pre-processing the captured pixel matrix with a plurality of sub-pixel values of the respective view by evaluating the variations between sub-pixel values relating to the same position in the matrix; and - jointly preprocessing both the preprocessed combined pixel values of the captured pixel matrix in the set of views and the preprocessed pixel matrix of the plurality of sub-pixel values for each position in the matrix for each view by using the evaluation result of the variation.
4. The method according to claim 3, characterized in that The method comprises combining the multiple sub-pixel values associated with a common position in the matrix, i.e. a common lens element (7) and / or filter element (9), by automatically processing the sum of the sub-pixel values associated with the same position in the matrix to achieve a summed and merged pixel matrix.
5. The method according to any one of claims 1 to 4, characterized in that The method comprises combining a plurality of sub-pixel values associated with a common position in the matrix, i.e. a common lens element (7) and / or filter element (9), by automatically processing the average value of the sub-pixel values associated with the same position in the matrix to achieve an average pixel matrix.
6. The method according to any one of claims 1 to 5, characterized in that The method comprises: preprocessing a captured pixel matrix by using a set of pixel matrices, the captured pixel matrix comprising a plurality of sub-pixel values for each position in the pixel matrix, wherein each pixel matrix in the set is a sub-pixel matrix comprising sub-pixel values of a related set of photosensitive elements, and for a common position in the pixel matrix associated with a common lens element (7) and / or a common filter element (9), each photosensitive element of the related set has the same relative position in the photosensitive element group.
7. A method according to any one of the preceding claims, characterised in that The method comprises evaluating changes in brightness of sub-pixel values associated with a same pixel position in a set of views of an image.
8. A method according to any one of the preceding claims, characterised in that The method comprises evaluating a change in exposure characteristics by associating a combined view of an image with at least one view of the image, wherein the combined view represents a longer exposure time compared to a separate pixel matrix comprising a matrix of sub-pixel values, the combined view comprising combined pixel values processed from a combination of related sub-pixel values at corresponding positions in the matrix, and wherein the sub-pixel values are respectively captured by a corresponding photosensitive element.
9. A method according to any one of the preceding claims, characterised in that The method comprises evaluating view blur by correlating relevant sub-pixel values of at least two views of the image, wherein a first sub-pixel matrix of a first set of sub-pixel values is associated with a second sub-pixel matrix of a second set of sub-pixel values.
10. The method according to claim 9, characterized in that The method includes associating the sub-pixel matrices with each other by automatically processing the difference value at each position in the matrix as the difference between the sub-pixel values of one sub-pixel matrix in the set of sub-pixel matrices and the sub-pixel values of another sub-pixel matrix in the set of sub-pixel matrices.
11. The method according to any one of the preceding claims, characterized in that The method comprises automatically estimating disparity between views of an image, wherein the disparity of sub-pixel values relating to the same pixel position is determined.
12. A method according to any one of the preceding claims, characterised in that The method comprises automatically estimating a depth value of the captured image related to the focal depth of the captured image in relation to a focal plane of the image sensor (4).
13. A method for processing raw image data (IMG RAW), the image sensor (4) comprising a matrix of photosensitive elements and a plurality of lens elements (7) and / or filter elements (9) arranged in a pixel matrix before a finer sub-pixel matrix of the photosensitive elements, wherein: a set of photosensitive elements are placed after a common lens element (7) and / or a common filter element (9) to provide sub-pixel values for corresponding positions in the pixel matrix, and wherein the raw image data comprises a matrix of pixel values for a pixel matrix captured by the matrix of photosensitive elements, the matrix of pixel values being divided into a set of views, each view comprising a matrix of sub-pixel values, the matrix of sub-pixel values comprising view-specific sub-pixels of the sub-pixel matrix for each position in the matrix, which are associated with the corresponding lens element (7) and / or filter element (9), Characterized in that the image processor unit (3) is arranged to: - for each captured view of the image, determining a first change in sub-pixel values in the respective view separately from other views of the same image; - determining a second change in sub-pixel values relating to the same position in the pixel matrix after the respective lens element (7) and / or filter element (9) in a set of views of the same image; - processing the image data of the image by using the determined first variation and second variation.
14. The image processor unit (3) according to claim 13, characterized in that The image processor unit (3) is arranged for processing image data by performing the steps of any one of claims 1 to 10.
15. A computer program comprising instructions which, when executed by a processing unit, cause the processing unit to perform the steps of the method according to any one of claims 1 to 12.
