def get_image(track_data_list, index_mapping, index):
    """ Returns an image from a series of track directories.
        Inputs:
        track_data_list -- List of TrackData objects.
        index_mapping -- total num images by 2 array, with each row 
            containing a directory index and the image indices for 
            that directory only.
        index -- Single index, less than total number of images in
            all directories.
    """
    dir_index, orig_index = index_mapping[index]
    return track_data_list[dir_index].detection_image(orig_index)