Digital circuit to correct vignetting effects in pixel values ​​of images from electronic cameras

By using the correction method of feedback multiplication cascade and polynomial exponential function in electronic cameras, the correction problem of the vignetting effect in electronic cameras is solved, high-speed, resource-saving correction effects are achieved, and correction accuracy and efficiency are improved.

CN110677555BActive Publication Date: 2024-09-10BASLER AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910589742.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-07-02
Filing Date
2019-07-02
Publication Date
2024-09-10
Estimated Expiration
2039-07-02

AI Technical Summary

Technical Problem

It is difficult to effectively correct the vignetting effect in electronic cameras with the existing technology, especially in industrial applications where high speed and resource saving are required, and it is difficult to achieve efficient correction with hardware-friendly calculations.

Method used

Adopting a cascade structure based on feedback multiplication, using the polynomial exponential function as the correction function, iteratively or recursively multiplies the factor by the value of the correction function to correct the pixel value, and combines the characteristics of the polynomial exponential function to replace the hardware incompatibility in a hardware-friendly way. Friendly division operation.

Benefits of technology

It realizes high-speed, resource-saving vignetting correction in electronic cameras, reduces calculation errors and calculation costs, and improves correction accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110677555B_ABST
    Figure CN110677555B_ABST
Patent Text Reader

Abstract

The invention relates to a correction method for correcting vignetting effects in the values ​​of pixels of an image of an electronic camera. The correction method comprises: determining the value of a correction function at the location of a pixel iteratively or recursively by multiplying one or more factors with the determined value of the correction function at the location of another pixel; and correcting the value of the pixel, wherein the correction comprises dividing or preferably multiplying the value of the pixel by the value of the correction function at the location of the pixel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a correction method for correcting vignetting effects in pixel values ​​of an image of an electronic camera. The invention also relates to a corresponding correction device and an electronic camera comprising an image sensor and the correction device. The invention also relates to a computer device and a computer program product. Background Art

[0002] Electronic cameras are used in particular in industrial applications, as they are described in detail in European Patent EP 2 929 503 B1.

[0003] Figure 1 A simplified application of an electronic camera is shown. There, a light 16 usually illuminates a scene 17 with an object 18. The scene is recorded by a camera 10. In this case, the scene is imaged onto an image sensor 12 via an objective lens 11. An image processing unit 13 generates a result image from the raw image of the scene, which is transmitted via an interface 14 by means of an output 15 for further use.

[0004] In industrial applications, the camera is usually part of a machine. For reasons of profitability, it is usually desirable that the machine be run quickly. This also requires the camera to capture images at a high speed by the image sensor 12, process them quickly in the image processing unit 13, and then transmit them quickly. Moreover, as explained in EP 2 929 503 B1, it is also important for the high speed of the machine to keep the waiting time between the capture and transmission of the original image as short as possible.

[0005] Image sensors are usually composed of a large number of pixels. The pixels can be, for example, Figure 2 (a) is arranged in the form of a one-dimensional matrix. Therefore, we talk about line sensors or "line scan sensors" in English. It is particularly common for the pixels to be arranged in the form of a two-dimensional matrix, such as in Figure 2 (b). Matrix sensors are therefore also referred to as matrix sensors. Matrix sensors have a very large number of pixels, which are usually in the millions.

[0006] The image sensor can be designed in monochrome, as in Figure 2 As indicated in (a) and (b). The pixels then all have the same or at least very similar spectral sensitivity. Color sensors in turn usually have an arrangement of color filters of different colors, which are called mosaic filters. Figure 2(c) shows a mosaic color filter according to US Pat. No. 3,971,065 B1, which is named after its inventor "Bayer Pattern" and is constructed of red R, green G, and blue B color filters.

[0007] Reading of the raw image from the image sensor 12 is typically done incrementally. Figure 3 The schematic diagram of the incremental readout process is shown, which is carried out row by row. Here, the signal of the first pixel 30 is first output in the row direction 32, followed by the signal of the pixel 31 adjacent to the right of the first pixel, and continues in the readout direction. When the last pixel 33 of a row is reached, the row-by-row readout performs a jump 34 to the next row 35 and starts again there with the first pixel.

[0008] exist Figure 4 (a) shows by way of example an image sensor whose pixel matrix is ​​divided into two blocks 40 and 41 and in which the reading in the two blocks is performed in a mirrored manner. Such an image sensor is known, for example, from US Pat. No. 7,362,358 B2. There are numerous other ways of dividing the pixel matrix of an image sensor into blocks, for example, into strips or quadrants. According to common expression habits, this process is here referred to in English as "split readout".

[0009] Furthermore, image sensors are known which transmit more than one pixel value per clock cycle of the readout process, for example the image sensor PB-MV13 from Photobit. Figure 4 (b) is described. Here, the pixels of the first row are clocked at a clock cycle t 00 ,t 01 and t 02 In this case, two pixel values ​​of adjacent pixels are transmitted as an example in each of these clock cycles. This corresponds to the case when in clock cycle t 10 ,t 11 and t 12 The same applies when reading the second row in , and so on. In this case, the pixel values ​​transmitted simultaneously are understood to be vectors, so that this reading method is also referred to as "vectorization" here. When reading, more than two pixels can also be combined into a vector, for example 4, 8, 10, 16, etc.

[0010] Certain types of readout result in the following data format, in which the image data of the original image are present. It is common to convert the data format into another data format. For example, the image data read out with the aid of "split readout" can be converted into incremental data, which is achieved by temporarily storing the image data of a line and then reading it incrementally at twice the frequency. It is also possible to increase or decrease the vector width, for example by reducing or increasing the clock frequency by a corresponding factor.

[0011] As described in EP 2 929 503 B1, it is common to perform image correction in an image processing mechanism. The image correction must usually be calculated in real time. For this purpose, a computer, such as a computer with a processor (CPU), a microcontroller (MCU) or a graphics processing unit (GPU) can be used in principle. However, the image processing unit 13 usually needs to use a dedicated electronic circuit, such as a field programmable gate array (FPGA), a system on a chip (SOC) or an image signal processor (ISP) for the high speed required for running the machine under cost pressure. According to the architecture, it is expected that digital resources are considered economically, because the digital resources, for example, consume computing time, computing power, logic resources, chip area or energy, and their use is therefore associated with cost in principle. The heat associated with high power consumption is also usually a problem in practice.

[0012] In the aforementioned circuits FPGA, SOC and ISP, the calculations are performed in dedicated digital hardware provided by the configuration or chip design. In principle, it is also always possible to perform such calculations in analog circuits, although these have been losing their significance for image processing over the past few decades.

[0013] In digital circuits, addition, subtraction and multiplication can be performed relatively simply, resource-saving and cost-effectively. For example, addition and subtraction can be performed in an FPGA by means of logic elements. Alternatively, a special multiplier can be used for multiplication. Therefore, the operations are referred to as hardware-friendly operations here, and their use in hardware is considered to be advantageous. Other operations, such as division, square roots or transcendental functions, such as the calculation of cosine, hyperbolic cosine, exponential functions and logarithms, are associated with considerable expenditure or cost in hardware here. These operations are referred to as hardware-unfriendly operations here, and their use in hardware is considered to be disadvantageous.

[0014] As explained in EP 2 929 503 B1, in industrial applications there is usually still a computer which receives the transmitted data 15 and can parameterize the camera 10. Depending on the application, it is therefore possible to transfer large-scale or complex calculations to the computer. This applies in particular if the calculations are not time-critical and are, for example, only used to configure the camera 10, which then works independently in the subsequent operation. In principle, hardware-unfriendly calculations can be performed better on a computer than in hardware. Therefore, it is usually advantageous in terms of resource requirements and costs to transfer such calculations to a computer, although more computing time is required for this.

[0015] Electronic cameras are often used for measuring tasks in industrial applications. In this case, for example, the workpiece to be inspected is photographed with a camera and the brightness is compared pixel by pixel with an expected value by a computer. Here, a lower threshold and / or an upper threshold are usually used in order to make a decision about a defect in the workpiece. In principle, it is therefore desirable that equally bright parts of the scene 17 appear equally bright in the resulting image, since an uneven brightness distribution could interfere with the decision.

[0016] It is known that objective lenses do not generally produce images of uniform brightness. They usually produce so-called edge light loss, which is often also called edge shading. Sometimes this effect is also collectively referred to as vignetting. In English, we speak of "vignetting" or "lens roll-off". Edge light loss causes, in particular, the outer parts of the image to appear too dark in relation to the rest, in particular the central part. This is basically an intensity error. A good description and display of this effect can be found in the following examples: can be found in "Handbook of Computer Vision and Applications", Academic Press, 1999, by Johansen et al. (publisher).

[0017] It is desirable to correct the intensity errors in order to achieve an imaging with uniform brightness. The resulting image should correctly reproduce the intensity distribution on the object 18 , ie, as it would be without the intensity errors produced by the objective 11 .

[0018] In order to correct edge light loss, there are quite a number of publications, such as US patents or European patents US 9,414,052 B2, US 7,453,502 B2, EP 1 700268 B1, US 7,391,450 B2, EP 1 711 880 B1, EP2 278 788 B1, US 7,692,700 B2, US 7,834,921 B1, US 7,634,152 B2, US 7,548,262 B2, US 7,920,171 B2, US 7,907,195 B2, US 7,388,610 B2, US 7,408,576 B2, US 8,130,292 B2, US 8,218,037 B2, US 7,961,973 B2, US 8,472,712 B2, US 8,712,183 B2, US 8,577,140 B2 and US 7,817,196 B1.

[0019] Figure 5 A widely spread basic approach for correcting edge shading is explained. This approach is used by most methods, for example in "The Image Processing Handbook" by JC Russ, 2nd edition, CRC Press, 1994. At setup time 50, in the industrial context, for example during the production of a camera or during the commissioning of a machine using the camera, a reference image I is recorded. 0 The reference image I 0 It is usually designed so that it can be easily evaluated, for example by virtue of the fact that the recorded scene 17 consists only of homogeneous surfaces. For example, the scene 17 can show a white reference card, or it can be completely empty, which is achieved by virtue of the fact that no object 18 is located therein. The mathematical model M is then used and the parameters P are determined with the aid of the mathematical model. At runtime 51, the original image I is analyzed with the aid of the parameters P. 1 Correction K is performed. Therefore, the corrected result image I is obtained 2 .

[0020] Figure 6The possibility of carrying out such a correction according to JCRuss is described. This is done by using a model 53 at runtime 51, which can also be used as a model 52 for determining the parameter P during the setup time 50. Since it can be assumed that edge shading is a multiplication process, the correction consists in dividing 54 by the model value M of the edge shading, since division is the inverse operation of multiplication. The effects of edge shading are thus eliminated. The disadvantage here is that the division is hardware-unfriendly and must be performed very frequently for each pixel at runtime 51, so that the division cannot be easily transferred to a computer, for example.

[0021] Another basic approach is described, for example, in US Pat. No. 9,414,052 B2 and in Figure 7 Here, for the reference image I 0 The required division 60 is performed on the image data of I, for example by calculating its reciprocal value pixel by pixel. Subsequently, a model 61 suitable for the reciprocal value is applied to the reciprocal image value and parameters 62 are obtained for this. In this case, the correction K can be performed by finding the output value of a model 63 identical to the model 61 at runtime 51 and multiplying it by the original image I 1 Compared to the above division, the multiplication 64 performed at runtime 51 is more hardware friendly.

