Algorithm 2 Pseudo code of the proposed EWT decomposition.

From: A novel brain MRI classification framework integrating tuned single scale retinex and empirical wavelet entropy features

FUNCTION EWT_Decomposition(enhanced_image, basis_type="Tensor”, N_subbands = 4):

   // Decompose image into subbands using EWT

   1. Compute Fourier spectrum of the enhanced_image using FFT

   2. Segment Fourier spectrum into N_subbands using local maxima detection.

   3. Construct filter bank based on selected basis function.

   4. Extract subbands by applying inverse FFT to each filtered spectrum

   RETURN subbands = [approximation_coeff, detail_coeff_1,…, detail_coeff_N]