floodFill(EBImage)
floodFill()所属R语言包:EBImage
Region filling
区域填充
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fill regions in images.
填充图像中的区域。
用法----------Usage----------
floodFill(x, pt, col, tolerance=0)
参数----------Arguments----------
参数:x
An Image object or an array.
Image对象或数组。
参数:pt
Coordinates of the start filling point.
坐标点开始灌装。
参数:col
Fill color. This argument should be a numeric for Grayscale images and an R color for Color images.
填充颜色。这种说法应该是一个数字为灰度图像和彩色图像的ŕ颜色。
参数:tolerance
Color tolerance used during the fill.
色差过程中使用的填充。
Details
详情----------Details----------
Flood fill is performed using the fast scan line algorithm. Filling starts at pt and grows in connected areas where the absolute difference of the pixels intensities (or colors) remains below tolerance.
洪水填充使用快速扫描线算法。灌浆开始在pt在连接的像素强度的绝对差异(或颜色)的地方仍然低于tolerance增长。
值----------Value----------
An Image object or an array, containing the transformed version of x.
一个Image对象或数组,包含x的转换版本。
作者(S)----------Author(s)----------
Gregoire Pau, Oleg Sklyar; 2007
举例----------Examples----------
x = readImage(system.file("images", "shapes.png", package="EBImage"))
y = floodFill(x, c(67, 146), 0.5)
if (interactive()) display(y)
y = channel(y, 'rgb')
y = floodFill(y, c(48, 78), 'red')
y = floodFill(y, c(156, 52), 'orange')
if (interactive()) display(y)
x = readImage(system.file("images", "lena.gif", package="EBImage"))
y = floodFill(x, c(226, 121), 1, tolerance=0.1)
if (interactive()) display(y)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|