[0022] Many methods for correcting edge light reduction work radially and involve the center point, for example US patents or European patents US 7,453,502 B2, EP 1 700 268 B1, EP 2 278 788 B1, US 7,692,700 B2, US 7,834,921 B1, US 7,634,152 B2, US 7,548 262 B2, US 7,920,171 B2, US 7,907,195 B2, US 7,408,576 B2, US 8,130,292 B2, US 7,961,973 B2, US 8,472,712 B2 and US 8,577,140 B2. Figure 8 (a) illustrates the difference between the geometric center point 71 and the optical center point 72 of the image. This difference is also described, for example, in US Pat. No. 7,548,262 B2 and US Pat. No. 7,453,502 B2. The geometric center point 71 is located in the middle of the pixel array 70 of the image sensor and can be used in principle for vignetting correction, for example as described in US Pat. No. 7,920,171 B2. The geometric center point is derived directly from the mechanical properties of the image sensor and is therefore easy to determine.

[0023] The optical midpoint 72 describes the center of the effect caused by the object lens. The optical midpoint is usually offset from the geometric midpoint 71 and usually coincides with the position of the optical axis of the object lens on the image sensor. Because the effect of edge obscuration or vignetting mostly occurs radially symmetrically around the optical midpoint 72 in a good approximation, the correction based on the optical midpoint 72, rather than based on the geometric midpoint 71, usually provides better results. This is contrary to the following fact: the correct determination of the optical midpoint 72 is basically accompanied by technical difficulties, and partly requires large-scale calculations, as this is for example known from EP 1 700 268 B1, EP 2278 788 B1 and US 7,634,152 B2. In US 7,692,700 B2, there is the following reminder: advantageously, correction is performed so that the image brightness at the optical midpoint 72 will not change due to correction.

[0024] In principle, it is possible to treat the entire image as a uniform region 73 in which the correction is performed in a uniform manner, ie in particular with the aid of the same parameters P. This is done in Figure 8 In (a) it is described, for example, in US Pat. No. 7,45,3502 B2, US Pat. No. 7,634,152 B2, US Pat. No. 7,548,262 B2 and US Pat. No. 7,920,171 B2.

[0025] Alternatively, as in Figure 8 As shown in (b), the image can also be divided into concentric zones 82, 83 and 84 in a circular manner around the midpoint 81, wherein specific parameters are selected for the respective zone from all parameters P depending on the zone. This also occurs when a radial correction function is used, which is defined as a function of the radius from the midpoint 81 and is divided into zones. This division can be carried out, for example, by grid points, between which interpolation is carried out. Methods that can be described by such radial zones are also mentioned in EP 1 700 268 B1, US 7,834,921 B1, US 7,907,195 B2, US 7,408,576 B2 and US 7,961,973 B2.

[0026] Figure 8(c) shows another widely used possibility: the image 90 is divided into regions along the row and column directions, which are usually called blocks. Here, the basic idea is to select specific parameters for the corresponding blocks from all parameters P. For example, this division can be carried out by means of case differentiation. The use of grid points distributed in a grid shape and interpolated between them and the use of two-dimensional spline elements ultimately leads to such a division into blocks, wherein the specific parameters are then derived from the values ​​of the grid points adjacent to the pixels to be corrected. This approach is described, for example, in US 9,414,052 B2, EP 1 711 880 B1, US 7,388,610 B2, US 8,218,037 B2, US 8,472,712 B2, US 8,712,183 B2 and US 7,817,196 B1.

[0027] The mathematical model M is based in principle on a mathematical function which depends on the radius or a power of the radius or a coordinate or a difference in coordinates or another function of the coordinates. In this context, completely different functions are used in the prior art:

[0028] US Pat. No. 8,472,712 B2, US Pat. No. 8,218,037 B2 and US Pat. No. 7,961,973 B2 mention linear functions, which also include linear interpolation. Since linear functions only describe the shape of edge shading or vignetting very poorly, a linear correction with a fixed parameter set is applied only to a small area in the region of a zone, which is usually adjacent to other zones with linear corrections with other parameter sets. Therefore, a large number of linear functions are required for linear correction of edge shading or vignetting, which are used in many zones. This leads to a high storage requirement for parameters, such as coefficients or grid points.

[0029] The linear function forms a first-order polynomial. From this, the idea of ​​improving the correction can be derived, in that a higher-order polynomial function is used instead, which can better approximate the actually required function. Such polynomial functions are usually used as a function of the radius, for example in US 7,453,502 B2, EP 1 700 268 B1, US 7,548,262 B2, US 7,907,195 B2 and US 7,408,576 B2. Two-dimensional polynomials are also used, which are defined on a surface and usually use two coordinate values, for example x and y, as input values. Corresponding suggestions or solutions are described, for example, in Russ and US 7,692,700 B2 and US 8,712,183 B2.

[0030] Another approach uses surface curves based on two-dimensional splines or Bezier functions and is used, for example, in US Pat. No. 9,414,052 B2. It should be noted that Bezier curves or spline curves can also be converted into equivalent polynomials or expressed by equivalent polynomials. Therefore, the distinction between splines, Bezier and polynomial functions and curves is abandoned here, and they are summarized under the superordinate term "polynomial function" within the scope of the present invention.

[0031] Finally, another possibility provides for the use of trigonometric functions and functions derived therefrom, such as cos 4 This is likewise described in US Pat. No. 9,414,052 B2. The cosine hyperbolic function cosh is also used as a basis for solving the vignetting problem, as explained, for example, in US Pat. No. 7,920,171 B2. This solution is disadvantageous in principle: calculating the values ​​of trigonometric functions always involves hardware-unfriendly operations.

[0032] A. Kordecki et al., "Fast Vignetting Reduction Method for Digital Still Camera", IEEE, International Conference on Methods and Models in Automation and Robotics (MMAR), 2015, pp. 1145-1150, discloses a novel method for reducing vignetting effects based on two images recorded with different camera / lens settings. Changing the lens aperture also changes the vignetting effect in the image. The difference is used to estimate a vignetting function, which is used to reduce vignetting.

[0033] AASawchuk, "Real-Time Correction of Intensity Nonlinearities in Imaging Systems", IEEE, Transactions on Computers, 1977, pp. 34-39, presents an analysis of a two-dimensional imaging system with pervasive intensity nonlinearities and discusses different methods for real-time correction. Exact corrections for measurement purposes and approximate corrections for human observers are described, and implementations in hardware, particularly using programmable memory modules (PROMs), are shown. Also presented are calibration methods for such systems and estimates of system complexity.

[0034] It is desirable to be able to perform the correction at high speed in an image processing unit, preferably in a camera. It is desirable to save digital resources for digital operations performed at high speed, use hardware-friendly operations, minimize the number of digital operations as much as possible, and discard hardware-unfriendly operations as much as possible. Summary of the invention

[0035] The invention is based on the object of providing a correction method for correcting vignetting effects in pixel values ​​of images of an electronic camera, which correction method is suitable for satisfying one or more, preferably as many as possible, of the above-mentioned requirements. Furthermore, the invention is based on the object of providing a corresponding correction device as well as a computer device and a computer program product. Finally, the invention is based on the object of providing an electronic camera comprising a correction device according to the invention.

[0036] According to a first aspect of the present invention, there is provided a correction method for correcting vignetting effects in pixel values ​​of an image of an electronic camera, the correction method comprising:

[0037] - determining the value of the correction function at the location of a pixel is performed iteratively or recursively by multiplying one or more factors with the determined value of the correction function at the location of another pixel, and

[0038] - correcting the pixel value, wherein said correction comprises dividing or preferably multiplying the pixel value by the value of the correction function at the location of the pixel.

[0039] The inventors have recognized that for a specific correction function, such as an exponential function whose argument is the base of a one-dimensional or multidimensional polynomial of degree n≥2, or a function mathematically transformable into such a function, the value of the correction function at the location of a pixel can be determined very simply and based on hardware-friendly operations, iteratively or recursively by multiplying one or more factors with the already determined value of the correction function at the location of another pixel. This makes it possible to perform the correction at high speed, preferably in the camera, in hardware or in software, even in the case of a large number of pixels.

[0040] According to an advantageous development of the invention, the value of the correction function at the location of the pixel is determined based on a cascade of feedback multiplications. Such a structure based on a cascade of feedback multiplications can be implemented very easily and efficiently in hardware and in software.

[0041] According to another advantageous development of the invention, the factors of the feedback multiplication are respectively values ​​of an exponential function of a base, preferably the Euler number e or the number 2 or 10, the independent variable of which is a weighted sum of one or more coefficients of one or more parameters of the correction function, preferably a polynomial.

[0042] According to another advantageous improvement of the present invention, the image is a two-dimensional image, and the cascade of feedback multiplications includes a first feedback multiplication in a first direction of the image, for example in a row direction, and a second feedback multiplication in a second direction of the image, for example in a column direction, wherein an output value of the second feedback multiplication provides an input value of the first feedback multiplication.

[0043] According to an advantageous development of the invention, the determination of the value of the correction function at the location of the pixel is carried out in parallel, so that the pixel is divided into a plurality of channels, which:

[0044] - separately from each other, or

[0045] is processed in such a way that in one time step the value of the correction function at the location of a pixel of at least two different channels is determined on the basis of a common, already determined value of the correction function at the location of another pixel.

[0046] The speed of the correction can be further increased by determining the values ​​of the correction function at the position of the pixel in parallel. In this case, the pixels are divided into a plurality of channels, which are processed independently of one another, which offers the advantage of a very simple structure. However, this can have the disadvantage that calculation errors, such as rounding errors, can accumulate in different ways in different channels, which can lead to visible differences in the pixels of different channels and thus to undesirable visible banding in the result image. This can be avoided by processing the pixels divided into a plurality of channels in such a way that in one time step, the value of the correction function at the position of the pixels of at least two different channels is determined based on a common, already determined value of the correction function at the position of another pixel.

[0047] According to an advantageous development of the invention, the image is a color image, which is present as a mosaic-filtered image, in which the value of each pixel is respectively assigned to a color channel.

[0048] According to an advantageous improvement of the present invention, the values ​​of the pixels of the image are color values ​​of two or more color channels, and the correction of the pixel values ​​comprises:

[0049] - correcting the values ​​of the pixels by means of a separate correction function for each color channel, preferably such that the correction functions for two different channels in each case differ only by a constant offset in the values ​​of the correction functions, or

[0050] - Correction of the pixel values ​​using a correction function that is common to all color channels.

[0051] In this way, color images can also be processed in a suitable manner by means of the correction according to the invention.

[0052] According to an advantageous development of the invention, only the values ​​of the pixels of a local part of the image are corrected, and the origin of this local part is shifted relative to the origin of the image by a corresponding shift of the correction function, so that at least part of the parameters of the correction function are replaced by the shifted parameters of the correction function. In this way, the correction can be applied very effectively to a local part of the image, for example, a "region of interest" or "area of ​​interest".

[0053] According to an advantageous development of the invention, a plurality of regions are defined in the image and the values ​​of the pixels are corrected for each region using the parameters of the correction function for this region. With the aid of such a subdivision, it is possible to achieve a higher correction accuracy. This is the case in particular if the vignetting effect cannot be described sufficiently accurately for the entire image using a single parameter set of the correction function.

[0054] According to an advantageous development of the invention, the respective parameters of the correction function for two adjacent zones are such that the transition of the correction function between the two zones is continuous and preferably continuously differentiable. In this way, visible artifacts can be avoided when transitioning from one zone to the next.

[0055] According to a further advantageous development of the invention, the zone relates to the midpoint of the image, preferably the optical midpoint. This is advantageous because the midpoint of the image, in particular the optical midpoint, usually also represents the center of the vignetting effect and the midpoint also appears to be radially symmetrical in many cases.

[0056] According to an advantageous development of the invention, the correction method comprises estimating the optical center point of the image, which preferably shows a homogeneous scene, so that for the case where the image is generated by means of a one-dimensional image sensor, estimating the coordinates of the optical center point in one dimension comprises:

