Soften/Smooth image filtering methods?

Started by
4 comments, last by Starfall 24 years, 6 months ago
Just wondering if anyone knows anything about softening or smoothing of images, or can point me in the right direction for information? Thanks Starfall
Advertisement
The gimp soften plug-in is open source. You can get a source version of gimp from www.gimp.org.
The basic idea of softening: each pixel gets to be a pondered average (? sorry, me not native english speaker ) between itself and the pixel around it (component-wise, i mean) something like:
R11'' = 0.6*R11 + 0.1*R10 + 0.1*R01 + 0.1*R20 + 0.1*R02
Thanks for the suggestions. Now to work out a way to do this quickly with minimum of reading from memory...

Regards

Starfall
If you read and write data in chunks of 32-bytes, you will achieve maximum throughput. Especially on writes. The reason being is that Intel Pentium Pro, 2 and 3 CPU's have a 32-byte write back cache. When you write bytes in sequential order (i.e a line of a buffer), these bytes go to the Write-Back (WB)cache. When the WB becomes full (that is, it reaches it's 32-byte capacity) all 32-bytes get BURSTED from the WB to memory. This happens EXTREMLY fast. However, if you read one byte and write back one byte, the WB cache flushes each time you write.

To make long explanation short: you can write 32 SEQUENTIAL bytes to memory in a little more time it takes to write just 1 byte.

Just a little something to keep in mind.

~-------------------------------------------------------~
Fred Di Sano
System Programmer - Artech Studios (Ottawa.CA)
~-------------------------------------------------------~

Edited by - fredo on 2/2/00 11:04:37 AM
~-------------------------------------------------------~ Fred Di Sano System Programmer - Artech Studios (Ottawa.CA)~-------------------------------------------------------~
If you''re rendering the image, draw it to an offscreen bitmap at double it''s size. Then take the average color of every 2x2 pixels. redraw that color to another offscreen bitmap as one pixel. Then you can just zap that over to your window.

E:cb woof!
E:cb woof!

This topic is closed to new replies.

Advertisement