% this function takes a stack of images named PATCH(heigh, width, #images)
% and a provided weight vector W  and output the decision value
% Yout
function Yout = YoutFromPatchSimple(PATCH, W)

		[n_W n_AU] = size(W);
		n_PATCH= size(PATCH,3);
		Yout = zeros(n_PATCH, n_AU);  % #images x #AUs

		%Andrew: if you're short of time, this part can be precomputed and store in files.
		gb = InitGaborPyramid();  


		for i=1:n_PATCH
			[Yout(i,:)]=YoutFromImage(PATCH(:,:,i), W, gb);
		end
return


%
function [Y F]=YoutFromImage(Pimg, W, gb)
			F=FeatFromImage(Pimg, gb);
			Y= F*W;
return 

