resize(EBImage)
resize()所属R语言包:EBImage
Spatial linear transformations
空间的线性变换
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Rotates, mirrors and resizes images.
旋转,镜子和调整大小的图像。
用法----------Usage----------
flip(x)
flop(x)
resize(x, w, h, blur=1, filter="Lanczos")
rotate(x, angle=90)
affine(x, m)
参数----------Arguments----------
参数:x
An Image object or an array.
Image对象或数组。
参数:w, h
Width and height of a new image. One of these arguments can be missing to enable proportional resizing.
一个新的图像的宽度和高度。这些论点之一,可以丢失,使比例调整。
参数:blur
The blur factor, where 1 (TRUE) is blurry, 0 (FALSE) is sharp.
模糊的因素,其中1(TRUE)是模糊的,0(FALSE)是尖锐的。
参数:filter
Interpolating sampling filter.
插值采样滤波器。
参数:angle
Image rotation angle in degrees.
度图像旋转角度。
参数:m
The affine 3x2 transformation matrix.
为3x2仿射变换矩阵。
Details
详情----------Details----------
flip transforms x in its vertical mirror image by reflecting the pixels around the central x-axis.
flip转换x反映围绕中央的X-轴的像素在垂直镜像。
flop transforms x in its horizontal mirror image by reflecting the pixels around the central y-axis.
flop转换x反映中央Y轴周围的像素水平镜像。
resize scales the image to the desired dimensions using the supplied interpolating filter. Available filters are: Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel and Sinc. The filter Box performs a nearest-neighbor interpolation and is fast but introduces considerable aliasing. The filter Triangle performs a bilinear interpolation and is a good trade-off between speed adn aliasing. Cubic interpolation with the filter Cubic is also a good trade-off. High-quality and slower interpolation is achieved with the Lanczos filter. The algorithm used by this ImageMagick function is not well defined.
resize尺度图像所需的尺寸,使用提供的插值滤波器。可用的过滤器有:Point,Box,Triangle,Hermite,Hanning,Hamming,Blackman,Gaussian。 ,Quadratic,Cubic,Catrom,Mitchell,Lanczos,Bessel和Sinc。过滤器Box执行近邻插值和快速,但是却带来了相当大的走样。过滤器Triangle执行双线性插值,是一个很好的权衡之间的速度ADN走样。立方插值过滤器Cubic也是一个很好的权衡。高品质和慢插补实现Lanczos过滤。这个ImageMagick的功能所使用的算法是没有很好地界定。
rotate rotates the image counter-clockwise with the specified angle. Rotated images are usually larger than the originals and have empty triangular corners filled in black. The algorithm used by this ImageMagick function is not well defined.
rotate指定角度逆时针旋转图像。旋转图像通常比原件大,空的三角四角填充黑色。这个ImageMagick的功能所使用的算法是没有很好地界定。
affine returns the affine transformation of the image, where pixels coordinates, denoted by the matrix px, are transformed to cbind(px, 1)%*%m.
affine返回的图像,像素坐标,矩阵px表示,转化为cbind(px, 1)%*%m仿射变换。
值----------Value----------
An Image object or an array, containing the transformed version of x.
一个Image对象或数组,包含x的转换版本。
作者(S)----------Author(s)----------
Oleg Sklyar, <a href="mailtosklyar@ebi.ac.uk">osklyar@ebi.ac.uk</a>, 2006-2007
参考文献----------References----------
参见----------See Also----------
translate
translate
举例----------Examples----------
x = readImage(system.file("images", "lena.gif", package="EBImage"))
if (interactive()) display(x)
y = flip(x)
if (interactive()) display(y, title='flip(x)')
y = flop(x)
if (interactive()) display(y, title='flop(x)')
y = resize(x, 128)
if (interactive()) display(y, title='resize(x, 128)')
y = rotate(x, 30)
if (interactive()) display(y, title='rotate(x, 30)')
m = matrix(c(0.6, 0.2, 0, -0.2, 0.3, 300), nrow=3)
if (interactive()) display(affine(x, m), title='affine transform')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|