The invention relates to a method and device, which correct images from framestore or full-frame Charge-Coupled Devices (CCDs) of readout smear and thereby calculate the corrections in the frequency range.
CCDs are image sensors that create charges from incident photons and shift the created charge to evacuate the sensor. Framestore CCDs shift the charge generated in a pixel through neighboring pixels into a shielded framestore area so that the analog-to-digital conversion of a photo can be parallelized with the exposure of the following photo. Full-frame CCDs shift the charges directly into an amplifier instead of into a framestore area so that no parallelization takes place.
In full-frame and framestore CCDs, the charges are shifted through neighboring pixels. If the camera does not have a shutter, then the shifted charges continue to be illuminated during the displacement through neighboring pixels, whereby the image error of readout smear occurs.
Current cameras with framestore CCDs allow a high cadence, little noise, large pixels and few additional structures on a sensor. However, framestore CCDs cannot be electronically shuttered. Many framestore CCDs are too fast for mechanical shutters, which can then necessitate an algorithmic correction of the resulting readout smear.
In scientific cameras, a correction of several hundred images per second may be needed. In the case of consumer cameras, it is also desirable that a photo be displayed corrected with the least possible latency. There is thus interest in methods that determine the readout smear correction with less complexity and thus in a shorter period of time. Moreover, a correction with low complexity results in less energy consumption of the correction.
U.S. Pat. No. 8,169,515 B2 shows a method, which corrects the readout smear error with matrix-vector multiplications. Powell et al. (K. Powell, D. Chana, D. Fish, and C. Thompson, “Restoration and frequency analysis of smeared CCD images,” Applied Optics, vol. 38, no. 8, pp. 1343-1347, 1999) considers the standard scenario of the readout smear. A framestore CCD is run through by an image in 4 cycles. The image with zero values is shifted into the photosensitive area in the shifting-in cycle. This leads to an error through exposure during the shifting in so that a charge is created in each transfer cycle, the charge depending on the ratio of the delta of the transfer time and the exposure time. During the exposure, the image is located entirely in the photosensitive area and is illuminated with the actual scene. In the shifting-out cycle, the image is shifted into the framestore area, wherein an incorrect exposure in turn occurs. In the readout cycle, the image is located in the framestore area and is digitized.
Powell described the image error as smear S, which always occurs in a column along the shifting direction of this column. The column S contains the image information and the degradation through smear. Y is the column with image information and without smear. Powell established a connection via the circulant matrix M:
Powell corrected the column S to Y by means of:
Y=M−1S
Powell (aaO) and Ruyten [W. Ruyten, “Smear correction for frame transfer charge-coupled-device cameras,” Optics Letters, vol. 24, pp. 878-880, July 1, 1999] introduced independently of each other the scenario for charge flush and reverse clocking. A charge-flush operation grounds all pixels of the image before the exposure or respectively sets all image values to zero. Reverse clocking shifts the image opposite the shifting direction during the shifting in. In both cases, the image degradation is again described with a matrix vector multiplication:
The value t is equal to 1 for charge flush and equal to 2 for reverse clocking.
Iglesias et al. (F. A. Iglesias, A. Feller, and K. Nagaraju, “Smear correction of highly variable, frame-transfer CCD images with application to polarimetry,” Applied Optics, vol. 54. no. 19, Jun 2015) consider the periodic scenario of readout smear. There, it is assumed that the scene between exposure and shifting out changes, with which Iglesias described a polarimetric modulation. This leads to a mathematical description of the smear using two matrices:
A column S with smear now depends on the current column with the same time index k as well as on the following column with successor index k+1. Iglesias assumed for the periodic scenario that an image occurred periodically with a periodicity K so that the correlation applies:
The matrix M can be inverted again in order to solve for Y. M and its inverse are in this case block-circulant and invertible.
Moreover, Iglesias calculated the column Y with time index k under the condition that the images do not repeat themselves periodically:
Iglesias showed that the last term of the equation can be disregarded since the system is dampened.
However, the known methods include high computing effort and lead to more complex implementations.
The object of the invention is thus the provision of a method and a device, which enables a faster and simpler correction of the readout smear.
This object is solved by a method and a device according to the independent patent claims. Advantageous embodiments are specified in the dependent claims.
Further aspects and advantages of the invention will become evident in the following description of exemplary embodiments with reference to the individual figures of the included drawing.
According to the invention, it is taken advantage of that the inverse of the circulant matrix M is in turn circulant. The matrix-vector multiplication thus corresponds with a folding:
Y=M
−1
S=M
−1[1,:]*S=−1()(M−1[1,:])o(S))
Here, matrix M−1 corresponds with the correction values, matrix S corresponds with the uncorrected image values (with smear) and matrix Y corresponds with the corrected image values. F is the Fourier transformation.
Matrix M is inverted. Instead of multiplying the inverse with the vector S, the first row of the inverse matrix is folded with the vector S. The reduction in complexity is based on the fact that a Fourier transformation with the length of a whole-number potency of 2 is used in order to thereby calculate the folding as an element-by-element multiplication in the frequency range. A signal, the length of which is not a potency of 2, can be brought to a corresponding length through expansions with zeros (zero padding). The matrix is thereby expanded so that they remain circulant.
The vector Y was further calculated using division. Thus, the first row of M can be transformed into the frequency range and then calculated as divisor element-by-element with the transformed one from S as dividend as long as the divisor has no zero elements.
All algorithms of the prior art refer to one column of the signal. However, the signal of a CCD normally consists of several columns. Thus, the two-dimensional signal of a CCD can also be transformed two-dimensionally in order to perform the smear correction in the two-dimensional frequency space. Three-dimensional frequency spaces are also suitable for correcting series of images. Here, the first row of the inverse of M is expanded with zeros to the dimension of the signal to be corrected and transformed into multi-dimensional frequency space. The correction takes place in turn through element-by-element multiplication with the signal.
A subsequent back-transformation 0136 generates corrected image values 0137 as data. The method can be restarted with a new camera setting. Further image values with the same camera setting can be processed in a new correction. Further, several image values can be generated for a correction 0133, 0131, 0132.
In a further embodiment of the invention, a method is suggested, which calculates the readout smear for the case of charge-flush and reverse clocking operations in the frequency range.
The starting point here is the knowledge that the matrix M in these cases forms a Toeplitz matrix in the form of a lower triangle.
In order to be able to implement the correction according to the invention, the matrix M is expanded from this type of a Toeplitz matrix to a circulant matrix:
Here, matrix Z contains unused information, expansions, i.e. image values or correction values that are not needed but are present. The δ parameter describes the ratio of transfer time to exposure time; the α parameter describes the ratio of time needed during a scene change to the exposure time; the t parameter is an index (1 or 2), wherein t=1 for charge flush and t=2 for reverse clocking.
The inverse of the expanded matrix is in turn circulant so that its first row in turn represents a transfer function. For this, the matrix M must be expanded from at least double its original size minus 1. However, the matrix M can also be expanded to larger sizes. In particular, the matrix M was expanded to a size, which is an integral potency of two so that the transformation for the smear correction can be calculated quickly. The vector S is expanded to the same size as the row length of M in that zeros are filled up. The ones transformed from S and the inverse of M can then be multiplied in the frequency range element-by-element. A back transformation of this product then contains the corrected signal at the upper position. The lower values of the retransformed vector are discarded. The number of discarded values is the number of values with which the vectors were initially expanded. Discarded values were labeled with Z.
According to a further embodiment of the invention, the periodic scenario according to Iglesias can also be calculated in the frequency range. Based on the knowledge that the block-circulant matrix M is circulant if both delta values are the same and the inverse of this matrix is then also circulant, the correction can take place again according to the invention by means of folding and thus very efficiently. This prerequisite is given in the normal operation of the CCD sensor. The first row of the inverse can be folded with the smear-degraded signal in order to calculate the signal without smear.
An element-by-element multiplication in the frequency range makes this type of calculation faster than a matrix-vector multiplication.
According to a further embodiment of the invention, the aperiodic scenario according to Iglesias can also be calculated more efficiently. The aperiodic scenario is thereby calculated according to the invention only up to a certain correction depth n and is simplified to:
For the approximation of the solution of the aperiodic scenario according to the invention, the periodic scenario is used according to the invention:
k=index (time unit of the column)
K=periodicity in the periodic scenario
A, B=matrices according to Iglesias (blocks of M)
Here, the periodic scenario implies an error at the signal value Ŷ(k+n), which on the other side makes the matrix M circulant if delta_1=delta_2. Through the circulant matrix M, the aperiodic scenario can be represented in the frequency range as:
The vector Ŝ(k+n) calculated with the error is set to zero. Thus, n columns Ŝ(i) are used to correct a column Ŷk. Other columns Ŷ(k+i) are discarded after the calculation and are marked with Z. As a result, Ŷk quickly converges to its true value with increasing n.
The number of columns n used for the correction is called the correction depth.
The expansion of a Toeplitz matrix to a circulant matrix can be used to allow the methods to be parallelized. Square blocks can be cut out of the Toeplitz matrices or the circulant matrices. These blocks are then always Toeplitz matrices. These Toeplitz matrices can be expanded to circulant matrices. The calculation can thereby be parallelized in all shown scenarios. For example, in the aperiodic scenario:
The relevant blocks T̂i for the calculation of Ŷk are created here. The formula can therefore be written as:
The individual terms in the sum can thus be calculated in parallel. The same is possible for the standard scenario, the periodic scenario as well as charge flush and reverse clocking. The ability to parallelize can take place in the software and in the hardware and enables a lower power consumption of the calculation or a higher hardware usage.
Besides different methods, the invention comprises hardware implementations for smear correction. The hardware implementation was developed for a scientific camera, which is based on a framestore CCD. At 400 images per second, a mechanical shutter is not feasible. For real time smear correction, the aperiodic scenario was implemented in hardware. The camera sensor consists of two spheres with their own framestore area. The images of each sphere are corrected independently. The images are then rotated on a random access memory and saved with a correction depth of 4 or 6 images. The saving takes place with memory mapping, in that the same pixels from images with a different time index are located next to each other in the memory tape. In this manner, read access, which has higher throughput, is optimized instead of write access. It was determined that memory is the critical resource; thus, the images of the correction depth were saved in the intensity area, which requires less memory and more Fourier transformations. However, the images can also be transformed first and then saved, which requires more memory and less computing power. The data formats of a transformation-based solution were compared. In particular, fixed-point-and floating-point-based methods were evaluated in both hardware and software. The fixed-point-based methods are more convenient overall but are less flexible. Mixed methods that use fixed-point-based transformations were thus implemented; however, the actual correction between the transformations is calculated with floating point. These mixed methods reduce the hardware requirements while maximizing accuracy. Here, the integer values of the original image were always cast so that the resulting fixed- and floating-point data formats prevent a number range overrun and the accuracy of the calculation is simultaneously maximized. Hardware-based Fourier transformations generally have a complex input. The transformations were thus implemented so that two signals are simultaneously calculated in a hardware module for Fourier transformations, wherein a signal is placed on the real input of the module and the other signal is placed simultaneously on the imaginary input of the module. The resulting output signal was then broken down into two transformations of the respective input signals. The correction depth was subsequently measured. In a positive 16-bit data format, a correction depth of 4 can be considered sufficient for the camera because the error from smearing is subsequently lower than the error from the readout noise.
Lastly, options for correcting readout smear on processors and graphic cards were examined. It was shown that the processing of columns or the options of the described parallelization benefits a calculation for single-instruction-multiple-data architectures. Thus, graphic cards and processors with vector command sets are certainly suitable for executing the implementations mentioned.
The hardware and software implementations mentioned can be used in several commercial applications. Scientific sensors require high fill factors of the pixels, whereby the need to reduce other structures on the sensor results. Since such structures can also serve to reduce readout smear, for example in Interline transfer CCDs, a software correction of readout smear is important. If this correction then takes place in real time, the implementations mentioned are more efficient and resource-saving than the prior art, which in turn justifies their use and thus their commercial application. Further, the implementations mentioned can be used to lower the latency of an image correction. This is important in particular in consumer photography, where a user wants to view a picture in less than a second. A fast correction can be used here since it achieves a latency advantage of a factor of approximately 10 in the case of a megapixel resolution like in current systems. Conversely, due to such an advantage, CCD sensors can also be installed in end devices in which they were not previously used, for example in smartphones. Here, enough computing power is present for a fast correction so that readout smear is consciously permitted and can be corrected post-facto within a short period of time.
Number | Date | Country | Kind |
---|---|---|---|
10 2017 003 170.3 | Mar 2017 | DE | national |