METHOD FOR APPLYING A TRANSFORMATION TO A DATA FIELD AND CORRESPONDING TRANSFORMATION DEVICE

20220382828 · 2022-12-01

Assignee

Inventors

Cpc classification

International classification

Abstract

A method and a device for applying a transformation to a data field are provided, wherein data points are transformed using at least one transformation rule, characterized in that the data field is divided into segments, that for each data point to be transformed of the data field a test is performed to identify the segment in which the data point is arranged, and that a transformation rule is subsequently selected depending on the segment found and the rule is applied to said data point.

Claims

1. A method for applying a transformation to a data field, the method comprising: transforming data points using at least one transformation rule, including dividing the data field into segments, for each data point to be transformed of the data field, performing a test to identify a segment in which the data point is arranged, and subsequently selecting the transformation rule depending on the segment found and applying the transformation rule to said data point.

2. The method as claimed in claim 1, wherein the transformation rules are given by at least one function.

3. The method as claimed in claim 2, wherein the function is a polynomial.

4. The method as claimed in claim 1, wherein boundaries of the segments are described by at least one function.

5. The method as claimed in claim 4, wherein the at least one function are polynomials, with equipotential surfaces of the at least one function, there are multiple segments, and a respective one of the segments belonging to one of the data points is determined by finding the equipotential surfaces between which the data point is located.

6. The method as claimed in claim 4, wherein at least one transformation of the boundary of the segment enters into the transformation rule of the segment.

7. The method as claimed in claim 4, wherein, if the data point to be transformed is located between the boundaries of the segments, an interpolation is applied between segment boundary values of the boundaries of the segments.

8. The method as claimed in claim 1, wherein the data field is at least two-dimensional.

9. The method as claimed in claim 1, wherein the transformation changes a dimension of the data field.

10. The method as claimed in claim 1, wherein the transformation does not change a dimension of the data field.

11. The method as claimed in claim 1, wherein the transformation acts on dimensions of the data field that define a segmentation.

12. The method as claimed in claim 1, wherein the transformation acts on dimensions of the data field that do not define a segmentation.

13. The method as claimed in claim 7, further comprising carrying out the interpolation using a linear, bilinear, trilinear, bicubic, or polynomial or according to a nearest neighbor method.

14. The method as claimed in 13, wherein the interpolation comprises a subdivision of the segment into interpolation points and as a transformation value for the data point in the segment, a value is selected which corresponds to the transformation value of the nearest interpolation point.

15. The method as claimed in claim 1, wherein the method is used for at least one of geometric transformations, color transformations, or for generating additional parameters.

16. The method as claimed in claim 15, wherein the method is used for hemoglobin, hematocrit concentrations, or oxygen saturations.

17. A transformation device including: a processor configured for applying a transformation to a data field, wherein data points are transformable using at least one transformation rule, the processor is further configured to divide the data field into segments, to test each data point of the data field to be transformed, to determine a segment in which the data point is arranged, to select a transformation rule depending on the segment that is determined, and to apply the selected transformation rule for the transformation of the data point.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The invention will now be explained in more detail by reference to a small number of exemplary embodiments, without being limited to these few exemplary embodiments. Further variants of the invention and exemplary embodiments result from the combination of the features of individual or multiple protective claims with one another and/or with individual or multiple features of the exemplary embodiments and/or the previously described variants of devices and methods according to the invention.

[0028] In the drawings:

[0029] FIG. 1 shows a direct geometric transformation (vertical transformation),

[0030] FIG. 2 shows an indirect geometric transformation (radially symmetric transformation),

[0031] FIG. 3 shows a further indirect geometric transformation (information extraction), and

[0032] FIG. 4 shows a transformation device.

DETAILED DESCRIPTION

[0033] FIG. 1 shows the example of a direct geometric transformation, in this case a non-linear vertical transformation. Assume the task to be to transform the data point (x,y)(24) in such a way that a new data point (x′, y′) is obtained, where y′=f(x,y) and x′=x.

