function groundTruth = get_ground_truth (self, frame, person)
    % groundTruth = GET_GROUND_TRUTH (self, frame, person)
    %
    % Retrieves ground truth for specified, either for all people or for
    % people specified by an optional array of indices.
    %
    % Input:
    %  - self = @GroundTruthDatabase instance
    %  - frame = frame number (or vector of frames)
    %  - person = optional array of indices denoting people for which
    %    ground truth is to be retrieved
    %
    % Output:
    %  - groundTruth = Mx3 array of ground truth information for M people
    %
    % Copyright (C) 2012, Rok Mandeljc <rok.mandeljc@fe.uni-lj.si>
    
    % Default parameter for direction is 'prev' (zero-hold behavior)
    if nargin < 3 || isempty(person),
        person = 1:size(self.data, 1);
    end
    
    % Apply frame offset
    frame = frame - self.frameOffset;
    
    % Check frame number
    if any(frame < 1) || any(frame > numel(self.data)),
        error('Rok:GroundTruth:InvalidFrameNumber', 'Invalid frame number; must be a number between %d and %d!', 1+self.frameOffset, numel(self.data)+self.frameOffset);
    end
    
    % Get ground truth
    groundTruth = self.data(person, :, frame);
end