METHOD FOR APPLYING A TRANSFORMATION TO A DATA FIELD AND CORRESPONDING TRANSFORMATION DEVICE
20220382828 · 2022-12-01
Assignee
Inventors
Cpc classification
G06F17/14
PHYSICS
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]
[0030]
[0031]
[0032]
DETAILED DESCRIPTION
[0033]
[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
[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
[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
[0044]
[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
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
[0051] The example shown graphically in
[0052] The method illustrated in
[0053]
[0054] The individual steps, as given in
[0055] The method illustrated in
[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
[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:
[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]
[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