MATLAB Answers

how to apply median filter to a color image?

121 ビュー (過去 30 日間)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2014 年 3 月 30 日
回答済み: Image Analyst 2014 年 3 月 30 日
I applied median filter to a color image.. herewith i have mentioned the code.. is it correct?
img=shadow_imadjust;
R = img(:,:,1);
G = img(:,:,2);
B = img(:,:,3);
medfilimg(:,:,1) = medfilt2®;
medfilimg(:,:,2) = medfilt2(G);
medfilimg(:,:,3) = medfilt2(B);
figure,imshow(medfilimg);

採用された回答

Image Analyst
Image Analyst 2014 年 3 月 30 日
Change this
medfilimg(:,:,1) = medfilt2®;
to
medfilimg(:,:,1) = medfilt2(R);

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by