Posted by
Michael Schmid on
May 04, 2007; 2:11pm
URL: http://imagej.273.s1.nabble.com/Filtering-with-Savitzky-Golay-tp3699606p3699609.html
Hi Gabriel,
cleaning up my e-mails, I just stumbled over your old
message to the ImageJ mailing list:
> Then I realised something curious: the X0Y0 filters (the ones that
> I think one
> uses for smoothing), are the same for orders 2 and 3, and the same
> for orders
> 4 and 5 for a particular kernel size.
I think this is ok. If you fit a polynomial of 3rd order into
data points spaced symmetrically around x=0, the third order
term will have an average of zero, thus it will never influence
the 0 order term (i.e., the constant offset).
Same for the 5th order term, if you add 5th order to a 4th order
poynomial.
Anyway, my 5 cents about Savitzky-Golay:
Looking at the Savitzky-Golay smoothing kernels, they have
negative values at the edge. This means that they are not
really the kind of functions one would usually like to have for
smoothing. Also, to get the derivative of a function, the
Savitzky-Golay kernels have positive edge values on the
negative side, and vice versa.
So, to get the derivative, if the standard 3x3 Sobel kernels
produce too much noise, I would do some other type of smoothing.
Michael
________________________________________________________________
On 4 Mar 2007, at 12:57, Gabriel Landini wrote:
> On Saturday 03 March 2007, I wrote:
>> This page:
>>
http://research.microsoft.com/users/jckrumm/SavGol/SavGol.htm>> describes the filter and gives (at the bottom) the two-dimensional
>> Savitzky-Golay filters for different patch sizes and polynomial
>> orders.
>
> Hi,
> Following the example from that page, I loaded the convolution
> matrices in the
> IJ convolver as found in
>
>
http://research.microsoft.com/users/jckrumm/SavGol/SavGol.cpp.htm>
> According to the page, to smooth, one needs to use the C00 filter,
> and to get
> the partial derivatives filter with C10 and C01, and so on. These
> correspond
> to the X0Y0, X1Y0 and X0Y1 in the file above.
>
> The X0Y0 filters do some kind of smoothing, but not knowing what to
> expect, I
> am not sure whether this is the correct way of doing it.
>
> Then I realised something curious: the X0Y0 filters (the ones that
> I think one
> uses for smoothing), are the same for orders 2 and 3, and the same
> for orders
> 4 and 5 for a particular kernel size.