Changes between Version 4 and Version 5 of libpipi/research/filters
- Timestamp:
- 08/21/2008 12:25:47 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
libpipi/research/filters
v4 v5 1 1 [wiki:libpipi << back to libpipi] 2 2 3 == Gaussian kernels == 3 = Gaussian filtering = 4 5 Current code: 6 * [/browser/libpipi/trunk/pipi/filter/blur.c] 7 * [/browser/libpipi/trunk/pipi/filter/convolution_template.h] 8 * [/browser/libpipi/trunk/pipi/filter/convolution.c] 4 9 5 10 The usual way to create a Gaussian kernel is to evaluate a Gaussian function at the center of each cell: … … 11 16 k[i][j] = exp(-((i×cosθ-j×sinθ-dx)²+(j×cosθ+i×sinθ-dy)²)/2σ) 12 17 13 == Median filter == 18 {{{ 19 #!html 20 <p><span style="background: red; color: yellow; padding: 0 3px; font-weight: bold;">TODO</span> interpolate the Gaussian integral on more points, eg. 5×5 (currently libpipi does it at the central point and at 8 additional points in the neighbourhood). 21 }}} 22 23 = Median filtering = 24 25 Current code: 26 * [/browser/libpipi/trunk/pipi/filter/median.c] 14 27 15 28 There are several ways to optimise a median filter. … … 18 31 * [http://coding.derkeiler.com/Archive/General/comp.programming/2004-10/0289.html Sliding median filter] 19 32 * [http://iris.usc.edu/Vision-Notes/bibliography/twod268.html A shitload of papers about median filtering and its derivatives] 33 34 = Dilate / erode = 35 36 Current code: 37 * [/browser/libpipi/trunk/pipi/filter/dilate.c] 38 39 Erosion and dilation already work, but only for nearest pixels. 40 41 {{{ 42 #!html 43 <p><span style="background: red; color: yellow; padding: 0 3px; font-weight: bold;">TODO</span> each pixel couple test is done twice. There seems to be an opportunity for improvement there. 44 }}} 45 46 {{{ 47 #!html 48 <p><span style="background: red; color: yellow; padding: 0 3px; font-weight: bold;">TODO</span> implement "dilate by X" (Manhattan distance). 49 }}} 50 51 {{{ 52 #!html 53 <p><span style="background: red; color: yellow; padding: 0 3px; font-weight: bold;">TODO</span> implement "dilate by X" (Euclidian distance). 54 }}} 55 56 === References === 57 58 * [http://ostermiller.org/dilate_and_erode.html Efficiently Implementing Dilate and Erode Image Functions]