Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Data Manipulation > Image Processing & Analysis > Image Filtering & Neighborhood Processing > CommonestFilter >

CommonestFilter

CommonestFilter
transforms image by replacing each pixel with the most common pixel value in its range r neighborhood.
CommonestFilter
applies commonest filtering to an array of data.
  • CommonestFilter computes the commonest value in blocks centered on each pixel.
  • For multichannel images, CommonestFilter computes the commonest of the set of pixel vectors.
  • CommonestFilter uses neighborhoods with vertical range and horizontal range .
  • In CommonestFilter, data can be an array of any rank, and can contain symbolic as well as numerical entries.
Replacing each pixel with the most common color in its neighborhood creates a posterization effect:
Apply commonest filtering to a vector of numbers:
Replacing each pixel with the most common color in its neighborhood creates a posterization effect:
In[1]:=
Click for copyable input
Out[1]=
 
Apply commonest filtering to a vector of numbers:
In[1]:=
Click for copyable input
Out[1]=
Commonest filtering applied to arbitrary expressions:
Majority filtering removes noise from a binary image:
Commonest filtering applied to random noise:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF