def split_channels(image):
    """ Takes a numpy array and splits its' channels into a 3 or 4 tuple (views)

    :return: A 3 or 4 tuple, with each element containing the corresponding color channel
    """
    if image.shape[2] == 3:
        return (image[:, :, 0], image[:, :, 1], image[:, :, 2])
    elif image.shape[2] == 4:
        return (image[:, :, 0], image[:, :, 1], image[:, :, 2], image[:, :, 3])
    assert False, "Wrong shape: %s" % str(image.shape)