【发布时间】:2018-11-22 02:04:07
【问题描述】:
有没有一种方法可以将加载为二进制字符串的图像转换为大小为 (im_height, im_width, 3) 的 numpy 数组?像这样的:
# read image as binary string
with open(img_path, "rb") as image_file:
image_string = image_file.read()
# convert image string to numpy
image_np = convert_binary_string_to_numpy(image_string)
这个转换函数是什么样子的?我正在使用解密,因此我需要使用二进制字符串。 谢谢!
【问题讨论】:
-
不,我自己没有发现,我会检查一下,似乎非常接近我的问题。非常感谢!
标签: python numpy opencv pillow rncryptor