Faster Kuwahara filter

版本 1.0.0.0 (2.6 KB) 作者: Luca Balbi
Performs a very fast Kuwahara filtering on images.
3.0K 次下载
更新时间 2007/5/18

查看许可证

This function performs a Kuwahara filtering on images. It is optimized using vectorization, convolution and the fact that, for every subregion
variance = (mean of squares) - (square of mean).
A nested-for loop approach is still used in the final part as it is more readable, but a commented-out, fully vectorialised version is provided as well.

This function is about 2.3 times faster than KuwaharaFast at
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13474&objectType=file
with a 5x5 window, and even faster at higher window sizes (about 4 times on a 13x13 window)

Kuwahara Filter description
The Kuwahara filter works on a window divided into 4 overlapping subwindows (for a 5x5 pixels example, see below). In each subwindow, the mean and variance are computed. The output value (located at the center of the window) is set to the mean of the subwindow with the smallest variance.

( a a ab b b)
( a a ab b b)
(ac ac abcd bd bd)
( c c cd d d)
( c c cd d d)

References:
http://www.ph.tn.tudelft.nl/DIPlib/docs/FIP.pdf
http://www.incx.nec.co.jp/imap-vision/library/wouter/kuwahara.html

引用格式

Luca Balbi (2024). Faster Kuwahara filter (https://www.mathworks.com/matlabcentral/fileexchange/15027-faster-kuwahara-filter), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0