DSPRelated.com
Forums

about min max filters?

Started by move December 18, 2008
Hi all:

How to evaluate the performance of this filter? i.e the frequency
response?
h[n] := max(x[n-1],x[n],x[n+1])?
I think there is only statitics analysis of such filter, and its
performance could only be evaluated by monte-carlo method.

any suggestions?
thanks all
On 18 Des, 08:31, move <liubeny...@gmail.com> wrote:
> Hi all: > > How to evaluate the performance of this filter? i.e the frequency > response? > h[n] := max(x[n-1],x[n],x[n+1])? > I think there is only statitics analysis of such filter, and its > performance could only be evaluated by monte-carlo method.
This is a non-linear filter, which is why the analysis tools common in DSP are not likely to work very well. The DSP tools are designed to work with Linear Time Invariant, LTI, filters. I think the monte carlo method seems reasonable, provided you can come up with well-defined quantitative criteria for the analysis and run the filter on test signals that are statistically representative for whatever data you eventually will process with the filter. Rune
move wrote:

> Hi all: > > How to evaluate the performance of this filter? i.e the frequency > response? > h[n] := max(x[n-1],x[n],x[n+1])? > I think there is only statitics analysis of such filter, and its > performance could only be evaluated by monte-carlo method.
You might be interested in Shmulevich et al.'s work: http://www.google.com/search?q=+site:citeseer.ist.psu.edu+shmulevich+stack+filter Martin -- Quidquid latine scriptum est, altum videtur.
On Thu, 18 Dec 2008 03:36:02 -0800, Rune Allnor wrote:

> On 18 Des, 08:31, move <liubeny...@gmail.com> wrote: >> Hi all: >> >> How to evaluate the performance of this filter? i.e the frequency >> response? >> h[n] := max(x[n-1],x[n],x[n+1])? >> I think there is only statitics analysis of such filter, and its >> performance could only be evaluated by monte-carlo method. > > This is a non-linear filter, which is why the analysis tools common in > DSP are not likely to work very well. The DSP tools are designed to work > with Linear Time Invariant, LTI, filters. > > I think the monte carlo method seems reasonable, provided you can come > up with well-defined quantitative criteria for the analysis and run the > filter on test signals that are statistically representative for > whatever data you eventually will process with the filter. > > Rune
To make this stronger: in a strict sense, the common analysis tools used for DSP don't just not work well, their application is meaningless. Most of the common tools of DSP analysis start by assuming that you're dealing with a linear shift-invariant system and go from there. Toss a nonlinear system at them and you've violated the very first rule of their use -- it's like asking how far a car will fly. Specifically, frequency domain analysis works on the underlying assumption of a LSI system, or at least a linear system with well-defined shift-varying parts. You can use describing function analysis to approximately model a nonlinear system as a linear system, but then you're heavily dependent on the input signal -- which is why Andor is telling you that your analysis needs to use test signals that are representative of the real-world signals you want to filter. Good luck -- nonlinear signal processing is fun because you get to invent the theory specific to your problem as you go along. It's tedious and time consuming because you have to invent the theory specific to your problem as you go along, though. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html

move wrote:
> > Hi all: > > How to evaluate the performance of this filter? i.e the frequency > response? > h[n] := max(x[n-1],x[n],x[n+1])?
In image processing the filter is known as a "dilation" . the opposite (using min instead of max) is known as erosion. That won't help you with the frequency response but may give you something to google. -jim
> I think there is only statitics analysis of such filter, and its > performance could only be evaluated by monte-carlo method. > > any suggestions? > thanks all
On Dec 19, 9:22&#4294967295;am, jim <"sjedgingN0sp"@m...@mwt.net> wrote:
> move wrote: > > > Hi all: > > > How to evaluate the performance of this filter? i.e the frequency > > response? > > h[n] := max(x[n-1],x[n],x[n+1])? > > In image processing the filter is known as a "dilation" . the opposite > (using min instead of max) is known as erosion. That won't help you with the > frequency response but may give you something to google. > > -jim > > > > > I think there is only statitics analysis of such filter, and its > > performance could only be evaluated by monte-carlo method. > > > any suggestions? > > thanks all- Hide quoted text - > > - Show quoted text -
Since it non-linear, it has no "frequency response". It has frequency changing effects, but no "frequency response". Dirk
I will stick my neck out and respecfully disagree with both of you.... :-)

This filter is data dependent and, as such, could be a linear filter if the 
data is known a priori.  Of course, it will only apply to that one data set.

So, if the task is to understand the filter as it deals with a single data 
set then the task is easy.

This treatment can be extended to multiple data sets ad infinitum.

Of course, the OP's mention of statistics argues against this 
simplification.  But, it could be used over and over again to generate some 
sort of frequency response measures - thus the monte carlo idea I suppose. 
Tim is correct that it becomes an interesting exercise that's application 
dependent.

And, nothing is going to work unless he specifies the length of "h"

Fred 



dbell wrote:
> > On Dec 19, 9:22 am, jim <"sjedgingN0sp"@m...@mwt.net> wrote: > > move wrote: > > > > > Hi all: > > > > > How to evaluate the performance of this filter? i.e the frequency > > > response? > > > h[n] := max(x[n-1],x[n],x[n+1])? > > > > In image processing the filter is known as a "dilation" . the opposite > > (using min instead of max) is known as erosion. That won't help you with the > > frequency response but may give you something to google. > > > > -jim > > > > > > > > > I think there is only statitics analysis of such filter, and its > > > performance could only be evaluated by monte-carlo method. > > > > > any suggestions? > > > thanks all- Hide quoted text - > > > > - Show quoted text - > > Since it non-linear, it has no "frequency response". It has frequency > changing effects, but no "frequency response".
What i said was intended to avoid commenting on the frequency response since that would be a political discussion :). The filter in question does have a "step response" and so there is at least one signal where it doesn't introduce any new frequencies and for that case its frequency response can be described. -jim
On Dec 19, 10:45 am, "Fred Marshall" <fmarshallx@remove_the_x.acm.org>
wrote:
.> I will stick my neck out and respecfully disagree with both of
you.... :-)
.>
.> This filter is data dependent and, as such, could be a linear
filter if the
.> data is known a priori.  Of course, it will only apply to that one
data set.

The filter is only linear iff the response is consistent for all data
sets.

.> So, if the task is to understand the filter as it deals with a
single data
.> set then the task is easy.

Yes, but that task does not determine the frequency response of an LTI
filter but of a filter and particular data set.

.> This treatment can be extended to multiple data sets ad infinitum.
.> ...

Hopefully the OP can find some data sets that have reason to be
considered useful if this route is chosen.

.>
.> Fred

Dale B. Dalrymple
dbd wrote:
> .> So, if the task is to understand the filter as it deals with a > single data > .> set then the task is easy. > > Yes, but that task does not determine the frequency response of an LTI > filter but of a filter and particular data set. >
Actually it does if you are willing to define a single filter based on a single data set. Then, that one filter can be analyzed for arbitrary data. The fact that you don't *intend* to apply that one filter to but one data set is something you decide to do with it - but has nothing to do with your ability to analyze the filter. In a way, this is a "partitioning" of the question. Now, I know that this perspective may deviate from the mathematical expression that resulted in the filter in the first place. That is likely a sticking point. This is not a strong argument. Just an observation. The observation leads to an ability to analyze families of LTI filters that could lead to useful insight - and that part is data / application dependent as Tim mentioned. Fred