Old 05-28-2006, 08:26 PM   #1 (permalink)
Cloud's Hair Spray
 
Join Date: May 2006
Posts: 63
Reputation: 10
Default Image Smoothing 3 by 3 Matrix...

I didnt know wether this would fit under Game dev or General Programming but it seems to be more programming than game deving.... I'ts for my map editor I'm trying to create a smoothing algorithim... it takes the 8 pixels around the pixel your smoothing and averages them to get the middle of the 3 by 3 matrice's height. question is do I include the middle point's height value in the averaging?


like you have

1|9|1
1|1|1

1|1|1

1+9+1+1+1+1+1+1+1 = 17/9 which is 1.8888888888888888888 etc...

or

1+9+1+1+1+1+1+1 = 16/8 = 2....


so which one's the most efficient smoothing algorithm?
__________________
Legends of Alterion - Under Development

toast lands butter down, cats land on their feet, what happens when u strap toast to a cat?.....
Math indicates they will hover in quatom indecision...(yet to be tested)
Tocs1001 is offline  
Old 05-28-2006, 09:32 PM   #2 (permalink)
Luigi’s Pizza
 
HopeDagger's Avatar
 
Join Date: May 2006
Location: Ontario, Canada
Posts: 119
Reputation: 10
Send a message via MSN to HopeDagger
Default

Try a Google search on "convolution linear filtering". There's heaps of resources on this flavour of filtering.
__________________
Gauntlets of Recursion (+5) - My game development journal.
HopeDagger is offline  
Old 05-29-2006, 12:19 AM   #3 (permalink)
Cloud's Hair Spray
 
Join Date: May 2006
Posts: 63
Reputation: 10
Default

hmm interesting.... Anyone know how they changed File IO in .Net with c++ because i've tried googling and i still get the old fstream.h and its not popping up
__________________
Legends of Alterion - Under Development

toast lands butter down, cats land on their feet, what happens when u strap toast to a cat?.....
Math indicates they will hover in quatom indecision...(yet to be tested)
Tocs1001 is offline  
Old 05-29-2006, 04:10 AM   #4 (permalink)
Luigi’s Pizza
 
HopeDagger's Avatar
 
Join Date: May 2006
Location: Ontario, Canada
Posts: 119
Reputation: 10
Send a message via MSN to HopeDagger
Default

Quote:
Originally Posted by Tocs1001
Anyone know how they changed File IO in .Net with c++ because i've tried googling and i still get the old fstream.h and its not popping up
You using Visual C++ 2005 Express? You'll need to download the Platform SDK before you can access those headers.
__________________
Gauntlets of Recursion (+5) - My game development journal.
HopeDagger is offline  
Old 05-29-2006, 04:44 AM   #5 (permalink)
Cloud's Hair Spray
 
Join Date: May 2006
Posts: 63
Reputation: 10
Default

express no.... I have Microsoft Visual Studio 2003 .NET and they changed <fstream.h> and <iostream.h> to <fstream> and <iostream>, I also had to usenamespace std... and now fstream::get () is giving me -1, but thanks for the help I just gotta tangle with this for a while, things have changed since I last wrote my .raw heightmap loader in MSVS 6.0 ... Good news is thanks to u I got a smoothing function working thx ^.^ File I/O always drove me crazy >.>
__________________
Legends of Alterion - Under Development

toast lands butter down, cats land on their feet, what happens when u strap toast to a cat?.....
Math indicates they will hover in quatom indecision...(yet to be tested)

Last edited by Tocs1001; 05-29-2006 at 04:49 AM.
Tocs1001 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:10 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0
OnRPG, Copyright ©2003-2011, Game Entertainment Enterprises