The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: ueberken on May 28, 2005, 06:14:34 PM

Title: Image Blurring
Post by: ueberken on May 28, 2005, 06:14:34 PM
I'm working on some assembly code that blurs an 8-bit grayscale bitmap file, and i'm having problems with the file input and output routines. I would appreciate some help on the matter. Algorithms for blurring 8,16-bit RGB bitmaps will also be greatly welcome. :'(
Title: Re: Image Blurring
Post by: BogdanOntanu on May 28, 2005, 08:33:49 PM
Well, for bluring you can sum up the 8 pixels arround and the current pixel and divide the result with a ceratain number let us say 9 in this case... depending on what and how many pixels arround are considered and with what constant the result is divided... you have different versions of blur... google helps on finding such algorithms ...

This should be simpler for 8bits grayscale but a little complicated for 8bits with a pallete since you would have to find the nearest color in the pallete for each result.

For 16bits or 24/32bits you will have to break each pixel into RGB components and do the math on each component and then combine them back into a single pixel... MMX or SSE or 3DNow might help speed this up...