[0034] A simple solution to this problem, which is not according to the invention, would be to store a DeltaY value for each coordinate point (x,y), which represents, for example, the vertical displacement to the new value y′. An image at 1080p resolution (1920×1080 pixels) would require more than 2 million values to be stored. An image at 4K-UHD resolution would require even more storage. Therefore, usually only a portion of these values is stored and the rest interpolated, which is nevertheless very memory intensive in relation to the hardware resources, for example on an FPGA chip.

[0035] In the present solution approach, shown in FIG. 1, n vertical values y.sub.n (in this example: 0≤n≤8) are selected and their transformation is defined as a polynomial function.

[0036] In this example, the transformation is represented as a polynomial function in this way:


y.sub.0′=P.sub.0(x)


y.sub.1′=P.sub.1(x)


y.sub.2′=P.sub.2(x) [0037] etc. [0038] where the polynomials can be of the same or different order and can have different polynomial coefficients.

[0039] Interpolation is used to transform data points that lie between the polynomial boundaries y.sub.n. For example, the interpolation can be linear, bicubic, or more complex.

[0040] In this case, for each data point (x,y), where y.sub.n-1<y<y.sub.n, an interpolation of a new value y′ takes place between P.sub.n(x) and P.sub.n-1(x).

[0041] The individual steps, as given in FIG. 1, are as follows:

[0042] In step 1, the data field (26) and the data point (x,y)(24) to be transformed are loaded. n data values y.sub.n are then selected, which divide the data field into (n−1) segments (25). In step 2, the index k is determined, where y.sub.k<y<y.sub.k+1. In step 3, the limits of the polynomials are calculated, where y.sub.min=P.sub.k(x) and y.sub.max=P.sub.k+1(x). In step 4, the new value y′ is transformed using an interpolation and y′ is obtained as a function of y.sub.min, y.sub.max, y, y.sub.k, and y.sub.k+1.

[0043] The method shown in FIG. 1 can be used in devices such as cameras, photographic devices or television sets, FPGAs or the like. Numerous other devices are conceivable and possible.

[0044] FIG. 2 shows an indirect geometric transformation, in this case a radially symmetric transformation. Assume the task is to transform the data point (x,y)(28) in such a way that different light effects, such as in a cone of light, or color shades at a different distance from the center of the axis, can be compensated. Such transformations may refer to the brightness, the color, or the like.

[0045] A first approach to this problem would be to define three values alphaR, alphaG and alphaB for each point to be transformed (e.g.: RGB pixel), which can act on this point as a multiplication factor, offset or the like, and to store them discretely. This generally requires a large amount of memory in the chip.

[0046] A solution according to the invention would be to divide the data field (27) into circular segments (29). Each circle with a different radius defines a transformation rule which is given by Alpha, preferably represented as a polynomial. Data points to be transformed, which lie between these circles with different Alpha, can be interpolated. A value Alpha(x,y) can now be assigned to each data point (x,y) (28). For the sake of simplification, Alpha(x,y) is used here, but this can also be substituted by AlphaR(x,y), AlphaG(x,y) and AlphaB(x,y).

[0047] The individual steps, as given in FIG. 2, are as follows: in step 5, the data field (27) and the data point (x,y) (28) to be transformed are loaded. The data field is divided into n circles with n different radii. In step 6, the radius R of the data point (x,y) (28) is determined, where


R=(x{circumflex over ( )}2+y{circumflex over ( )}2){circumflex over ( )}(½) or R{circumflex over ( )}2=x{circumflex over ( )}2+y{circumflex over ( )}2.

