필터 지우기
필터 지우기

Subscripted assignment dimension mismatch.

조회 수: 1 (최근 30일)
vetri veeran
vetri veeran 2014년 11월 21일
편집: vetri veeran 2014년 11월 21일
% Mean Filter clc clear all close all
original_im=imread('Picture1.tif');
figure,imshow(original_im);
%%%%% Mean Filter Programing without using matlab command %%%%%%
pad_org=padarray(original_im,[1 1],'both'); %All side Zero padding at boundary figure(3);imshow(pad_org);title('With Zero Padding Original Image at Boundary')
for i=1:size(pad_org,1)-2 for j=1:size(pad_org,2)-2 window=zeros(9,1); %% Matrix to store the value of 3 by 3 window win_inc=1;%%initial value of window matrix for k=1:size(window)/3 for l=1:size(window)/3 window(win_inc)=pad_org(i+k-1,j+l-1); win_inc=win_inc+1; end end mean=(1/9)*(window); new_image(i,j)=mean; end end new_image=uint8(new_image); figure(4);imshow(new_image);title('Image After Mean Filtering')
I am getting an error as
Subscripted assignment dimension mismatch.
Error in meanfilter_withoutbuiltin (line 49) new_image(i,j)=mean;%% 5 is the median value of 3 by 3 window
Can anyone help me please.
thank you

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by