[mmlabelflat] [Up] [mmstats] | Measurements |
Implemented in Python.
f | Image Binary image. |
type | String Disk family: 'OCTAGON', 'CHESSBOARD', 'CITY-BLOCK', 'LINEAR-V', 'LINEAR-H', 'LINEAR-45R', 'LINEAR-45L', 'USER'. Default:
|
n | Double Maximum disk radii. Default:
|
Bc | Structuring Element Connectivity for the reconstructive granulometry. Used if '-REC' suffix is appended in the 'type' string. Default:
|
Buser | Structuring Element User disk, used if 'type' is 'USER'. Default:
|
h | Image Gray-scale (uint8 or uint16) or binary image.
a
|
Compute the Pattern Spectrum of a binary image. See Mara:89b. The pattern spectrum is the histogram of the open transform, not taking the zero values.
def mmpatspec(f, type='OCTAGON', n=65535, Bc=None, Buser=None): if Bc is None: Bc = mmsecross() if Buser is None: Buser = mmsecross() assert mmisbinary(f),'Error: input image is not binary' g=mmopentransf(f,type,n,Bc,Buser) h=mmhistogram(g) h=h[1:] return h
mmopen | Morphological opening. |
mmopentransf | Open transform. |
mmsedisk | Create a disk or a semi-sphere structuring element. |
[mmlabelflat] [Up] [mmstats] | ![]() |
Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |