getFeatures(EBImage)
getFeatures()所属R语言包:EBImage
Extract feature extraction from image objects
从图像对象提取特征提取
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Extracts numerical features from image objects.
从图像对象提取的数字特征。
用法----------Usage----------
getFeatures(x, ref, N=12, R=30, nc=32)
参数----------Arguments----------
参数:x
An Image object or an array containing object masks. Object masks are sets of pixels with the same unique integer value.
Image对象或数组,包含对象口罩。对象口罩套像素具有相同的唯一的整数值。
参数:ref
An Image object or an array, containing the intensity values of the objects.
Image对象或数组,包含对象的强度值。
参数:N
Passed to zernikeMoments. Integer value defining the degree of the Zernike polynomials, which in turn defines the number of features calculated. Defaults to 12.
传递zernikeMoments。 Integer值,定义Zernike多项式,进而定义计算功能的程度。默认为12。
参数:R
Passed to zernikeMoments. Defines the radius of the circle around an object centre from which the features are calculated. See details. Defaults to 30.
传递zernikeMoments。围绕一个中心,从它的特点是计算对象的定义圆的半径。查看详情。默认为30。
参数:nc
Passed to haralickFeatures. A numeric value. Specifies the number of gray levels to bin ref into when computing the co-occurrence matrix. Defaults to 32.
传递haralickFeatures。一个数值。斌ref到指定数量级灰度共生矩阵计算时。默认为32。
Details
详情----------Details----------
Combines and returns the features returned by hullFeatures, moments, edgeFeatures, haralickFeatures and zernikeMoments.
结合返回hullFeatures返回的功能,moments,edgeFeatures,haralickFeatures和zernikeMoments。
值----------Value----------
getFeatures returns feature matrices.
getFeatures返回特征矩阵。
作者(S)----------Author(s)----------
Oleg Sklyar, <a href="mailto sklyar@ebi.ac.uk">osklyar@ebi.ac.uk</a>, 2007
参见----------See Also----------
hullFeatures, moments, edgeFeatures haralickFeatures, zernikeMoments
hullFeatures,moments,edgeFeaturesharalickFeatures,zernikeMoments
举例----------Examples----------
x = readImage(system.file('images', 'nuclei.tif', package='EBImage'))
x = x[,,1]
if (interactive()) display(x)
## computes object mask[#计算对象的遮罩]
y = thresh(x, 10, 10, 0.05)
y = opening(y, makeBrush(5, shape='disc'))
mask = bwlabel(y)
if (interactive()) display(mask, title='Cell nuclei')
## features[#功能]
ftrs = getFeatures(mask, x)[[1]]
print(ftrs[1:5,])
## paint nuclei with an eccentricity higher than 0.85[#画原子核比0.85更高的偏心]
maskb = mask
id = which(ftrs[,'m.ecc']<0.85)
maskb[!is.na(match(maskb, id))] = 0
img = paintObjects(maskb, channel(x, 'rgb'), col='red')
if (interactive()) display(img, title='Nuclei with high eccentricity')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|