Write a Program for Morphological operations and filtering of the image with statistics values of the images to be updated?
2 views (last 30 days)
Show older comments
I have applied the morphological operator,gave a noise filtered it ,now how to determine the Statistical parameters like mean, standard deviation, skewness and kurtosis of the image?? please help me with my assignment
clc;
close all;
A=imread('brain.jpg');
subplot(3,3,1);
imshow(A);
title('original image');
%rectangle shaped structuring element%
a=strel("rectangle",[10 20]);%strel('rectangle',[height width])%
%morphological operation(dilation)%
di=imdilate(A,a);
subplot(3,3,2);
imshow(di);
title('dilated image');
%applying gaussian noise%
e=imnoise(di,'gaussian');
subplot(3,3,3);
imshow(e);
title('gaussian noise');
%using average filter%
a1=fspecial('average',2);
avgfilt=imfilter(e,a1);
subplot(3,3,4);
imshow(avgfilt);
title('average filter');
M=mean2(di);
0 Comments
Accepted Answer
Image Analyst
on 29 Apr 2022
sk = skewness(di(:))
kurt = kurtosis(di(:))
stDev = std2(di)
2 Comments
Image Analyst
on 30 Apr 2022
You must not have tried the code I gave you. Since there are no semicolons at the end of the lines it will report the values to the command window. Alternatively you can use fprintf(), or sprintf() and msgbox().
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!