'create an image structure for the driver'

def _getImage(self, img):

    if (not ('local_file_path' in img)):
        img['local_file_path'] = os.path.join(self.image_root, img['filename'])
    if (not ('feat' in img)):
        feature_index = img['imgid']
        img['feat'] = self.features[:, feature_index]
    return img
