def prepare_indices_stereocalib(corners1, corners2):
    """
    Return indices between 0 and num_images
    for which chessboard corners were detected
    in both left and right image (i.e. neither in corners1 
    nor in corners2 there is None at those indices).
    """

    indices = []

    idx = 0
    for c1, c2 in zip(corners1, corners2):
        
        if not ((c1 is None) or (c2 is None)):
            indices.append(idx)
        
        idx += 1

    return indices