[0057] – generates a one-dimensional data vector from the values ​​of the pixels of the image in one dimension,

[0058] – iteratively fit a one-dimensional compensation parabola to a one-dimensional data vector,

[0059] And for the case where the image is generated by means of a two-dimensional image sensor, estimating the coordinates of the optical midpoint in the first dimension comprises:

[0060] – averaging the values ​​of the pixels of the image in the second dimension to produce a one-dimensional data vector of the average values ​​in the first dimension, and

[0061] - Iteratively fit a one-dimensional compensating parabola to the one-dimensional data vector.

[0062] The method provides a relatively simple but robust possibility of estimating the optical center point of an image, if this is required, for example, for partitioning the image. In the case of recording images with the aid of a one-dimensional image sensor, as well as in the case of recording images with the aid of a two-dimensional image sensor, the generation of a one-dimensional data vector can also include averaging the values ​​of the pixels of images recorded successively in time.

[0063] According to a further advantageous development of the invention, the iterative fitting in each iteration is carried out in a data region around the coordinates of the current estimate of the optical midpoint in the one dimension or the first dimension of the one-dimensional data vector, wherein the data region is preferably symmetrical with respect to the coordinates of the current estimate of the optical midpoint in the one dimension or the first dimension and / or is initialized with the iterative fitting of the coordinates of the geometrical midpoint of the image in the one dimension or the first dimension as the coordinates of the current estimate of the optical midpoint in the one dimension or the first dimension. In this case, the respectively updated estimated coordinates usually converge very quickly with respect to the actual optical midpoint, so that a good estimate can usually be obtained with a small number of iterations.

[0064] According to an advantageous development of the invention, the correction function comprises an exponential function of the base, preferably Euler's number e or the number 2 or 10, the argument of which is a one-dimensional or multidimensional polynomial of degree n≥2, or the correction function is mathematically transformable into such a function.

[0065] Here we assume that: through the so-called cos 4 The law can describe the typical vignetting effect well or well enough. However, as mentioned above, cos 4 The calculation of the value of the function is a hardware-unfriendly operation. The inventors have now realized that cos 4 The function can be very well described by an exponential function whose argument is the base of a one-dimensional or multidimensional polynomial of degree n≥2, or a function that can be mathematically transformed into such a function, for example a Gaussian normal distribution. According to the knowledge of the inventors, such a function has many properties that are destined to be used as a correction function for correcting vignetting effects in the values ​​of pixels of an image of an electronic camera. For example, the negation of its argument provides a reciprocal value, so that the function can be converted by a very simple operation by dividing or multiplying the value of the pixel by the value of the function at the position of the pixel to correct the value of the pixel. Therefore, the use of the claimed exponential function as a correction function allows to provide a correction method for correcting vignetting effects in the values ​​of pixels of an image of an electronic camera, so that the requirements mentioned above are highly met.

[0066] According to a further advantageous development, the correction method comprises determining parameters of the correction function based on a reference image, which preferably shows a homogeneous scene, wherein determining the parameters of the correction function comprises normalizing the correction function so that the correction function has a predetermined value, preferably the value 1, at its apex. On the one hand, the determination of the parameters of the correction function therefore ideally only needs to be performed once during setup time, for example during production of the camera or during commissioning of a machine using the camera. Furthermore, by suitably selecting the reference image, for example so that the image shows a homogeneous scene, the evaluation of the image and thus the determination of the parameters of the correction function can be carried out in a relatively simple manner. Furthermore, it can be ensured by the normalization that the brightness in the center of the vignetting effect is not changed by the correction.

[0067] According to another advantageous development of the invention, the normalization is performed so that the coefficients of the zeroth order of the polynomial are replaced by normalized coefficients of the zeroth order, which are calculated from the coefficients of the higher order of the polynomial. Thus, the normalization can be performed in a simple manner without the need to determine the optical center point for this purpose.

[0068] According to another aspect of the invention, a correction device for correcting vignetting effects in the values ​​of pixels of an image of an electronic camera is provided, wherein the correction device is configured to:

[0069] - the value of the correction function at the location of a pixel is determined iteratively or recursively by multiplying one or more factors with the already determined value of the correction function at the location of another pixel, and

[0070] - correcting the value of the pixel, wherein the correction comprises dividing or preferably multiplying the value of the pixel by the value of the correction function at the location of the pixel.

[0071] According to another aspect of the present invention, there is provided an electronic camera (10), wherein the electronic camera comprises:

[0072] - an image sensor having pixels for generating an image; and

[0073] - A correction device according to the invention for correcting vignetting effects in the values ​​of pixels of an image.

[0074] According to another aspect of the present invention, a computer device is provided, wherein the computer device comprises a computing unit which is designed to execute the correction method according to the present invention.

[0075] According to another aspect of the present invention, a computer program product is provided, wherein the computer program product comprises code means for causing the computer device to perform the correction method according to the present invention when the computer program product is executed on the computer device.

[0076] It is to be understood that the correction method according to the invention, the correction device according to the invention, the electronic camera according to the invention, the computer device according to the invention and the computer program product according to the invention have similar and / or identical preferred embodiments, in particular as defined in the following description.

[0077] It is to be understood that a preferred embodiment of the present invention can also be any combination of the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings, wherein

[0079] Figure 1 schematically and exemplarily illustrate the application and construction of an electronic camera; and

[0080] Figure 2 Schematically and by way of example, an image sensor is shown which can be designed, for example, as (a) a one-dimensional matrix, (b) a two-dimensional matrix or (c) a two-dimensional matrix with an arrangement of color filters;

[0081] Figure 3 Incremental reading is schematically and exemplarily shown;

[0082] Figure 4 Schematically and exemplarily showing (a) block-wise and (b) vectorized reading of an image sensor;

[0083] Figure 5 The basic flow of the correction is shown schematically and exemplarily;

[0084] Figure 6 The correction performed by means of division is shown schematically and exemplarily;

[0085] Figure 7 It is shown schematically and by way of example that the correction is performed by multiplication of a model which is determined with the aid of a reciprocal reference image;

[0086] Figure 8 Schematically and exemplarily showing (a) the geometrical and optical midpoint of an image, (b) the division of an image into radial zones, and (c) the division of an image into Cartesian zones;

[0087] Fig. 9 Schematically and exemplarily, (ac)cos 4 Function and (df)cos 4 Functions are fitted by (a, d) parabolas, (b, e) cosh functions, and (c, f) Gaussian or reciprocal Gaussian distributions;

[0088] Fig.10The replacement of hardware-unfriendly division by transformation is schematically and exemplarily shown;

[0089] Fig.11 Schematically and exemplarily showing a polynomial exponential function in (a) the x-direction, (b) in the y-direction, and (c) in two dimensions;

[0090] Fig.12 An example of selecting pixels for determining parameters is schematically and exemplarily shown;

[0091] Fig.13 The feedback multiplication mechanism in two alternative embodiments is schematically and exemplarily shown;

[0092] Fig.14 Schematically and exemplarily showing the cascade of two feedback multiplication mechanisms and the subsequent correction of pixel values;

[0093] Fig.15 A cascade of n feedback multiplication mechanisms is shown schematically and exemplarily together with a multiplier connected downstream for correcting pixel values;

[0094] Fig.16 It is schematically and exemplarily shown how two cascaded feedback multiplication mechanisms are connected to form a two-dimensional cascaded feedback multiplication mechanism;

[0095] Fig.17 It is schematically and exemplarily shown how a plurality of cascaded feedback multiplication mechanisms are connected to form a two-dimensional cascaded feedback multiplication mechanism for correction by means of a two-dimensional polynomial exponential function of degree n×m;

[0096] Fig.18 It is shown schematically and exemplarily that different color channels can have different brightness;

[0097] Fig.19 It is schematically and exemplarily shown that the logarithmic color values ​​of different color channels have different offsets and can be described (a) separately or (b) together;

[0098] Fig. 20 Schematically and exemplarily showing image parts;

[0099] Fig.21 Schematically and exemplarily showing the serial correction of pixels by a cascaded feedback multiplication mechanism;

[0100] Fig. 22 Schematically and exemplarily showing the partially parallel calculation by multiple cascaded feedback multiplication mechanisms;

[0101] Fig.23The stabilization of partially parallel calculations by common reference to correction values ​​is schematically and exemplarily shown;

[0102] Fig.24 Different forms of partitioning are shown schematically and exemplarily;

[0103] Fig.25 An overview of an algorithm for finding the optical midpoint is shown schematically and exemplarily;

[0104] Fig.26 The effect of taking row-by-row or column-by-column averages is shown schematically and exemplarily;

[0105] Fig. 27 schematically and exemplarily shows a first iteration of determining the coordinates of the optical midpoint; and

[0106] Fig.28 The second iteration of determining the coordinates of the optical center point is shown schematically and exemplarily. DETAILED DESCRIPTION

[0107] In the figures, identical or corresponding elements or units are provided with identical or corresponding reference numerals, respectively. If an element or unit has been described in conjunction with one figure, a detailed description may be omitted in conjunction with another figure. The terms "left", "right", "upper", "lower" etc., which may be used within the description of the figures, relate to the corresponding figures in an orientation with normally readable reference numerals and reference signs.

[0108] As described above, according to the present invention, a correction method for correcting vignetting effects in the values ​​of pixels of an image of an electronic camera can be provided, which correction method is suitable for satisfying one or more, preferably as many as possible, requirements regarding high speed, saving resources, using hardware-friendly operations, etc. This occurs in the following way: the value of the pixel is corrected based on a correction function, which includes an exponential function of the base, preferably the Euler number e or the number 2 or 10, the argument of which is a one-dimensional or multidimensional polynomial of degree n≥2, or the correction function is mathematically transformable into such a function, wherein correcting the value of the pixel includes dividing or preferably multiplying the value of the pixel by the value of the correction function at the position of the pixel.

[0109] How this can be achieved in different embodiments of the present invention is explained below by way of example in reference numerals 1 to 11. In this case it should be noted that the inventive concepts described in these reference numerals can be combined in a suitable manner by a person skilled in the art, and that the combinations are respectively embodiments of the present invention:

[0110] 1. Correction function

[0111] Assumption: Through the so-called cos4 The law describes the marginal light reduction produced by the objective lens well or sufficiently. Reference is also made to this law in US 7,453,502 B2, US 7,692,700 B2, US 7,634,152 B2, US 7,920,171 B2, US 8,472,712 B2 and US 8,577,140 B2.

[0112] cos 4 Functions can only be described with difficulty by linear functions or by polynomial functions. This will be described according to Fig. 9 There, the function values ​​f for different functions of the free variable z are respectively shown. Fig. 9 (a) to (c) respectively represent the cos 4 The shape function 100 is shown as a dashed line. The region is selected so that the function drops to approximately 25% of the maximum value at the edge. This corresponds to the observation that the edge light reduction that actually occurs leads to a darkening of approximately 75% in the worst case, so that at least 25% of the light intensity is still present in each case without edge light reduction. In the diagram, f and all functions shown are scaled linearly to a value range of 0 to 255, since this corresponds to the usual practice in which brightness in digital images is described in this region.

[0113] exist Fig. 9 In (a), cos 4 Function 100 is approximated by means of parabolic function 101 while minimizing the integral variance. It can be seen that the parabolic function cannot approximate cosine sufficiently accurately. 4 Function. The reason is speculated here: why in a large number of prior art documents, parabolic functions as quadratic polynomial functions are extended to further degrees, such as in US 7,453,502 B2 and US 7,548,262 B2. Polynomial functions of higher degrees require more computational effort. In addition, they require higher precision in the calculation, which in turn requires higher expenditure on hardware.

