matlab code for max filter applied to an image. max filter having window size 7*7
이전 댓글 표시
matlab code for max filter applied to an image. max filter having window size 7*7
A = imread('E:\under\data\fih.PNG');
B=zeros(size(A));
%PAD THE MATRIX A WITH ZEROS
modifyA=padarray(A,[1 1]);
x=[1:3]';
y=[1:3]';
for i= 1:size(modifyA,1)-2
for j=1:size(modifyA,2)-2
%VECTORIZED METHOD
window=reshape(modifyA(i+x-1,j+y-1),[],1);
%FIND THE MAXIMUM VALUE IN THE SELECTED WINDOW
B(i,j)=max(window);
end
end
B=uint8(B);
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Filtering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!