Size of a kernel
古いコメントを表示
Hi I have MR data acquired at 3.8x3.8x8.0 mm resolution. First I load it in to Matlab and then do some Gaussian filtering.
H = fspecial('gaussian',4,1);
for i=1:48
for j=1:8
My_Matrix1= squeeze(Diffb0(:,:,:,i));
My_Matrix1=squeeze(My_Matrix1(:,:,j));
Des_Matrix1=zeros(size(My_Matrix1));
Des_Matrix1 = imfilter(Diff(:,:,j,i),H,'replicate');
New_Diff_1(:,:,j,i)=Des_Matrix1;
end
end
How do I calculate the size of a kernel? Thanks
3 件のコメント
Ryan
2012 年 6 月 11 日
What do you mean by kernel? If you're referring to the size of your Gaussian kernel, it is dictated by the "4". You can either enter a number, which specifies a square matrix or as a vector ([rows cols]) that specifies a particularly shaped Gaussian kernel.
Med_Imager
2012 年 6 月 11 日
Ryan
2012 年 6 月 11 日
You know the base size and sigma value (4x4 and 1) of the kernel so to calculate FWHM you would just need to locate an equation (which I am unsure of, a quick google search yielded no conclusive results). For a square kernel, the 2D FWHM would be the same as the 1D FWHM because they are symmetric I would imagine.
回答 (1 件)
Image Analyst
2012 年 6 月 17 日
0 投票
What do i and j represent (hopefully not row and column)? Why is My_Matrix1 being overwritten in the loop (i.e. why did you create the first one simply to overwrite it with something different)? Same question for Des_Matrix1. What are Diffb0 and Diff? Why are they 4D matrices?
カテゴリ
ヘルプ センター および File Exchange で Deblurring についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!