def binarize(image):
"""
Binarizes an image with the threshold defined in the AE config
:param image: The image to binarize. Most likely a low-res image where each pixel
represents a patch
:return: An image where each pixel larger than the threshold is set to 1,
and otherwise set to 0.
"""
binarized = np.zeros(image.shape)
binarized[image > conf.binarize_threshold] = 1
return binarized
denoise_cnn_autoencoder.py 文件源码
python
阅读 43
收藏 0
点赞 0
评论 0
评论列表
文章目录