How to determine the radius of gaussian smoothing?

조회 수: 4 (최근 30일)
hanif hamden
hanif hamden 2020년 12월 4일
댓글: hanif hamden 2020년 12월 4일
Hi everyone, can anyone explain how I would like to determine the radius smoothing by using imgaussfilt function matlab.
Let say, in my coding, I try imgaussfilt function with 6 sigma. Since the default filter size is 2*ceil(2*sigma)+1.
Thus, the filter size for 6sigma is 2*2*6+1 = 25 . So, would the smoothing radius is half of the filter size? correct me I'm wrong. Below is my coding. Thank you.
clc;clear all; close all;
file = 'Example.txt';
name = 'Testing Smoothing';
Data = textread(file);
y = Data(:,1);
x = Data(:,2);
z = Data(:,3);
ymin = 0.5 ; ymax = 3.5;
xmin = 96 ; xmax = 123;
xlim = [xmin xmax];
ylim = [ymin ymax];
m2 = 0.033333333333;
dx =xmin:m2:xmax; % set the min,max y and interval
dy = ymin:m2:ymax; % set the min,max x and interval
[Xi,Yi] = meshgrid(dx,dy);
[Zi] = griddata(x,y,z,Xi,Yi,'cubic');
Zi = imgaussfilt(Zi,6,'FilterDomain','spatial');
GrdXYZ = [Yi(:) Xi(:) Zi(:)];
nGrd = sortrows(GrdXYZ,1);
  댓글 수: 2
Steve Eddins
Steve Eddins 2020년 12월 4일
What is your definition of smoothing radius for a Gaussian filter? Theoretically speaking, the Gaussian function has infinite extent. Practically, it decays to zero quickly so that a finite-extent window is sufficient. But it's not clear to me whether smoothing radius is clearly defined for it.
hanif hamden
hanif hamden 2020년 12월 4일
Hi sir, I think smoothing radius is most likely same as filter length.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by