matlab中wavedec2,wavedec2函数详解[通俗易懂]

matlab中wavedec2,wavedec2函数详解[通俗易懂]很多人对小波多级分解的wavedec2总是迷惑,今天就详释她!wavedec2函数:1.功能:实现图像(即二维信号)的多层分解,多层,即多尺度.2.格式:[c,s]=wavedec2(X,N,’wname’)[c,s]=wavedec2(X,N,Lo_D,Hi_D)(我不讨论它)3.参数说明:对图像X用wname小波基函数实现N层分解,这里的小波基函数应该根据实际情况选择,具体选择办法可以搜之或者…

大家好,又见面了,我是你们的朋友全栈君。

很多人对小波多级分解的wavedec2总是迷惑,今天就详释她!

wavedec2函数:

1.功能:实现图像(即二维信号)的多层分解,多层,即多尺度.

2.格式:[c,s]=wavedec2(X,N,’wname’)

[c,s]=wavedec2(X,N,Lo_D,Hi_D)(我不讨论它)

3.参数说明:对图像X用wname小波基函数实现N层分解,

这里的小波基函数应该根据实际情况选择,具体选择办法可以搜之或者 help WFILTERS

.输出为c,s.

c为各层分解系数,s为各层分解系数长度,也就是大小.

4.c的结构:c=[A(N)|H(N)|V(N)|D(N)|H(N-1)|V(N-1)|D(N-1)|H(N-2)|V(N-2)|D(N-2)|…|H(1)|V(1)|D(1)]

可见,c是一个行向量,即:1*(size(X)),(e.g,X=256*256,then

c大小为:1*(256*256)=1*65536)

A(N)代表第N层低频系数,H(N)|V(N)|D(N)代表第N层高频系数,分别是水平,垂直,对角高频,以此类推,到H(1)|V(1)|D(1).

每个向量是一个矩阵的每列转置的组合存储。原文:Each vector is the vector

column-wise storage of a matrix. 这是你理解A(N) H(N) | V(N) | D(N)

的关键。

很多人对wavedec2和dwt2的输出差别不可理解,后者因为是单层分解,所以低频系数,水平、垂直、对角高频系数就直接以矩阵输出了,没有像wavedec2那样转换成行向量再输出,我想你应该不再迷惑了。

a4c26d1e5885305701be709a3d33442f.png

那么S有什么用呢?

s的结构:是储存各层分解系数长度的,即第一行是A(N)的长度(其实是A(N)的原矩阵的行数和列数),

第二行是H(N)|V(N)|D(N)|的长度,

第三行是

H(N-1)|V(N-1)|D(N-1)的长度,

倒数第二行是H(1)|V(1)|D(1)长度,

最后一行是X的长度(大小)

a4c26d1e5885305701be709a3d33442f.png

从上图可知道:cAn的长度就是32*32,cH1、cV1、cD1的长度都是256*256。

到此为止,你可能要问C的输出为什么是行向量?

1、没有那一种语言能够动态输出参数的个数,更何况C语言写的Matlab

2、各级详细系数矩阵的大小(size)不一样,所以不能组合成一个大的矩阵输出。

因此,把结果作为行向量输出是最好,也是唯一的选择。

另:MATLAB HELP

wavedec2 里面说得非常明白了,呵呵.

wavedec2

Multilevel 2-D

wavelet decomposition Syntax [C,S] =

wavedec2(X,N,’wname’)

[C,S] = wavedec2(X,N,Lo_D,Hi_D)

Description wavedec2 is a two-dimensional wavelet analysis

function.

[C,S] =

wavedec2(X,N,’wname’) returns the wavelet decomposition of the

matrix X at level N, using the wavelet named in string ‘wname’ (see

wfilters for more information).

Outputs are the

decomposition vector C and the corresponding bookkeeping matrix S.

N must be a strictly positive integer (see wmaxlev for more

information).

Instead of giving the

wavelet name, you can give the filters. For [C,S] =

wavedec2(X,N,Lo_D,Hi_D), Lo_D is the decomposition low-pass filter

and Hi_D is the decomposition high-pass filter.

Vector C is organized

as C = [ A(N) | H(N) | V(N) | D(N) | … H(N-1) | V(N-1) | D(N-1) |

… | H(1) | V(1) | D(1) ]. where A, H, V, D, are row vectors such

