TLD
TLD

Reputation: 8135

Detect linear vs non linear filter

I see that there are many available filters such as Median filter, Laplacian filter, Gradient filter... How can we distinguish whether they are a linear or non linear filter ?
Thank you very much

Upvotes: 1

Views: 990

Answers (1)

Zaphod
Zaphod

Reputation: 1927

Linear systems exhibit the following properties:

  • Superposition
  • Homogeneity of degree 1

To understand superposition in images, consider a Gaussian filter operating on n regions of the image. If you apply the Gaussian on each of the n regions separately and add up the resulting values, the sum will be the same as when you add up the values in the n regions pixel-wise and apply the Gaussian just once. However this does not always hold true when you apply a median filter, because the median filter is chosen after re-ordering the pixels within the region.

To understand homogeneity in images, consider again a Gaussian filter operating on a single region in the image. Apply the Gaussian filter and obtain a resultant value p. Now within the region, multiply every pixel by a constant c and re-apply the same Gaussian filter to obtain resultant value q. You will find that q = c * p. This does not always hold true for the median filter.

As a quick test, if the filtering stage involves some modification to the image region being operated upon (including ordering), then the filter is a non-linear one. As a less quick test, apply the principles of superposition and homogeneity to classify the filter.

Upvotes: 2

Related Questions