function [FeaturePointsOut] = select_strongest_features(FeaturePoints, upper_limit, min_metric)

    if isa(FeaturePoints, 'cornerPoints')
        FeaturePointsOut = cornerPoints(); 
    elseif isa(FeaturePoints, 'SURFPoints')
        FeaturePointsOut = SURFPoints(); 
    elseif isa(FeaturePoints, 'BRISKPoints')  
        FeaturePointsOut = BRISKPoints();
    end
    
    [~, i] = sort(FeaturePoints.Metric, 'descend');
    
    if length(i) > upper_limit
        i(upper_limit+1:end) = [];
    end
    
    FeaturePointsOut = FeaturePoints(i);
    a = find(FeaturePointsOut.Metric < min_metric, 1);
    
    if ~isempty(a)
        FeaturePointsOut(a:end) = [];
    end
end