2 x 2 scanning mask of an image

조회 수: 1 (최근 30일)
mideas
mideas 2012년 3월 23일
can anyone help me with the code of using a 2 x 2 scanning mask of an image? m stuck with the loop. and also how do i feed the pixels of that mask as inputs into a fuzzy inference system... please help.. this is the code: the FIS system ed2 takes 4 inputs and produces 1 output.
a=imread('Lenna.png'); g=rgb2gray(a); [m,n]=size(g); t=readfis('ed2.fis'); i=2;j=2; while i~=m while j~=n for k=1:1:2
p4=g(i,j);
p1=g(i-1,j-1);
p2=g(i,j-1);
p3=g(i-1,j);
o=evalfis([p1 p2 p3 p4],t);
end
j=j+1;
end
i=i+1;
end
and the error is: The first input must be a defined DOUBLE matrix
Error in ==> evalfis at 84 [output,IRR,ORR,ARR] = evalfismex(input, fis, numofpoints);
Error in ==> ed2x2 at 14 o=evalfis([p1 p2 p3 p4],t);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fuzzy Logic in Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by