algorithm for the surface blur filter in photoshop

I was wondering if there were any examples of how to implement the surface blur filter in photoshop.

This is the description:

Surface Blur Blurs an image while preserving edges. This filter is useful for creating special effects and for removing noise or graininess. The Radius option specifies the size of the area sampled for the blur. The Threshold option controls how much the tonal values of neighboring pixels must diverge from the center pixel value before being part of the blur. Pixels with tonal value differences less than the Threshold value are excluded from the blur.

thanks
hbizAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
You might be able to find it in the source code for GIMP which is open source.  http://www.gimp.org/
0
TommySzalapskiCommented:
You basically just described the entire process. What else do you need to know?
A simple way to do a blur is to make a pixel equal to the average of neighborhood of pixels around it. The size of that neighborhood is that radius parameter.

Then all you need to do is ignore edges. If the tone changes significantly, then it's an edge so don't change the pixel to the average of the neighborhood.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Algorithms

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.