[0114] exist Fig. 9 (b), the same cos 4 The shape function 100 is approximated in the same manner by means of a cosh function 102 plus a constant offset, as is proposed, for example, in US Pat. No. 7,920,171 B2. This approximation also shows clearly suboptimal results. In addition, the cosine hyperbola is a hardware-unfriendly function.

[0115] The present invention is based on the knowledge of the inventors that cos 4 The shape function closely approximates a Gaussian distribution, also called a Gaussian normal distribution, in shape:

[0116]

[0117] The equation for the Gaussian distribution is normalized by the factor and applied to the independent variable - (x - μ) 2 / (2σ). In order to obtain a description or correction suitable for vignetting, the normalization factor can be omitted, since there is no corresponding normalization condition for the integral. In addition, the distributive law can be applied to the independent variable using the binomial. This results in a quadratic polynomial. Then, the mean value of the Gaussian distribution μ and the leading negative sign and divided by 2σ 2 The same can be included in the coefficients. This results in an exponential function of the polynomial, which is referred to here as the exponential function of the polynomial with coefficients c. 0 、c 1 and c 2 The calculation rules for the exponential function result in the fact that the factors that may be required can also be included in the coefficient c. 0 Finally, if the free variable x is replaced by the free variable z, the quadratic polynomial exponential function is expressed as follows:

[0118]

[0119] Therefore, the following idea is generated: the cosine of the vignetting is described by a polynomial exponential function 4 Function. Fig. 9 (c) and Fig. 9 The same cos in (a) and (b) 4 The shape function is again approximated in the same way by means of a polynomial exponential function. It is clearly seen that this function can be more Fig. 9 The above functions in (a) and (b) clearly better describe cos 4 It is therefore proposed that the correction for edge light loss or vignetting is based on this function.

[0120] As already mentioned above, in principle there is also the possibility of using a reciprocal function for the correction, which describes the reciprocal brightness distribution, hereinafter the reciprocal cos 4 The approximation of the shape function, 1 / cos 4 or cos -4 Shape function 104. This function is also scaled proportionally to the value range of 0 to 255 that is common in image processing. This function is again represented via the free variable z, whose display range is selected to be exactly the same as in Fig. 9 The same as in (a) to (c).

[0121] Fig. 9(d) shows the parabolic function 105 for cos -4 Approximation of shape function 104. It can be seen that in this case, the parabola also does not describe function 104 well. The same applies to the approximation using the cosh shape function 106, which is Fig. 9 Finally, Fig. 9 (f) shows the effect of the quadratic polynomial exponential function 107 on cos -4 The quadratic polynomial exponential function, which is an approximation of the shape function 104 , can also describe the function very well.

[0122] This shows on the one hand the good suitability of the polynomial exponential function for describing the vignetting as a mathematical model M, wherein the coefficient c in the context of the above description is the parameter P. The correction K can then be performed by means of a division. On the other hand, the polynomial exponential function is also suitable for describing the reciprocal vignetting as a reciprocal model M, so that the correction K can be performed as a multiplication.

[0123] Furthermore, the exponential function has the advantageous property that the negation of the independent variable provides the reciprocal value:

[0124]

[0125] Based on this, the inventor's idea is to replace the hardware-unfriendly division described by hardware-friendly multiplication. Fig.10 In this case, at the setup time, the reference image I 0 The mathematical model M is described by means of a first polynomial exponential function. In this case, a parameter P is determined, which is converted into a transformed parameter P by means of a transformation N. 2 The transformation can preferably consist of a negation. For this purpose, the transformed parameter P can now be used. 2 , the image I is corrected by multiplication 112 with the aid of the polynomial exponential function 111 0 image data. By transforming N, a hardware-unfriendly division can be replaced by a hardware-friendly multiplication. The additional effort for the transformation is low, since in the example mentioned the transformation consists only of a hardware-friendly negation of the parameters, and since the number of parameters is preferably in the order of magnitude of, for example, 1 to 10, whereas the number of pixels is mostly in the order of magnitude of millions, and therefore the computational effort for transforming a small number of parameters is very low, in particular compared to a division of the pixel values.

[0126] The inversion can also be performed by applying the inversion operator N to the coefficients of the polynomial exponential function summed up in the column vector. The inversion operator can be represented in matrix notation and is respectively composed of an identity matrix multiplied by -1. For the case mentioned in equation (1.2), the matrix is ​​represented as follows:

[0127]

[0128] The quadratic one-dimensional polynomial exponential function according to equation (1.2) can now be used directly to correct the image of the line sensor in the manner mentioned.

[0129] However, most electronic cameras have a two-dimensional matrix sensor, in which case vignetting occurs two-dimensionally. Therefore, the idea is developed as follows, preferably by describing the vignetting by a two-dimensional polynomial exponential function, which can be represented as a function of the two coordinates x and y. It is assumed here that vignetting is purely multiplicative, so that the following idea is derived from this: by converting the vignetting according to Fig.11 (a) The level of the polynomial exponential function is related to the Fig.11 (b) is multiplied to produce the vertical polynomial exponential function according to Fig.11 (c) A two-dimensional polynomial exponential function of (c). The horizontal polynomial exponential function is obtained by replacing the free variable z with the horizontal coordinate x, and the vertical polynomial exponential function is obtained by replacing z with the vertical coordinate y. This is shown here by way of example for a polynomial exponential function of the second order and can be extended by a person skilled in the art for higher orders:

[0130]

[0131] Here, c x.0 、c x.1 and c x.2 are the coefficients of the polynomial exponential function for the levels, and c y.0 、c y.1 and c y.2 are the coefficients of the vertical polynomial exponential function. By applying the calculation rules for exponential functions, it is possible to combine the two exponential functions into one by adding the independent variable:

[0132]

[0133] In this case, c appears in the independent variable x.0 and c y.0 The sum of these two coefficients can be combined into a unique coefficient c by summing 0.0 =c x.0 +c y.0 This shows by way of example how a large number of equivalent expressions for polynomial exponential functions can be generated by mathematical transformations.

[0134] The basis obtained Fig.11 The two-dimensional polynomial exponential function of (c) has the following advantages: it can have a radially symmetric shape and is therefore very suitable for correcting radially symmetric vignetting. x.2and c y.2 have equal value c 2 This is especially the case when

[0135] Mathematical proofs have furthermore shown that polynomial exponential functions are the only type of functions in which radially symmetrical functions can advantageously be generated by multiplying horizontal and identical vertical functions.

[0136] Correction of edge light loss or vignetting with the aid of a polynomial exponential function can in principle be carried out by multiplying or dividing the uncorrected pixel value p by the function value of the polynomial exponential function g. As already explained, the two cases differ only in the choice of the sign of the coefficients and it is always possible to consider both mathematically. However, due to the greater hardware friendliness, multiplication is usually preferred.

[0137] In general, a one-dimensional polynomial exponential function g of degree n can be described by an exponential function applied to the one-dimensional polynomial of degree n:

[0138]

[0139] The use of higher-order terms and coefficients has the advantage that the accuracy can be further increased. However, this may also increase the computational effort. In addition, the idea can be developed from this that the accuracy can be further increased in the two-dimensional case by using a polynomial exponential function g with an m×n degree. In this case, n represents the horizontal degree of the two-dimensional polynomial exponential function and m represents the vertical degree. Then, g can be calculated, for example, as follows:

[0140]

[0141] Since the underlying vignetting problem is usually radially symmetric and thus has no preferred direction, it is appropriate to choose the horizontal order n and the vertical order m to be equal. Thus, neither of these two directions is prioritized in the correction.

[0142] Of course, a large number of equivalent representations are possible here, for example by changing the order of the summation. In addition, the solution is given here as an exponential function, i.e. as a power function with the Euler number e as base. Almost any other number can also be used as base, for example the numbers 2 or 10 which are particularly often used for this purpose. The corresponding conversion follows the following known formula. Therefore, a corresponding transformation of the base only requires a corresponding adjustment of the coefficients:

[0143]

[0144] In this equation, unlike the rest of the description, a and b represent two different bases of the corresponding exponential function, and x is an arbitrary free variable.

[0145] 2. Determination of parameters

[0146] In the following, the type of determination according to the invention of the coefficients of the polynomial exponential function g is described by way of example as a parameter P for the correction.

[0147] First, select the pixel value p i This choice can be made in various ways and under the condition of evaluating facts about the performance of vignetting and the available memory and computing resources. Some examples are Fig.12 It is thus possible, for example, to select all pixels, such as Fig.12 As shown in (a). Alternatively, it is also possible to use a regularly arranged subset of pixels, as in Fig.12 (b). It is also possible to select pixels along a preferred line or direction, as in Fig.12 Finally, it is also possible to combine the pixels, for example by adding or averaging their values, as in Fig.12 This process is also called "binning".

[0148] Then, it is possible to i Determine the parameters. This can be performed according to the invention, for example, as a fit by applying a fitting algorithm to the input data. Reference image I n The pixel value or the reference image I 0 The reciprocal pixel value of can be used as input data. The error between the input data and the function to be fitted is minimized. An example of such a fitting algorithm is the so-called "Levenberg-Marquardt ordinary least-squares method".

[0149] A preferred alternative for determining the parameters is to omit the division 60 (see Figure 7 ), and instead of this the logarithm of the input data to a base is calculated. For example, Euler's number e, 2 or 10 or another number can be used as the base. By calculating the logarithm of the input data, the determination of the parameters can be converted into a linear problem, which can be realized with simpler methods, less computational effort and also with less computing time.

[0150] This can be achieved, for example, by combining the input data consisting of pixels p into a target vector d. i The logarithm of the coordinate x i and i The natural logarithm of the base e is used as an example in the following formula:

[0151]

[0152] Furthermore, the parameters can be combined in an exemplary order to form a parameter vector c. In this case, c 0.0 As described including the x offset c x.0 and the y offset c y.0 :

[0153]

[0154] Finally, a matrix can be formed, which contains the coordinates x column by column. i and i Different powers of , which belong to the coefficients:

[0155]

[0156] The overdetermined optimization problem can then be described as follows using the variance to be minimized:

[0157] (d-Mc) 2 →Minimize(2.4)

[0158] A simple, known possibility to solve this problem is to use the pseudo-inverse according to Moore-Penrose, also called the Moore-Penrose inverse:

[0159] c=(M T M) -1 M T d. (2.5)

[0160] The coefficients of the polynomial exponential function can thus be calculated in a simple manner and with little effort. For the case of a targeted search for the coefficients for the radially symmetrical correction, additional auxiliary conditions can be introduced, such that, for example, c x.2 =c y.2 The determination of the parameters can then be attempted using the least squares method together with auxiliary conditions.

[0161] Another alternative is to first determine two parameters to be set equally independently of one another and then to make them equal to their common average value.

[0162] Finally, it is also possible to pass the parameter c 2 Substitute these two parameters cx.2 and c y.2 And the two-dimensional polynomial exponential function of second order is written as:

[0163]

[0164] Accordingly, the parameter vector c can then be obtained from the parameter c 0 、c x.1 、c y.1 and c 2 Construct, where M and c 2 The associated columns contain the values Furthermore, there are further equivalent possibilities which can be derived therefrom by applying known calculation rules, for example by linear combinations.

[0165] This method of determining the parameters offers the advantage that it is possible to determine the parameter P in a simple manner without requiring a complex determination of the optical center point for this purpose.

[0166] Furthermore, the method can also be easily extended to determine the parameters of higher-order polynomial exponential functions by including the corresponding coefficients in the parameter vector c and expanding the matrix M with the corresponding columns of the coordinate values ​​belonging to the powers or power products of the parameters.

