ravens/utils.py
def check_transform(image, pixel, transform):
    """Valid transform only if pixel locations are still in FoV after transform."""
    new_pixel = np.flip(np.int32(np.round(np.dot(transform, np.float32(
        [pixel[1], pixel[0], 1.]).reshape(3, 1))))[:2].squeeze())
    valid = np.all(new_pixel >= 0) and new_pixel[0] < image.shape[
        0] and new_pixel[1] < image.shape[1]
    return valid, new_pixel
Valid transform only if pixel locations are still in FoV after transform.
Valid transform only if pixel locations are still in FoV after transform.
Valid transform only if pixel locations are still in FoV after transform .
def check_transform(image, pixel, transform):
    new_pixel = np.flip(np.int32(np.round(np.dot(transform, np.float32(
        [pixel[1], pixel[0], 1.]).reshape(3, 1))))[:2].squeeze())
    valid = np.all(new_pixel >= 0) and new_pixel[0] < image.shape[
        0] and new_pixel[1] < image.shape[1]
    return valid, new_pixel
def check_transform ( image , pixel , transform ) : new_pixel = np . flip ( np . int32 ( np . round ( np . dot ( transform , np . float32 ( [ pixel [ 1 ] , pixel [ 0 ] , 1. ] ) . reshape ( 3 , 1 ) ) ) ) [ : 2 ] . squeeze ( ) ) valid = np . all ( new_pixel >= 0 ) and new_pixel [ 0 ] < image . shape [ 0 ] and new_pixel [ 1 ] < image . shape [ 1 ] return valid , new_pixel
Valid transform only if pixel locations are still in FoV after transform.
Valid transform only if pixel locations are still in FoV after transform .
"""Valid transform only if pixel locations are still in FoV after transform."""
image
pixel
transform