Method and apparatus for correcting smear artifacts
20180376085 · 2018-12-27
Inventors
Cpc classification
International classification
Abstract
1. Method and device for correcting readout smear artifacts.
2.1. Known methods for correcting smear artifacts that occur when reading out CCD sensors require considerable computing time; their implementation is cumbersome. The new method should enable more simple and efficient implementations.
2.2 In order to enable an efficient calculation of a corrected image, the readout image values and the correction values to be used are first transformed with a suitable transformation into a frequency range in which the transformed image values are then corrected by means of the transformed correction values through use of a folding operation. The folding can then be calculated in parallel. Furthermore, a method for approximately calculating corrections for an aperiodic readout smear is provided. Different efficient implementations in hardware are introduced.
2.3 Based on their efficiency, the method and the device are suitable in particular for scientific sensors that require high fill factors of the pixels but also for image sensors that are used in smartphones.
Claims
1. A method for correcting smear artifacts, comprising: readout of created charges from a matrix of photosensitive elements (CCD); conversion of the readout charges into image values; determination of correction values for correcting smear artifacts; transformation of image and correction values with a suitable transformation; and correction of the transformed image values based on the transformed correction values.
2. The method according to claim 1, wherein the photosensitive elements (CCD) are implemented in a framestore or a full-frame architecture.
3. The method according to claim 1, characterized in that the transformed correction values are calculated element-by-element with the transformed image values.
4. The method according to claim 3, characterized in that the transformed correction values are multiplied with the transformed image values.
5. The method according to claim 3, characterized in that the transformed image values are divided by the transformed correction values.
6. The method according to claim 1, characterized in that at least one correction value is used to correct several image values in one image.
7. The method according to claim 1, characterized in that the correction values form a Toeplitz matrix.
8. The method according to claim 7, characterized in that the correction values form a circulant or respectively cyclical matrix.
9. The method according to claim 1, characterized in that the correction values form a Hankel matrix.
10. The method according to claim 1, characterized in that a folding multiplication theorem applies for the transformation.
11. The method according to claim 10, characterized in that the transformation is a Fourier transformation, in particular a fast Fourier transformation.
12. The method according to claim 10, characterized in that the transformation is a z transformation.
13. The method according to claim 10, characterized in that the transformation is a sine cosine transformation.
14. The method according to claim 1, wherein the correction of variable scenes is approximated by the assumption of periodically occurring scenes.
15. The method according to claim 1, wherein the corrections are executed incompletely up to a certain correction depth.
16. The method according to claim 1, wherein the correction of the smear artifacts takes place in real time.
17. The method according to claim 1, wherein rotations of the image are performed in a memory.
18. The method according to claim 1, wherein several image values are transformed in one transformation.
19. The method according to claim 1, wherein the integral image values are converted into fixed-point or floating-point or mixed data formats.
20. The method according to claim 1, wherein additionally a correction takes place for a dark-field image and a flat-field image.
21. The method according to claim 1, wherein the sensor is divided into several individual spheres.
22. The method according to claim 14, wherein the same pixels of several images are located near each other in a memory, so that they can be accessed in a parallel manner.
23. The method according to claim 1, wherein image values are stored in the memory.
24. The method according to claim 23, wherein the stored image values were previously transformed to save computing capacity.
25. The method according to claim 1, wherein several correction values are saved.
26. The method according to claim 1, wherein platform-specific commands for vector calculations or single-instruction-multiple-data are used for the correction.
27. The method according to claim 7, which uses the parallelizability, which occurs in the case of a division of a Toeplitz matrix into several Toeplitz matrices.
28. A computer program product, comprising machine-readable program instructions, which perform a method according to claim 1 on a computer.
29. The computer program product according to claim 28, in the form of loadable app for mobile devices.
30. A device for correcting smear artifacts, comprising: an interface for obtaining image values; an interface for determining correction values for correcting smear artifacts; a circuit for transforming the image and correction values with a suitable transformations; and a circuit for applying the transformed correction values to the transformed image values, wherein the device is set up to perform a method according to patcnt claim 1.
31. The device according to claim 30, wherein the correction values are saved in a memory.
Description
[0019] 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.
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047] 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.sup.1S=M.sup.1[1,:]*S=.sup.1(
)(M.sup.1[1,:])o
(S))
[0048] Here, matrix M.sup.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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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:
[0056] 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.
[0057] 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.
[0058] 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.
[0059] An element-by-element multiplication in the frequency range makes this type of calculation faster than a matrix-vector multiplication.
[0060] 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:
[0061] For the approximation of the solution of the aperiodic scenario according to the invention, the periodic scenario is used according to the invention:
[0062] k=index (time unit of the column)
[0063] K=periodicity in the periodic scenario
[0064] A, B=matrices according to Iglesias (blocks of M)
[0065] Here, the periodic scenario implies an error at the signal value Y(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:
[0066] The vector S(k+n) calculated with the error is set to zero. Thus, n columns S(i) are used to correct a column Yk. Other columns Y(k+i) are discarded after the calculation and are marked with Z. As a result, Yk quickly converges to its true value with increasing n.
[0067] The number of columns n used for the correction is called the correction depth.
[0068] 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:
[0069] The relevant blocks Ti for the calculation of Yk are created here. The formula can therefore be written as:
[0070] 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.
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077] 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.
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097] 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.
[0098] 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.