File Exchange

## Feature Extraction Using Multisignal Wavelet Transform Decom

version 1.2.0.0 (191 KB) by
Multisignal Wavelet Transform Feature Extraction

Updated 11 Mar 2020

From GitHub

A MATLAB function to extract 5 types of features from the wavelet transform coefficients from each node, these include: energy, variance, std, waveform length, and entropy. You can modify and extract any types of features as you need.

** You need the wavelet toolbox to run this code.

### Cite As

Rami Khushaba (2021). Feature Extraction Using Multisignal Wavelet Transform Decom (https://github.com/RamiKhushaba/getmswtfeat), GitHub. Retrieved .

Abrar Alamoudi

Thank you Dr. Rami.Khushaba,
how can we modify the number of channels and why you decide to use 6 channels?

Salma Hassan

sir , please you said that you have extracted tree types of features stored in the variable feat which gave me 29*44 ?? where is the statically measure energy , mean and variance

LEE ZISHENG

Rami Khushaba

Didik, your comment relates to another submission, not this one!!!

You are referring to the wavelet packet feature extraction. In that submission there is an attached pdf tutorial. The answer to your question is: look at the tree and decompose to 7 levels as per the example and count how many nodes in your resulting tree, they would be 1+2+4+8+16+32+64+128=255.

Didik Purwanto

Anyone, please tell me how we should set the winsize and wininc corrrectly? Then, in the readme line 39-40 : "Total = 255 features
% and the result from the example above is feat is of size 25 x 255". I just don't get it, how it obtain 25 x 255? Thanks

Didik Purwanto

ahmed silik

thank you very much

behnaz bagherian

thank you very good

ok

kamalvir pannu

dear sir,please suggest me an approach to recognize isolated words . ive extracted the features of different words using ur 'oh so awesm' code. 100 thanka for that

PeiY

hossein

Hi Dr

I am so interesting to know if we have discrete impulse response signals. is it possible use your code to extract features from mentioned signals?

Rami Khushaba

Thanks Yousra,

Yousra Ahmed

Thank you Dr.
How i can use it with image 2D

Rami Khushaba

Dear Hamed abdulaziz & Prabhakar

Thank you for your inquiries. I work mainly in signal feature extraction, rather than image feature extraction. My Suggestions for you could be:
1- Reshape each image into vector and apply this code on each vector.
2- OR, use the 2D wavelet decomposition commands (more suitable for images) and extract your features from each node in the same way am doing here. Note with the 2D version, you will have a small image at each node and you can use something like moment invariants to get the features from each image. Look here (http://www.mathworks.com.au/matlabcentral/fileexchange/33975-the-seven-invariant-moments)

Thanks

hamed abdulaziz

Dear Dr. Rami.Khushaba,

please How to use this method to extract the features from image.

Prabhakar

Dear Dr. Khushaba,

How to use this method to extract the features for image

vidyasagar k

Rami Khushaba

Dear Shiddiq Hashuro

I believe that you are completely confusing between the number of samples (1024 in the previous example) and the number of features (44 in the previous example). You only have 44 features and not 1276 as you described (that's wrong).

I am thinking of posting a video to explain this, stay tuned to my website (www.rami-khushaba.com)

Thanks
Rami

shiddiq hashuro

Dear Dr. Khushaba,

thank you for the reply. It helps me a lot.
I have more questions now if you don't mind. My plan of using feature extractor is to reduce the dimension, but for example in this case,the previous dimension was, say, 1024 and after, it became 44x29 which is 1276, it got larger. I guess we're supposed to select the important features,is it correct? You would help me a lot if you can give me directions as where to start with this,is there some kind of correlation check you think i can do?

thank you very much for your time.

Rami Khushaba

Dear Shiddiq Hashuro

Thank you for your inquiry. At the moment the code works on single dimensions, i.e., vectors. If you need to run this code on multiple dimensions then just use a for loop and repeat it for each dimension. I will soon update the code to account for that as I have fixed this issue with the wavelet packet code as well.

On the other hand, you are right about the 29x44 features. For 10 levels you should get 11 features as we have decided to extract 4 types of features then we get 11 x 4 =44. As for the 29, since we are using an overlapping windowing scheme then the total 1024 is divided into windows of 128 samples slided by 32 samples giving you a total of 29 window each having 44 features.

Hope that helps. Let me know if you have further inquiries.

Rami

shiddiq hashuro

Dear Dr. Khushaba,
thank you for the share..
i tried using more than one column of input data but it gave me this error on line 61 %feat(1:winsize,i) = detrend(curwin);% : ??? Subscripted assignment dimension mismatch.
i suspect this is because feat(1:winsize,i) is (winsize by 1) in size and the result's size of the detrend,which is the same as curwin's size is (winsize by number_of_column)..
i might be able to repair this line but i wouldn't know about the next lines,so i might need your help.. however,this might possibly be an error on my side,in any case please comment..

also,can you explain about the result matrix,the result dimension for an input like your example %rand(1024,1)% is (29 by 44) instead of (1 by 44),is this normal?

thank you anyway,you've already helped me.

Qasem

##### MATLAB Release Compatibility
Created with R2011b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux