The coefficients of the wavelet-transformed image can be modified by typing or drawing on the transformed image, or a rectangular or irregular-shaped region can be selected with the mouse and modified by the usual operations for modifying pixels in an image, such as delete (by pressing the delete key, which sets the selected coefficients to 0 if the background is black), contrast, subtract pixel value, image algebra, etc. The transformed image can also be zoomed in or out, or edited in the spreadsheet like a regular image. This gives great flexibility in manipulating the data in wavelet space.
Filtering consists simply of altering the wavelet coefficients and then reconstituting the image. For example, suppose it is desired to remove the high-frequency noise from the image below (A). Somewhat arbitrarily selecting a Daubechie's-16 wavelet (dau16.wavelet) and transforming produces B. This is a pyramidal representation of the wavelet coefficients. Each level of detail is demarcated by blue lines, with the highest detail in the lower right; the residual smoothed image (i.e., the lowest detail) is the tiny box in the upper left. The off-diagonal boxes are diagonal coefficients.
To remove the noise, the background color was set to 0 and the areas shown in C were selected with the mouse and set to 0 with the delete key, thus removing most of the detail coefficients. Reverse-transforming produced the de-noised image D.
Noise removal using wavelets.
If the low-detail coefficients are removed instead, an outline or edge-enhanced image is produced instead:
In this image, all the lowest-detail coefficients were removed, creating the small gray box in upper left of B. This produced the image in C. When removing low-detail coefficients, it is usually necessary to use a gray-scale offset (128 was used in this case) to ensure positivity of the resulting pixel values. Afterwards, the intensity contrast and/or grayscale mapping may need to be adjusted to restore the image balance.
It is recommended to use the ``Change size'' command to resize the image to a power of 2 in each direction before performing wavelet transformations, instead of letting the algorithm enlarge it, to avoid artifacts caused by the additional background pixels. The artifacts can arise because the new pixels are set to black, which can create a sharp edge in the image.
Convolution: Convolution is carried out by adding the coefficients of two transformed images. Deconvolution is also possible. These can be done using image algebra (see Sec. 12).