[0167] 3. Normalization

[0168] Advantageously, the brightness at the optical center point is kept constant by the correction. Since the determination of the optical center point has been deliberately omitted in the simplification process, the question now arises as to how such a normalization can be performed without determining the optical center point.

[0169] One possibility according to the invention for this normalization is to determine the value of a function of the mathematical model for all pixels. Depending on the appropriate extreme value, i.e. the maximum or minimum value, the function can then be divided by this value or multiplied by its inverse or by the number resulting from the division by this value. The disadvantage of this approach is that it requires a relatively high computational effort.

[0170] For a simpler normalization, it is first considered to apply a polynomial exponential function. Since the function is multiplied or divided by the function, the function preferably has a natural value of 1 associated therewith at the desired location of constant brightness.

[0171] For this purpose, we also consider its definition according to equation (1.2). An exponential function has the value 1 when its argument, which is a quadratic polynomial, has the value 0. The idea is to make a parameter c 0is chosen so that the independent variable of the exponential function becomes 0 just at the extreme value of the function g. To do this, g is differentiated during the derivation, set to 0, solved for the location x, its value is again applied to the independent variable of the function g for x, said independent variable is also set to 0 and c is 0 Solve. So we have for c 0 The following normalized values

[0172]

[0173] The calculation steps described for the derivation are only used to trace the validity of equation (3.1). At run time, it is not necessary to trace back the equation. In the case of a polynomial exponential function, the normalized value So replace the previous value c 0 . Therefore the polynomial exponential function is normalized.

[0174] In principle, the same procedure can be followed for the two-dimensional case. Instead of differentiating, a gradient is formed from the vector consisting of the values ​​x and y, which, after being reset to zero, provides the two-dimensional coordinate values ​​for this vector. As before, the element corresponding to x or y for the value of x or y is inserted into the argument of the function g, which is again set to 0 and the value of c is set to zero. 0.0 Alternatively, the rows of the vector equations mentioned here can also be calculated individually and then used. 0.0 The following normalized values

[0175]

[0176] This exemplary expression can be easily converted into different equivalent expressions. x.2 =c 2 =c y.2 The following expressions of applicability are given in the case:

[0177]

[0178] Equations (3.1) to (3.3) respectively show that according to Fig.10 The simple normalized transformation N of the parameter P of φ is perfect and can be calculated with very little effort. In particular, knowledge of the optical center point is not required for its execution, so that the effort of calculating the optical center point can be further omitted.

[0179] As expected, simplified notation is also introduced here. More precisely, equations (3.1) to (3.3) are nonlinear calculations. The calculations can be written in a slightly simplified manner by first introducing the vector c of the polynomial exponential function coefficients and the vector of the normalized polynomial exponential function coefficients For the one-dimensional case, it is expressed as follows:

[0180] and

[0181] With the help of this vector, a nonlinear normalization operator can be defined in the parameter space F:

[0182]

[0183] For the two-dimensional case, the vector and normalization operator F can also be defined accordingly:

[0184] 4. Iteration

[0185] Until now, there has been a fundamental technical problem when applying polynomial exponential functions: exponential functions are hardware-unfriendly functions, and their pixel-by-pixel calculation requires high computational effort or extensive hardware resources. Therefore, a detailed analysis was performed to determine how the calculation of polynomial exponential functions could be reduced to hardware-friendly operations.

[0186] The underlying knowledge follows the mathematical concept of defining superoperators. In the case of superoperators, operations of a particular level are obtained by executing operations of a lower level multiple times. Exponential functions are power functions and thus operations of the third level of superoperators. The exponential function can be calculated according to the definition of the superoperator by executing operations of the second level of the superoperator multiple times, which also includes multiplication.

[0187] Following this idea, the working mode of the feedback multiplication mechanism has been analyzed. Fig.13 The feedback multiplication mechanism here comprises variables or registers, such as h 0 Via the initialization signal r, it is possible to select 200 via the input terminal d at the start time 0 In the case shown, the input d 0 By the value a 0The selection can be performed, for example, by means of a multiplexer. After the start time, the initialization signal r can have a different value, which indicates that the start time no longer exists. The selection can then select another value, for example the result of a multiplication, which can be performed, for example, by means of a multiplier 202. Such a multiplier can be constructed, for example, by logical operations or by logic elements of an FPGA. Alternatively, for example, dedicated multiplier elements can be used in the FPGA, which can, for example, be part of a DSP block. In a processor, for example, a multiplier contained in its ALU can be used. In this case, the multiplier 202 respectively converts the variable h 0 is multiplied by the value applied to the data input d. In the two examples shown, this is the value a 1 Variable h 0 The values ​​of are output via the output terminals q, respectively. The delay element 201 accordingly ensures that the operation is performed once within the time step. Such a delay can be realized, for example, by a register, which is composed of flip-flops, which are each constructed with a clock input and optionally with a so-called enable input. The latter is also called the "enable" input in English. For example, the following frequency or its multiples can be used as a clock, with which pixels, rows or columns of an image are calculated. It is also feasible that, in a digital circuit, each clock is selected as a time step by means of an enable signal. It is thus feasible, for example, to perform the multiplication exactly once for each pixel, row or column.

[0188] In principle, there is a multiplication 202, a selection 200, a delay 201 and a 0 In principle, there are different possibilities for the order of storage. Thus, for example, Fig.13 As shown in (a), it is possible to store in variable h 0 Before the delay 201. However, if Fig.13 As shown in (b), the variable h is executed before the delay 201. 0 The main difference between these two implementations is that the input terminal d 0 How fast the signal is present at the output terminal q. Therefore, Fig.13 In (a), after the first time step, there is a value a at the output 0 , while Fig.13 In (b), the value a already exists after the first time step 0 a 1 This difference can be compensated by choosing the values. For example, if Fig.13 (b) for a 0 Choose Fig.13 (a) Compared with the factor 1 / a 1If the values ​​loaded are the same, then the same output values ​​are obtained after the first time step. It is therefore possible in principle to implement different embodiments and to achieve respectively equivalent behavior by appropriately selecting the values ​​at the input in a specific case. Fig.13 When necessary, the technical teaching of this embodiment can also be applied to other embodiments.

[0189] The mathematical representation of the feedback multiplication mechanism will be discussed below. Here, a time step z and a count value i for the time step are used. Without limiting the generality, it is assumed that at time step z=0, an initialization signal r is set. Here, the set signal means that the signal has the following value, which causes the selection of 200 to select the starting value d 0 , without taking into account whether a logical value 0 or 1 is required for the initialization signal r. It is also assumed that for all time steps z>0 or i>0, the initialization signal r is not set, wherein the unset initialization signal r causes the selection 200 to select the result of the multiplier 202. Under these assumptions, after a time step z=0, the value a is present at the output q 0 Here, without limiting the generality, it is assumed that during the time step z=0, the selected 200 with the value a 0 The signal d 0 is applied to the delay 201 so that after the time step z=0 the value is forwarded from the delay 201 to the variable h 0 and output q. It is possible that after time step z=0, time step z=1 already exists, but this is not absolutely necessary. After each additional time step, a value is then present at output q, which corresponds to the value a applied to input d. 1 Multiply. This results in the following recursive equation for the value at output q after time step z:

[0190]

[0191] The recursion can be converted into the following iterative formula and under the assumption that a 0 and a 1 Under the positive condition, it can be further modified as follows:

[0192]

[0193] In this case, the coefficient c is used 0 and c 1 , from which the value a is obtained in the case mentioned according to the following formula 0 and a 1 :

[0194] and

[0195] This modification and this notation make it clear that the feedback multiplication mechanism is able to continuously calculate the value of a first-degree polynomial exponential function with coefficients b0 and b1 for the integer free variable z.

[0196] From the knowledge that a feedback multiplication mechanism can continuously calculate a first-order polynomial exponential function, the question arises as to how a second-order polynomial exponential function can be continuously calculated by means of a feedback multiplication mechanism and how the pixels can thereby be corrected with respect to vignetting.

[0197] To this end, observations based on Fig.14 The same reference numerals correspond to the interconnection of two feedback multiplication mechanisms. Fig.13 (a) in the figure. Here, the second feedback multiplication mechanism 221 is connected upstream of the first feedback multiplication mechanism 222. Therefore, a cascade of two feedback multiplication mechanisms occurs. The resulting circuit consisting of the two feedback multiplication mechanisms 221 and 222 is referred to as a secondary cascade feedback multiplication mechanism. Since the input terminal of the feedback multiplication mechanism on the left cannot be empty, a constant value 220 is connected upstream of the second feedback multiplication mechanism as the starting element of the cascade chain. Downstream of the output terminal of the first feedback multiplication mechanism 222, a multiplier 224 for correcting pixel values ​​can be connected.

[0198] The cascade is carried out in detail so that the feedback multiplication mechanism, such as W 1 The output terminal q is respectively connected to the subsequent feedback multiplication mechanism, such as W 0 As in Fig.10 As in 2 Applied to the feedback multiplication mechanism W located at the front of the cascade 1 The output of the last feedback multiplication mechanism of the cascaded feedback multiplication mechanism can then be used to correct the pixel value p z , which is done by: using multipliers 224 to multiply the pixel value p i This multiplication also corresponds to Fig.10 The multiplication 112 in . Here, the corrected pixel values ​​are obtained respectively

[0199] The number of feedback multiplication mechanisms that decreases during the cascade, such as W 1 , after which W 0 The mathematical effect achieved by the cascade is explained here in the usual mathematical notation. To illustrate this, the previously selected time steps and their numbering are retained in the same way.

[0200] The mathematical effect of the feedback multiplication mechanism can again be described first recursively. Here, the number z of the time step is given in parentheses, according to which the value is assumed:

[0201]

[0202]

[0203] The output value q of the first feedback multiplication mechanism 222 has a value h after the time point z. 0 (z). For a better understanding, the values ​​obtained from time points z=0 to z=4 are described in detail here:

[0204] h 0 (0) = a 0 h 1 (0) = a 1 (4.6)

[0205] h 0 (1) = h 0 (0)h 1 (0) = a 0 a 1 h 1 (1) = h 1 (0) 2 =a 1 a 2 (4.7)

[0206]

[0207]

[0208]

[0209] Generally speaking, h 0 The value of (z) can be expressed as follows: In the first step of equation (4.2) for a simple feedback multiplication mechanism, the value a of the signal present at the input d is represented here 1 For all previous time steps i, the corresponding output value q of the upstream feedback multiplication device 221 is substituted. This results in the following iteration formula, which can be further converted into the following polynomial exponential function:

[0210]

[0211] For better understanding and to simplify the notation, the value b is used here. 0 、b 1 and b2 and c 0 、c 1 and c 2 It has been shown that quadratic polynomial exponential functions can in principle be calculated by cascading two feedback multiplication mechanisms.

[0212] In order to get the coefficient c from the polynomial exponential function 0 、c 1 and c 2 Calculated value a 0 、a 1 and a 2 , b 0 , b 1 and b 2 , define three vectors a, b and c:

[0213]

[0214] The vectors a and b are related to one another via an exponential function, wherein the application of an exponential function to a vector is understood here to mean the application of the exponential function to the corresponding elements of the vector:

[0215] a=e b . (4.13)

[0216] The relationship between b and c can be derived from the penultimate step of equation (4.11) and is described by a linear transformation, which can be expressed by the inverse transformation matrix T -1 Shows:

[0217] c=T -1 b. (4.14)

[0218] Here, for T -1 The value of can be obtained directly from equation (4.11):

[0219]

[0220] Here, the linear transformation is therefore defined as the inverse matrix, since in applications the calculations are usually performed in the reverse order, i.e. b is calculated from c:

