There are many "Edge Preserving" filters in the image processing world.
2 very popular would be:


The Bilateral Filter.
Anisotropic Diffusion Filter.


Google search on each of the terms will give you plenty of data and code samples of each.

For any specific question about them, let me know, I'd be happy to assist.

Low pass filter to maintain edge information
I'm trying to load a hefty Excel workbook (.xlsm format, ~30 mb) that has a large number of array calcs. 

&gt; wb1 &lt;- loadWorkbook("Mar_SP_20130227_V6.1.xlsm")
Error: POIXMLException (Java): java.lang.reflect.InvocationTargetException


But I am able to successfully load a values-only/no-macro version of the workbook.

&gt; wb2 &lt;- loadWorkbook("Mar_SP_20130227_V6.1_VALUES_ONLY.xlsx")
&gt; wb2
[1] "Mar_SP_20130227_V6.1_VALUES_ONLY.xlsx"


What could be causing the error?

From the maintainer's website I can see that there can be issues with workbooks containing array calcs or unsupported formula functions, but this doesn't look like the same errror.

Java Info:

C:\&gt; java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode)

