how to calculate mean and standard deviation, from the image then subtracted from the original image iteratively using matlab ?
5 次查看(过去 30 天)
显示 更早的评论
Is it meant to be the local statistical features mean and standard deviation. or it mean by mean filter or standard deviation fitter
0 个评论
采纳的回答
Image Analyst
2021-10-22
For local mean, use imfilter, or conv2()
kernel = ones(5)/25;
localMeanImage = conv2(double(grayImage), kernel, 'same');
For local standard deviation, use stdfilt
localSDImage = stdfilt(grayImage, ones(5));
0 个评论
更多回答(1 个)
yanqi liu
2021-10-23
local statistical features mean and standard deviation. or it mean by mean filter or standard deviation fitter
sir,may be use blockproc to process, such as
clc; clear all;
im = imread('cameraman.tif');
fun = @(block_struct) [mean2(block_struct.data) std2(block_struct.data)];
res = blockproc(double(im),[64 64],fun);
disp(res)
2 个评论
Image Analyst
2021-10-23
@safa, show your code. Because I don't see %{ in her code. In your code you have a %{ to start a big chunk of code as a comment, but you never have a %} to tell it where you want all those lines of code to stop being a comment. Search for %{ and %} in your code. Do you see the same number of each of them?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!