[0221] b=Tc. (4.16)

[0222] Then T is obtained as the inverse of the inverse transformation matrix:

[0223]

[0224] In summary, the coefficients of the polynomial exponential function can be calculated from the vector c using the following formula: Fig.14 A vector of the values ​​a of the feedback multiplication mechanism:

[0225] a=e Tc . (4.18)

[0226] Therefore, it is possible to use Fig.14 The cascade of two feedback multiplication mechanisms 221 and 222 and the multiplier 224 connected downstream perform vignetting correction by means of continuously calculated quadratic polynomial exponential functions.

[0227] In continuation of this idea, more than two feedback multiplication mechanisms can also be cascaded. Fig.15 For n feedback multiplication mechanisms W 0 , W i , W 2 , ..., W n-1 224 for correcting the pixel values. Thus, the n-order polynomial exponential function can be calculated continuously. The mathematical steps required for the calculation follow in principle the ideas, mathematical laws and principles mentioned so far, which can then be applied accordingly to the n feedback multiplication mechanisms in an expanded form.

[0228] Until now, the calculation of the polynomial exponential function for correcting vignetting by means of a cascaded feedback multiplication mechanism has been carried out in one dimension and is therefore particularly suitable for correcting vignetting of images recorded by means of a one-dimensional image sensor, for example a line sensor. For the correction of two-dimensional image sensors, it is in principle advantageous to also be able to implement a two-dimensional polynomial exponential function by means of a cascaded feedback multiplication mechanism.

[0229] Fig.16 The cascaded quadratic feedback multiplication mechanism 231 is shown as a two-dimensional cross-linking with the cascaded quadratic feedback multiplication mechanism 230 connected upstream. In this case, the two-dimensional cross-linking is carried out via the connection 225. The connection is connected to the Fig.14 The cross-linking shown in FIG. 1 is not carried out via a connection of the output q to the input d, but via a connection of the output q to the input d. Fig.13 The input terminal d 0 This does not result in a cascaded fourth-order feedback multiplication mechanism, but rather a two-dimensional cascaded second-order feedback multiplication mechanism.

[0230] The architecture is designed in principle for use in Figure 2 (b) The positions of the pixels in the two-dimensional matrix are divided according to Figure 3 The calculation of the polynomial exponential function is performed in increasing order. Figure 3In this increasing order, the pixels thereof are processed iteratively row by row and column by column in each of these rows. Thus, the order is exemplarily selected such that the vertical cascade feedback multiplication mechanism 230 operates iteratively in the vertical direction, i.e. row by row, and downstream thereof is connected a horizontal cascade feedback multiplication mechanism 231, which operates horizontally and calculates the values ​​of the two-dimensional polynomial exponential function for its pixels column by column in the corresponding row, and then calculates these values ​​according to Fig.10 It is used as correction K by multiplication 112.

[0231] In principle, the two cascaded feedback multiplication mechanisms 230 and 231 carry out different time steps here, since all columns are respectively traversed within a row. Therefore, a distinction is made between a vertical time step for the vertical cascaded feedback multiplication mechanism 230 and a horizontal time step for the horizontal cascaded feedback multiplication mechanism 231. 1 For example, a vertical time step is performed for each row, and then, for example, a vertical time step is performed within the row in accordance with the image I. 1 has as many horizontal time steps as the number of columns. 1 The value of the polynomial exponential function is calculated for each pixel.

[0232] The separation of the vertical and horizontal time steps can be achieved, for example, by connecting the corresponding cascaded feedback multiplication mechanisms 230 and 231 to different clock signals, which are respectively connected to the vertical and horizontal time steps. Fig.16 On the other hand, it can also be realized in the following manner: although the two cascaded feedback multiplication mechanisms 230 and 231 are connected to the same clock signal, the corresponding cascaded feedback multiplication mechanisms can be executed at corresponding time steps through the enable signal at different time steps.

[0233] The two cascaded feedback multiplication mechanisms 230 and 231 in this example not only operate at different time steps, but they are also initialized at different starting time points and at different frequencies. Therefore, they also require separate initialization signals, which are Fig.16 The vertical time step signal r v and the time step signal r of the level h For example, for incremental reading, the vertical time step signal r v In each image I 1 The start is set in the sense of initialization, and the horizontal time step signal r h Set at the beginning of each line in the sense of initialization.

[0234] By following Fig.16 This operation of the two-dimensional cascade feedback multiplication mechanism, in the multiplication mechanism w h.0 At the output q of , the following values ​​f for selecting the coordinates x and y of the image point are obtained, for example starting with the values ​​x=0 and y=0 for the upper left image corner:

[0235]

[0236] According to equation (4.11) and the calculation steps of equation (1.5) according to equation (1.6), equation (4.19) can be converted into the following calculation formula:

[0237]

[0238] Here, analogously to equation (4.18), the vector of values ​​a is obtained from the coefficients c by applying the exponential function element by element to the elements of the vector b, which results from applying a suitable transformation T to the vector in the coefficients c:

[0239] a=e Tc . (4.21)

[0240] Exemplarily, vectors a and c can be selected as follows:

[0241]

[0242] Then, the transformation exemplarily and according to equation (4.17) has the following formula:

[0243]

[0244] 5. color

[0245] The image to be corrected can be a single color, i.e. monochrome, or a color image, which is present, for example, as a mosaic filter image (as described) or as an interpolated color image according to EP 2 929 503 B1, wherein the color image can have a color vector for each pixel. In the case of a mosaic filter, the value of each pixel is respectively associated with a color channel. In the case of a color vector, a pixel can also have a plurality of values, which then, for example, describe the color of the pixel as an element of the color vector.

[0246] The fundamental problem that arises when describing vignetting of color images is that the color channels have different brightnesses from one another, which can be caused by effects such as the color of the light source or different light sensitivities of different color channels. Such brightness deviations in principle cause difficulties in describing them using mathematical models.

[0247] This is Fig.18 , an example of an image of a mosaic filter is shown in which the arrangement of the colors follows the so-called Bayer pattern according to US 3,971,065 B1. There, in each row there is a sequence of two different colors, for example red and green. If the colors now have different values ​​in the image, then under the assumption that cos 4 The situation shown by way of example is obtained in the case of a shaped brightness distribution. In this case, the values ​​130 and 131 of two different colors follow each other alternately and deviate significantly from each other.

[0248] It is assumed here that the brightness deviations of the different color channels are in principle multiplicative effects. These multiplicative effects can be converted into additive effects by logarithmizing the values ​​according to equation (2.1) according to the invention, i.e. the color curves then have in principle the same curve and are only shifted relative to one another by different offsets within the value range. This is Fig.19 (a) and (b) are clearly visible. Here, alternating logarithmic color values ​​132 and 133 are shown, corresponding to Fig.18 The color values ​​in are 130 and 131. Fig.19 It can be seen in (a) that the logarithmic color values ​​of a respective color 130 or 131 can be well described by two curves 134 and 135 which are identical in their shape and which are displaced relative to one another in the vertical direction by an offset.

[0249] In principle, vignetting correction can be performed on the one hand by observing the color channels separately from one another, determining a separate correction parameter P for each color channel and the pixel value associated therewith, and correcting with the aid of a separate correction K. Fig.19 (a) is shown. Here, the logarithmic values ​​of the first color 132 are described by a first quadratic polynomial function 134, and the logarithmic values ​​of the second color 133 are described by a second quadratic polynomial function 135. These functions or their parameters can then be used for separate corrections of the different color channels. This approach is feasible in principle, but it leads to relatively high computational expenditure both in determining the parameters and in the correction. However, the approach has nevertheless proven to be advantageous, for example, in the case of different shapes of vignetting of different colors, and can therefore be carried out.

[0250] Another possibility is to describe the logarithmic color values ​​channel by channel by means of polynomial functions, wherein the polynomial functions for different color channels differ from each other only in their offset values ​​and are identical in all other coefficients. Then, for describing and for correcting a specific color channel, the offset belonging to this color channel can be used in each case. For example, the brightness distribution of two color channels with the values ​​r and g can be described in the following manner in one dimension, similar to equation (1.2), wherein the symbols represent red and green by way of example:

[0251]

[0252] Here, r and g also respectively denote the dependence of a pixel or color value on the corresponding color. When determining the coefficient c, it is possible to combine the different coefficients into a vector c similarly to equation (2.2) and to list a corresponding matrix similarly to equation (2.3), wherein then in each row only the value c belonging to the corresponding color is 0.r or c 0.g , and 0 in each case for values ​​that do not belong to the corresponding color. This then enables the value of the coefficient vector c to be determined in the manner mentioned in equation (2.5). In this case, within the scope of the subsequent normalization, the following usually occurs: From the coefficient c 0.r and c 0.g The normalized coefficients generated in and have the same value. This has the effect that initially different polynomial functions for different color channels become identical after normalization and can therefore be described by a single polynomial function.

[0253] Based on this knowledge, a third possibility according to the invention is to consider all color channels together and process all color values ​​regardless of their relevance to the color channel. A common correction parameter P can then be determined for the color channels and corrected with a common correction K. This is accomplished by Fig.19 (b) illustrates and offers the advantage of minimal computational effort. Furthermore, it offers the advantage that monochrome and color images can be processed identically in this way and that expensive modifications between monochrome and color cameras can be dispensed with. Thus, the methods mentioned above with reference to 1 and 2 can be applied without changing the color.

[0254] Such a joint observation of the color channels is possible by the cooperation between the logarithmization of the input values, the generally constant frequency distribution of the colors in the same spatial region in the mosaic filter and in the interpolated color image, and the minimum square error method.

[0255] When the variance is taken into account together, parameters for the polynomial exponential function are sought which are suitable for accurately describing the shape of the intensity distribution and its spatial orientation, rather than its offset in the space of logarithmic values, which corresponds to the factor in the linear space of the values. With reference to equation (1.2) this means that: In this way the parameter c can be found exactly 1 and c 2 , instead of parameter c 0 However, this does not present a disadvantage in the case of a subsequent application of normalization according to reference numeral 3, since the normalization is performed with the normalized parameter Replace incorrectly or imprecisely determined parameter c 0 In order to calculate the normalized parameters No need to know parameter c 0 , because, for example, according to equation (3.1), c 0 Not included in 's calculation.

[0256] The formulas and relationships mentioned can be extended to other colors, such as blue, in other dimensions and / or in a second dimension by applying the mathematical principles, relationships and methods mentioned in a manner understandable to a person skilled in the art. Likewise, extension to interpolated color images is possible, in which multiple color values ​​exist for each pixel, such as RGB.

[0257] 6. Shift and AOI

[0258] Sometimes, in the operation of an electronic camera, the entire image 120 is not required, but only an image part 121, which is also called "area of ​​interest" (AOI) or "region of interest" (ROI) in English. Fig. 20 In this case, it is desirable that the parameters do not have to be newly determined individually for each selectable image section, but that the parameters determined once for the entire image 120 can also be used to correct the image section 121 .

[0259] Without limiting the generality, it is assumed here that there is an incremental reading. Thus, the reading of the entire image 120 begins at a starting point 122, which is mostly located in its upper left corner, and the reading of the image part 121 begins at a shifted starting point 123, which is usually located in its upper left corner. The horizontal shift value is referred to here as Δx, and the vertical shift value is referred to as Δy.

[0260] Then, using a polynomial exponential function according to, for example, equation (1.2) or equation (1.6), the coordinate x of the local image can be a and a Convert to the x and y coordinates of the entire image by adding the corresponding shift values ​​to the coordinates:

[0261] x=x a +Δx, und y=y a +Δy. (6.1)

