def adjust_convention(img, convention):
    """
    Inverts (could) the image according to the given convention

    Args:
        img (np.ndarray): Image numpy array
        convention (int): -1 or 1 depending on macros.IMAGE_CONVENTION

    Returns:
        np.ndarray: Inverted or non inverted (vertically) image.
    """
    img = img[::-convention]
    return img