
- Mahotas - Home
- Mahotas - Introduction
- Mahotas - Computer Vision
- Mahotas - History
- Mahotas - Features
- Mahotas - Installation
- Mahotas Handling Images
- Mahotas - Handling Images
- Mahotas - Loading an Image
- Mahotas - Loading Image as Grey
- Mahotas - Displaying an Image
- Mahotas - Displaying Shape of an Image
- Mahotas - Saving an Image
- Mahotas - Centre of Mass of an Image
- Mahotas - Convolution of Image
- Mahotas - Creating RGB Image
- Mahotas - Euler Number of an Image
- Mahotas - Fraction of Zeros in an Image
- Mahotas - Getting Image Moments
- Mahotas - Local Maxima in an Image
- Mahotas - Image Ellipse Axes
- Mahotas - Image Stretch RGB
- Mahotas Color-Space Conversion
- Mahotas - Color-Space Conversion
- Mahotas - RGB to Gray Conversion
- Mahotas - RGB to LAB Conversion
- Mahotas - RGB to Sepia
- Mahotas - RGB to XYZ Conversion
- Mahotas - XYZ to LAB Conversion
- Mahotas - XYZ to RGB Conversion
- Mahotas - Increase Gamma Correction
- Mahotas - Stretching Gamma Correction
- Mahotas Labeled Image Functions
- Mahotas - Labeled Image Functions
- Mahotas - Labeling Images
- Mahotas - Filtering Regions
- Mahotas - Border Pixels
- Mahotas - Morphological Operations
- Mahotas - Morphological Operators
- Mahotas - Finding Image Mean
- Mahotas - Cropping an Image
- Mahotas - Eccentricity of an Image
- Mahotas - Overlaying Image
- Mahotas - Roundness of Image
- Mahotas - Resizing an Image
- Mahotas - Histogram of Image
- Mahotas - Dilating an Image
- Mahotas - Eroding Image
- Mahotas - Watershed
- Mahotas - Opening Process on Image
- Mahotas - Closing Process on Image
- Mahotas - Closing Holes in an Image
- Mahotas - Conditional Dilating Image
- Mahotas - Conditional Eroding Image
- Mahotas - Conditional Watershed of Image
- Mahotas - Local Minima in Image
- Mahotas - Regional Maxima of Image
- Mahotas - Regional Minima of Image
- Mahotas - Advanced Concepts
- Mahotas - Image Thresholding
- Mahotas - Setting Threshold
- Mahotas - Soft Threshold
- Mahotas - Bernsen Local Thresholding
- Mahotas - Wavelet Transforms
- Making Image Wavelet Center
- Mahotas - Distance Transform
- Mahotas - Polygon Utilities
- Mahotas - Local Binary Patterns
- Threshold Adjacency Statistics
- Mahotas - Haralic Features
- Weight of Labeled Region
- Mahotas - Zernike Features
- Mahotas - Zernike Moments
- Mahotas - Rank Filter
- Mahotas - 2D Laplacian Filter
- Mahotas - Majority Filter
- Mahotas - Mean Filter
- Mahotas - Median Filter
- Mahotas - Otsu's Method
- Mahotas - Gaussian Filtering
- Mahotas - Hit & Miss Transform
- Mahotas - Labeled Max Array
- Mahotas - Mean Value of Image
- Mahotas - SURF Dense Points
- Mahotas - SURF Integral
- Mahotas - Haar Transform
- Highlighting Image Maxima
- Computing Linear Binary Patterns
- Getting Border of Labels
- Reversing Haar Transform
- Riddler-Calvard Method
- Sizes of Labelled Region
- Mahotas - Template Matching
- Speeded-Up Robust Features
- Removing Bordered Labelled
- Mahotas - Daubechies Wavelet
- Mahotas - Sobel Edge Detection
Mahotas - Wavelet Transforms
Wavelet transforms are mathematical techniques used to break the images into different frequency components. Wavelet transforms captures both the local and the global details of an image.
Wavelet transforms use small wave−shaped functions, known as wavelets, to analyze signals. These wavelets are scaled and transformed to match different patterns present in an image.
Wavelet transform involves modifying the high and low frequency coefficients of the frequency components to produce identify patterns and enhance and image. The original image can be recovered by inversing the wavelet transform.
Let us discuss about the wavelet transformation techniques along with their inverse variations.
Daubechies Transformation
The Daubechies transformation is a wavelet transformation technique used to break a signal into different frequency components. It allows us to analyze the signals in both the time and the frequency domains.
Let's see Daubechies transformation image below −

Inverse Daubechies Transformation
The inverse Daubechies transformation is the reverse process of the Daubechies transformation. It reconstructs the original image from the individual frequency components, which are obtained through the Daubechies transformation.
By applying the inverse transform, we can recover the signal while preserving important details.
Here, we look at inverse of Daubechies transformation −

Haar Transformation
The Haar transformation technique breaks down an image into different frequency components by dividing it into sub−regions. It then calculates the difference between the average values to apply wavelet transformation on an image.
In the image below, we see the Haar transformed image −

Inverse Haar
The inverse Haar transformation reconstructs the original image from the frequency components obtained through the Haar transformation. It is the reverse operation of the Haar transformation.
Let's look at inverse of Haar transformation −

Example
In the following example, we are trying to perform all the above explained wavelet transformations −
import mahotas as mh import numpy as np import matplotlib.pyplot as mtplt image = mh.imread('sun.png', as_grey=True) # Daubechies transformation daubechies = mh.daubechies(image, 'D6') mtplt.imshow(daubechies) mtplt.title('Daubechies Transformation') mtplt.axis('off') mtplt.show() # Inverse Daubechies transformation daubechies = mh.daubechies(image, 'D6') inverse_daubechies = mh.idaubechies(daubechies, 'D6') mtplt.imshow(inverse_daubechies) mtplt.title('Inverse Daubechies Transformation') mtplt.axis('off') mtplt.show() # Haar transformation haar = mh.haar(image) mtplt.imshow(haar) mtplt.title('Haar Transformation') mtplt.axis('off') mtplt.show() # Inverse Haar transformation haar = mh.haar(image) inverse_haar = mh.ihaar(haar) mtplt.imshow(inverse_haar) mtplt.title('Inverse Haar Transformation') mtplt.axis('off') mtplt.show()
Output
The output obtained is as shown below −
Daubechies Transformation:

Inverse Daubechies Transformation:

Haar Transformation:

Inverse Haar Transformation:

We will discuss about all the wavelet transformations in detail in the remaining chapters.