Steve on Image Processing

May 9th, 2008

Anti-aliased text in color

Over the past few years I've been fascinated to see the progress in making text look better on the screen. (I should confess right away that I know nothing about typography, and almost nothing about text anti-aliasing.) I recall reading some time ago that the Microsoft ClearType technology made use of color pixels, even when displaying "black" or gray text text. I thought to myself, "I wonder how that works," and then I promptly forgot all about it.

A couple of weeks ago I was preparing to give a presentation at Yale, and I was tinkering with a screen magnifier program (ZoomIt; highly recommended) to use during my presentation. When I cranked the zoom factor all the way up, I was startled to see the colors everywhere in my text.

Here's a screen shot of a portion of my browser display:

Now here's a highly enlarged view of the word "Each":

Well! That's pretty cool. Human visual perception is a strange and wondrous thing.

Added note: Blog reader Alessandro suggests looking at the Wikipedia article on subpixel rendering for more information.

4 Responses to “Anti-aliased text in color”

  1. Alessandro Giusti replied on :

    Those color pixels are useful due to the colored RGB subpixels of TFT screens, which effectively triple the horizontal resolution.
    I agree that’s extremely cool: have a look at http://en.wikipedia.org/wiki/Subpixel_rendering

    Typography is also something deeply fascinating…

  2. Steve replied on :

    Alessandro—Thanks. I’m going to add your subpixel rendering link to the post.

  3. Nomee replied on :

    Hi Steve,
    As far as appearance on screen is concerned, these colours let the text merge into backgrounds and avoid displaying sharp edges. However capturing screen text and storing might become an issue. You capture a text field which was suppose to be a binary image however when you store it in paint or some other imaging software you see it as an RGB which may not look as crisp and even readable when converted to grayscale.

  4. Steve replied on :

    Nomee—Thanks for your comments. I don’t agree, though. I wouldn’t expect a screen capture to be binary just because text was being displayed. In fact, I would never capture or scan text to binary if I had the option otherwise. Screen captures of text on my Windows laptop look just as good as the original.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Steve Eddins manages the Image & Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.

  • Sana: hi steve, could you explain to me how i would be able to use the dir function, to do a loop through a directory...
  • Nishtha: Sir, I have preprocessed the image in following steps: [1] adaptive histogram equalization [2] thresholding...
  • Kristof: I also strongly support the idea. I have just recently bumped into the problem that im2single was not...
  • Steve: David—I’ m glad you found it useful!
  • David Lalejini: I found your example very useful for finding connected nodes in a large set of input pairs. I start...
  • tommy: Dear Steve, I have a question,please if you are kind to help me regarding the accumulator array dimensions of...
  • Steve: Abc—I don’t know how to distinguish the faces. You might try posting your question in the MATLAB...
  • Manju: well if we have a few ovals within each other like in a cell how do we measure the distance from the center...
  • Steve: Manju—What do you mean? How is each region defined?
  • Manju: if we have 2-3 regions within each other how do we measure the regions of each one?

These postings are the author's and don't necessarily represent the opinions of The MathWorks.