NSST is a discrete form of Shearlet transform, and it differs from other multi-scale transformations by avoiding up-down samplers. NSST consists of two main stages, multi-scale and multi-directional separations.
- The Laplacian Pyramid (NSLP) without subsampling produces low and high frequency images whose size is the same as the size of the source image.
- Versatility is achieved by using different "combinations of Shear Filters" in the so-called polar (pseude-polar) coordinate
The process steps performed to obtain the NSST coefficients of an image of NxN size at a fixed resolution scale are as follows:
-
Laplacian pyramid is applied to the image. Low and High pass sub-images are obtained.
-
The fourier transformations of the high pass sub-images are calculated and transformed into the Polar coordinate system.
-
Bandpass filter is applied to Polar coordinate system transformations and Fourier transforms (FFT) of Shearlet coefficients are obtained.
-
The Inverse Fourier Transform (IFT) is applied to obtain the Shearlet coefficients and the transformation is performed to the Cartesian coordinate system.
- Firstly, the input image must be converted to the YCbCr channel. At this stage, only Y channel will be used for NSST. You can use ConvertBMPToYCbCr() for this process. General formula :
I = (16 + 0.257 * Red + 0.504 * Green + 0.098 * Blue) // Y => Intensity
X = (128 - 0.148 * Red - 0.291 * Green + 0.439 * Blue) // Cb => X
Y = (128 + 0.439 * Red - 0.368 * Green - 0.071 * Blue) // Cr => Y
for more see ITU-R_BT.601
-
Intensity image given to NSST function. Low (AFK) and High (YFK) Frequency coefficients are obtained at its output. You can use NsstDec1e() for this process.
-
"Fusion Selection Rule 1" is applied for only AFK coefficients. This method is the process of taking the average of the AFK coefficients of each image.
-
"Fusion Selection Rule 2" is applied for only YFK coefficients. This method is the process of applying the absolute maximum to the YFK coefficients of each image.
-
"Fusion Selection Rule 2" is applied for the Cr (Y) channel of each image.
-
"Fusion Selection Rule 2" is applied for the Cb (X) channel of each image.
-
Optimum focused intensity image is obtained. You can use NsstRec1() for this process.
-
In the last step, an optimally focused color image is obtained. Conversion must be done from YCbCr to RGB space. General formula :
// I => Intensity, X => Cb, Y => Cr
Red = (1.164 * (I - 16) + 1.596 * (Y - 128));
Green = (1.164 * (I - 16) - 0.392 * (X - 128) - 0.813 * (Y - 128));
Blue = (1.164 * (I - 16) + 2.017 * (X - 128));
The following is my optimum focused image when tested with 30 images in the "Images" folder: