Graphics Reference
In-Depth Information
uniform scaling to the space before estimating the plane. This affects the error
distribution across the RGB channels, allowing some hues to be represented more
closely at the cost of others. The result of this non-uniform scaling is that as RGB
components shrink, their influence on the color plane shrinks, because distances
along the shrunk axis are shortened. Due to the hue perception's nonlinearity,
it is not easy to define the scaling factors once for all potential textures, and in
our tests they were set experimentally based on the sample texture set. First we
tried the RGB component weights used in the luminance computation (putting
most importance on G and barely any on B), but experiments showed that some
material textures are better represented when the estimation is done with more
balanced weighting. To achieve acceptable results for various textures, we used
an experimentally chosen weight set of 1/2 for red, 1 for green and 1/4 for blue,
which lies between the classic luminance component weights and the equally
weighted component average. Fortunately, the perceived difference in pixel hues
after the encoding changes is barely noticeable with these scaling factors. Still,
the scaling factors may be used to improve texture representation by fine tuning
them separately for each texture.
With the two above operations, the whole initial pixel color processing can be
expressed as
r i = r i w r ,
g i = g i w g ,
b i = b i w b ,
where γ is the gamma value used to transition from the input color space to
the linear color space, and w r , w g and w b are the color component importance
weights.
Having taken into account the above considerations, the color of every texel
represents a single point in 3D space. The optimal approximating color plane
will be the plane that minimizes the sum of squared distances between the plane
and each point. Because the plane is assumed to be passing by the point (0,0,0),
we can express it by its normal. In effect, the point-plane distance computation
reduces to a dot product. Note that since we are using the RGB space, the vector
components are labeled r , g ,and b instead of the usual x , y ,and z :
P i = n r r i + n g g i + n b b i .
d i = N
·
The optimal plane normal vector is the vector, which minimizes the point-
plane distances. Such problems can be solved using least squared fit method that
aims to minimize sum of squared distances. The approximation error we want to
minimize is expressed as
err =
i
d i =
i
P i ) 2 =
i
( n r r i + n g g i + n b b i ) 2 ,
( N
·
Search WWH ::




Custom Search