Can anyone please explain waveletTransform coding

1 回表示 (過去 30 日間)
gobika ranthil
gobika ranthil 2016 年 11 月 3 日
回答済み: anita jasmine 2020 年 10 月 24 日
I have a code for waveletTransform to find the feature vector containing the first 2 moments of wavelet coefficients.Can anybody please explain me this code?I don't understand what is coif1 and coeff_1 in this code.
function wavelet = waveletTransform(image)
% input: image to process and extract wavelet coefficients from
% output: 1x20 feature vector containing the first 2 moments of wavelet
% coefficients
imgGray = double(rgb2gray(image))/255;
imgGray = imresize(imgGray, [256 256]);
coeff_1 = dwt2(imgGray', 'coif1');
coeff_2 = dwt2(coeff_1, 'coif1');
coeff_3 = dwt2(coeff_2, 'coif1');
coeff_4 = dwt2(coeff_3, 'coif1');
% construct the feaute vector
meanCoeff = mean(coeff_4);
stdCoeff = std(coeff_4);
wavelet = [meanCoeff stdCoeff];
end
  1 件のコメント
Pavan Kumar
Pavan Kumar 2020 年 3 月 21 日
Where did you get this code

サインインしてコメントする。

回答 (1 件)

anita jasmine
anita jasmine 2020 年 10 月 24 日
Coiflet is derived from daubechies wavelet.
  1. the coiflet wavelet of order 1 is computed for image.
coeff_1 = dwt2(imgGray', 'coif1');
2. Applying 4 levels of 2DWT
coeff_2 = dwt2(coeff_1, 'coif1');
coeff_3 = dwt2(coeff_2, 'coif1');
coeff_4 = dwt2(coeff_3, 'coif1');
3.computing the first 2 moments mean and std

カテゴリ

Help Center および File ExchangeContinuous Wavelet Transforms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by