Currently, I am studying a paper by K. He and J. Sun, “Computing nearest-neighbor fields via propagation-assisted KD-trees,” in Proc. IEEE Conf. Comput. Vis. Pattern Recog., 2012, pp. 111–118.

In the paper there is a sentence which i can quote as:

... We use the first 16 WHT bases for the Y channel2 and 4 for each chrominance channel (Cb/Cr) throughout this paper. ...

Although I have made a search on the internet, I couldn't get the meaning of base.

In MATLAB 2014b There is a function fwht(x,n) where n is the order of the transform. Can this order be the base that i am trying to find the meaning of?


1 Answer 1


I believe that here bases stands for "basis vectors". From the cited paper by Y. Hel-Or and H. Hel-Or. Real time pattern matching using projection kernels, 2003, ICCV, you can see the set of $8 \times 8$ vectors from a separable Walsh-Hadamard basis:

[20] Y. Hel-Or and H. Hel-Or. Real time pattern matching using projection kernels. In ICCV, pages 1430–1445, 2003.

It consists in a tensor product of two $8$ 1D Walsh-Hadamard transforms (one horizontal, one vertical).

Walsh Hadamard basis

The sixteen 2D vectors in the left-top $4\times 4$ square are the one with the lowest sequencies (sequency is the frequency analog for Walsh-Paley-Hadamard transforms), in terms of "maximum sequency":

first 2D Walsh Hadamard basis vectors

  • 1
    $\begingroup$ Thank you for your response, i think this will help me quite a lot to find myself a better understading of the concept. $\endgroup$
    – Archura
    Jun 18, 2017 at 17:11
  • $\begingroup$ One small question though, after having a glance at the paper that was posted, and the one I have quoted from, in which the sentence continues as "Thus we represent each patch by a 24-d vector." I couldn't catch the mathmetical relationship between the order, base, and dimension of the W-H matrix. $\endgroup$
    – Archura
    Jun 18, 2017 at 17:36
  • $\begingroup$ 24 probably comes from 16 coefficients from the Y (luminance) channel and two times 4 for each chrominance channel : $16+4+4=24$. $\endgroup$ Jun 18, 2017 at 17:43
  • $\begingroup$ Indeed, so it can be simplified as: 1 base = 1 dimension = lg2(1) orders, do you believe this is correct? $\endgroup$
    – Archura
    Jun 18, 2017 at 18:33
  • 1
    $\begingroup$ To get a $8\times 8$ FWT, you will apply 'fwht' with order $8$ on both the columns and rows of a $8\times 8$ image patch. $\endgroup$ Jun 18, 2017 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.