Question about significancy of wavelet coefficients

3 ビュー (過去 30 日間)
snake eyes
snake eyes 2011 年 8 月 20 日
I'm doing watermarking project based on discrete wavelet transform. According to various research paper i understand that, the watermark should be embedded into highest wavelet coefficients. Now consider some wavelet coefficients: 12, -23 ,34 ,-123,56 Can anybody tell me which are the three highest coefficients?
Thanks in advance.

採用された回答

the cyclist
the cyclist 2011 年 8 月 20 日
Does this do what you want?
coefficients = [12,-23,34,-123, 56];
sortedCoefficients = sort(coefficients,'descend');
topThree = sortedCoefficients(1:3)
If you need the three highest by magnitude (e.g. -123 is the largest), then it's just a bit trickier:
coefficients = [12,-23,34,-123, 56];
[sortedCoefficients,sortingIndex] = sort(abs(coefficients),'descend');
topThree = sign(coefficients(sortingIndex(1:3))).*sortedCoefficients(1:3)
  1 件のコメント
snake eyes
snake eyes 2011 年 8 月 21 日
Thanks "The cyclist". :-)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWavelet Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by