RangeFilter

RangeFilter[data,r]

filters data by replacing every value by the difference of the maximum and minimum in its range-r neighborhood.

RangeFilter[data,{r1,r2,}]

uses ri for filtering the ^(th)dimension in data.

Details

  • RangeFilter is used to detect local jumps in data, where the size of the local neighborhood is dependent on the value of r.
  • The function applied to each range-r neighborhood is the absolute difference of MinMax.
  • The data can be any of the following:
  • listarbitrary-rank numerical array
    tseriestemporal data such as TimeSeries, TemporalData,
    imagearbitrary Image or Image3D object
    audioan Audio object
  • RangeFilter[data,{r1,r2,}] computes the range of sample values in blocks centered on each sample.
  • RangeFilter assumes the index coordinate system for lists and images.
  • At the data boundaries, RangeFilter uses smaller neighborhoods.

Examples

open allclose all

Basic Examples  (3)

Range filtering of a list:

Filter a TimeSeries:

Range filtering applied to a color image:

Scope  (11)

Data  (6)

Range filtering of a numeric vector:

Range filtering of a 2D array:

Range filtering of a list of Quantity objects:

Filter an Audio signal:

Filter a 2D grayscale image:

Filter a 3D image:

Parameters  (5)

Specify one radius to be used in all directions:

Increasing the radius will result in brighter images and larger regions of uniform value:

Range filtering just in the first direction:

Filtering just in the second direction:

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

Filtering of a 3D image in the horizontal planes only:

Applications  (2)

Use range filtering for edge detection:

Use range filter to detect borders in a binary image:

Properties & Relations  (1)

Range filtering is the same as the difference of MaxFilter and MinFilter:

Wolfram Research (2010), RangeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/RangeFilter.html (updated 2016).

Text

Wolfram Research (2010), RangeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/RangeFilter.html (updated 2016).

CMS

Wolfram Language. 2010. "RangeFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/RangeFilter.html.

APA

Wolfram Language. (2010). RangeFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RangeFilter.html

BibTeX

@misc{reference.wolfram_2023_rangefilter, author="Wolfram Research", title="{RangeFilter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/RangeFilter.html}", note=[Accessed: 20-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_rangefilter, organization={Wolfram Research}, title={RangeFilter}, year={2016}, url={https://reference.wolfram.com/language/ref/RangeFilter.html}, note=[Accessed: 20-April-2024 ]}