DSPRelated.com
Forums

Is this a famous filter, and how to compute the orthogonal filter?

Started by Zhang Zhiqiang March 14, 2005
Hi all:

A paper gives a filter:
  [ -2     3    -6     3    -2
     3     4     2     4     3
    -6     2    48     2    -6
     3     4     2     4     3
    -2     3    -6     3    -2 ]/64
and uses its orthogonal filter to solve a problem, but the author did
not give out what is its orthogonal filter exactly. I wonder is this
filter a famous one and the orthogonal filter is notorious?

I have not learned much about the filter. Any help will be
appreciated.

Zhang Zhiqiang
Zhang Zhiqiang wrote:
> Hi all: > > A paper gives a filter: > [ -2 3 -6 3 -2 > 3 4 2 4 3 > -6 2 48 2 -6 > 3 4 2 4 3 > -2 3 -6 3 -2 ]/64 > and uses its orthogonal filter to solve a problem, but the author did > not give out what is its orthogonal filter exactly. I wonder is this > filter a famous one and the orthogonal filter is notorious? > > I have not learned much about the filter. Any help will be > appreciated. > > Zhang Zhiqiang
Hello Zhang, I don't recognize this as a famous filter - I'm not sure if there are really any famous FIR filters. Except for some windows. However, just looking at the coefs, I see several things. First is the even symmetry about the central value of 48, so this is a linear phase filter. The sum of the coefs is 1 (after /64), so the DC response is 1.0. You have 25 coefs, therefore the filter's delay is 13 smaples. I don't have access to a math package right now, but just find the fourier transform of the 25 values and see what the frequency response is. You can then derive the orthogonal filter from the FT of the filter easily. Later, Clay
Clay wrote:
> Zhang Zhiqiang wrote: > >>Hi all: >> >>A paper gives a filter: >> [ -2 3 -6 3 -2 >> 3 4 2 4 3 >> -6 2 48 2 -6 >> 3 4 2 4 3 >> -2 3 -6 3 -2 ]/64 >>and uses its orthogonal filter to solve a problem, but the author did >>not give out what is its orthogonal filter exactly. I wonder is this >>filter a famous one and the orthogonal filter is notorious? >> >>I have not learned much about the filter. Any help will be >>appreciated. >> >>Zhang Zhiqiang > > > Hello Zhang, > > I don't recognize this as a famous filter - I'm not sure if there are > really any famous FIR filters. Except for some windows. > > However, just looking at the coefs, I see several things. First is the > even symmetry about the central value of 48, so this is a linear phase > filter. The sum of the coefs is 1 (after /64), so the DC response is > 1.0. You have 25 coefs, therefore the filter's delay is 13 smaples. I > don't have access to a math package right now, but just find the > fourier transform of the 25 values and see what the frequency response > is. You can then derive the orthogonal filter from the FT of the filter > easily. > > Later, > Clay
Clay, It looks like a 2D filter kernel to me. Is that consistent with what you wrote above? Note that the rows and columns are individually symmetric, and that there is symmetry about the diagonals. I have no idea what an orthogonal spatial filter is or what it might do, but I guess that this is an image-processing question. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
>> > It looks like a 2D filter kernel to me. Is that consistent with what
you
> wrote above? Note that the rows and columns are individually
symmetric,
> and that there is symmetry about the diagonals. I have no idea what
an
> orthogonal spatial filter is or what it might do, but I guess that
this
> is an image-processing question. > > Jerry > -- > Engineering is the art of making what you want from things you can
get.
>
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF Hello Jerry, My original thoughts were for a 1-D filter, but the even symmetry - linear phase and DC response statements still hold for a 2-D cased. The delay is now thought of as an offset to the center of the convolver block. An orthogonal filter block can be useful if one needs to know the real intensity at a pixel's location. Or if one needs to fill in an unknown pixel. He can do a 2-D fourier transform, zero out the negative frequencies and Inverse FT the data, and finally take the imaginary part for his orthogonal filter. I didn't really answer his question earlier on how to find an orthogonal filter. When I get back to a computer with a math package, I'll check out the frequency response. This may be some kind of interpolator used for demosaicing (I know that's an ugly word, but it is what is commonly used now by people in that arena.) Clay
"Zhang Zhiqiang" <mathzqy@gmail.com> wrote in message 
news:7348e98b.0503140523.7f92dde0@posting.google.com...
> Hi all: > > A paper gives a filter: > [ -2 3 -6 3 -2 > 3 4 2 4 3 > -6 2 48 2 -6 > 3 4 2 4 3 > -2 3 -6 3 -2 ]/64 > and uses its orthogonal filter to solve a problem, but the author did > not give out what is its orthogonal filter exactly. I wonder is this > filter a famous one and the orthogonal filter is notorious? > > I have not learned much about the filter. Any help will be > appreciated. > > Zhang Zhiqiang
Zhang, I'd never heard of it. A quick Google revealed: http://www.cs.sunysb.edu/~mueller/teaching/cse616/wavelets.ppt#54 where it says the orthogonal filter [presumably to h(t)] is: g(k)=[(-1)^k]*h(N-k) Also, http://www.site.uottawa.ca/~edubois/courses/ELG5378/Two_channel_FB.pdf gives some insight. Some nice pictures at: http://www.toolsmiths.com/fwrorth.htm and so on..... Fred Fred
"Clay" <physics@bellsouth.net> wrote in message news:<1110816207.551392.145950@l41g2000cwc.googlegroups.com>...
> Hello Jerry, > > My original thoughts were for a 1-D filter, but the even symmetry - > linear phase and DC response statements still hold for a 2-D cased. The > delay is now thought of as an offset to the center of the convolver > block. > > An orthogonal filter block can be useful if one needs to know the real > intensity at a pixel's location. Or if one needs to fill in an unknown > pixel. > > He can do a 2-D fourier transform, zero out the negative frequencies > and Inverse FT the data, and finally take the imaginary part for his > orthogonal filter. I didn't really answer his question earlier on how > to find an orthogonal filter. When I get back to a computer with a math > package, I'll check out the frequency response. This may be some kind > of interpolator used for demosaicing (I know that's an ugly word, but > it is what is commonly used now by people in that arena.) > > Clay
Hi, Clay: Thanks for your help. You are genius and have guessed that the filter was used for demosaicing. Yes, that filter is from the paper "Color demosaicing by estimating luminance and opponent chromatic signals in the Fourier domain", which we can find it at http://ivrgwww.epfl.ch/publications/ash02.pdf and it is a 2-D filter. Following your advice, if matlab is at hand, I first get the FFT transform by command "fft_H = fft2(H)", but what is the meaning "the negative frequencies"? Now, fft_H is a 5 by 5 matrix. Maybe I should use the command "fftshift(fft_H)" to shift zero-frequency component of discrete Fourier transform to center of spectrum. Then the negative frequencies are fft_H([1 2], [1 2]), like the zero positions at the matrix given below? 0 0 1 1 1; 0 0 1 1 1; 1 1 1 1 1; 1 1 1 1 1; 1 1 1 1 1; Zhang Zhiqiang