Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!caip!princeton!allegra!ulysses!bellcore!petrus!magic!joevax!sdh From: sdh@joevax.UUCP (The Doctor) Newsgroups: net.graphics Subject: Possible way of anti-aliasing. Message-ID: <280@joevax.UUCP> Date: Wed, 17-Sep-86 13:34:27 EDT Article-I.D.: joevax.280 Posted: Wed Sep 17 13:34:27 1986 Date-Received: Fri, 19-Sep-86 22:23:20 EDT Distribution: net Organization: Bell Communications Research Inc., Morristown, NJ Lines: 35 I don't know a good algorithm for anti-aliasing, but you could try the following technique: Get a pixels attributes. Average its attributes with the pixels immediately tangent to it. If the difference in attributes is above a certain threshold, decide how greatly you want to change the pixel (could be by a percentage of the difference in attributes. If there is a change, stack it, else nothing. Repeat until all pixels have been hit. Go through the stack and make the changes. This should be very efficient on images with plenty of consistent background, and not too many objects in the foreground. It will use up more memory than you'd really like on complex pictures. Ways to eliminate this problem: Forget the stack entirely and just put the image out to a file, or an alternate graphics display. This will have a memory consumption that will be a constant, which is far smaller than the worst case of stacking. Do separate passes for red, green and blue, thus reducing the data that has to be stacked. Don't do the whole screen in one pass. Just do it in blocks of 3 scan lines The reasoning behind this is that the fourth line down only needs to know about line 3 and line 4, so it can forget about line 1 and 2. I have no idea whether or not any of this is valid. I started thinking about anti-aliasing about 5 minutes ago, so this is just off the top of my head. It seems to be a pretty brute force way of doing it, but swift. If you only stack 3 lines at a time, it will be very memory efficient too. Steve Hawley joevax!sdh