2D gaussian filter manual process??
古いコメントを表示
i have image resolution 585x564 pixel and i want to processed with 2d gaussian filter. and i found some code..
function h = Gaussian2D(hsize, sigma)
n1 = hsize; n2 = hsize;
for i = 1 : n2
for j = 1 : n1
% size is 10;
% -5<center<5 area is covered.
c = [j-(n1+1)/2 i-(n2+1)/2]';
% A product of both axes is 2D Gaussian filtering
h(i,j) = Gauss(c(1), sigma)*Gauss(c(2), sigma);
end
end
end
i guest sigma is standard deviation of gaussian distribution. but i dont know what is hsize is?? and the standard deviation,how i can define value for standard deviation??
回答 (1 件)
Image Analyst
2014 年 1 月 18 日
0 投票
hsize is the window size. You can have a window of a certain size, and the spread of the Gaussian within that can be anything. I can be really narrow Gaussian so that it completely fits in the window (the filter array), or it can be a really wide Gaussian where the tails get lost because they extend outside the window.
カテゴリ
ヘルプ センター および File Exchange で Image Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!