How to calculate the mean and standard deviation of the 27 neighbourhood of a voxel in a 3D matrix?

2 ビュー (過去 30 日間)
Hello everybody!
I have a matrix 336*336*65. I want to create two new matrices of the same size, one representing the mean value of the 27-neighboor of each voxel and another one representing the standard deviation for the same neighbors.
Can anyone help me?

採用された回答

Image Analyst
Image Analyst 2017 年 4 月 25 日
Use convn() and stdfilt().
kernel = ones(3,3,3);
out = convn(inputImage, kernel, 'same')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by