Changes between Version 7 and Version 8 of libpipi/research/filters
- Timestamp:
- 08/21/2008 02:56:01 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
libpipi/research/filters
v7 v8 25 25 There are several ways to optimise a median filter. 26 26 27 The first idea is an approximation, based upon the assumption that the median of subset medians is close to the median of the whole set. It can already be simulated by doing `--median 5x0 --median 0x5` in `pipi`, so there is no real point in studying this specific optimisation.27 The first idea is an approximation, based upon the assumption that the median of subset medians is close to the median of the whole set. It can already be simulated by applying a 5×0 filter and a 0×5 filter instead of a 5×5 filter, so there is no real point in studying this specific optimisation. 28 28 29 29 The second idea is to optimise the median selection. The most naive method is to bubble-sort the neighbourhood values and select the middle point, which has complexity O(n²). Improving on the sort algorithm by using eg. heapsort or quicksort, reduces the complexity to O(n.log2(n)). But since we’re only interested in the median and not in ordering the rest of the data, we can use an efficient median selection algorithm. This operation can be done in fewer than 3n tests ![1] but the practical implementation is extremely complex. 30 31 The third way to optimise a median filter is by accounting for the size of neighbourhood changes in raster scan order: usually only a few values are removed from and added to the list of neighbours. This becomes promising with large kernel sizes, and efficient algorithms exist that handle this case in 1D at least ![2]. 32 33 === References === 34 35 * ![1] Uri Zwick, [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.5.2770 Selecting the median], In Proceedings of the 6rd Annual ACM-SIAM Symposium on Discrete Algorithms (1995) 36 * ![2] Juhola, M. Katajainen, J. Raita, T., [http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=80784 Comparison of algorithms for standard median filtering], IEEE Transactions on Signal Processing, Volume 39, Issue 1, Jan 1991 pp. 204-208 30 37 31 38 === Code === … … 36 43 * [http://coding.derkeiler.com/Archive/General/comp.programming/2004-10/0289.html Sliding median filter] 37 44 * [http://iris.usc.edu/Vision-Notes/bibliography/twod268.html A shitload of papers about median filtering and its derivatives] 38 39 === References ===40 41 * ![1] Uri Zwick, [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.5.2770 Selecting the median], In Proceedings of the 6rd Annual ACM-SIAM Symposium on Discrete Algorithms (1995)42 45 43 46 = Dilate / erode =