function [ corners ] = classifyImageAccordingToSegment( image,threshold,n ,pixelsToIgnore)
% Hassan Nahas
%This function classified a pixel according to the segment criterion test,
%while allowing some pixels to be ignored. This is a slow implementation
%that allows this test to be realistically compared to FAST as if it where
%a c based system.
    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) = segmentCriterionFeatures(Fvector,n);
        end
    end

end

