how to calculate mean and standard deviation, from the image then subtracted from the original image iteratively using matlab ?
3 views (last 30 days)
Show older comments
Is it meant to be the local statistical features mean and standard deviation. or it mean by mean filter or standard deviation fitter
0 Comments
Accepted Answer
Image Analyst
on 22 Oct 2021
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 Comments
More Answers (1)
yanqi liu
on 23 Oct 2021
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 Comments
Image Analyst
on 23 Oct 2021
@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?
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!