Function Index
BinaryMajority
BinaryMajority[
img
]
returns one for each 3 × 3 neighborhood of
img
with a majority of ones.
BinaryMajority[
img
,
s
]
returns one for each neighborhood of
img
defined by structuring element
s
with a majority of ones.
BinaryMajority[
img
,
s
,
v
]
returns one for each neighborhood of
img
defined by structuring element
s
with
v
or more ones.
BinaryMajority
returns an expression of the same dimensions and type as
img
.
The default threshold value is equal to
v
=
Floor[Plus@@Flatten[
s
]/2]+1
.
The neighborhood is defined by the spatial arrangement of ones in
s
.
The argument
img
may be a list or
ImageData
expression.
See also User's Guide
6.3
.
Examples
This loads the package.
In[1]:=
This defines the binary arrays.
In[2]:=
This gives the majority transformation.
In[3]:=
Out[3]//MatrixForm=
This gives the majority transformation of image
A
using a T-shaped neighborhood.
In[4]:=
Out[4]//MatrixForm=
© 2008 Wolfram Research, Inc.
•
Terms of Use
•
Privacy Policy
Sign up for our newsletter: