Re: interpolation for a color image?



Thomas Richter <thor@xxxxxxxxxxxxxxxxx> writes:

It depends on what you think your image channels will be, and how to make
use of their correlation. A typical way to do that is to first transform
them to a different color space, for example YUV. The transformation between
YUV (and related other spaces) is linear, and the bilinear interpolation
filter is linear as well, but in a different dimension. This means that
it actually makes *no* difference at all whether you first transform to
YUV, run there a bilinear filter, then transform back, or run the bilinear
filter on RGB itself. The result will be the same. But *only* because
bilinear filtering is linear, and YUV to RGB is a linear transformation.

So far so good.

If you pick a nonlinear color space (say, CIElab) and/or a nonlinear
filter (say, bicubic), things will be not so easy and the results will
be different.

There's no problem with using a bicubic filter for resampling. Although
it is based on cubic polynomials instead of linear polynomials, the
process of resampling with a cubic is still a *linear transformation*.
So the entire process of colour transform/interpolate/colour transform
is still linear, in the linear transformation sense, and the choice of
colour space doesn't make any difference to the result. (You won't get
the same result as bilinear filtering, but the same result as the same
bicubic filter applied in another colour space).

On the other hand, a nonlinear representation *will* change the results,
often visibly. For example, a linear filter (in the linear transform
sense, even if it's using cubic polynomials) will generally have a DC
gain of one, so it leaves the average brightness of the image unchanged,
or (more precisely) the mean pixel value will remain constant. In a
nonlinear representation, keeping the sum of pixel values the same does
not generally keep the brightness the same.

Despite this, linear filters (e.g. resizing, Gaussian blur, unsharp
mask) are often applied to nonlinear (gamma-corrected) data, usually
with pleasing results.

There are non-linear filters too - many noise-reducing and
edge-detecting filters are nonlinear (in the linear transform sense).

Dave
.



Relevant Pages

  • Re: Formulae for Latin squares of size 2^n
    ... But vastly it implies a linear function. ... Transform is a generic term, ... >> I was suggesting to use a MDS to replace a latin square. ...
    (sci.crypt)
  • Re: New transform for video
    ... to handle motion without blocks. ... The new transform is compatible with bocks. ... if you stop the filter there (at ... Something like this: an inter frame can be divided into 2 regions: one ...
    (comp.compression)
  • Re: linear/non-linear system
    ... For a system, if the input function is u1, the output is y1 ... linear, if not it nonlinear. ... Why don't they use Fourier Transform? ... The Fourier transform is better for analyzing systems when you just care about their frequency response, and has some handy properties to analyze systems that are periodically time varying, so it's good for communications systems. ...
    (comp.dsp)
  • Re: ? solving linear eqn
    ... > But this approach just remind me another linear equation below. ... With A and B given, provided A is of maximum rank, in other words ... A = E (the unity matrix with the diagonal elements =1, ... You may now adjoining any columns at all to b to transform this vector ...
    (sci.math)
  • Re: Connecting a raw file to transform filter.
    ... Also what should be done to make the transform filter ... the file type), that is a parser filter, which happens to be ... transform and that offers a media type your transform filter ...
    (microsoft.public.win32.programmer.directx.video)