principalComponents

(method of grain2d)

returns the principalcomponents of grain polygon, without Holes

Syntax

[omega,a,b]= principalComponents(grains,'param1',val1,'param2',val2)

Input

grains

grain2d

param,val Parameters and values that control principalComponents
Parameter Description
'area'

scale a,b such that the corresponding ellipse has the same area as the grain (default)

'boundary'

scale a,b such that the corresponding ellipse has the boundary length as the grain

Output

omega

angle of the ellipse

a

length largest axis

b

length smallest axis

See also

plotEllipse