





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
a 3D table, where nonlattice points are interpolated by using the nearest lattice ... the literature is the trilinear interpolation, disclosed in a 1974 ...
Typology: Slides
1 / 9
This page cannot be seen from the preview
Don't miss anything!
Color space transformation using a 3D lookup table (LUT) with interpolation is used to correlate the source and destination color values in the lattice points of a 3D table, where nonlattice points are interpolated by using the nearest lattice points. This method has been used in many applications with quite satisfactory results, and incorporated into the ICC profile standard.^1 In this chapter, the structure of the 3D-LUT approach is discussed and the math- ematical formulations of interpolation methods are given. These methods are tested using several sets of data points. The similarities and differences of these interpo- lation methods are discussed.
The 3D lookup method consists of three parts—packing (or partition), extraction (or find), and interpolation (or computation).^2 Packing is a process that partitions the source space and selects sample points for the purpose of building a lookup table. The extraction step is aimed at finding the location of the input pixel and extracting color values of the nearest lattice points. The last step is interpolation where the input signals and the extracted lattice points are used to calculate the destination color specifications for the input point.
9.1.1 Packing
Packing is a process that divides the domain of the source space and populates it with sample points to build the lookup table. Generally, the table is built by an equal step sampling along each axis of the source space, as shown in Fig. 9.1, of a five-level LUT. This will give (n − 1 )^3 cubes and n^3 lattice points, where n is the number of levels. The advantage of this arrangement is that it implicitly supplies information about which cell is next to which. Thus, one needs only to store the starting point and the spacing for each axis. Generally, a matrix of n^3 color patches at the lattice points of the source space is made and the destination color specifications of these patches are measured. The corresponding values from the source and destination spaces are tabulated into a lookup table.
151
152 Computational Color Technology
Figure 9.1 A uniformly spaced five-level 3D packing.
Nonuniformly spaced LUTs are also used extensively. They lose the simplicity of the implementation edges, but gain the versatility and conversion accuracy as discussed in Section 9.7.
9.1.2 Extraction
Nonlattice points are interpolated by using the nearest lattice points. This is the step where the extraction performs a search to select the lattice points necessary for computing the destination specification of the input point. A well-packed space can make the search simpler. In an 8-bit integer environment, for example, if the axis is divided into 2j^ equal sections where j is an integer smaller than 8, then the nearest lattice points are given in the most significant j bits (MSBj ) of the input color signals. In other words, the input point is bounded between the lattice points p(MSBj ) and p(MSBj + 1). To find the point of interest requires the computer operations of the masking byte and shifting bits that are significantly faster than the comparison operations. For unequally spaced packing, a series of comparisons are needed to locate the nearest lattice points. Further search within the cube may be needed, depending on the interpolation technique employed to compute the color values of nonlattice points. There are two interpolation methods: the geometrical method and cellular regression. Cellular re- gression does not require a search within the cube. All geometric interpolations
154 Computational Color Technology
Figure 9.2 Linear interpolation.
where the LSBs are the least significant bits. This is a simple byte-masking op- eration that significantly lowers the computational cost and increases speed. The interpolation error is given as
δ = p(x) − pc(x). (9.2)
9.2.1 Bilinear interpolation
In two dimensions, we have a function of two variables p(x, y) and four lattice points p 00 (x 0 , y 0 ), p 01 (x 0 , y 1 ), p 10 (x 1 , y 0 ), and p 11 (x 1 , y 1 ) as shown in Fig. 9.3. To obtain the value for point p, we first hold y 0 constant and apply the linear interpolation on lattice points p 00 and p 10 to obtain p 0.
p 0 = p 00 + (p 10 − p 00 )[(x − x 0 )/(x 1 − x 0 )]. (9.3)
Similarly, we calculate p 1 by keeping y 1 constant.
p 1 = p 01 + (p 11 − p 01 )[(x − x 0 )/(x 1 − x 0 )]. (9.4)
After obtaining p 0 and p 1 , we again apply the linear interpolation to them by keep- ing x constant.
p(x, y) = p 0 + (p 1 − p 0 )[(y − y 0 )/(y 1 − y 0 )]. (9.5)
Three-Dimensional Lookup Table with Interpolation 155
Figure 9.3 Bilinear interpolation.
Substituting Eqs. (9.3) and (9.4) into Eq. (9.5), we obtain
p(x, y) = p 00 + (p 10 − p 00 )[(x − x 0 )/(x 1 − x 0 )]
9.2.2 Trilinear interpolation
The trilinear equation is derived by applying the linear interpolation seven times (see Fig. 9.4); three times each to determine the points p 1 and p 0 as illustrated in the 2D bilinear interpolation, then one more time to compute the point p. The general expression for the trilinear interpolation is given in Eq. (9.7).
p(x, y, z) = c 0 + c 1 x + c 2 y + c 3 z + c 4 xy
where x, y, and z are the relative distances of the point with respect to the starting point p 000 in the x, y, and z directions, respectively, as shown in Eq. (9.7b).
x = (x − x 0 )/(x 1 − x 0 ); y = (y − y 0 )/(y 1 − y 0 ); z = (z − z 0 )/(z 1 − z 0 ). (9.7b)
Three-Dimensional Lookup Table with Interpolation 157
Note that the sizes of vectors Q 1 and C must be the same. The coefficients C can be put into vector-matrix form as shown in Eq. (9.10a) by expanding Eq. (9.7c).
c 0 c 1 c 2 c 3 c 4 c 5 c 6 c 7
p 000 p 001 p 010 p 011 p 100 p 101 p 110 p 111
, (9.10a)
or
C = B 1 P , (9.10b)
where vector P is a collection of vertices,
P = [p 000 p 001 p 010 p 011 p 100 p 101 p 110 p 111 ]T, (9.11)
and the matrix B 1 , given in Eq. (9.10a), represents a matrix of binary constants, having a size of 8 × 8. Substituting Eq. (9.10b) into Eq. (9.7d), we obtain the vector-matrix expression for calculating the destination color value of point p.
p = CTQ 1 = P TBT 1 Q 1 , (9.12a)
p = QT 1 C = QT 1 B 1 P. (9.12b)
Equation (9.12) is exactly the same as Eq. (9.7), only expressed differently. There is no need for a search mechanism to find the location of the point because the cube is used as a whole. But the computation cost, using all eight vertices and having eight terms in the equation, is higher than other 3D geometric interpola- tions.
9.2.3 Prism interpolation
If one cuts a cube diagonally into two halves as shown in Fig. 9.5, one gets two prism shapes. A search mechanism is needed to locate the point of interest. Because there are two symmetric structures in the cube, a simple inequality comparison is sufficient to determine the location: if x > y, then the point is in Prism 1, otherwise the point is in Prism 2. For x = y, the point is laid on the diagonal plane, and either prism can be used for interpolation.
158 Computational Color Technology
Figure 9.5 Prism interpolation.
The equation has six terms and uses six vertices of the given prism for compu- tation. Equation (9.13) gives prism interpolation in vector-matrix form.
[ p 1 p 2
p 000 (p 100 − p 000 ) (p 110 − p 100 ) (p 001 − p 000 ) p 000 (p 110 − p 010 ) (p 010 − p 000 ) (p 001 − p 000 )
(p 101 − p 001 − p 100 + p 000 ) (p 111 − p 101 − p 110 + p 100 ) (p 111 − p 011 − p 110 + p 010 ) (p 011 − p 001 − p 010 + p 000 )
x y z xz yz
By setting
Q 2 = [ 1 x y z xz yz]T, (9.14)
Eq. (9.13) can be expressed in vector-matrix form as given in Eq. (9.15).
p 1 = P TBT 21 Q 2 = QT 2 B 21 P , (9.15a)
p 2 = P TBT 22 Q 2 = QT 2 B 22 P , (9.15b)