[0262] These two equations can also be expressed in a simple way for x a and aAfter this conversion, the calculated coordinates x and y can be used to correct the image locally with the help of the parameters found for the entire image.

[0263] However, if a cascade of feedback multiplication mechanisms according to reference numeral 4 is used for the correction, the situation becomes slightly more difficult. That is, if such a cascade of feedback multiplication mechanisms is run over the entire image 120, then a specific value occurs in each of the feedback multiplication mechanisms until, for example, the upper left corner of the image part 123 is reached, which has coordinates shifted by Δx and Δy. On the other hand, if the start is to be started at the starting point 123, then all participating feedback multiplication mechanisms must be initialized with the help of corresponding values. For this purpose, the value vector needs to be recalculated accordingly according to equation (4.12).

[0264] A simple way to recalculate this from the already determined coefficient vector c according to equation (4.12) is to shift the polynomial in the independent variable of the polynomial exponential function. The underlying mathematical method is explained for simplicity reasons for a one-dimensional quadratic polynomial in relation to the general free variable z. For a shift in coordinate space by the shift value Δz, z is replaced in the independent variable in equation (1.2) by the difference z-Δz. This results in the following equation, which can be further transformed below:

[0265]

[0266] It has been shown that by converting the 0 、c 1. and c 2 The polynomial exponential function of the shift Δz again produces the most different coefficients and The polynomial exponential function of and And combined into a vector:

[0267]

[0268] Then we can use the linear shift operator S to perform the calculation from c The shift operator can be described in matrix form according to the second step of equation (6.2):

[0269]

[0270] Therefore, by applying the shift operator S we can compute

[0271]

[0272] If the shifted value vector c is now inserted into equation (4.15) together with its calculation formula according to equation (6.5), then the calculation of the value vector a for the coordinates shifted by Δz in one dimension results as follows:

[0273] a=e TSc . (66)

[0274] Using the same or similar mathematical concepts, laws and considerations, a person skilled in the art can also determine the shift operator for polynomial exponential functions of higher order or more dimensions. As an example, for a two-dimensional polynomial exponential function, a two-dimensional shift matrix of a value vector c according to equation (4.19) shifted by horizontal shift values ​​Δx and vertical shift values ​​Δy is explicitly described:

[0275]

[0276] By applying such a shift, it is possible to determine in a simple manner and with little computational effort a starting value as an element of the value vector a, with the aid of which the cascaded feedback multiplication mechanism can be initialized in order to start directly at its starting point 123 with the calculation of the correction value for the image part 121 without prior calculation steps.

[0277] 7. Mirroring and reversing of reading direction

[0278] In order to apply the correction according to the invention to a sensor with "split readout" (as described above) using a cascaded feedback multiplication mechanism, it can be advantageous to use a plurality of cascaded feedback multiplication mechanisms, for example one for the left block and one for the right block. Here, the right block is read in a horizontally mirrored direction relative to the incremental reading of the left block.

[0279] This can be done using, for example, Fig.16 In the case of a cascaded feedback multiplication mechanism, difficulties arise, since the cascaded feedback multiplication mechanism was originally designed for use with blocks and incremental reading. The difficulties can be overcome, for example, by using a plurality of, for example two, separate cascaded feedback multiplication mechanisms for each block, i.e., for example, for the block on the left and for the block on the right. Here, for example, one of them can work in a direction of incremental reading from left to right, while the other can work, for example, in a horizontally mirrored direction of incremental reading from right to left.

[0280] The basic problem here is to find the vector a for the cascaded feedback multiplication mechanism that works in a horizontal mirrored manner. In principle, the polynomial in the argument of the polynomial exponential function can be mirrored at the line with the coordinate x=0 by replacing x by -x at all locations there. However, an equivalent mathematical effect can also be achieved by adjusting the coefficient vector c with the aid of the mirror operator M. In this case, the mirrored coefficient vector

[0281]

[0282] The mirror operator, for example, has the following formula for a one-dimensional quadratic polynomial exponential function:

[0283]

[0284] Now, in the rarest case, a mirror image is required at the line x=0, but most often at other lines, for example at the boundary between the left block and the right block. For this purpose, a first shift of the polynomial to the corresponding boundary line can first be carried out by means of a shift operator S, where the mirror image can be carried out and then a reverse shift can take place, which can be carried out, for example, by means of a shift operator S which is the inverse of the first shift S. -1 The matrices for the operators can be combined by matrix multiplication.

[0285] 8. Vectorization and Parallelism

[0286] The type of iterative calculation of polynomial exponential functions mentioned above with reference to numeral 4 operates essentially serially. In this case, a time step is required for the correction of each pixel.

[0287] This situation Fig.21 In this case, consecutive pixels 300, 301, 302 and 303 are corrected in consecutive time steps by calculating a correction value for pixel 301 from the correction value for pixel 300 in a first time step 304, calculating a correction value for pixel 302 from the correction value for pixel 301 in a second time step 305, and calculating a correction value for pixel 303 from the correction value for pixel 302 in a third time step 306.

[0288] Sometimes it may be necessary to carry out partially parallel calculations in place of serial calculations. Thus, for example, a higher bandwidth for correction can be achieved by correcting more pixels per unit time.

[0289] This can be done, for example, by having a plurality of cascaded feedback multiplication mechanisms operate simultaneously. This mode of operation is called parallel and Fig. 22 . In this case, pixels 310 to 321 are alternately grouped into four channels. In the example shown, pixels 310, 314 and 318 form a first channel, pixels 311, 315 and 319 form a second channel, pixels 312, 316 and 320 form a third channel, and pixels 313, 317 and 321 form a fourth channel. During the first time step, the correction value of pixel 314 is calculated 322 from the correction value of pixel 310, the correction value of pixel 315 is calculated 323 from the correction value of pixel 311, the correction value of pixel 316 is calculated 324 from the correction value of pixel 312, and the correction value of pixel 317 is calculated 325 from the correction value of pixel 313. Based on this, during the second time step, the correction value of pixel 318 is calculated 326 from the correction value of pixel 314, the correction value of pixel 319 is calculated 327 from the correction value of pixel 315, the correction value of pixel 320 is calculated 328 from the correction value of pixel 316, and the correction value of pixel 321 is calculated 329 from the correction value of pixel 317. This is achieved in that four parallel cascaded feedback multiplication mechanisms perform calculations simultaneously in the time step, wherein each cascaded feedback multiplication mechanism works on one channel in each case, and the pixels are assigned to the channels in an alternating order. In principle, the parallel cascaded feedback multiplication mechanisms work independently of each other in this case. This may have the following disadvantages: calculation errors, such as rounding errors, in different channels are accumulated in different ways, which may cause visible differences in the pixels of different channels and thus cause undesirable visible streaks in the result image.

[0290] A possibility according to the invention for avoiding this situation when using a plurality of cascaded feedback multiplication mechanisms connected in parallel is that the calculation steps can be performed so that in the calculation steps performed by the plurality of cascaded feedback multiplication mechanisms connected in parallel, the calculations of the individual feedback multiplication mechanisms are each jointly based on the same value of the predetermined channel.

[0291] This is Fig.23 As shown in FIG. , the pixel usage is the same as in Fig. 22 , and the pixels are associated with the same channel. Here, the calculation of the correction values ​​for pixels 314, 315, 316 and 317 is performed simultaneously and in parallel in calculation steps 330, 331, 332 and 333 based on the correction value of the same pixel 310, and the calculation of the correction values ​​for pixels 318, 319, 320 and 321 is performed simultaneously and in parallel in calculation steps 334, 335, 336 and 337 based on the correction value of the same pixel 314.

[0292] 9. Partition

[0293] In principle, it is possible to apply the proposed correction in the same way to the entire image. However, in order to achieve a higher precision for the correction, it can also be advantageous to define a plurality of zones in the image. This can be done, for example, by defining radial zones or dividing the image into rectangular areas, as in Figure 8 In order to achieve a higher accuracy, it is possible according to the invention to further increase the number of zones. In principle, it is possible to associate the zones with the midpoints, for example with the Figure 8 (a) is related to the geometrical midpoint 71 or the optical midpoint 72.

[0294] Practical observations show that the edge obscuration of real objective lenses sometimes does not fully satisfy the assumption of radial symmetry. In this case, better results can be achieved if the zones are divided not only in the radial direction but also in the circumferential direction, such as for example in Fig.24 (a). In this case, there are 8 zones in each radial section in the circumferential direction. In this case, the zones can also be combined, such as in Fig.24 (b). Since edge shading effects can occur particularly in edge regions, the computational effort can be reduced by combining a plurality of regions, for example, in a central region. In the example shown, a circular region is thus generated in the central region.

[0295] Furthermore, if the dividing lines between the zones are designed as straight lines, the computational effort for the division into zones can be reduced or the design can be made more hardware-friendly. Then, polygonal zones are obtained, such as those in Fig.24 As shown in (c) to (e).

[0296] Finally, it is also possible to define the zones so that there is no connection to a midpoint. This simplifies the calculations, since the need to determine the midpoint is eliminated. For example, such a division can be performed as in Figure 8 (c) is performed. Fig.24 (f) shows an alternative in which each polygon is connected to a small number of adjacent polygons, thereby using a small number of degrees of freedom when determining the coefficients for the polynomial exponential function. In principle, a large number of other possibilities for dividing the surface into uniform or non-uniform polygons are also conceivable.

[0297] In this case, within each zone, a correction is performed using a polynomial exponential function, wherein the parameters of the polynomial exponential function can differ from one another in different zones. The different polynomial exponential functions defined over the different zones then together form the correction function.

[0298] In order to avoid visible artifacts when transitioning from one zone to the next, it is important that in adjacent zones the polynomial exponential functions defined on these zones transition continuously into one another when forming the correction function. This can be ensured by the polynomial exponential functions of two adjacent zones each having the same value at the same location. Since changes in brightness gradients can also be easily visible, visible artifacts can also be avoided by the polynomial exponential functions defined on these zones transition continuously and differentiably into one another when forming the correction function in adjacent zones. This can be achieved by the polynomial exponential functions of two adjacent zones each having the same derivative at the same location, in that the polynomial exponential functions have the same gradient vector, for example.

[0299] This condition can be met, for example, by determining the coefficients jointly according to the least squares method and according to the logarithmic image values ​​by specifying them mathematically as auxiliary conditions. The subsequent calculation of the solution with the minimum square error can be determined using the so-called "constrained least squares method".

[0300] 10. Alternative Implementations

[0301] In this description, a number of exemplary calculation possibilities for the value vector a and for forming the values ​​of its elements have already been mentioned, for example, in 1, a negation by means of a negation terminal N, in 3, a normalization by means of a normalization operator F, in 4, a transformation by means of a transformation operator T, in 6, a shift by means of a shift operator S, and in 8, a mirroring by means of a mirroring operator M. These operators can be combined with one another as desired to calculate the value vector a, for example in the following form: a=e TSNFc .(10.1)

[0302] Furthermore, it is possible to exchange the order of the operators, provided that they are reversed in individual cases. Thus, for example:

[0303] a=e TSNFc =e TSFNc . (10.2)

[0304] Furthermore, it is also possible to combine multiple operators into a common operator. If the operator is a linear operator in matrix representation, this can be performed by applying matrix multiplication to the multiple operators. Thus, for example, the matrix A can be defined by means of the following formula:

[0305] A=TSN. (10.3)

[0306] Therefore, equation (10.1) can be rewritten as:

[0307] a=eAFc . (10.4)

[0308] Using similar mathematical concepts and methods, a large number of other equivalent representations of calculation parameters can also be achieved.

