The Majority Filter function replaces cells based on the majority value in their contiguous neighborhoods. Majority Filter has two criteria to satisfy before a replacement can occur. First, the number of neighboring cells with the same value must be large enough to be the majority value, or at least half the cells must have the same value (depending on the parameter specified). That is, three out of four or five out of eight connected cells must have the same value with the majority parameter and two out of four or four out of eight for the half parameter. Second, those cells must be contiguous to the center of the specified filter (for example, three out of four cells must be the same). The second criteria concerning the spatial connectivity of the cells minimizes the corruption of cellular spatial patterns. If these criteria are not met, no replacement occurs, and the cell retains its value.
In the image below, Majority Filter is applied to the input raster using a filter of the closest four cells, which are the four orthogonal neighboring cells, requiring the majority (three out of four cells) to be the same before a cell will change its value. Only those cells surrounded by three or more (orthogonal) cells with the same value are changed.