| hullFeatures {EBImage} | R Documentation |
Computes hull features from image objects.
hullFeatures(x)
x |
An Image object or an array containing object masks.
Object masks are sets of pixels with the same unique integer value. |
Extracted object features are:
g.x ,g.y - coordinates of the geometric center.
g.s - size in pixels.
g.p - perimeter in pixels.
g.pdm - mean distance from the center to perimeter.
g.pdsd - standard deviation of the distance to perimeter.
g.effr - effective radius (is the radius of a circle with the same area).
g.acirc - acircularity (fraction of pixels outside of the circle with radius g.effr).
g.sf - shape factor, equals to (g.p/ ( 2*sqrt(i*g.s))).
g.edge - number of pixels at the edge of the image.
g.theta - hull orientation angle, in radians. See above.
g.l1 - largest eigeinvalue of the covariance matrix. See above.
g.l2 - lowest eigenvalue of the covariance matrix. See above.
g.ecc - eccentricity, equals to sqrt(1-g.l2/g.l1). See above.
g.I1, g.I2 - first and second Hu's translation/scale/rotation invariant moment. See above.
The features g.theta, g.l1, g.l2, g.ecc, g.I1,
g.I2 are computed with the function moments using the binary objects
as intensity values, e.g. g.theta = moment(x,x>0)[, 'm.theta']. See moments for details
on properties of these features.
A matrix (or a list of matrices if x contains multiple frames) of
features computed of the objects present in x.
Oleg Sklyar, osklyar@ebi.ac.uk, 2007
x = readImage(system.file('images', 'shapes.png', package='EBImage'))
x = x[110:512,1:130]
y = bwlabel(x)
if (interactive()) display(normalize(y), title='Objects')
## hullFeatures
hf = hullFeatures(y)
print(hf)