The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: anybody got a complex 2-D median filter script they can share?
Replies: 7   Last Post: Nov 13, 2012 5:55 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 4
Registered: 3/4/11
Re: anybody got a complex 2-D median filter script they can share?
Posted: Mar 4, 2011 10:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Matt J" wrote in message <ikr1fs$2g0$>...
> "Matt J" wrote in message <ikr10v$2e3$>...
> >
> > > I am in a bit of a time crunch and am looking for a script to handle 2-D complex data with a median filter. long story short I've been doing the operation wrong and getting good results with bad math. any assistance is appreciated!
> > ============
> >
> > median filtering relies on the ability to sort/order the input data. Since your data is complex valued, how would you define an ordering for it, on which to base calculations of the medians?

> ====================
> If you mean that you just want to median filter the real and imaginary part of the image separately, you could just do
> X_filtered = medfilt2(real(X))+i*medfilt2(imag(X));

Thats essentially what I was doing before. I think it violates some part of signal processing to do it that way though and is just filtering out a bunch of stuff I don't want serendipitously. I am trying to preserve a phase characteristic of the complex imaginary data. there are a few papers on IEEE about the application for complex weighted median filters, but frankly I don't think I have time to digest the math and get a script written.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.