paintObjects(EBImage)
paintObjects()所属R语言包:EBImage
Marks objects in images
图像中的标记对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function marks objects in images.
此功能标志着图像中的对象。
用法----------Usage----------
paintObjects(x, tgt, opac=c(1, 1), col=c('red', NA))
参数----------Arguments----------
参数:x
An Image object in Grayscale color mode or an array containing object masks. Object masks are sets of pixels with the same unique integer value.
ImageGrayscale颜色模式或一个数组,包含对象口罩对象。对象口罩套像素具有相同的唯一的整数值。
参数:tgt
An Image object or an array, containing the intensity values of the objects.
Image对象或数组,包含对象的强度值。
参数:opac
A numeric vector of two opacity values for drawing object boundaries and object bodies. Opacity ranges from 0 to 1, with 0 being fully transparent and 1 fully opaque.
一个数字的两个绘制对象边界和对象机构的透明度值的向量。不透明度范围从0到1,0是完全透明和1完全不透明。
参数:col
A character vector of two R colors for drawing object boundaries and object bodies. By default, object boundaries are painted in red while object bodies are not painted.
两个R色彩绘制对象边界和对象机构的一个特征向量。默认情况下,对象边界画在red不画而对象机构。
值----------Value----------
An Image object or an array, containing the painted version of tgt.
一个Image对象或数组,包含tgt的画版。
作者(S)----------Author(s)----------
Oleg Sklyar, <a href="mailto sklyar@ebi.ac.uk">osklyar@ebi.ac.uk</a>, 2006-2007
参见----------See Also----------
bwlabel, watershed, link{getFeatures}
bwlabel,watershed,link{getFeatures}
举例----------Examples----------
## load images[#载入图像]
nuc = readImage(system.file('images', 'nuclei.tif', package='EBImage'))
cel = readImage(system.file('images', 'cells.tif', package='EBImage'))
img = rgbImage(green=cel, blue=nuc)
if (interactive()) display(img, title='Cells')
## segment nuclei[#段原子核的]
nmask = thresh(nuc, 10, 10, 0.05)
nmask = opening(nmask, makeBrush(5, shape='disc'))
nmask = fillHull(nmask)
nmask = bwlabel(nmask)
if (interactive()) display(normalize(nmask), title='Cell nuclei mask')
## segment cells, using propagate and nuclei as 'seeds'[#段的单元,利用宣传和核作为“种子”]
ctmask = opening(cel>0.1, makeBrush(5, shape='disc'))
cmask = propagate(cel, nmask, ctmask)
if (interactive()) display(normalize(cmask), title='Cell mask')
## using paintObjects to highlight objects[#使用paintObjects的突出对象]
res = paintObjects(cmask, img, col='#ff00ff')[FF00FF)]
res = paintObjects(nmask, res, col='#ffff00')[FFFF00“)]
if (interactive()) display(res, title='Segmented cells')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|