Code covered by the BSD License  

Highlights from
Simple DIP demos

image thumbnail

Simple DIP demos

by

 

03 Sep 2002 (Updated )

Simple DIP demo using MATLAB 6.1, Image Processing Toolbox and NN Toolbox.

traindata(x)
function [NNinput, NNtarget] = traindata(x) 

pic78 = x;

for cntout = 1:78
    for cnt=1:7
        for cnt2=1:5
            pictemp=sum(pic78((cnt*10-9:cnt*10),(cnt2*10-9:cnt2*10),cntout));
            pictemp2((cnt-1)*5+cnt2)=sum(pictemp);

        end
    end
    pic_NNinput(cntout,:)=pictemp2/100;
end

NNinput=pic_NNinput';
NNtarget= [eye(10) eye(10) eye(10) eye(10) eye(10) eye(10) eye(10) eye(10)];
NNtarget=NNtarget(:,1:78);

Contact us