JBMAJORITYFILTER
Name
JBMAJORITYFILTER
USAGE:
Result = JBMAJORITYFILTER(Data)
Inputs
Data: 2D array to be filtered
Outputs
Result will be the input Data with values replaced if at least half of the
surrounding 8 pixels (fewer for edges and corners) have a common value.
If the neighbours are exactly split between 4-and-4, then the choice of
which to use is arbitrary.
Modification History
Written by: Jeremy Bailin
7 March 2013