1-D wavelet transform on individual pixels of an image time series data

3 views (last 30 days)
I am working on an imaging system, where I have a stack of images whose source of illumination is a sinusoidally varying source. Thus for any pixel p(x,y,t) in the image series , there is a sinusoidally varying intensity (starting from the first image to the last image and tracing a single pixel location). However the intensity is not stationary and also has harmonic contents. How may I get the component of each harmonic from the pixel location using wavelet transform?

Answers (1)

Gokul Nath S J
Gokul Nath S J on 26 May 2023
Hi Faisal,
To extract the harmonics from a pixel location in an image series with sinusoidally varying intensity using wavelet transform, you can follow these general steps:
  1. Load the image series into MATLAB as a 3D array, where each slice represents an image frame:
% Load the image series as a 3D array
image_series = load_image_series('path/to/images/*.png');
The load_image_series function is a custom function that loads a series of images from a file path using the imread function.
2.For the pixel location of interest, extract the intensity values over time as a 1D array:
% Extract the intensity values for a pixel location as a 1D array
pixel_values = squeeze(image_series(x,y,:));
The squeeze function is used to remove singleton dimensions from the 3D array.
3. Decompose the pixel values into frequency components using wavelet transform:
% Perform wavelet decomposition on the pixel values
[c,l] = wavedec(pixel_values, num_levels, wavelet_name);
% Extract the wavelet coefficients for a specific harmonic frequency
harmonic_coefficients = detcoef(c,l,harm_level);
4. Reconstruct the harmonic frequency component from the extracted coefficients:
% Reconstruct the pixel values corresponding to the harmonic frequency component
harmonic_pixel_values = wrcoef('d',c,l,wavelet_name,harm_level);
The wrcoef function reconstructs the signal from the wavelet coefficients using a specified wavelet type and decomposition level.
5. Repeat steps 3-4 for each harmonic component of interest.
By repeating these steps for different harmonic frequencies, you can extract the frequency components of interest from a pixel location in an image series with sinusoidally varying intensity using wavelet transform.
with regards,
Gokul Nath S J
  3 Comments
Gokul Nath S J
Gokul Nath S J on 28 May 2023
Hi Faisal,
Yes, you might need to write the function while incorporating a loop depending on the number of images.
Faisal Sani Bala
Faisal Sani Bala on 2 Jun 2023
Hi Gokul,
I have created the function. thanks, but I discovered the signal multiresolution analyzer app, is it implementing the same thing ?

Sign in to comment.

Categories

Find more on Denoising and Compression in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!