fbasatemur / Non-Subsampled_Shearlet_Transform

NSST - Non-Subsampled Shearlet Transform
MIT License
19 stars 5 forks source link
image-processing non-subsampled-shearlet-transform nsst signal-processing

Non-Subsampled_Shearlet_Transform

What is NSST ?

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.

Multi-scale

Multi-directional

NSST Steps

The process steps performed to obtain the NSST coefficients of an image of NxN size at a fixed resolution scale are as follows:

  1. Laplacian pyramid is applied to the image. Low and High pass sub-images are obtained.
  2. The fourier transformations of the high pass sub-images are calculated and transformed into the Polar coordinate system.
  3. Bandpass filter is applied to Polar coordinate system transformations and Fourier transforms (FFT) of Shearlet coefficients are obtained.
  4. The Inverse Fourier Transform (IFT) is applied to obtain the Shearlet coefficients and the transformation is performed to the Cartesian coordinate system.

Pipeline

image 1

  1. Firstly, the input image must be converted to the Intensity channel. At this stage, only Y channel will be used for NSST. You can use ConvertBMPToIntensity() for this process. General formula :

    Y = (0.11 * Red + 0.59 * Green + 0.3 * Blue)

  2. 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.

You can get the input Intensity image using TNSST (Inverse NSST). You can use NsstRec1() for this process.

Run

Windows:

mkdir build && cd build
copy ..\external_lib\fftw-3.3.5-dll64\libfftw3f-3.dll .
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Or run with Clion
Note: A copy of external_lib/fftw-3.3.5-dll64/libfftw3f-3.dll must be in the executable directory

Ubuntu:

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Note: If you want to see the Eigen array values during debug, you can copy the .gbinit file to /home/user-name/

Dependencies

Don't worry, no setup needed !

Thanks !