Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Cameron
Posts:
4
Registered:
3/4/11


Re: anybody got a complex 2D median filter script they can share?
Posted:
Mar 4, 2011 10:56 AM


"Matt J" wrote in message <ikr1fs$2g0$1@fred.mathworks.com>... > "Matt J" wrote in message <ikr10v$2e3$1@fred.mathworks.com>... > > > > > I am in a bit of a time crunch and am looking for a script to handle 2D 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.



