News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Image Blurring

Started by ueberken, May 28, 2005, 06:14:34 PM

Previous topic - Next topic

ueberken

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. :'(

BogdanOntanu

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...
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro