找回密码
 注册
查看: 349|回复: 0

R语言 SpatialVx包 FeatureAxis()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:54:51 | 显示全部楼层 |阅读模式
FeatureAxis(SpatialVx)
FeatureAxis()所属R语言包:SpatialVx

                                         Calculate the major (and minor) axis of a feature
                                         计算的主要和次要轴的功能

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Calculate the major and minor axes of a feature and various other properties such as the aspect ratio.
计算的长轴和短轴的特征和各种其它性能如纵横比。


用法----------Usage----------


FeatureAxis(x, fac = 1, flipit = FALSE, twixt = FALSE)
## S3 method for class 'FeatureAxis'
plot(x, ...)
FeatureProps(x, Im = NULL, which.props=c("centroid", "area", "axis", "intensity"), areafac=1, q = c(0.25, 0.9), ...)



参数----------Arguments----------

参数:x
For FeatureAxis this is an object of class "owin" containing a binary image matrix defining the feature.  In the case of plot.FeatureAxis, this is the value returned from FeatureAxis.  
对于FeatureAxis这是一个对象的类“owin”含有的二进制图象矩阵定义功能。 plot.FeatureAxis的情况下,这是从FeatureAxis返回的值。


参数:Im
Matrix giving teh original values of the field from which the feature was extracted.  Only needed if the feature intensity is desired.
矩阵给格兰原始值栏位中的特征提取。只需要,如果需要的功能强度。


参数:fac,areafac
numeric, in determining the lengths of the axes, they are multiplied by a factor of fac (e.g., if the grid points are k X k km each, then one could set this to k so that the resulting lengths are in terms of km rather than grid points.  
数值,在确定轴的长度,它们被乘以一个因子fac(例如,如果网格点是k公里每个值X k,则可以设置为k,使得所得到的长度是在公里,而不是网格点。


参数:q
numeric vector of values between 0 and 1 inclusive giving the quantiles for determining the intensity of the feature.
的值在0和1(含)给出用于确定该功能的强度位数之间的数值向量。


参数:flipit
logical, should the objects be flipped over x and y?  The disjointer function results in images that are flipped, this would flip them back.  
逻辑,对象翻转x和y?该disjointer会导致图像翻转功能,这将翻转回来。


参数:twixt
logical, should the major axis angle be forced to be between +/- 90 degrees?  
逻辑长轴的角度,应该被强制为+ /  -  90度之间?


参数:which.props
character vector giving one or more of "centroid", "area", "axis" and "intensity".  If "axis" is given, then a call to FeatureAxis is made.
字符向量给一个或多个的“质心”,“面积”,“轴”和“强度”。如果“轴”,然后调用FeatureAxis。


参数:...
For plot.FeatureAxis these are additional arguments to the plot function.  For FeatureProps, these are additional arguments to FeatureAxis.
对于plot.FeatureAxis,这些额外的plot函数的参数。对于FeatureProps,这些都是额外的参数FeatureAxis。


Details

详细信息----------Details----------

This function attempts to identify the major and minor axes for a pre-defined feature (sometimes referred to as an object).  This function relies heavily on the spatstat and smatr packages.  First, the convex hull of the feature is determined using the convexhull function from the spatstat package.  The major axis is then found using the sma funciton from package smatr, which is then converted into a psp object (see as.psp from spatstat) from which the axis angle and length are found (using angles.psp and lengths.psp, resp., from spatstat).
这个函数尝试识别为一个预定义的功能(有时也被称为作为一个对象)的长轴和短轴。此功能在很大程度上依赖于的spatstat和smatr包。首先,确定凸包的功能,使用convexhull功能从spatstat包。然后发现从包smatr,然后将其转换成从一个PSP对象(见从spatstat as.psp)的轴线的角度和长度被发现(使用angles.psp和lengths.psp,分别使用SMA功能可按长轴。次,从spatstat)。

The minor axis anlge is easily found after rotating the major axis 90 degrees using rotate.psp from spatstat.  The length of the minor axis is more difficult.  Here, it is found by rotating the convex hull of the feature by the major axis angle (so that it is upright) using rotate.owin from spatstat, and then computing the bounding box (using bounding.box from spatstat).  An infinite line (using infline from spatstat) is created, and then clipped (using clip.infline from spatstat) by the upright bounding box.  This seems to give a reasonable value for the length of the minor axis.  A psp object is then created using the mid point of the major axis (which should be close to the centroid of the feature) using as.psp and midpoints.psp from spatstat along with the length and angle already found for the minor axis.
未成年人的的轴anlge容易被发现后的主轴线旋转90度使用rotate.psp从spatstat。的短轴的长度是比较困难的。在这里,它是通过由长轴角(这样它是直立)使用rotate.owin从spatstat旋转的凸包的功能,然后计算边界框(使用bounding.box来自spatstat)中找到。创建一个无限长的直线(使用infline从spatstat),然后直立的包围盒裁剪(使用clip.infline从spatstat)。这似乎为短轴的长度,得到一个合理的值。甲psp的对象,然后创建使用使用as.psp和midpoints.psp从spatstat沿着与已经发现为短轴的长度和角度的中间点的长轴(这应该是接近的形心的功能)。

See the help files for the above mentioned functoins for references, etc.
上述functoins参考文献等,请参阅帮助文件


值----------Value----------

FeatureAxis: A list object of class "FeatureAxis" is returned with components:
FeatureAxis的类“FeatureAxis”,则返回一个列表对象的组件:


参数:z
same as the argument x passed in.
相同参数x传递的。


参数:MajorAxis,MinorAxis
a psp object with one segment that is the major (minor) axis.
一个PSP对象,一个段是主要的(未成年人)轴。


参数:OrientationAngle
list with two components: MajorAxis (the angle in degrees of the major axis wrt the abscissa), MinorAxis (the angle in degrees wrt the abscissa).
有两个组成部分:长轴(以度为单位的长轴WRT的横轴)的角度,MinorAxis(WRT的横轴以度的角度)的列表。


参数:aspect.ratio
numeric giving teh ratio of teh length of the minor axis to that of the major axis (always between 0 and 1).
数值给德比德的短轴长度的长轴(始终为0和1之间)。


参数:MidPoint
an object of class "ppp" giving the mid point of the major (minor) axis.
(未成年人)的主要轴线的中点对象类的“PPP”。


参数:lengths
list object with components: MajorAxis giving the length (possibly multiplied by a factor) of the major axis, and MinorAxis same as MajorAxis but for the minor axis.
与组件的列表对象:MajorAxis给予的长轴的长度(可能是乘以一个系数),并且相同的长轴但短轴MinorAxis。


参数:sma.fit
The fitted object returned by the sma function.  This is useful, e.g., if confidence intervals for the axis are desired.  See the sma help file for more details.
SMA函数的拟合返回的对象。这是有用的,例如,如果需要的轴的置信区间。有关详细信息,请参阅SMA帮助文件。

No value is returned from plot.FeatureAxis, a plot is created.
无返回值从plot.FeatureAxis,有一个图是。

For FeatureProps, a list object with components depending on the which.props argument.  One or more of:
的FeatureProps,一个列表对象的组件,这取决于的which.props参数。的一个或多个:


参数:centroid
list with components x and y giving the centroid of the object.
给予对象的质心的分量x和y的列表。


参数:area
numeric giving the area of the feature.
数字给的功能的区域。


参数:axis
list object of class FeatureAxis as returned by the same-named function.
的同名函数返回的列表作为对象的类FeatureAxis的。


警告----------Warning ----------

The length of the minor axis is determined by the clipping of an infinite line with a bounding box.  Therefore, it will be slightly longer than it should be.  In practice, this does not seem to be horrible.  Note, however, that for circular shaped features, this may lead to a minor axis that is apparently longer than the major axis (i.e., aspect ratio will be greater than 1).  Perhaps this will be improved in the future.
短轴的长度的确定由削波的无限长的直线与一个边界框。因此,这将是比它应该是稍长。在实践中,这似乎并不可怕。然而,请注意,对于圆形的功能,这可能会导致一个短轴,显然是长于长轴(即,将纵横比大于1)。也许,这将在今后改进。


(作者)----------Author(s)----------



Eric Gilleland




参见----------See Also----------

owin, convexhull, sma, as.psp, angles.psp, rotate.owin, rotate.psp, bounding.box, midpoints.psp, lengths.psp, infline, clip.infline, deltamm, FeatureSuite, FeatureSuitePrep, convthresh, disjointer, connected, tiles, tess, solutionset
owin,convexhull,sma,as.psp,angles.psp,rotate.owin,rotate.psp,bounding.box,midpoints.psp,lengths.psp,infline,clip.infline,deltamm,FeatureSuite,FeatureSuitePrep,convthresh,disjointer ,connected,tiles,tess,solutionset


实例----------Examples----------


grid<- list( x= seq( 0,5,,100), y= seq(0,5,,100))
obj <- stationary.image.cov( grid=grid, V=cbind(c(0.25,0.15),c(0.45,0.75)), setup=TRUE)
look<- sim.rf( obj)
look <- disk2dsmooth(look,5)
u <- quantile(look,0.99)
sIx <- matrix(0, 100, 100)
sIx[ look > u] <- 1
look2 <- disjointer(sIx)[[1]]
look2 <- flipxy(look2)
tmp <- FeatureAxis(look2)
plot(tmp)
tmp$OrientationAngle
tmp$lengths

## Not run: [#不运行:]
data(pert000)
data(pert004)
hold <- FeatureSuitePrep("pert004", "pert000")
look <- convthresh( hold, smoothpar=10.5)
par( mfrow=c(2,2))
image.plot(look$X.labeled)
image.plot(look$Y.labeled)

look2 <- deltamm( look, verbose=TRUE)
image.plot(look2$X.labeled)
image.plot(look2$Y.labeled)

look2$mm.new.labels # the first seven features are matched.[第一七大功能相匹配。]

ang1 <- FeatureAxis(look2$X.feats[[1]])
ang2 <- FeatureAxis(look2$Y.feats[[1]])
plot(ang1)
plot(ang2)

ang3 <- FeatureAxis(look2$X.feats[[4]])
ang4 <- FeatureAxis(look2$Y.feats[[4]])
plot(ang3)
plot(ang4)
   
## End(Not run)[#(不执行)]


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-10 11:38 , Processed in 0.024083 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表