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
|
Re: Digest Number 131
Started by ●February 26, 2005
Reply by ●February 26, 20052005-02-26
> 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 |
Reply by ●April 16, 20052005-04-16
hello everyone,
i have a doubt in performing 2-D hadamard transform.for finding the 2-d transform whether 1-d transform has to be performed first horizontally or vertically.it was given some where that for finding 2-d transform 1-d has to be performed both horizontally and vertically.can u plz say me which has to be done prior to the other.
thanx in advance
regards
chandrika
"Always be with a smiling face and singing heart"
--Chandrika villuri
Reply by ●April 18, 20052005-04-18
I think you can do it either way .Complete the rows and then the columns or vice versa
chandrika <chandrika6@chan...> wrote:
hello everyone,
i have a doubt in performing 2-D hadamard transform.for finding the 2-d transform whether 1-d transform has to be performed first horizontally or vertically.it was given some where that for finding 2-d transform 1-d has to be performed both horizontally and vertically.can u plz say me which has to be done prior to the other.
thanx in advance
regards
chandrika
"Always be with a smiling face and singing heart"
--Chandrika villuri
To
---------------------------------