def get_frames_index_range(filename, start, end):
    """
    returns a range of frames as numpy array. The indecies comply with scimage

    We can then supplement the above table as follows:

    Addendum to dimension names and orders in scikit-image
    Image type: 2D color video
    coordinates: (time, row, col, channel)
    """
    import cv2
    from numpy import array, zeros, nan
    vidcap = cv2.VideoCapture(filename)
    vidcap.set(cv2.CAP_PROP_POS_FRAMES, start)
    i = 0
    success, image = vidcap.read()
    arr = zeros((end - start, image.shape[0], image.shape[1], image.shape[2])
        ) * nan
    arr[i] = image
    i += 1
    while start + i < end:
        success, image = vidcap.read()
        if success:
            arr[i] = image
        i += 1
    return arr
