distmap(EBImage)
distmap()所属R语言包:EBImage
Distance map transform
距离映射变换
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the distance map transform of a binary image. The distance map is a matrix which contains for each pixel the distance to its nearest background pixel.
距离图计算二进制图像变换。距离图是一个矩阵,每个像素包含其最近的背景像素的距离。
用法----------Usage----------
distmap(x, metric=c('euclidean', 'manhattan'))
参数----------Arguments----------
参数:x
An Image object or an array. x is considered as a binary image, whose pixels of value 0 are considered as background ones and other pixels as foreground ones.
Image对象或数组。 x被视为一个二进制图像,其像素值0作为背景的其他像素和前景的考虑。
参数:metric
A character indicating which metric to use, L1 distance (manhattan) or L2 distance (euclidean). Default is euclidean.
字符指示指标来使用,L1距离(manhattan)或L2距离(euclidean)。默认euclidean。
Details
详情----------Details----------
A fast algorithm of complexity O(M*N*log(max(M,N))), where (M,N) are the dimensions of x, is used to compute the distance map.
快速算法的复杂性为O(M * N *log(最大值(,M,N))),(,M,N)x,用来计算距离图的尺寸。
值----------Value----------
An Image object or an array, with pixels containing the distances to the nearest background points.
Image对象或数组,包含距离最近的背景点像素。
作者(S)----------Author(s)----------
Gregoire Pau, <a href="mailto:gpau@ebi.ac.uk">gpau@ebi.ac.uk</a>, 2008
参考文献----------References----------
举例----------Examples----------
x = readImage(system.file("images", "shapes.png", package="EBImage"))
if (interactive()) display(x)
dx = distmap(x)
if (interactive()) display(dx/10, title='Distance map of x')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|