After variational model decomposition "vmd" of my time series data , I'd like to convert each of the subcomponent IMFs to 2Dimages , how am i supposed to that ?

4 Ansichten (letzte 30 Tage)
I have a time series dataset , only 2 columns , DateTime and the values corresponding to each date , I hv done vmd ie variational model decomposition on it and i got 5 IMFs after the decomposition , now i'd to convert these subcomponent IMFs to HSV colorspace , as in timeseries_to_images , so i'd appreciate if someone can tell me how to convert the IMFs into 2D images , Thanks a lot !

Antworten (1)

Gautam
Gautam am 22 Mai 2024
Hello Muskaan
I understand that you have 5 IMFs that are 1D signals produced as a result of applying Variational Mode Decomposition to a time series data and you want to represent each of the five IMFs as images in HSV color space.
To accomplish this, you can map various properties of the signal to the Hue (H), Saturation (S), and Value (V) components of the HSV model. This would allow you to visualize different aspects of the signal in a single image.
Below is an IMF represented as an image in HSV color space
In this, I have assigned the signal's frequency data to the Hue channel, the amplitude data to the Saturation channel, and the phase data to the Value channel of the image.
The following MATLAB code demonstrates the implementation of this task.
t = linspace(0,1,900);
sig = 6*t.^2 + cos(4*pi*t+10*pi*t.^2) + ...
[cos(60*pi*(t(t<=0.5))) cos(100*pi*(t(t>0.5)-10*pi))];
%Performing VMD
[imf,res] = vmd(sig);
%Retrieving phase information of the signal
analyticSig = hilbert(imf(:,1));
phase = unwrap(angle(as));
phase = phase/max(phase);
V = reshape(phase,[30 30]);
%Retrieving amplitude information of the signal
S = imf(:,1).^2/max(imf(:,1));
S = reshape(S, [30,30]);
%Retrieving frequency information of the signal
freq = abs(fft(imf(:,1)));
freq = freq/max(freq);
H = reshape(freq,[30 30]);
% Maping the signal properties to the color channels
HSV = zeros([30,30,3]);
HSV(:,:,1) = H;
HSV(:,:,2) = S;
HSV(:,:,3) = V;
RGB = hsv2rgb(HSV); %Converting the channels to RGB to display them
imshow(RGB)
colorbar
Thank you,
Gautam Murhty

Kategorien

Mehr zu Denoising and Compression finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by