> Date: Fri, 25 Feb 2005 15:02:50 -0000 > From: "jlin_nb" <> > Subject: Help: How to convert 1d Hamming filter to 2D one > > I have 1D hamming mathematical form > H(v)=0.54+0.46*cos(2*PI*v/Vmax) > > Could you help me to get 2D Hamming filter from this 1D one. > I need to use it to filter my images Jian, Two possible methods immediately spring to mind: cos(2*PI*v1/V1max)*cos(2*PI*v2/V2max) or cos(2*PI*sqrt((v1^2+v2^2)/(V1max^2+V2max^2))) Of cource you need to check the spectral forms in both cases and use the best one. Regards, Andrew |
I have generated 2D hamming from 1d successfully in the past. Here is what
i did
suppose u have a one row of 32 element 1D hamming window.
And now you want to generate a 2d window. So just copy the same elements to 32
rows to make a 32 x 32 matrix .
Then take its transpose and multiply it by itself. In the end normalize by
dividing it by the maximum. You will get a 2d hamming window.
Algo:
1) h[1][1 --> 32] = 1D hamming window
2) h[2][1--->32] = h[1][1 --> 32] ;
|
|
|
|
h[32][1--->32] = h[32][1 --> 32] ;
3) let h* = transpose of h
4) 2d hamming = h x h* ( element by element multiplication)
5) Find the max of the 2d hamming matrix and divide all matrix elements by
it to normalize it.
Hope it helps
Gaurav
i...@yahoogroups.com wrote:
Gaurav Sharma
Imaging Research Associate , Omnicorder Technologies M . S Electrical Engineering and Biomedical Engineering
phone: 631-897-0438 email:
g...@omnicorder.com
|