Phase-Shifting Separable Haar Wavelets and Applications
Mais Alnasser, Hassan Foroosh

TL;DR
This paper introduces a novel phase-shifting method for Haar wavelets that preserves key properties and enables accurate, efficient shift and rotation operations in the wavelet domain, with applications to image processing.
Contribution
It derives closed-form expressions for phase shifting in Haar wavelets, including non-integer shifts, and demonstrates their application to image rotation and interpolation.
Findings
Accurate phase shifting formulas for Haar wavelets
Effective image rotation and interpolation using the new method
Preservation of Haar wavelet properties during shift operations
Abstract
This paper presents a new approach for tackling the shift-invariance problem in the discrete Haar domain, without trading off any of its desirable properties, such as compression, separability, orthogonality, and symmetry. The paper presents several key theoretical contributions. First, we derive closed form expressions for phase shifting in the Haar domain both in partially decimated and fully decimated transforms. Second, it is shown that the wavelet coefficients of the shifted signal can be computed solely by using the coefficients of the original transformed signal. Third, we derive closed-form expressions for non-integer shifts, which have not been previously reported in the literature. Fourth, we establish the complexity of the proposed phase shifting approach using the derived analytic expressions. As an application example of these results, we apply the new formulae to image…
| Reduction Level | Complexity | Probability= |
| Nearest Neighbor | 23.2451 | 15.3117 | 23.2249 | 19.3687 | 26.9128 | 13.8441 | 22.1845 | 7.2702 | 11.8229 | 18.3561 |
| Bilinear | 21.9343 | 12.7582 | 21.9399 | 18.3487 | 26.5292 | 12.0671 | 20.0879 | 6.2334 | 10.3405 | 17.02 |
| Bicubic | 15.2645 | 7.0842 | 14.5404 | 11.4509 | 17.2482 | 6.7327 | 11.6671 | 4.7183 | 5.9234 | 9.6489 |
| Sinc | 8.4349 | 1.8098 | 4.7284 | 4.0193 | 6.4774 | 2.3743 | 2.9468 | 2.2373 | 2.042 | 2.4533 |
| Our Method | 3.3738 | 1.5586 | 3.0092 | 2.4095 | 3.4965 | 1.5173 | 2.3753 | 1.1139 | 1.3243 | 2.0574 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsImage and Signal Denoising Methods · Advanced Data Compression Techniques · Mathematical Analysis and Transform Methods
Phase-Shifting Separable Haar Wavelets and Applications
Mais Alnasser and Hassan Foroosh Mais Alnasser was with the Department of Computer Science, University of Central Florida, Orlando, FL, 32816 USA at the time this project was conducted. (e-mail: [email protected]).Hassan Foroosh is with the Department of Computer Science, University of Central Florida, Orlando, FL, 32816 USA (e-mail: [email protected]).
Abstract
This paper presents a new approach for tackling the shift-invariance problem in the discrete Haar domain, without trading off any of its desirable properties, such as compression, separability, orthogonality, and symmetry. The paper presents several key theoretical contributions. First, we derive closed form expressions for phase shifting in the Haar domain both in partially decimated and fully decimated transforms. Second, it is shown that the wavelet coefficients of the shifted signal can be computed solely by using the coefficients of the original transformed signal. Third, we derive closed-form expressions for non-integer shifts, which have not been previously reported in the literature. Fourth, we establish the complexity of the proposed phase shifting approach using the derived analytic expressions. As an application example of these results, we apply the new formulae to image rotation and interpolation, and evaluate its performance against standard methods.
Index Terms:
Discrete Haar Wavelets, Separable Wavelets, Phase Shifting, Image Rotation, Image Interpolation
I Introduction
The wavelet transform has been playing an ever increasing important role in the modeling and analysis of a wide range of problems in science and engineering. In signal and image processing, wavelets have been particularly instrumental in methods of constructing “optimal” basis that are often used in various image processing and computer vision applications, such as shape/scene description and classification [105, 52, 124, 125, 58, 60, 59, 38, 37, 168, 107, 118, 2, 1, 63, 3, 36, 55, 93, 33, 79, 10, 82, 88, 156, 95, 155, 14, 158, 86, 85, 87, 81, 80, 15, 9, 153], scene content modeling [90, 89, 96, 97, 94, 98, 162, 161, 163, 160, 159], image restoration and denoising [54, 53, 61, 64, 75, 77, 133, 141, 136, 46, 31, 137, 106, 131, 127, 128, 132, 129, 30, 143, 32, 78, 134, 135, 140], video content modeling [149, 16, 11, 157, 145, 154, 17, 144, 147, 12, 13, 34, 146, 148, 8], image alignment [73, 68, 28, 29, 6, 18, 19, 139, 69, 138, 25, 24, 72, 23, 70, 66, 130, 22, 20, 67, 65], tracking and object pose estimation [151, 114, 116, 142, 115], camera motion quantification and calibration [45, 43, 51, 91, 40, 42, 39, 83, 92, 50, 71, 84, 100, 101, 102, 7, 99, 108, 26, 41, 41, 49], and image-based rendering (IBR) [47, 48, 150, 27, 166, 117, 4, 5, 74, 21, 167, 44], to name a few. However, a major drawback restricting the use of such methods is the lack of shift-invariance. For example, in the case of de-noising, Gibbs phenomenon in the neighborhood of discontinuities is attributed to the lack of shift-invariance of the wavelet basis [53]. An image transform is shift-invariant if the total energy of the coefficients in any subband is invariant to translations of the original image. It can be thus readily verified that the fastest and the most compact formulations - i.e. the classical fully decimated real wavelet transforms - suffer from the lack of shift-invariance. Additional properties that are often desired in many applications of wavelets include separability, orthogonality and symmetry.
There has been two trends in responding to the shift-invariance requirement. The earlier literature has been focusing on modifying the classical real wavelets to enforce shift-invariance, while attempting to preserve other desired properties. This approach was rediscovered by various authors independently, and bears different names such as algorithme à trous [110, 62, 112], redundant wavelets [35] and undecimated wavelets [104] to name a few. The major drawbacks of this approach, of course, are the undesirable side-effect of overly redundant representation and the high computational cost, since each set of coefficients contains the same number of samples as the input signal. This level of redundancy essentially defeats the purpose of designing wavelets for compression and coding, which take advantage of the localization properties of wavelets as opposed to the shift-invariant Fourier basis.
In order to alleviate these side-effects, more recently a second approach has been investigated in the literature that attempts to directly construct shift-invariant wavelets. This line of research has led to a new class of wavelets with complex coefficients. Few examples are the Gabor wavelets for texture processing [113], harmonic wavelets for vibration and acoustic analysis [119, 120] and the Complex Wavelet Transform (CWT) for motion estimation [111]. In addition to shift-invariance, one particular advantage of complex wavelets is directionality that is similar to the steerable pyramids [152]. Complex wavelets prove to be useful in solving the shift-invariance problem without compromising many other properties. However, their major drawbacks are lack of speed and often also poor inversion properties. A more successful attempt in this category is perhaps the dual-tree complex wavelet transform (DT-CWT) and its variations [57, 123]. Although, DT-CWT provides a good trade-off between fully decimated wavelets and the redundant wavelet transform, it does so by trading off the compression capabilities and computational time of the classical real wavelets.
In this paper, we initiate and investigate a third line of approach to tackling the shift-invariance problem. Instead of modifying a classical wavelet or introducing a new complex wavelet, our goal is to determine in what way the wavelet coefficients in a fully decimated transform are related to those of a shifted signal. Of course such relation would be wavelet-dependent and may not be a straightforward relation as in redundant wavelets, where the shift in the input results in a shift in the output. The key idea is that as long as the relation is known, one can tackle shift-invariance, since all the coefficients of a shifted signal can be mapped to those of the original signal. On the other hand, shift-invariance is tackled without compromising speed and compression properties. Furthermore, establishing the explicit and direct relations between the coefficients of a signal and its shifted version, would allow us to perform compressed domain processing of signals or images without requiring a chain of forward and backward transforms. This is particularly of interest in applications such as data compression and progressive transmission, or more recent applications in compressed sensing [122, 109, 76]. Our focus in this paper is on the standard Haar wavelet transform due to additional desirable properties of separability and symmetry.
We present a solution to phase-shift the Haar coefficients in the transform domain solely using the available coefficients of the unshifted transformed signal, which we refer to as the 0-shift signal. Our solution generalizes readily to an N-dimensional signal due to separability. We also show how our solution can be extended to non-integer phase shifts. To demonstrate the power of the proposed approach and to evaluate it, we performed extensive experiments on the problem of accurate image rotation [164]. The remaining of this paper is organized as follows: In the next section, we introduce the notations and briefly describe the Haar transform tree. The following two sections will then derive our expressions for describing the explicit relations between the Haar coefficients of a 0-shift and shifted signal for both fully and partially transformed signals. These results are then extended for sub-pixel shifting, followed by full evaluation and testing of the results on image rotation and interpolation problems. The paper concludes with a brief discussion and some remarks on the proposed new ideas.
II The Haar Transform Tree
Let be a one-dimensional signal of size , where is a positive integer. The Haar transform of , namely , has the form:
[TABLE]
such that is the dc value of the signal and is the detail coefficient at level , where and .
Transforming a signal using Haar wavelets can be easily done by successively convolving the blurred part of the signal by box and differencing filters until the signal is fully transformed (see for instance [165] for more details).
We choose to express the Haar transformation using a tree as in Fig. 1. The tree is constructed of levels with residing at the leaves, i.e. the level. The node at level in the tree can be made to hold the 0-shift blur and detail coefficients, and , respectively, where and .
Each level in the tree corresponds to a reduction step , with the untransformed original signal corresponding to . The signal is partially transformed with reduction steps if and is said to be fully transformed if . At each reduction level , one obtains the partially transformed signal . is composed of the blur coefficients at level followed by the detail coefficients at the same level and all subsequent reduction levels that are less than and greater than
- That is:
[TABLE]
Where, and . Note that is the fully transformed signal.
We use the tree to examine the behavior of the detail coefficients with respect to shifting. Note that we can denote as , in which case . By using this notation, now has the range . Also, note that the blur coefficient is related to its parent at level by the following relation:
[TABLE]
Now, let be the difference between the dc value at the root of the tree and the blur coefficient . Then
[TABLE]
By substituting (4) in (3), can be computed recursively solely in terms of the detail coefficients using the following relation:
[TABLE]
It can be verified that can be computed recursively with a complexity of for fully-transformed signals, which in itself is very cheap, or be simply tabulated for even a faster retrieval. Also, note that for partially transformed signals, a combination of (5) and (4) has to be used to evaluate :
[TABLE]
The complexity for the above equation is even less than that of (5) because the recursion needs to go a maximum depth of rather than a maximum depth of . In other words, the complexity for the above equation is
At level , there are non-redundant coefficient sets each of size [126], where . A shift can be one of the following possibilities:
- •
A shift that is divisible by .
- •
An odd shift.
- •
An even shift that is not divisible by .
In the following sections, we first analyze the behavior of the detail coefficients based on the above three possibilities for a fully transformed signal. We then analyze the behavior of the blur coefficients for signals that are partially transformed. The final analytic solutions that we provide are capable of evaluating the coefficients of the shifted signal solely using the original coefficients of the 0-shift signal, which is the goal of our paper.
III Shifting Fully Transformed Signals
III-A Shifting by a Multiple of
This is the simplest case. A shift in the discrete domain that is equal to is a circular shift of the 0-shift detail coefficients at level by , that is,
[TABLE]
where and % is the mod operation. Note that for levels a shift of of the original signal is a circular shift of the coefficients at those levels by , respectively. In other words, a shift of of the original signal shifts the coefficients at level by , while shifting the coefficients at level by twice as much, and the coefficients at level by four times as much and so on.
III-B Shifting by an Odd Amount
By examining the tree in figure (1), we notice that:
[TABLE]
In other words, is the sum of the leaves shifted into its left branch minus the leaves shifted into its right branch divided by . To simplify the above equation, we set the indices as follows:
[TABLE]
Using the notation for , (LABEL:eq:xn1) now becomes:
[TABLE]
Substituting (4) and then (5) in (9) and canceling out the ’s, the relation for computing for a shift that is odd becomes:
[TABLE]
Note that for , would be a non-integer value, in which case we must set to 0.
III-C Shifting by an Even Amount that is Not Divisible by
In this case, is divisible by , for and is the highest power of 2 by which is divisible. This allows us to let , where . This means that the coefficients at levels follow the first case. In other words, the 0-shift coefficients at levels are circularly shifted by , respectively. Since is the highest power of 2 by which is divisible, must be odd. This allows us to treat this case as an odd shift of the blur details at level . In other words, at level , can be evaluated using the following modification of equation (9):
[TABLE]
Following the same steps, the above can be rewritten as:
[TABLE]
Note that the second case is the same as the third case when . That leaves us with the following formula:
[TABLE]
The above relation can now be used to evaluate the new detail coefficients of the Haar transform at all different levels after any shift using only the coefficients of the 0-shift signal. The worst case complexity for evaluating using (13) is O, where is the size of the signal (see the complexity analysis section for more details).
IV Shifting Partially Transformed Signals
Depending on the application, the original signal might not be fully transformed. As we mentioned earlier, a signal that has degrees of reduction has the form:
[TABLE]
Where, , and .
A signal that is partially transformed is composed of both blur coefficients and detail coefficients. Equation (13) shows how to evaluate the detail coefficients of a fully transformed shifted signal, which also applies to evaluating the detail coefficients of a partially transformed signal. In this section we show how to evaluate the blur coefficients at reduction step for a signal that has been decomposed times and shifted by the integer amount in the time domain.
IV-A Shifting by a Multiple of
Similar to evaluating the detail coefficients case, a shift in the discrete domain that is equal to is a circular shift of the 0-shift blur coefficients at level by , that is,
[TABLE]
where .
IV-B Shifting by an Odd Amount
By examining the tree in figure (1), we notice that:
[TABLE]
In other words, is the sum of the leaves shifted into its left branch plus the leaves shifted into its right branch divided by . To simplify the above equation, we use only the starting and ending coefficients and we also use the notation for :
[TABLE]
Where,
[TABLE]
Substituting (3) in the above, we get
[TABLE]
The number of ’s is equal to the number of coefficients being summed, which is equal to . We factor out :
[TABLE]
Substituting (5) and simplifying, we get the analytic solution for evaluating under an odd shift :
[TABLE]
IV-C Shifting by an Even Amount that is Not Divisible by
For a shift , where and , we can treat this case as an odd shift of the coefficients at level , which is similar to what we did in evaluating the detail coefficients under a shift . can now be evaluated using the following equation:
[TABLE]
Proceeding as we did in the odd shift case, we get the following solution:
[TABLE]
Combining the three cases, the final result becomes:
[TABLE]
The above relation can now be used to evaluate the new blur coefficients of a partially transformed signal with reduction steps after any shift using only the coefficients of the 0-shift signal. The worst case complexity for evaluating using (22) is O, where is the size of the signal (see the complexity analysis section for more details).
V Non-Integer Shifting
In this section, we show how our solution can be extended to achieve non-integer shifts. Although, our model is based on up-sampling the original signal, the final relations that are derived require using only the coefficients of the original signal. Up-sampling by a factor of 2 can be modeled as adding levels to the lowest part of the transform tree and setting the detail coefficients in those levels to zero, with the lowest level being . On the other hand, shifting the up-sampled signal by an amount is equivalent to shifting the original signal by , which is a precision of . More generally, adding levels would enable us to obtain a precision of .
Let the size of the signal be , and , where is the number of added levels. Equation (13) can now be modified to allow for non-integer shifting by a precision of as follows:
[TABLE]
On the other hand, we can verify that , where . Using (5), we also know that:
[TABLE]
The above result allows us to modify (23) in such a way that avoids having to up-sample the signal for non-integer shifts, saving thus memory space in actual implementation, especially that the size increases exponentially. However, We have to split the equation into two cases. The first is when , which is when the coefficients at the added levels are being used to evaluate . The second is when is large enough for the coefficients at the original levels of the tree to be used. This leads to the new form of the phase shifting relation for non-integer values as follows:
[TABLE]
The worst case complexity of the above formula is O (again please refer to the Complexity Analysis section for more details).
VI N-Dimensional Shift
Due to separability, an N-dimensional standard Haar transform is constructed by applying the one-dimensional transform along each dimension. As a result, the above solution can also be easily generalized to N-dimensional signals by applying it along each dimension separately.
VII Complexity Analysis
In this section we explain in further detail the complexity of evaluating using equation (13), using equation (22) and using equation (25).
By examining (13), it is easy to verify that the complexity of evaluating can be expressed by the difference of the bounds of the two sums in the equation, that is O(). Substituting the values for and , the complexity can be shown to be O() when . When the complexity becomes O(1). Therefore, one can determine that the worst case is when , that is when the shift is odd. In that case the complexity of computing becomes O(). Let be the size of the signal, then the number of the detail coefficients in a fully transformed signal is . At reduction level , i.e. the root, the complexity of evaluating is O() = O() with a probability of . At the next reduction level , the complexity is O() = O() with a probability of . Table (I) shows the complexity and its probability at each reduction level .
By multiplying the complexities and the probabilities in table (I) and summing them up, the average performance of the worst case for evaluating is found to be O().
By following a similar analysis and examining (22), one can find that the complexity for evaluating is O() as well. Also, by examining (25) one can find that complexity for evaluating after a non-integer shift is O(), where is the number of levels added to achieve the shift.
VIII Experimental Validation
We validate our results on the problem of accurate image rotation using the decomposition of the rotation matrix described in [103, 121, 56, 164]. The choice of this application is driven by the fact that it allows us to evaluate all aspects such as integer and non-integer shifts, and the separability property.
VIII-A Image Rotation
We implement rotation as a sequence of sheers using the following factorization [103, 121, 56, 164]:
[TABLE]
A sheer is in fact a sequence of shifts that are row-dependent, if the sheer is horizontal, and column-dependent if it is vertical. That is, each row is shifted by in a horizontal sheer while each column is shifted by in a vertical sheer. Note that and are in general non-integer values, hence, the applicability of our phase-shifting relations derived in the previous sections. Figure (2-b) shows the application of our method to the 3-step shearing image rotation with . Figure (3) shows a magnified portion of the image under different values. An integer shift () results in a jagged effect. This effect is eliminated, leading to higher quality results, as we increase the value of . Note that visually satisfactory results are obtained even with .
As noted in [164], the worst scenario occurs when the errors get accumulated. Therefore, in order to quantify the performance, we computed the residual error, using an experiment similar to the one adopted in [164]. In other words, we successively rotated an input image by until it rotated back to its original position. Figures 4 and 5 show the results and the associated residual errors on two standard test images for our method as compared to the nearest-neighbor, bilinear, bicubic, and the sinc method. Note that the image in Figure 4, which was also used by [164], is specificaly designed for capturing accumulated errors in successive rotations. We tested and compared our method extensively on many images, some of which are shown in table II.
IX Conclusion
We have successfully shown that shift-invariance of the standard Haar wavelets may be tackled directly by establishing analytic relations between the Haar coefficients of a signal and its shifted version. This new line of approach has the advantage that it does not trade off the compression capability by retaining full decimation, while preserving symmetry and separability. Our approach does not yield a shift-invariant wavelet transform, but rather establishes the explicit relations that describe phase-shifting directly in the transform domain. Our experiments illustrate the validity of the underlying motivating ideas, and the high accuracy of results in practical problems.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Muhamad Ali and Hassan Foroosh. Natural scene character recognition without dependency on specific features. In Proc. International Conference on Computer Vision Theory and Applications , 2015.
- 2[2] Muhamad Ali and Hassan Foroosh. A holistic method to recognize characters in natural scenes. In Proc. International Conference on Computer Vision Theory and Applications , 2016.
- 3[3] Muhammad Ali and Hassan Foroosh. Character recognition in natural scene images using rank-1 tensor decomposition. In Proc. of International Conference on Image Processing (ICIP) , pages 2891–2895, 2016.
- 4[4] Mais Alnasser and Hassan Foroosh. Image-based rendering of synthetic diffuse objects in natural scenes. In Proc. IAPR Int. Conference on Pattern Recognition , volume 4, pages 787–790, 2006.
- 5[5] Mais Alnasser and Hassan Foroosh. Rendering synthetic objects in natural scenes. In Proc. of IEEE International Conference on Image Processing (ICIP) , pages 493–496, 2006.
- 6[6] Mais Alnasser and Hassan Foroosh. Phase shifting for non-separable 2d haar wavelets. IEEE Transactions on Image Processing , 16:1061–1068, 2008.
- 7[7] Nazim Ashraf and Hassan Foroosh. Robust auto-calibration of a ptz camera with non-overlapping fov. In Proc. International Conference on Pattern Recognition (ICPR) , 2008.
- 8[8] Nazim Ashraf and Hassan Foroosh. Human action recognition in video data using invariant characteristic vectors. In Proc. of IEEE Int. Conf. on Image Processing (ICIP) , pages 1385–1388, 2012.
