how to apply median filter to a color image?
조회 수: 36 (최근 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);
댓글 수: 0
채택된 답변
Image Analyst
2014년 3월 30일
Change this
medfilimg(:,:,1) = medfilt2®;
to
medfilimg(:,:,1) = medfilt2(R);
and it should be fine. See http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!