[0048] In step 7, the index k is determined, where R.sub.k<R<R.sub.k+1. This means that the position of the data point (x,y) (28) and the corresponding boundaries (30) of the segment (29) are determined. In step 8 the values Alpha.sub.min and Alpha.sub.max are determined, where Alpha.sub.min=P.sub.k(f(x,y)) and Alpha.sub.max=P.sub.k+1 (f(x,y)) and where P is a polynomial and f(x,y) denotes an image parameter/characteristic at position x,y, for example Hue, Saturation, Brightness, or individual color values such as red, green, and blue. In step 9 a new value for Alpha is interpolated, where Alpha(x,y) is a function of Alpha.sub.min, Alpha.sub.max, R, R.sub.k and R.sub.k+1. In step 10, the value Alpha(x,y) is output.

[0049] In further exemplary embodiments, Alpha.sub.min, Alpha.sub.max and Alpha(x,y) can have multiple components. For example, Alpha.sub.min can have the components AlphaR.sub.min=P.sub.R,k(Red(x,y)), AlphaG.sub.min=P.sub.G,k(Green(x,y)), AlphaB.sub.min=P.sub.B,k(Blue(x,y)), where Red, Green and Blue are the intensities in the respective color channels red, green and blue. The same applies to Alpha.sub.max and Alpha(x,y).

[0050] In the example shown graphically in FIG. 2, there are 10 circles and thus 10 values for Alpha, namely Alpha.sub.0, Alpha.sub.1, . . . , Alpha.sub.9. Depending on the application and degree of difficulty, the data field (27) can of course be divided into more or fewer circle segments.

[0051] The example shown graphically in FIG. 2 is deliberately simplified. In other embodiments, other non-circular geometric forms, such as elliptical, oval or the like, are possible.

[0052] The method illustrated in FIG. 2 can be implemented in devices such as microscopes, endoscopes, night vision devices, light sources or the like. Numerous other devices are conceivable and possible.

[0053] FIG. 3 shows an indirect geometric transformation, in this case an information extraction. Assume the task to be to extract information from a data field (31) and an associated data point (x,y) (32). This may be color information or more complex information such as a hemoglobin value, hematocrit value, oxygen saturation, or the like.

[0054] The individual steps, as given in FIG. 3, are as follows: In step 11, the data field (31) and the data point (x,y) (32) to be transformed are loaded. In step 12, the coordinates (u,v) are determined, i.e. a color transformation takes place. In step 13, the data point (u.sub.0,v.sub.0) (32) is obtained. The data field (31) is divided into (n−1) segments (33) using n polynomials P. In step 14, the index k is determined, where P.sub.k(u.sub.0)<v.sub.0<P.sub.k+1(u.sub.0), i.e. the point (u.sub.0,v.sub.0) is located within the segment bounded by P.sub.k and P.sub.k+1. In step 15, the segment boundary values, which are given by the polynomial values P.sub.k(u.sub.0) and P.sub.k+1(u.sub.0), are determined. One possibility would be to use a lookup table (LUT) for Alpha, which has n entries, where Alpha.sub.min=AlphaLUT(k) and Alpha.sub.max=AlphaLUT(k+1). Alpha.sub.min is therefore the value of AlphaLUT at position k and Alpha.sub.max is therefore the value of AlphaLUT at position k+1. Thus, a simple 1D table can convey information which refers to a polynomial representing information such as % or color. In step 16, an interpolation is performed to obtain the value of Alpha(x,y), where Alpha(x,y) is a function of Alpha.sub.min, Alpha.sub.max, v.sub.0, u.sub.0, P.sub.k(u.sub.0) and P.sub.k+1(u.sub.0). In step 17, the value of Alpha(x,y) is output.

[0055] The method illustrated in FIG. 3 can be implemented in devices such as microscopes, endoscopes, 3D video glasses, camera devices or the like. Numerous other devices are conceivable and possible.

[0056] A method that accelerates the interpolation and reduces the hardware requirements can be effected by dividing the segment with interpolation points. The example given in FIG. 3 is used as an illustration.