[0309] The calculation in digital hardware is described in reference 4. It is also possible to carry out the proposed operation partially or completely in analog electronics and, for example, replace the digital multiplier with an analog multiplier. Further simplifications are also possible in analog electronics. For example, the function of the feedback multiplication mechanism 221 can be realized by using so-called RC elements, whose inputs are each connected to a constant value and whose mathematical function is described in equation (4.2), whose voltage also decreases exponentially in the course of linearly successive time steps.

[0310] Furthermore, all calculation steps described for calculations in digital hardware can in principle also be executed in software. Feedback can be programmed in this case, for example in the form of loops, which are then calculated for one time step during each loop.

[0311] Furthermore, the calculation of the correction values ​​or the correction of the pixels can also be performed in a different order. For example, it is also possible to perform the correction column by column and then within each column for the pixels of the column row by row, for which purpose the coefficients or initialization values ​​can be exchanged or adjusted accordingly.

[0312] Furthermore, it is also possible to perform a precalculation of the correction values ​​and to store them until the correction is applied. For example, the precalculation can be performed at a setup time or at another point in time also before runtime. In this case, the correction values ​​can be stored for each individual pixel or pixel group. This makes it possible to call up the correction values ​​during runtime and not have to calculate them at runtime. This makes it possible to save logic resources in the hardware.

[0313] It is also possible to store horizontal correction values ​​g(x) and vertical correction values ​​g(y). At run time, the multiplication of the horizontal and vertical correction values ​​can then be performed according to equation (1.5). This also results in a two-dimensional polynomial exponential function g(x, y) that can be used for vignetting correction. In this case, the computational effort of g(x, y) that occurs at run time consists of only one multiplication and is low, which can be performed, for example, by a multiplier. At the same time, much less storage space is required for storing the correction values ​​in this manner than in the case of pixel-by-pixel storage. This is important in the following situation: In a large number of circuits that can be used as image processing means 13, for example in an FPGA, in an MCU or in a DSP, only relatively little memory is available, and the commonly used static memories that allow for fast access require a large amount of expensive chip space.

[0314] Finally, it is of course also possible to store part of the correction value before the runtime and to calculate part of the correction value at runtime. Thus, for example, a vertical correction value can be stored and used as an initialization value for a horizontal cascaded feedback multiplication mechanism. Thus, the above advantages can be combined accordingly.

[0315] 11. Determine the midpoint

[0316] Some of the above methods require the determination of the optical midpoint, which can be found based on assumptions that are usually made well enough that vignetting occurs radially symmetrically.

[0317] according to Fig.25 According to the invention, image data 500 of an output image can be assumed for determining the optical center point, which output image was recorded under uniform illumination, for example by recording a white or gray reference plate or a white surface. The image data can be unprocessed or corrected, for example with respect to brightness or color or other effects occurring in electronic cameras, as required, but the image data can also be logarithmized in the range of reference 2 or in Figure 6 Find the reciprocal in the range of .

[0318] Now, the image is used to determine the vertical coordinate y of the optical midpoint c And take the horizontal average value 501, or in order to determine the horizontal coordinate x of the optical midpoint c The vertical average is taken 502. Here, in the case of horizontal averaging, the average value or multiple of the average value of the pixel values ​​of each row is calculated, and in the case of vertical averaging, the average value or multiple of the pixel values ​​of each row is calculated. The averaging provides a data vector 503. As in Fig.26 As can be seen in , this averaging has the advantage that, even in the case of a brightness distribution 520 that deviates strongly from a parabolic shape, due to the radial symmetry of the distribution, it usually also provides an average value 521 result whose shape is already very close to a parabola, which significantly simplifies the subsequent determination of the coordinates of the optical midpoint.

[0319] Now, the corresponding x or y coordinate of the midpoint 504 can be estimated. The estimation can be based on the coordinates of the geometric midpoint, for example. The estimated value is adopted as the current midpoint 505 in a first step 510. A data region is selected based on the current midpoint. This selection is preferably carried out symmetrically, so that on both sides of the current midpoint, the data region includes the same amount of data of the data vector 503. Subsequently, a compensation parabola 507 with the minimum variance is determined on the data region. Here, the symmetrical selection of the data region with respect to the current midpoint has the following advantages: even in the case of a significant deviation of the data vector from the parabola, a higher moment occurs symmetrically, so that it does not cause a deviation of the coordinates of the vertex. Therefore, this coordinate of the vertex 508 can be determined with higher accuracy, and an updated midpoint 509 is obtained, which replaces the current midpoint in the subsequent step 511.

[0320] exist Fig. 27 This approach is illustrated in FIG. Here, as a result of the estimation 504, the coordinate x is obtained. c.0 The coordinate is located in the middle of the x region, so that the distance r from the edge x.0 The data vector 530 is described by the parabola 531 with the smallest variance over this data region. The vertex of the parabola can now be determined with the aid of the following formula and used as the updated midpoint x c.1 :

[0321]

[0322] Here, c 1 and c 2 The corresponding coefficients of the parabola are described as quadratic polynomials.

[0323] according to Fig.28 Another way to illustrate this is to use a parabola 533 as shown here. Fig. 27 The parabola 531 in is the same. From its vertex x c.1 Now select the data area again. c.1 X c.0 Closer to the edge of the image, the data region can therefore only be selected slightly smaller this time and extends between the two arrows. In a second step, the parabola 534 with the minimum variance is now determined only over the selected data region of the data vector 532. The vertex of the parabola is now determined again, resulting in another updated midpoint x c.2 The process can now be repeated for the further steps. In this case, the respectively updated center point converges very quickly with respect to the actual optical center and in most cases the iteration can already be successfully concluded after the second or third step.

[0324] Other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from consideration of the drawings, the disclosure, and the appended claims.

[0325] In the claims, the words "having" and "comprising" do not exclude other elements or steps, and the indefinite article "a" or "an" does not exclude a plurality.

[0326] A single unit or device may perform the functions of several elements recited in the claims. The mere fact that individual functions and / or elements are recited in different dependent claims does not indicate that a combination of these functions and / or elements cannot be used to advantage.

[0327] Reference signs in the claims should not be understood as limiting the subject matter and protective scope of the claims to these reference signs.

[0328] In summary, a correction method for correcting vignetting effects in the values ​​of pixels of an image of an electronic camera is provided, wherein the correction method comprises:

[0329] - correcting the value of the pixel based on a correction function comprising an exponential function of a base, preferably Euler's number e or the number 2 or 10, the argument of which is a one-dimensional or multidimensional polynomial of degree n≥2, or the correction function is mathematically transformable into such a function,

[0330] Therein correcting the value of a pixel comprises dividing or preferably multiplying the value of the pixel by the value of the correction function at the position of the pixel.

Claims

1. A method for correcting an image (I) in an electronic camera (10) 1 ) in a pixel value, the correction method include: - determining the value of a correction function at the location of a pixel is performed by iteratively multiplying one or more factors with the determined value of the correction function at the location of another pixel by means of at least two cascaded feedback multiplication mechanisms, wherein the correction function comprises an exponential function of a base, the argument of which is a one-dimensional or multidimensional polynomial of degree n≥2; - correcting the value of the pixel, wherein the correction consists in multiplying the value of the pixel by the value of the correction function at the location of the pixel, by means of a multiplier connected downstream of the feedback multiplication mechanism of the at least two cascades.

2. The calibration method according to claim 1, The factors of the feedback multiplication are respectively determined as values ​​of an exponential function of a base, and the independent variable of the exponential function is a weighted sum of one or more parameters of the correction function.

3. The calibration method according to claim 1 or 2, The image (I 1 ) is a two-dimensional image, and the cascade of feedback multiplications comprises 1 ) in the first direction, and in the image (I 1 ), wherein an output value of the second feedback multiplication provides an input value of the first feedback multiplication.

4. The calibration method according to claim 1 or 2, Wherein determining the value of the correction function at the position of the pixel is performed in parallel, so that the pixel is divided into a plurality of channels, wherein: - are processed independently of each other, or - processing such that in one time step, the value of the correction function at the location of a pixel of at least two different channels is determined based on a common, already determined value of the correction function at the location of another pixel.

5. The calibration method according to claim 1 or 2, The image is a color image which is present as a mosaic-filtered image, in which the value of each pixel is associated with a respective color channel.

6. The calibration method according to claim 1 or 2, The image (I 1 ) is a color value of two or more color channels, and the correction of the pixel value include: - correcting the value of the pixel by means of its own correction function for each color channel, or The values ​​of the pixels are corrected by means of a correction function which is common to all color channels.

7. The calibration method according to claim 1 or 2, Only the image (I 1 ) of a local pixel (121) and taking into account the shifting of the local origin (123) relative to the origin (122) of the image by a corresponding shift of the correction function, so that at least a part of the parameters of the correction function are replaced by the shifted parameters of the correction function.

8. The calibration method according to claim 1 or 2, In the image (I 1 ) is defined in a plurality of regions, and for each region, the value of the pixel is corrected by means of the parameters of the correction function for the region itself.

9. The calibration method according to claim 8, The respective parameters of the correction function for two adjacent regions are such that the transition of the correction function between the two regions is continuous.

10. The calibration method according to claim 8, Wherein the region is associated with a midpoint (71, 72) of the image.

11. Correction method according to claim 10, wherein the zone is associated with the optical midpoint (72) of the image, The correction method comprises estimating the optical midpoint (72) of the image, so that, in the case where the image is generated by means of a one-dimensional image sensor, the coordinates of the optical midpoint (72) are estimated in one dimension. include: - generating a one-dimensional data vector in said one dimension from the values ​​of said pixels of said image; - iteratively fitting a one-dimensional compensation parabola to the one-dimensional data vector; And in the case where the image is generated by means of a two-dimensional image sensor, estimating the coordinates of the optical midpoint (72) in the first dimension comprises: - averaging the values ​​of said pixels of said image in a second dimension to produce a one-dimensional data vector of the average values ​​in said first dimension, and - iteratively fitting a one-dimensional compensation parabola to the one-dimensional data vector.

12. The calibration method according to claim 11, Wherein the iterative fitting in each iteration is performed in a data region of the one-dimensional data vector around the currently estimated coordinates of the optical midpoint (72) in the one dimension or the first dimension.

13. The calibration method according to claim 1 or 2, The correction function comprises an exponential function of the Euler number e or the number 2 or 10.

14. The calibration method according to any one of claims 1 to 13, The correction method comprises the following steps: based on a reference image (I 0 ) determine parameters of the correction function, wherein determining the parameters of the correction function comprises normalizing the correction function so that the correction function has a predetermined value at its vertex.

15. The calibration method according to claim 14, The normalization is performed in such a way that the zeroth-order coefficients of the polynomial are replaced by normalized zeroth-order coefficients which are calculated from higher-order coefficients of the polynomial.

16. A method for correcting an image (I) in an electronic camera (10) 1 ), wherein the correction means is configured to: - determining the value of a correction function at the location of a pixel is performed by iteratively multiplying one or more factors with the determined value of the correction function at the location of another pixel by means of at least two cascaded feedback multiplication mechanisms, wherein the correction function comprises an exponential function of a base, the argument of which is a one-dimensional or multidimensional polynomial of degree n≥2, and - correcting the value of the pixel, wherein the correction consists in multiplying the value of the pixel by the value of the correction function at the location of the pixel, by means of a multiplier connected downstream of the feedback multiplication mechanism of the at least two cascades.

17. An electronic camera (10), wherein the electronic camera (10) include: -having a function for generating an image (I 1 ) of pixels of an image sensor (12); and - A correction device according to claim 16, for correcting the 1 )’s pixel values. 18 . A computer device comprising a computing unit configured to execute the correction method according to claim 1 .

19. A computer program product, comprising code means for causing a computer device to perform a correction method according to any one of claims 1 to 15 when the computer program product is executed on the computer device.