MAL

Mallat wavelet transformation


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples :: References

Back to top

Description


Performs an orthogonal 2-dimensional wavelet transformation on an image channel. The result is a set of detail images at different scales. These images contain horizontal, vertical, or diagonal details in the image within a spatial frequency band.
Back to top

Parameters


mal(fili, dbic, dbiw, filo, dboc)

Name Type Caption Length Value range
FILI * str Input file name 1 -    
DBIC * List[int] Input raster channel 1 - 1  
DBIW List[int] Raster input window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
FILO * str Output file name 1 -    
DBOC * List[int] Output raster channel(s) 1 -    

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDISK file that contains the image to process.

DBIC

Specifies the input raster channel holding the image to process. Only one input channel may be specified.

DBIW

Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) that is read from the input channel. If this parameter is not specified, the entire image is processed by default.

Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

FILO

Specifies the name of the PCIDISK file to receive the output wavelet detail masks. The specified file must already exist before running MAL.

DBOC

Specifies the output image channels in the output file (FILO) to receive the output wavelet detail maps.

Back to top

Details

MAL performs an orthogonal 2-dimensional wavelet transformation on a specified image channel. The result is a set of detail images at different scales. These images contain horizontal, vertical, or diagonal details in the image within a spatial frequency band.

As with the 2-Dimensional Fast Fourier Transform, the input window (DBIW) must be rectangular and must have length and width values of a power of 2.

The wavelet transformation breaks down the input image into a set of detail images. Each detail image contains the image content within a specific region in spatial frequency, scale space, and orientation. In addition, the bases of generated detail images are mutually orthogonal.

The number of detail images from a complete Mallat wavelet transformation depends on the size of the input image. Detail images occur in groups of three in a succession of decreasing spatial sizes and correspondingly increasing higher-spatial frequency bands. Given an initial image of P pixels and L lines, the first group of three detail images will be of size P/2 pixels and L/2 lines. The second group will be of size P/4 pixels and L/4 lines; the Nth group will be of size P/(2^N) pixels and L/(2^N) lines. The transformation is completed when the size of the next group of detail images would be below 8 pixels or lines. The 8 pixels and lines limit is required to support the filter masks.

Within each group of three detail images, the first computed image contains image information with spatial frequency energy oriented in the vertical direction; the second detail image represents the horizontal spatial frequency information, while the third detail image contains the diagonal spatial frequency information.

The detail images generated using MAL can be though of as a set of multi-scale texture maps. These texture maps can be used by the AVG aggregation neural network to segment a multispectral version of the image used with MAL. Keep in mind that the largest detail image is actually half the pixel and line size of the input image; therefore, when AVG is used, the input multispectral image should also be subsampled by two along rows and columns to match the MAL texture maps. Refer to AVG for an explanation of how MAL or other texture maps are integrated into the neural network.

Back to top

Examples

Create a new image file named 'texture.pix' to hold the detail images from a complete Mallat wavelet transformation on a 256 pixel x 256 line image.

A 256x256 image will have three detail images in each of the following sizes: 128x128, 64x64, 32x32, 16x16, and 8x8. Thus a 15-channel image file must be created to hold 128x128 images.

from pci.cim import cim

file	=	"texture.pix"
tex1	=	"MAL detail images"
tex2	=	"Suitable for 256x256 image input to MAL"
dbsz	=	[128,128]
pxsz	=	[20,20]
dbnc	=	[0,0,0,15]
dblayout	=	"PIXEL"

cim( file, tex1, tex2, dbsz, pxsz, dbnc, dblayout )
	

Perform the complete Mallat wavelet transformation on a 256 pixel x 256 line window at offset 100 pixels and 100 lines, of channel 3 in the file 'irvine.pix'. Save the results in the previously created 'texture.pix' file, with the largest-detail images residing in the lowest-numbered channels.

from pci.mal import mal

file	=	"irvine.pix"
dbic	=	[3]
dbiw	=	[100,100,256,256]
filo	=	"texture.pix"
dboc	=	[1,-15]

mal( file, dbic, dbiw, filo, dboc )
	
Back to top

References

Mallat, S. (1990). Multiscale Image Analysis

Mallat, S. (1989). "A Theory of Multiresolution Signal Decomposition: the Wavelet Representation." IEEE Trans. PAMI, Vol. II, No. 7, pp. 572-693.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.