Mode & median filters for color image

조회 수: 2 (최근 30일)
Darshan A
Darshan A 2011년 5월 6일
Can you please send the syntax for mode and median filters for image restoration of color images.It would be very helpful

채택된 답변

Sean de Wolski
Sean de Wolski 2011년 5월 6일
%Median:
Irgb = your_rgb_image;
for ii = 1:3
Irgb(:,:,ii) = medfilt2(Irgb(:,:,ii),ones(3)); %3x3 median
end

추가 답변 (1개)

Darshan A
Darshan A 2011년 5월 6일
Thanks a lot for the quick response..!
  댓글 수: 4
Darshan A
Darshan A 2011년 5월 7일
Error using ==> medfilt2>parse_inputs at 134
MEDFILT2(A,[M N]): Second argument must consist of two integers.
Error in ==> medfilt2 at 48
[a, mn, padopt] = parse_inputs(varargin{:});
Error in ==> median_color at 3
Irgb(:,:,ii) = medfilt2(Irgb(:,:,ii),ones(3));
I am new to MATLAB , so this might have been my mistake.
Sean de Wolski
Sean de Wolski 2011년 5월 7일
No it's mine.
medfilt2(Irgb,[3 3]);
I was confusing it with conv2. (what you would use for mean or std)

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by