Code covered by the BSD License  

Highlights from
Fast Kuwahara Filter

3.5

3.5 | 2 ratings Rate this file 11 Downloads (last 30 days) File Size: 2.25 KB File ID: #13474

Fast Kuwahara Filter

by Sergei Koptenko

 

22 Dec 2006 (Updated 02 May 2007)

Fast Kuwahara edge preserving Filter

| Watch this File

File Information
Description

Fast Kuwahara edge preserving Filter.
as compared to submission:kuwahara.m"
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8171&objectType=FILE
on 480X640 image and window=5 (L=1), this filter was 38 times faster
(1.51 sec vs 57.6 sec). Also this
submission output correct (same) image size

MATLAB release MATLAB 7.2 (R2006a)
Other requirements it needs array pad function array_padd.m from FEX
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
10 Apr 2007 Anup K

the execution halts on an error:

Y=KuwaharaFast(imbw,1);
??? Error using ==> minus
Integers can only be combined with integers of the same class, or scalar doubles.

Error in ==> var at 86
            x0 = x - repmat(xbar, tile);

Error in ==> colfilt at 183
        b(i*mb+brows,j*nb+bcols) = ...

Error in ==> KuwaharaFast at 49
VarArray = colfilt(d,[R,R],'sliding',@var);

12 Apr 2007 Sergei Koptenko

Dear Anup
If you look closely into the error description you'll see that the error happens in colfilt function which is a MATLAB function not mine. The description of error suggest that you have problem in your data array (mixing up different classes of data in the same array?). Please check your data before blaming the Matlab.

Best Regards
Sergei

25 Apr 2007 Anup K

Sergei:
The problem was that I was passing a uint8 image instead of passing a double. Works great now..
thanks
anup

25 Apr 2007 Sergei Koptenko

Hi Anup
Thanks for the debugging. I uploaded the updated file that would check for the type of the input data and convert them to double if necessary. The update will appears in the few day on FEX

Please login to add a comment or rating.
Updates
27 Apr 2007

description formatting corrected

27 Apr 2007

Check added if input data are integer- convert them to double

02 May 2007

Formatting of the description was corrected

Tag Activity for this File
Tag Applied By Date/Time
filtering Sergei Koptenko 22 Oct 2008 08:53:48
fast kuwahara edge preserving filter Sergei Koptenko 22 Oct 2008 08:53:48

Contact us at files@mathworks.com