Imaging technology, including image sensors and image processing circuitry, is continually evolving as it is incorporated into a greater range of devices. Wearables devices in particular, such as smart watches, headbands, and glasses, are increasingly making use of imaging capabilities. However, such devices have substantial Size, Weight and Power (SWaP) constraints. Simultaneously, efforts are being made to improve the resolution and other performance characteristics of imaging circuitry. For example, gigapixel sensors may soon find use in defense, space, and medical applications. Collecting and processing the large amounts of data from such sensors raises several challenges. At the same time, there are many emerging applications for imaging in the field of computer vision, biometric analysis, and bio-medical imaging that require ultra-high speed computations. Another growing area is the use of stereo cameras, camera arrays and light-field cameras to perform computational imaging tasks. Typical imaging architectures and digital image processing solutions may not meet the demands of these applications because they may fail to handle the high computational loads and meet the SWaP requirements simultaneously.
Example embodiments of the invention include an apparatus for processing images. In one embodiment, the apparatus includes an analog-to-digital converter (ADC), an analog correlator, and a digital processor. The ADC generates digital data corresponding to analog data of a plurality of images, the digital data being stored to a memory. The analog correlator circuit calculates correlation information among the plurality of images based on the analog data. The a digital processor can transform the plurality of images represented by the digital data, based on the correlation information, to generate an aligned image set, the digital processor further determining disparity values for the aligned image set based on the correlation information. The plurality of images may include at least two associated stereoscopic images, including a template image and a reference image.
In further embodiments, the apparatus may include a pre-processing circuit configured to generate the analog data based on input of a plurality of image sensors. The pre-processing circuit may perform a correlated double sampling (CDS) on the input of the plurality of image sensors to generate the analog data.
In still further embodiments, the analog correlator circuit may perform a normalized cross correlation (NCC) process on the analog data to provide the correlation information. The analog correlator circuit may select a subset of the analog data on which to perform the NCC process, the subset corresponding to a plurality of vectors extending across the plurality of images. The images may be divided into several blocks, and the vectors may include, for example, diagonal elements extending across the blocks. The analog correlator may also generate a moving average of the analog data during the NCC process.
In yet further embodiments, the correlator circuit can include a plurality of blocks each associated with a respective channel carrying a subset of the analog data. Each block may include a low-pass filter (LPF) receiving a channel input from the respective channel, as well as a summer configured to generate a block output based on the channel input and an output from the LPF. The blocks may be arranged in pairs, where each block of the pair receives analog data corresponding to a different one of the plurality of images. The output of each block of the pair may be combined by a combiner.
Still further embodiments of the invention include an apparatus for processing images. An analog-to-digital converter (ADC) generate digital data corresponding to analog data of a plurality of images, the digital data being stored to a memory. An analog correlator circuit calculates correlation information among the plurality of images based on the analog data. The analog correlator circuit may calculate the correlation information for a plurality of blocks each comprising a subset of one of the images, where each of the blocks has a portion common to another of the blocks. A digital processor processes the digital data based on the correlation information. The plurality of images may include at least two associated stereoscopic images, including a template image and a reference image.
The foregoing will be apparent from the following more particular description of example embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating embodiments of the present invention.
A description of example embodiments of the invention follows.
Embodiments of the invention can employ analog image processing within an image processor, which may reduce SWaP and as well as reduce the computational load in the digital domain. Such analog signal processing can be implemented by interpreting the image data as a continuous stream of analog voltage values. Rather than replacing digital processing entirely, analog processing can be used to augment the digital processor and thus speed up computation.
A particular challenge in image processing, which can be addressed by analog processing, is image alignment in stereo cameras. Image pairs captured from the stereo cameras can be used for a variety of purposes, such as constructing disparity and depth maps, refocusing, and simulating the effect of optical zoom. Image alignment, which is the process of aligning common elements captured in two or more images, can be used for stitching images to create panoramas, for video stabilization, scene summarization, and other effects
An important element of stereo image processing is finding correspondence between the points in the two images that represent the same 3D point in the scene. Algorithms for finding such correspondence, referred to as stereo correspondence algorithms, have been developed. However, some of these algorithms suffer from poor performance in the presence of noise or low light. Other algorithms provide more robust performance, but may also perform slowly due to having high computational requirement. Two such stereo correspondence algorithms employ Normalized Cross Correlation (NCC) and Sum Absolute Difference (SAD), respectively. The first algorithm is a patch-based stereo correspondence algorithm and uses NCC as the similarity measure. This patch-based approach produces a coarse depth map. The second algorithm is a per-pixel algorithm, which produces a finer disparity map than the patch-based approach. Sum Absolute Differences (SAD) is used as a similarity measure in this algorithm. The first and second algorithms are referred to as the NCC algorithm and the SAD algorithm, respectively.
All stereo correspondence algorithms can be broadly classified into intensity based algorithms and feature based algorithms. If the disparity value corresponding to the best matching block is assigned to all the pixels of that block or patch, it is called a patch-based stereo correspondence algorithm. A number of intensity-based stereo correspondence algorithms have been developed for image processing. Among them, NCC is advantageous because (i) it is robust when the images being aligned have translation in the x and y direction but no rotation or shear, (ii) it is less sensitive to variation in the intensity values of two images being aligned, and (iii) it fits well into the analog architecture.
Equation (1): Implementation of the NCC Algorithm.
In the above equation,
In a general NCC algorithm, the template image is divided into blocks and each block is shifted on top of the reference image. All the pixels in the block are used to perform this calculation as shown in Equation 1. In a worst-case scenario for aligning images, where there is no information available about the camera system or the scene, a brute-force approach may be used. The computational complexity in such a case would be very high. A pre-processing step that that may assist in this computation is image rectification, which essentially transforms the 2-D stereo correspondence problem to 1-D. However, the rectification process itself will add to the computational complexity of the algorithm.
In order to reduce the computational load, only the diagonal elements of the template and reference image blocks may be used to compute the correlation coefficient. One reason for this approach is that the diagonal elements of a block often have the least spatial redundancy when compared to the neighboring horizontal and vertical pixels. The modification performed on the NCC algorithm reduces the equation to Equation 2, below.
Equation (2): Modified NCC Algorithm.
The first term in the numerator is a 1D correlation operation, which can be implemented efficiently in analog hardware. The second term in the numerator is calculating the mean, and the denominator is calculating the variance. If implemented directly, two passes over the data are required to compute these values, which increases the computation time. This problem may be solved by introducing a further modification to the NCC algorithm. Specifically, a one-pass formula can be used to calculate the variances efficiently. We can define two quantities as shown in Equations 3 and 4:
Implementing Equations 3 and 4, the variance can then be calculated as Bn/n.
The patch-based stereo correspondence algorithm described above, also referred to as a “modified NCC algorithm,” produces relatively coarse depth maps. This approach is suitable for applications such as navigation and people-tracking, where speed is more important than accuracy. However, in some of the other applications such as image rendering, a finer depth map may be beneficial. In these cases, a per-pixel approach of finding depth is preferred. Thus, a per-pixel stereo correspondence algorithm may be implemented, where the similarity measure used in such an algorithm is Sum of Absolute Difference (SAD). In such an embodiment, using a stride of more than one pixel can give a similar performance while significantly reducing the computational load of the image processing.
One drawback associated with a patch-based approach is that the algorithm may not perform well when there are depth discontinuities within a block. In order to obtain a finer depth estimate and reduce the effect of depth discontinuities, a series of overlapping blocks (rather than merely adjacent blocks) can be employed. For a per-pixel depth estimation, the blocks may be selected to be completely overlapping with the exception of 1 pixel (in height and/or width), meaning the “stride” is 1 pixel. However, when providing depth estimates using overlapping blocks in the digital domain, computation increases with reduction in stride as the amount of overlap between the block increases. Thus, the computational intensity of such an algorithm is higher than the patch based approach. By implementing analog signal processing, embodiments of the invention can provide per-pixel stereo correspondence while reducing computational load. Equation 5, below, shows the implementation of a SAD algorithm, where R is the reference image and T is the template image.
Equation (5): Implementation of a SAD Algorithm.
Embodiments of the invention, described below, provide image processing that implements one or both of the modified NCC algorithm and the SAD algorithm described above. In general, embodiments employing the modified NCC algorithm may be beneficial for providing relatively coarse depth maps, while embodiments employing the SAD algorithm may be beneficial for providing finer depth maps. Further embodiments may also employ both algorithms in combination, as described in further detail below.
The digital processor 140 may also perform image alignment, for example by implementing one or more of the NCC and SAD algorithms described above. However, in order to reduce computational load at the digital processor 140, the analog correlator circuit 120 may perform some or all of the image alignment of the system 100 in the analog domain. In particular, the analog correlator 120 may implement one or both of the modified NCC algorithm and the SAD algorithm described above. Example embodiments of an analog correlator implementing such algorithms are described in further detail below with reference to
Thus, in the image processor 100, a digital system (ADC 125, memory 130, digital processor 140) accesses the sensor 110 and operates to digitize, store, and process the captured images in the digital domain. Further, a parallel analog system (analog correlator circuit 120) accesses the analog data from the sensor 110, processes it to provide image alignment information, and then provides such information to the digital processor for further computations. In this hybrid digital-analog system, the analog block is performing the computationally-intensive task of running the modified NCC and/or SAD algorithms as the image data is being read off the image sensor 110. Further, the analog correlator 120 may be configured in the control plane, rather than in the signal plane. A common disadvantage of an analog system is the noise that it typically introduces. However, in system 100, the analog correlator 120 is not responsible for signal acquisition, and hence the problem of signal being corrupted by noise may be prevented.
Referring again to the modified NCC algorithm (Equation (2), above), the first term in the numerator of represents a 1D correlation operation. The output of the image sensor 210 comprises N analog channels, which read the analog data from the sensor directly. These N analog channels can be grouped into pairs in which one channel is used to read the reference image data and the other channel is used to read template image data (e.g., of a stereo image pair). The image sensor 210 is capable of accessing individual pixel data. The readout circuitry 212, 214, 237 may be used to selectively read the diagonal elements of the template and reference image blocks. The analog pre-processing circuit 215 provides the analog image data that may be implemented by the analog correlator circuit 220 to perform the NCC algorithm.
The analog correlator circuit 220 includes a plurality of units, each of which operates in parallel on a respective N analog channel pair. Each unit comprises a multiplier 224A-N, an integrator 226A-N, and an ADC 228A-N connected in series. The multiplier 224A-N and integrator 226A-N together perform the correlation operation as defined in the modified NCC algorithm. The outputs of each integrator 226A-N are then digitized by the respective ADC 228A-N and sent to the ISP 240 for further processing. The ISP 240 can calculate the numerator of the NCC algorithm. For calculating the denominator and other numerator terms, the one-pass method described above, with reference to equations (3) and (4), can be used. Such calculations can be completed efficiently in the digital domain by the ISP 240 following the correlation performed by the analog correlator circuit 220. Based on the correlation information provided by the correlator circuit 220, the ISP 240 can determine disparity values (e.g., X and Y shifts) among the image pair. In turn, the ISP 240 (or a further processor) can employ the disparity values to shift the blocks of the images accordingly, resulting in an aligned image pair.
Embodiments of the invention implementing the modified NCC algorithm (e.g., the image processor 200 described above with reference to
The image processor 200, described above with reference to
The analog correlator circuit 620 includes a plurality of units, each of which operates in parallel on a respective N analog channel pair. Each unit comprises a pair of sub-units 622A-N (each unit comprising a low-pass filter (LPF) and a summer connected in series), a multiplier 224A-N, an integrator 226A-N, and an ADC 228A-N connected in series. The sub-units 622A-N enable a further modification to the NCC algorithm. At each sub-unit 622A-N, the LPF provides a moving average rather than a regular average, and the moving average is subtracted from the original signal via the summer.
The multiplier 224A-N and integrator 226A-N together perform the correlation operation as defined in the modified NCC algorithm. The outputs of each integrator 226A-N are then digitized by the respective ADC 228A-N and sent to the ISP 240 for further processing. The ISP 240 can calculate the numerator of the NCC algorithm. For calculating the denominator and other numerator terms, the one-pass method described above, with reference to equations (3) and (4), can be used. Such calculations can be completed efficiently in the digital domain by the ISP 240 following the correlation performed by the analog correlator circuit 220.
The processor 700 differs from the processor 200 of
The analog correlator circuit 720 receives N analog channels, of which the odd-numbered channels are reading the reference image data, and the even-numbered channels are reading the template image data. In order to increase computation speed, the entire rows or columns of the reference and template image data may be read at once and their difference is calculated via the summer 722A-N at each analog channel pair. This data is then passed through the respective ABS circuit 724A-N and then through the respective integrator 726A-N. The integrator 726A-N accomplishes a 1D summation, and the integrator output is sampled by the respective ADC 728A-D at a particular rate depending on the size of the window/block. These values are then fed into the DSP 240, where the second-dimensional summation may be performed, along with any further processing and that is required.
Further embodiments of the invention may implement both the modified NCC algorithm (as described above with reference to
Embodiments of the invention, as described above, provide a number of advantages over previous image processing techniques. By employing analog image processing within an image processor, size, weight and power (SWaP) attributes of the image processor can be minimized, and the computational load in the digital domain can be greatly reduced. Rather than replacing digital processing entirely, analog processing can be used to augment the digital processor and thus speed up computation.
While this invention has been particularly shown and described with references to example embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention encompassed by the appended claims.
This application claims the benefit of U.S. Provisional Application No. 62/084,852, filed on Nov. 26, 2014, and U.S. Provisional Application No. 62/056,016, filed on Sep. 26, 2014. The entire teachings of the above applications are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62084852 | Nov 2014 | US | |
62056016 | Sep 2014 | US |