我有一张图片I,我想计算从图像I中提取的所有3x3子图像的标准差。根据标准差的定义,首先,我将计算子图像的均值,然后计算图像I和该均值之间的均方差以获得标准差。这是我的图像I和计算它的代码。但它没有返回正确的答案。你能帮我看看吗?
箭头表示窗口的移动。这是我的代码:
箭头表示窗口的移动。这是我的代码:
%% Compute the mean value
mask = fspecial('average', 3);
mean_sub= imfilter(A, mask, 'replicate');
%% How to compute the standard deviation for each sub-image