RandR version 1.2 revisited, subpixels, point-spread function

Markus Kuhn Markus.Kuhn at cl.cam.ac.uk
Wed Sep 13 02:10:59 PDT 2006


Keith Packard wrote on 2006-09-13 06:56 UTC:
>      2. How to describe the sub-pixel geometry per-monitor, and what to
>         do with that information when we have it.

The most generic and flexible solution is to provide a raster image of
the point-spread function of a single pixel. Imagine a single white
pixel on a black background, and now take a microscopic photograph of
that pixel and send it as a PNG file or the like to the application,
such that it gets an accurate picture of what the display will do to its
idealized pixels.

Point-spread function (PSF) is image-processing slang for what digital-signal
processing folks would call a 2-dimensional impulse response:

http://en.wikipedia.org/wiki/Point_spread_function

A screen essentially takes a pixel array, convolves it with a
point-spread function (one each for R, G, B), resulting in the
luminosity distribution seen by the user. An anti-aliasing algorithm has
to solve the inverse problem of which pixel matrix will -- under a given
point-spread function -- most closely aproximate the luminosity
distribution seen by the eyes of the user. There are lots of
well-understood straight-forward numerical algorithms for inverting
point-spread functions (the sort of maths done to fix the blurred Hubble
telescope images, see any DSP or image-processing textbook for details
and examples), and since convolution is commutative, you can apply the
PSF and the approximation of its inverse in any order, i.e. you can
sharpen an image before the display will blurr it (within the limits of
the dynamic range, i.e. not for pixels at 0 or 255).

At present, LCDs have rather boring point-spread functions, but just
have a look at CCD camera sensors to get an idea of what might come soon
(2x2 subpixel arrangements with twice as many green pixels as read and
blue pixels make a lot of sense for outputting 4:2:2 images, etc.).

Such information would have to be provided by the display manufacturer,
e.g. in an extension of VESA's EDID.

http://en.wikipedia.org/wiki/EDID

The image of the point-spread-function should have a multiple of the
resolution of the pixel matrix. Oversampling by a factor of 12 in each
direction sounds about right to me, but this could/should be a
parameter. Also, the nominal pixel position inside the point-spread
function would have to be marked.

Even more generaly, the pixel resolution could be different for each
colour channel, permitting the handling of displays with twice as many
green pixels as red or blue pixels.

With fixed parameters 12x oversampling, the point-spread function of my
boring simple LCD here would look like

....................................
....................................      where:
....................................       . = (red=0.0, green=0.0, blue=0.0)
....................................       R = (red=1.0, green=0.0, blue=0.0)
....................................       G = (red=0.0, green=1.0, blue=0.0)
....................................       B = (red=0.0, green=1.0, blue=0.0)
....................................
....................................
....................................
....................................
....................................
....................................
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
............RRRRGGGGBBBB............
....................................
....................................
....................................
....................................
....................................
....................................
....................................
....................................
....................................
....................................
....................................
....................................

where the nominal pixel size is the rectangle from (12,12) to (23,23).

The black area around the pixel could be trimmed away for efficiency if
the nominal pixel position is passed along as a parameter.

Point-spread functions can not only document the sub-pixel geometry of
flat-panel displays, they can also tell the application software and in
particular its anti-aliasing filters what blurring will be applied by
CRT e-beam focus, plasma-display glow area, CRT convergence errors, and
perhaps even eye problems and visual acuity of the user, allowing it to
compensate in the pitmap generated, select the most appropriate font
size for the given display quality, etc.

Markus

-- 
Markus Kuhn, Computer Laboratory, University of Cambridge
http://www.cl.cam.ac.uk/~mgk25/ || CB3 0FD, Great Britain




More information about the xorg mailing list