wavGabor( in.image, nlevels = 1, nvoices = 1, nangles = 1, angle.init = pi/2, angle.step = 0., sigma = 1., aspect = 0.5, bandwidth = 1., frequency =( sqrt( 2*log(2) ) ) * ( (2^bandwidth + 1) / (2^bandwidth - 1 ) ) / ( sigma * aspect ), step = 0.8, boundary = "zero", downsample = TRUE)
matrix
containing the image to process.
list
of complex matrices, containing the
wavelet coefficients at each level, voice, and angle. The list is ordered
so that first the decomposition level and voice are fixed, and the rotation
angle varies, then the voice changes, and then the decomposition level.
The Gabor wavelets are not orthonormal, but may form a frame if the decomposition parameters are chosen appropriately. For the Gabor wavelets to form a frame, the step size and the frequency must be such that step * frequency <= 2pi. However, for the frame to be tight, it is usually necessary to have step * frequency << 2pi. For a fixed frequency, this can be achieved by lowering the step parameter. In turn, this leads to smoother wavelets, at the expense of a smaller wavelet size (with all other parameters kept constant). Another way to make the frame tighter, and thus approximate an orthogonal base, is to oversample that is to use a larger number of rotations, voices, and levels than strictly necessary. It is possible to reconstruct the original matrix from a Gabor wavelet decomposition that forms a tight frame by simply adding the wavelets themselves, scaled by the coefficients of the decomposition and by a factor proportional to the frame bounds. For details, see the references.
Tai Sing Lee, ``Image Representation Using 2D Gabor Wavelets'', IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 18, no. 10, Oct. 1996.
Bovik, A. C. and Clark, M. and Geisler, W. ``Multichannel Texture Analysis Using Localized Spatial Filters'', IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 12, no. 1, Jan. 1990.
Daubechies, I. Ten Lectures in Wavelets, SIAM, 1992.
# 2 levels, 3 voices, 3 angles of rotation # starting a pi/4, separated by pi/8 out1 <- wavGabor(lena, nlevels=2, nvoices=3, nangles=3, angle.init=pi/4, angle.step=pi/8) # examine attributes of wavelet transform attributes(out1) # examine the wavelet coefficients of the second level, # first voice, third angle out2 <- wavGaborExtract(out1, level=2, voice=1, angle=1) image(Re(out2)) image(Im(out2))
# 5 angles of rotation, starting at pi/2, separated by pi/10 # no downsampling, and continuation boundary condition for convolution out3 <- wavGabor(lena, nangles=5, angle.step=pi/10, boundary="continue", downsample=FALSE) # examine wavelet coefficients at second angle of rotation out4 <- wavGaborExtract(out3, level=1, voice=1, angle=2) image(Re(out4)) image(Im(out4))