Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

filter to reverse anti-alias effects

I have bitmaps of lines and text that have anti-alias applied to them. I want to develop a filter that removes tha anti-alias affect. I'm looking for ideas on how to go about doing that, so to start I need to understand how anti-alias algorithms work. Are there any good links, or even code out there?

like image 363
Jeremy Avatar asked Feb 27 '23 08:02

Jeremy


1 Answers

I need to understand how anti-alias algorithms work

Anti-aliasing works by rendering the image at a higher resolution before it is down-sampled to the output resolution. In the down-sampling process the higher resolution pixels are averaged to create lower resolution pixels. This will create smoother color changes in the rendered image.

Consider this very simple example where a block outline is rendered on a white background.

High resolution image

It is then down-sampled to half the resolution in the process creating pixels having shades of gray:

Low resolution image

Here is a more realistic demonstration of anti-aliasing used to render the letter S:

Not anti-aliasedAnti-aliased

like image 192
Martin Liversage Avatar answered Feb 28 '23 23:02

Martin Liversage