AutocorrelationShell.jl is deprecated and will be part of
WaveletsExt.jl from April 23, 2021. Please follow the following steps to remove this package from your REPL and migrate to
julia> ] (@v1.x) pkg> rm AutocorrelationShell (@v1.x) pkg> update (@v1.x) pkg> add WaveletsExt
This package is a Julia implementation of Autocorrelation wavelet transforms (ACWT). AC wavelets are a special case of the stationary wavelet transform. This package includes the 1D autocorrelation wavelet transform, 2D autocorrelation wavelet transform, and autocorrelation wavelet packet transform.
Signal representations using autocorrelation wavelets are redundant and non-orthogonal. Some desirable properties of autocorrelation wavelet transforms are symmetry without losing vanishing moments, edge detection and characterization capabilities, and shift invariance. Autocorrelation wavelets can be used as a tool for data analysis such as time series analysis and image analysis.
This package was first translated from Matlab by Rishi Subramanian, and was extended by Christina Chang, and currently maintained by Shozen Dan under the supervision of Professor Naoki Saito at University of California, Davis.
The package is part of the official Julia Registry. It can be install via the Julia REPL
(@1.x) pkg> add AutocorrelationShell
julia> using Pkg; Pkg.add("AutocorrelationShell")
AutocorrelationShell.jl with the
using Wavelets, AutocorrelationShell
1D Autocorrelation Wavelet Transform
# Forward 1D Autocorrelation Wavelet Transform y = acwt(x, wavelet(WT.db4)) # Inverse 1D Autocorrelation Wavelet Transform iacwt(y)
Perform forward autocorrelation wavelet transform on the vector x
# Decompose signal y = acwt(x, wavelet(WT.db4)) # Display decomposition wiggle(y)
2D Autocorrelation Wavelet Transform
# Forward 2D Autocorrelation Wavelet Transform y = acwt(img, wavelet(WT.db4))
acwt function performs a forward wavelet transformation on 2D signals such as images. It returns a 4 dimensional tensor with the dimensions (num_row, num_col, levels_of_decomp_row, levels_of_decomp_col).
# Inverse 2D Autocorrelation Wavelet Transform iacwt(y)
iacwt function is the inverse function of
acwt. It takes an array of autocorrelation wavelet coefficients and reconstructs the original signal.
X = load(../test/pictures/boat.jpg) X = Float64.(Gray.(X)) Y = acwt(X, wavelet(WT.db4)) # Revert to original signal Z = iacwt(Y)
Autocorrelation Wavelet Packet Transform
# Autocorrelation Wavelet Packet Transform acwpt(x, wavelet(WT.db4))
acwpt function computes the autocorrelation wavelet packet transform for 1 dimensional signal. It returns a binary tree where the root node contains the original signal, and each child node contains a vector of 1 dimensional autocorrelation wavelet transform coefficients.
X₁ = randn(4); # length 4 random signal y = acwpt(X₁, wavelet(WT.db4))