function [ corners ] = classifyImageAccordingToTree( Tree,image,threshold, pixelsToIgnore )
% Hassan Nahas
%This function classifies an image by applying a given tree pixel by pixel
    if isempty(pixelsToIgnore)
        pixelsToIgnore = zeros(size(image));
    end
    allF = extractFeatureVector(image,threshold);
    corners = zeros(size(image,1),size(image,2));
    for x = 1:size(allF,1)
        for y = 1:size(allF,2)
            if (pixelsToIgnore(x,y) == 1 )
               continue 
            end
            Fvector = squeeze(allF(x,y,:));
            corners(x,y) = classifyPixel(Tree,Fvector);
        end
    end
    
end

