コード例 #1
0
ファイル: image.py プロジェクト: speri203/taudrones
def get_hash(img, ext):
    '''
    The function get_hash hash input image with sha256 algoritm and encode result by using Base64
    :param img: image in RGB format(numpy matrix)
    :param ext: file extension that defines the output format
    :return: the byte object
    '''
    return get_bytes_hash(write_bytes(img, ext))
コード例 #2
0
ファイル: fs.py プロジェクト: zylearncoding/supervisely
def get_file_hash(path):
    return get_bytes_hash(open(path, 'rb').read())
コード例 #3
0
def get_hash(img, ext):
    return get_bytes_hash(write_bytes(img, ext))