Login  Register

Re: Algorithm Difference between Median_Filter And Median Inside Rank Filter?

Posted by Michael Schmid on Oct 21, 2013; 10:01am
URL: http://imagej.273.s1.nabble.com/Algorithm-Difference-between-Median-Filter-And-Median-Inside-Rank-Filter-tp5005217p5005258.html

Hi Ashish,

it is still unclear to me what you need -- could you specify exactly what you want?

(1) A median filter as fast as the built-in one, but with a different structuring element (e.g. not using a circular but a rectangular area)?
(2) A simplified version as a starting point for something in addition to calculating the median?  If so, what do you want to do?
(3) An explanation how to efficiently compute the median for a set of numbers?  ("Hoare's find algorithm", also named "quickselect"; search for it on the web).

You might also have a look at the source code of the RankFilters in ImageJ 1.37.  There, the RankFilters are still simpler, with less optimization and no multithreading (still using Hoare's find algorithm).  You can get it at http://rsb.info.nih.gov/ij/download/src/

Michael
________________________________________________________________
On Oct 19, 2013, at 19:09, ashishdonvir wrote:

> yes i am ashish. Thanks for your reply.
>
> Now can you please simplify Median of RankFilter for me as i have to
> implement it on my own way. And accuracy does matter for me as i am suppose
> to use this for medical imaging. And Median of Rank Filter gives me better
> result.
>
> I am comparing Rank Filter with this
> http://svg.dmi.unict.it/iplab/imagej/Plugins/Forensics/Median_filter2/Median_Filter.html
>
> my own implementation is same as above take the same time. Now plese take a
> moment and simplify median of RankFilter for me. I mean if we don't use
> multithreding what would be the logic of Median. I have my image of type
> unsigned short.
>
> Thank you in advance..

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html