%V=video sequence
%X=23-channel output of CERT4_4(V) [frame x AU]

%Integrated Events
%***************************************************************
X=Xfill(X); %linear interpolation point to point
AI=ai_jw(X);%AI is 12 by 23 by n

              			
%                   OR    
			
%If you are accumulating filters as you go, you will have the following:
% for each of 12 different Gabor filters, and for each of 23 AU channels
% you have set of numbers for eachfilter start time back to t-6/bandwidth.
% only one of this set will be finished filtering, call it F(F0,AU)

%Instead of the AI above, use:
%for i=1:12               %frequency
%  for j=1:23             %AUs
%    if F(i,j)>0
%      AI(i,j,n)+=F(i,j); %where F is filter that started at t-6/a
%    else if AI(i,j,n)>0  
%	n+=1;            %if event ended,(F goes below 0) start new event  
%	AI(i,j,n)=0;
%    end
%  end
%end
%****************************************************************

load w1p.mat b d g %           parameters
h=newhist(AI,d,b); %           normalized histogram 
		   
load VS.mat VS ay %            support vectors		   
y=rbfSVMtest(h,VS,ay,g);%      non-linear SVM
  

 


		   
		   








