I cannot get the output, Image processing

조회 수: 2 (최근 30일)
Ahsen Feyza Dogan
Ahsen Feyza Dogan 2019년 6월 22일
답변: Akira Agata 2019년 6월 24일
Hi, I cannot get the output of this code, I don't understand where problem is. Thank you
I=imread('Desktop/mak/exp.jpg');
isp=imnoise(I,'salt & pepper' 0.1);
a=fspecial('average');
a1=filter2(a,isp);
figure,imshow(uint8(a1));

답변 (1개)

Akira Agata
Akira Agata 2019년 6월 24일
I think several points should be checked:
  1. File path in the line 1 is correct?
  2. 3rd input argument of imnoise function should be separated by ','
  3. imfilter function should be used in th eline 4, instead of filter2 function
  4. uint8 in the last line can be deleted
The following is an example.
I = imread('exp.jpg');
isp = imnoise(I,'salt & pepper',0.1);
a = fspecial('average');
a1 = imfilter(isp,a);
figure;imshow(a1);

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by