calibrate.py
def extract_projected_screen(
        original: np.array, observed: np.array, debug: bool=True) -> np.array:
    """Extract the projected screen (by default, checkerboard).

    Additionally, warp the projection accordingly to match the orientation of
    the original.
    """
    height, width, _ = original.shape
    H, ori_pts, obs_pts = compute_homography_ims(original, observed)
    if debug:
        print('* %sDetected' % 'Not ' if H is None else '')
        cv2.drawChessboardCorners(observed, (5, 5), obs_pts, H is not None)
    return warp(observed, H)[:height, :width] if H is not None else original
Extract the projected screen (by default, checkerboard).

    Additionally, warp the projection accordingly to match the orientation of
    the original.
    
Extract the projected screen (by default, checkerboard).
Additionally, warp the projection accordingly to match the orientation of
the original.
Extract the projected screen ( by default checkerboard ) . Additionally warp the projection accordingly to match the orientation of the original .
def extract_projected_screen(
        original: np.array, observed: np.array, debug: bool=True) -> np.array:
    height, width, _ = original.shape
    H, ori_pts, obs_pts = compute_homography_ims(original, observed)
    if debug:
        print('* %sDetected' % 'Not ' if H is None else '')
        cv2.drawChessboardCorners(observed, (5, 5), obs_pts, H is not None)
    return warp(observed, H)[:height, :width] if H is not None else original
def extract_projected_screen ( original : np . array , observed : np . array , debug : bool = True ) -> np . array : height , width , _ = original . shape H , ori_pts , obs_pts = compute_homography_ims ( original , observed ) if debug : print ( '* %sDetected' % 'Not ' if H is None else '' ) cv2 . drawChessboardCorners ( observed , ( 5 , 5 ) , obs_pts , H is not None ) return warp ( observed , H ) [ : height , : width ] if H is not None else original
Extract the projected screen (by default, checkerboard).
Extract the projected screen ( by default checkerboard ) .
"""Extract the projected screen (by default, checkerboard).

    Additionally, warp the projection accordingly to match the orientation of
    the original.
    """
original
np.array
observed
np.array
debug
bool