(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 7, October 2010
Kekre‟s Algorithm
[10] to generate Walsh Transform fromHadamard matrix [17] is illustrated for N=16.However thealgorithm is general and can be used for any N = 2
k
where k is an integer.
Step 1:
Arrange
the „N‟ numbers
in a row and then split the row at
„N/2‟, the other part is written below the upper row but in
reverse order as follows:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1515 14 13 12 11 10 9 8Step 2:
We get two rows, each of t
his row is again split in „N/4‟ and
other part is written in reverse order below the upper rows asshown below.
0 1 2 315 14 13 127 6 5 48 9 10 11
This step is repeated until we get a single column whichgives the ordering of the Hadamard rows according tosequency as given below:
0,15,7,8,3,12,4,11,1,14,6,9,2,13,5,10
Step 3:
According to this sequence the Hadamard rows are arrangedto get Walsh transform matrix. Now a product of Walshmatrix and the image matrix is calculated. This matrixcontains Walsh transform of all the columns of the givenimage.Since Walsh matrix has the entries either +1 or -1 there isno multiplication involved in computing this matrix. Sinceonly additions are involved computational complexity isvery low.III.
FEATURE
VECTOR
GENERATIONThe proposed algorithm makes novel use of Walshtransform to design the sectors to generate the featurevectors for the purpose of search and retrieval of databaseimages. The complex Walsh transform is conceived bymultiplying all sal functions by j =
√
-1 and combining themwith real cal functions of the same sequency. Thus it ispossible to calculate the angle by taking tan
-1
of sal/cal.However the values of tan are periodic with the period of
π
radians hence it can resolve these values in only two sectors.To get the angle in the range of 0-360 degrees we dividethese points in four sectors as explained below. These foursectors are further divided into 8, 12 and 16 sectors. Wehave proposed two different approaches for feature vectorgeneration namely sector mean of only sal components andonly cal components value of all the vectors in each sectorwith augmentation of extra highest-sal, zero-cal componentsand without augmentation of extra highest-sal, zero-calcomponents with sum of absolute difference and Euclideandistance [7-9] [11-14] as similarity measures. Performancesof all these approaches are compared using both similaritymeasures.
A.Four Walsh Transform Sectors:
To get the angle in the range of 0-360 degrees, the steps asgiven in Table 1 are followed to separate these points intofour quadrants of the complex plane. The Walsh transformof the color image is calculated in all three R, G and Bplanes. The complex rows representing sal components of the image and the real rows representing cal componentsare checked for positive and negative signs. The sal and calWalsh values are assigned to each quadrant. as follows:T
ABLE
I.
F
OUR
W
ALSH
S
ECTOR FORMATION
Sign of Sal Sign of CalQuadrant Assigned+ +
I (0
–
90 Degrees)
+ -
II ( 90
–
180 Degrees)
- -
III( 180- 270 Degrees)
- +
IV(270
–
360 Degrees)The equation (1) is used to generate individual componentsto generate the feature vector of dimension 12 consideringthree R, G and B Planes in the sal and cal densitydistribution approach. However, it is observed that thedensity variation in 4 quadrants is very small for all theimages. Thus the feature vectors have poor discretionarypower and hence higher number of sectors such as 8, 12 and16 were tried. In the case of second approach of featurevector generation i.e. individual sector mean has betterdiscretionary power in all sectors.Sum of absolute differencemeasure is used to check the closeness of the query imagefrom the database image and precision and recall arecalculated to measure the overall performance of thealgorithm.
B. Eight Walsh Transform Sectors:
Each quadrants formed in the previous obtained 4 sectorsare individually divided into 2 sectors each considering theangle of 45 degree. In total we form 8 sectors for R,G and Bplanes separately as shown in the Table 2. The percentage
157http://sites.google.com/site/ijcsis/ISSN 1947-5500