pose_estimation/tools/image.py
def write_im_np(filename, im):
    '''
    take an array with entries on the interval [0, 1] and save it as an image
    '''
    warnings.simplefilter('always')
    if np.any(im < 0) or np.any(im > 1):
        warnings.warn('image has values outside of the interval [0,1], ' \
                       'saturating...')
        im = np.clip(im, 0, 1)

    im = np.uint8(im * 255.0)
    imageio.imwrite(filename, im)

    take an array with entries on the interval [0, 1] and save it as an image
    
take an array with entries on the interval [0, 1] and save it as an image
take an array with entries on the interval [ 0 1 ] and save it as an image
def write_im_np(filename, im):
    warnings.simplefilter('always')
    if np.any(im < 0) or np.any(im > 1):
        warnings.warn('image has values outside of the interval [0,1], ' \
                       'saturating...')
        im = np.clip(im, 0, 1)
    im = np.uint8(im * 255.0)
    imageio.imwrite(filename, im)
def write_im_np ( filename , im ) : warnings . simplefilter ( 'always' ) if np . any ( im < 0 ) or np . any ( im > 1 ) : warnings . warn ( 'image has values outside of the interval [0,1], ' 'saturating...' ) im = np . clip ( im , 0 , 1 ) im = np . uint8 ( im * 255.0 ) imageio . imwrite ( filename , im )
take an array with entries on the interval [0, 1] and save it as an image
take an array with entries on the interval [ 0 1 ] and save it as an image
'''
    take an array with entries on the interval [0, 1] and save it as an image
    '''
filename
im