function evaluationData = rok_evaluation_full_convert_to_anonymous (evaluationData)
    % evaluationData = ROK_EVALUATION_FULL_CONVERT_TO_ANONYMOUS (evaluationData)
    %
    % Converts the results of full detection/identification evaluation to 
    % results of anonymous detection/identification evaluation, as if they
    % were produced by ROK_EVALUATION_ANONYMOUS_* functions.
    %
    % Input:
    %  - evaluationData = evaluation data structure, obtained by
    %    ROK_EVALUATION_FULL_INITIALIZE
    %
    % Output:
    %  - evaluationData = converted evaluation data
    %
    % See also: ROK_EVALUATION_FULL_CREATE, ROK_EVALUATION_FULL_UPDATE,
    % ROK_EVALUATION_ANONYMOUS_DISPLAY
    %
    % Cpyright (C) 2012, Rok Mandeljc <rok.mandeljc@fe.uni-lj.si>
    
    numIds = size(evaluationData.counterAssigned, 2);
    
    % Reduce full evaluation data to anonymous evaluation data
    evaluationData.counterDetections = sum(evaluationData.counterDetections);
    evaluationData.counterFp = sum(evaluationData.counterFp);
    
    evaluationData.counterAssigned = sum(evaluationData.counterAssigned, 2)';
    
    % Reduce the distances
    newDistances = cell(1, numIds);
    for i = 1:numIds,
        newDistances{i} = vertcat( evaluationData.distances{i,:} );
    end
    evaluationData.distances = newDistances;
end