that A = approximation coefficients H = horizontal detail

coefficients V = vertical detail coefficients D = diagonal detail

coefficients Each vector is the vector column-wise storage of a

matrix.

Matrix S is such that

S(1,:) = size of approximation coefficients(N) S(i,:) = size of

detail coefficients(N-i+2) for i = 2, …N+1 and S(N+2,:) =

size(X)

Examples% The current

extension mode is zero-padding (see dwtmode).

% Load original

image. load woman; % X contains the loaded image.

% Perform

decomposition at level 2 % of X using db1. [c,s] = wavedec2(X,2,’db1′);

% Decomposition

structure organization. sizex = size(X)

sizex =

256

256

sizec = size(c)

sizec =

1

65536

val_s =

s

val_s =

64

64 64

64 128

128 256

256

Algorithm For images, an algorithm similar to the

one-dimensional case is possible for two-dimensional wavelets and

scaling functions obtained from one-dimensional ones by tensor

product. This kind of two-dimensional DWT leads to a decomposition

of approximation coefficients at level j in four components: the

approximation at level j+1, and the details in three orientations

(horizontal, vertical, and diagonal). The following chart describes

the basic decomposition step for images: So, for J=2, the

two-dimensional wavelet tree has the form See Alsodwt, waveinfo,

waverec2, wfilters, wmaxlev ReferencesDaubechies, I. (1992), Ten

lectures on wavelets, CBMS-NSF conference series in applied

mathematics. SIAM Ed. Mallat, S. (1989), “A theory for

multiresolution signal decomposition: the wavelet representation,”

IEEE Pattern Anal. and Machine Intell., vol. 11, no. 7, pp.

674-693. Meyer, Y. (1990), Ondelettes et opérateurs, Tome 1,

Hermann Ed. (English translation: Wavelets and operators, Cambridge

Univ. Press. 1993.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/163763.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • pycharm 2022.01.13激活码_最新在线免费激活2022.02.24

    (pycharm 2022.01.13激活码)好多小伙伴总是说激活码老是失效,太麻烦,关注/收藏全栈君太难教程,2021永久激活的方法等着你。IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html2KLKA7BQFO-eyJsaWNlbnNlSWQi…

    2022年4月1日
  • linux 命令行 查找文件_shell查找文件中指定的字符串

    linux 命令行 查找文件_shell查找文件中指定的字符串一grep:查看文件内容,在文件中查询一个关键字,即搜索字符串的命令(在指定的文件中搜索符合条件的字符串)grep是包含匹配,不是完全的精确匹配,特别适合查找内容语法:grep[-option]需要搜索的关键字文件名参数:-n—-连行号一起显示-c—-统计有几行-i—-忽略大小写(一般用的少)-v—-排除指定的字符串(了解),取反,查找出来的内容是搜索条件以外的所有的内容例如:[root@localhostTEST~]#grep-n

    2022年10月21日
  • 在单调的队列

    在单调的队列

    2022年1月15日
  • pycharm 2021.12激活码【中文破解版】

    (pycharm 2021.12激活码)这是一篇idea技术相关文章,由全栈君为大家提供,主要知识点是关于2021JetBrains全家桶永久激活码的内容IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html23EQQJJI0G-eyJsa…

    2022年3月30日
  • ShellExecute, WinExec, CreateProcess区别

    ShellExecute, WinExec, CreateProcess区别ShellExecute  ShellExecute的功能是运行一个外部程序(或者是打开一个已注册的文件、打开一个目录、打印一个文件等等),并对外部程序有一定的控制。  有几个API函数都可以实现这些功能,但是在大多数情况下ShellExecute是更多的被使用的,同时它并不是太复杂。  ShellExecute函数原型及参数含义如下:  ShellExecute(  HWNDhwnd,…

    2022年7月27日
  • 3阶有向完全图的所有非同构的子图(不同钩子图个数)

    子图同构问题本质上就是一种匹配,VF2算法加了很多feasibilityrules,保证了算法的高效性。这里只是实现最基本的判断子图同构的算法:参考文献有(其实google一把就能出来这些):http://stackoverflow.com/questions/8176298/vf2-algorithm-steps-with-examplehttp://www.zhihu

    2022年4月10日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号