# EntropyFilter

EntropyFilter[data,r]

filters data by replacing every value by the entropy value in its range-r neighborhood.

EntropyFilter[data,{r1,r2,}]

uses ri for filtering the  dimension in data.

# Details • EntropyFilter returns the local randomness of a signal, commonly used to measure textures in an image. The size of the neighborhood is dependent on the value of r.
• • The function applied to each range-r neighborhood is Entropy.
• The data can be any of the following:
•  list arbitrary-rank numerical array tseries temporal data such as TimeSeries, TemporalData, … image arbitrary Image or Image3D object audio an Audio object
• EntropyFilter[data,{r1,r2,}] computes the entropy value in blocks centered on each sample.
• EntropyFilter assumes the index coordinate system for lists and images.
• • At the data boundaries, EntropyFilter uses smaller neighborhoods.

# Examples

open allclose all

## Basic Examples(3)

Apply an entropy filter to a vector of numbers:

Filter a TimeSeries:

Entropy filtering of random disks:

## Scope(11)

### Data(7)

Apply a moving entropy filter to a vector:

Entropy filtering of a 2D array:

Filter a quantity array:

Filter an Audio signal:

Filtering a 2D grayscale image:

Entropy filtering of a 3D image:

Filter a symbolic array:

### Parameters(4)

Specify one radius to be used in all directions:

Increasing the radius will result in smoother images:

Harmonic filtering just in the first direction:

Second direction:

Entropy filtering of a 3D image in the vertical direction only:

Filtering of the horizontal planes only:

## Applications(3)

Apply entropy filtering to show areas of higher information content with higher intensities:

Entropy filtering can reveal JPEG compression artifacts:

This reveals the presence of padding in an image:

## Properties & Relations(2)

Entropy filtering is the same as ArrayFilter with function Entropy:

Entropy filtering is the same as ImageFilter with function Entropy:

## Possible Issues(1)

The discrete entropy measure does not apply to real-valued images, since distinct pixel values are unlikely to occur more than once:

Use ColorQuantize to limit the number of possible pixel values: