NAME

Math::Wavelet::Haar - Perl extension for transforming data with the Haar Wavelet

SYNOPSIS

use Math::Wavelet::Haar qw(:all);

my @test = qw(1 2 3 4 5 6 7 8);
my @result = transform1D(@test);

my @test = ([0,1,2,3],[1,2,3,4],[2,3,4,5],[3,4,5,6]);
my @result = transform2D(@test);

my @test = qw(36 -16 -4 -4 -1 -1 -1 -1);
my @result = detransform1D(@test);

my @test = ([48,-16,-4,-4],[-16,0,0,0],[-4,0,0,0],[-4,0,0,0]);
my @result = detransform2D(@test);

my @test = ([48,-16,-4,-4],[-16,0,0,0],[-4,0,0,0],[-4,0,0,0]);
@result = detransform2D(transform2D(@test));

@result == @test;

DESCRIPTION

Math::Wavelet::Haar is a module for performing a discrete wavelet transform using the Haar wavelet.

EXPORT

transform1D @result = transform1D(@input); takes a single array as input, and returns the transformed result, @input MUST be a power of two in length, if it is not, then it will return undef
transform2D @result = transform2D(@input); takes a single two dimensional array as input, and returns the transformed result, @input MUST be a power of two in length and width, if it is not, then it will return undef
detransform1D @result = detransform1D(@input); takes a single array as input, and returns the inverse transform as the result, @input MUST be a power of two in length, if it is not, then it will return undef
detransform2D @result = detransform2D(@input); takes a single two dimensional array as input, and returns the inverse transform as the result, @input MUST be a power of two in length and width, if it is not, then it will return undef

SEE ALSO

Wikipedia articles on the Haar Wavlet, Discrete Wavelet Transforms, and lots and lots of math

AUTHOR

Ryan Voots <lt>simcop2387@yahoo.com<gt>

COPYRIGHT AND LICENSE

Copyright (C) 2007 Ryan Voots

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 193:

'=item' outside of any '=over'

Around line 209:

You forgot a '=back' before '=head1'