Version 5 (modified by Sam Hocevar, 16 years ago) (diff)

more stuff

<< back to libpipi

Gaussian filtering

Current code:

The usual way to create a Gaussian kernel is to evaluate a Gaussian function at the center of each cell:

k[i][j] = exp(-(i²+j²)/2σ)

This usually works well, except when the kernel is thin (σ < 1). It gets worse when using our generalised kernel:

k[i][j] = exp(-((i×cosθ-j×sinθ-dx)²+(j×cosθ+i×sinθ-dy)²)/2σ)

TODO 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).

Median filtering

Current code:

There are several ways to optimise a median filter.

Random links for now:

Dilate / erode

Current code:

Erosion and dilation already work, but only for nearest pixels.

TODO each pixel couple test is done twice. There seems to be an opportunity for improvement there.

TODO implement "dilate by X" (Manhattan distance).

TODO implement "dilate by X" (Euclidian distance).

References