Code covered by the BSD License  

Highlights from
Faster 2D-Hadmard Tranform

4.66667

4.7 | 5 ratings Rate this file 8 Downloads (last 30 days) File Size: 3.11 KB File ID: #20312

Faster 2D-Hadmard Tranform

by Andre

 

16 Jun 2008 (Updated 27 Jun 2008)

Fast 2D-Hadamard/Walsh Transform based on Simple Matrix Vector Multiplication

| Watch this File

File Information
Description

This function generates the 2D Walsh or Hadamard Transform of a matrix.
Where the Walsh Transform uses the sequency ordered matrix and the Hadamard the natural/hadamard ordered matrix.
The paley ordered transform is not yet implemented.

On my machine the function can transform matrices of a size up to 4096x4096 in very little time compared to the other 2D Walsh/Hadamard transform (ID 6882) which needs substantially more time.
For a 4096x4096 the transformation takes ~30s on the first call and ~20s after that (Transformation matrix is cashed)

References:
Walsh functions:
http://mathworld.wolfram.com/WalshFunction.html

Howto generate sequency ordered Hadamard Matrices:
http://ieeexplore.ieee.org/iel5/12/35157/01674860.pdf

http://dx.doi.org/
doi:10.1016/j.physletb.2003.10.071

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Fast 2D Walsh-Hadamard Transform
This submission has inspired the following:
1D Walsh Transform, Faster 3D Walsh - Hadamard Transform (sequency, natural)

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
18 Jun 2008 Jos x@y.z

Files contains no proper help or internal comments. How do you expect others will be able to use this submission?

There are also some programming issues, e.g. log2(N) is computed multiple times.

23 Jun 2008 Andre S

Fixed, contains now documentation and also function has now a sec. parameter to specify ordering of the basis functions.

25 Jun 2008 Jos x@y.z

The author has indeed fixed the code issues and added a understandable help section. Well done!

btw, the classname argument is never used in the code ...

06 Aug 2008 Moe K.  
30 Aug 2010 Sin Yi Lee

I have met with an error on class type when running the code. Towards the end, matlab cannot process Y = W*X*W/N...W is a double, my image X is a uint8...when i convert image X to double i got an error saying
??? Error using ==> mtimes
Input arguments must be 2-D.
Please enlighten me. Thanks.

30 Aug 2010 Sin Yi Lee

Hey i got it..have to change image to grayscale.

Please login to add a comment or rating.
Updates
23 Jun 2008

Lack of documentation. Now fixed. Now also takes two parameters where one can specify the ordering of the matrix. (natural, sequency)

23 Jun 2008

Little typo in walsh.m

26 Jun 2008

Fixed classname parameter usage & added comment. Also fixed bug when persistent parameters are uninitialized.

27 Jun 2008

Fixed description spelling.

Tag Activity for this File
Tag Applied By Date/Time
transforms Andre 22 Oct 2008 10:06:17
hadamard transform Andre 22 Oct 2008 10:06:17
walsh transform Andre 22 Oct 2008 10:06:17
sequency ordered Andre 22 Oct 2008 10:06:17
natural ordered Andre 22 Oct 2008 10:06:17

Contact us at files@mathworks.com