2 x 2 scanning mask of an image

1 Ansicht (letzte 30 Tage)
mideas
mideas am 23 Mär. 2012
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);

Antworten (0)

Kategorien

Mehr zu Fuzzy Logic in Simulink finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by