function img=absolute(img,tf,dtime)
%
% A type of absolute template applied to image file.
% 
% Usage: img=absolute(img, tf, dtime);
%


% control/feedforward (B) and feedback (A) templates
A = template_form([2 0 0])
B = zeros(3,3)

u = im2double(img);
uu = im2double(max(max(u)));
ul = im2double(min(min(u)));
%[uy,ux] = size(u);
u = (u-ul)/(uu-ul)*2-1;
%x0 = -1*ones(uy,ux);
x0 = u;

I = 0 ;

state=viewcnn(A,B,I,x0,u,tf,dtime);
img=pwlsig(state);
%img=state+u+1;
%imwrite(img,outName,'tiff');
%figure;imagesc(img);colormap(gray);



