lt.to.name(wavethresh)
lt.to.name()所属R语言包:wavethresh
Convert desired level and orientation into code used by imwd
转换所需的水平和方向代码使用imwd
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Function codes the name of a desired level and wavelet coefficient orientation into a string which is used by the 2D DWT functions to access and manipulate wavelet coefficients.
功能代码所需的水平和小波系数取向成一个字符串,它使用的2D DWT的功能来访问和操纵小波系数的名称。
用法----------Usage----------
lt.to.name(level, type)
参数----------Arguments----------
参数:level
Resolution level of coefficients that you want to extract or manipulate.
要提取或操作系数的水平解像度。
参数:type
One of CC, CD, DC or DD indicating smoothed, horizontal, vertical or diagonal coefficients
其中CC,CD,DC,DD,表示平滑,水平,垂直或对角线系数
Details
详细信息----------Details----------
For the 1D wavelet transform (and others) the accessC and accessD function extracts wavelet coefficients from 1D wavelet decomposition objects. For imwd.object class objects, which are the 2D wavelet transforms of lattice objects (images) the wavelet coefficients are stored within components of the list object that underlies the imwd object.
对于一维小波变换(和其他人)accessC和accessD函数提取小波系数的一维小波分解的对象。 imwd.object类对象,它是二维小波变换的的晶格对象(图片)的小波系数都存储在组件的列表对象的基础的imwd的对象。
This function provides an easy way to specify a resolution level and orientation in a human readable way and this function then produces the character string necessary to access the wavelet coefficients in an imwd object.
此功能提供了一个简单的方法来指定分辨率的水平和方向的人类可读的方式和功能,然后产生需要访问的小波系数在imwd对象的字符串。
Note that this function does not actually extract any coefficients itself.
请注意,这个功能实际上并没有提取任何系数本身。
值----------Value----------
A character string which codes the level and type of coefficients. It reads wXLY X is the resolution level and Y is an integer corresponding to the orientation (1=horizontal, 2=vertical, 3=diagonal, 4=smoothed).
一个字符串编码的级别和类型的系数。它读取wXLY X为分辨率等级和Y是一个整数的方位相对应的(1 =水平,2 =垂直,3 =对角线,4 =平滑)。
(作者)----------Author(s)----------
G P Nason
参见----------See Also----------
imwd, imwd.object
imwd,imwd.object
实例----------Examples----------
#[]
# Generate the character string for the component of the imwd object[生成组件的imwd对象的字符串]
#[]
# The string associated with the diagonal detail at the third level...[该字符串相关联与对角线的细节在第三级...]
#[]
lt.to.name(3, "DD")
# [1] "w3L3"[[1]“w3L3”]
#[]
# Show how to access wavelet coefficients of imwd object.[显示如何访问imwd对象的小波系数。]
#[]
# First, make up some data (using matrix/rnorm) and then subject it[首先,一些数据(使用矩阵/ rnorm),则受]
# to an image wavelet transform.[一个图像的小波变换。]
#[]
tmpimwd <- imwd(matrix(rnorm(64),64,64))
#[]
# Get the horizontal coefficients at the 2nd level[在第2级的水平系数]
#[]
tmpimwd[[ lt.to.name(2, "CD") ]]
# [1] 6.962251e-13 4.937486e-12 3.712157e-12 -3.064831e-12 6.962251e-13[[1] 6.962251e-13 4.937486e-12 3.712157e-12-3.064831e-12 6.962251e-13]
# [6] 4.937486e-12 3.712157e-12 -3.064831e-12 6.962251e-13 4.937486e-12[[6] 4.937486e-12 3.712157e-12-3.064831e-12 6.962251e-13 4.937486e-12]
# [11] 3.712157e-12 -3.064831e-12 6.962251e-13 4.937486e-12 3.712157e-12[[11] 3.712157e-12-3.064831e-12 6.962251e-13 4.937486e-12 3.712157e-12]
# [16] -3.064831e-12[[16]-3.064831e-12]
#[]
#[]
# If you want the coefficients returned as a matrix use the matrix function,[如果你想返回的系数矩阵使用矩阵功能,]
# i.e.[即]
#[]
matrix(tmpimwd[[ lt.to.name(2, "CD") ]], 4,4)
# [,1] [,2] [,3] [,4][[1] [2] [3] [4]]
#[1,] 6.962251e-13 6.962251e-13 6.962251e-13 6.962251e-13[[1,] 6.962251e-13 6.962251e-13 6.962251e-13 6.962251e-13]
#[2,] 4.937486e-12 4.937486e-12 4.937486e-12 4.937486e-12[[2,] 4.937486e-12 4.937486e-12 4.937486e-12 4.937486e-12]
#[3,] 3.712157e-12 3.712157e-12 3.712157e-12 3.712157e-12[[3] 3.712157e-12 3.712157e-12 3.712157e-12 3.712157e-12]
#[4,] -3.064831e-12 -3.064831e-12 -3.064831e-12 -3.064831e-12[[4]-3.064831e-12-3.064831e-12-3.064831e-12-3.064831e-12]
#[]
# Note that the dimensions of the matrix depend on the resolution level[需要注意的是,矩阵的尺寸依赖于分辨率等级]
# that you extract and dim = 2^level[提取和昏暗= 2 ^水平]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|