[0057] Assume that the data point (u.sub.0,v.sub.0) is between the curves representing, for example, a hemoglobin concentration and given by the polynomials P.sub.3(u) and P.sub.4(u), which represent a hemoglobin concentration of 30% and 40%.

[0058] In the case of a linear interpolation, the ratio β is determined, which is given by the following expression:


β=(v.sub.0−P.sub.4(u.sub.0))/(P.sub.3(u.sub.0)−P.sub.4(u.sub.0))

[0059] The hemoglobin concentration τ (in %) of the data point (u.sub.0,v.sub.0) is now given by:


τ(u.sub.0,v.sub.0)=40%−β×10%

[0060] However, a division as defined in the formula for β is relatively complex in the hardware domain. Therefore, an approach using interpolation points is proposed. (n−1) interpolation points are inserted between the polynomial boundaries, where n is an integer. The approach with interpolation points is relatively simple to implement in the hardware domain. The following applies:

[00001] Interpolation - point 0 = P 4 ( u 0 ) Interpolation - poin t 1 = P 4 ( u 0 ) - 1 × ( P 3 ( u 0 ) - P 4 ( u 0 ) ) / n Interpolation - point 2 = P 4 ( u 0 ) - 2 × ( P 3 ( u 0 ) - P 4 ( u 0 ) ) / n .Math. Interpolation - po i n t n = P 4 ( u 0 ) - n × ( P 3 ( u 0 ) - P 4 ( u 0 ) ) / n = P 3 ( u 0 )

[0061] The value of v.sub.0 is then compared with the value of the interpolation point, wherein the value of the next interpolation point is selected. This is possible using a simple difference query, where Difference(k)=|v.sub.0−interpolation-point.sub.k| for k=0, 1, . . . , n. The value of the interpolation point that has the smallest absolute difference is then selected. The greater the number of interpolation points (n−1), the more accurate this method becomes. Other selection criteria than that of the “nearest neighbor” are also conceivable.

[0062] FIG. 4 shows a transformation device (18) having the features of the stand-alone claim. The data field (19) is imported. In addition, the data point to be transformed can be imported. A segmentation (20) is applied to the data field. This can be carried out using polynomials or other functions. A test (21) is performed to find the segment in which the data point to be transformed is located. Based on this test, a transformation rule (22) is selected and applied. An output (23) is provided. The output (23) is fed to the transformation device (18). The transformation device (18) can contain means which can carry out the procedures described above. Such means may be or comprise FPGAs, microchips or the like.

[0063] The invention relates to a method and a device for applying a transformation to a data field, wherein data points are transformed using at least one transformation rule, characterized in that the data field is divided into segments, that for each data point to be transformed of the data field a test is performed to identify the segment in which the data point is arranged, and that a transformation rule is subsequently selected depending on the segment found and the rule is applied to said data point.

LIST OF REFERENCE SIGNS

[0064] 1 Data import [0065] 2 Segmentation of the data field and testing the position of the data point [0066] 3 Calculation of segment boundary values of the segment boundaries [0067] 4 Interpolation [0068] 5 Data import [0069] 6 Segmentation of the data field and calculation of all radii [0070] 7 Testing the position of the data point [0071] 8 Calculation of segment boundary values of the segment boundaries [0072] 9 Interpolation [0073] 10 Parameter output [0074] 11 Data import [0075] 12 Color transformation [0076] 13 Data output [0077] 14 Segmentation of the data field and determination of the position of the data point [0078] 15 Calculation of the segment boundary values of the segment boundaries [0079] 16 Interpolation [0080] 17 Data output [0081] 18 Transformation device [0082] 19 Data field [0083] 20 Segmentation [0084] 21 Testing [0085] 22 Transformation rule [0086] 23 Output [0087] 24 Data point [0088] 25 Segment [0089] 26 Data field [0090] 27 Data field [0091] 28 Data point [0092] 29 Segment [0093] 30 Boundary [0094] 31 Data field [0095] 32 Data point [0096] 33 Segment