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 Center および File ExchangeFuzzy Logic in Simulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by