How to use 'median filter and gaussian filter' in matlab ?

3 views (last 30 days)
image_folder ='E:\Resize Image'
filenames = dir (fullfile(image_folder,'*.jpeg'))
total_images = numel(filenames);
results=[];
for n= 1:total_images;
f= fullfile(image_folder, filenames(n).name);
disp(f);
our_images= imread (f);
% CONTRAST STRECHING
s = imadjust (our_images,stretchlim(our_images,[0.01 0.99]),[]); %menentukan nilai maksimum dan minimum untuk peregangan
% FILTERING
noise = imnoise (s,'gaussian',0.05);
denoise = medfilt2(noise);denoise1 = imgausstfilt (noise, 2) ;
  1 Comment
Armylia Dewi
Armylia Dewi on 5 Jun 2022
Please help, here I am using Matlab version R2018a.
error in
Undefined function 'imgausstfilt' for input arguments of type 'uint8'.

Sign in to comment.

Accepted Answer

Voss
Voss on 5 Jun 2022
Try imgaussfilt instead of imgausstfilt (note the extra t)
denoise1 = imgaussfilt(randn(100),2); % works
denoise1 = imgausstfilt(randn(100),2); % error
Unrecognized function or variable 'imgausstfilt'.
  4 Comments

Sign in to comment.

More Answers (0)

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!