Python 如何将元组保存为图像?
Helo,我刚学会使用Python。我在tuple-bellow中有一些数组Python 如何将元组保存为图像?,python,python-3.x,image,image-processing,tuples,Python,Python 3.x,Image,Image Processing,Tuples,Helo,我刚学会使用Python。我在tuple-bellow中有一些数组 (array([[ 90, 94, 6], [126, 108, 24], [180, 116, 42], [166, 116, 46], [ 72, 94, 31]]), array([[101, 96, 14], [190, 165, 84], [202, 134, 63], [170, 115
(array([[ 90, 94, 6],
[126, 108, 24],
[180, 116, 42],
[166, 116, 46],
[ 72, 94, 31]]), array([[101, 96, 14],
[190, 165, 84],
[202, 134, 63],
[170, 115, 50],
[ 40, 50, 0]]), array([[145, 125, 53],
[150, 112, 40],
[148, 73, 6],
[156, 90, 31],
[ 25, 11, 1]]), array([[133, 124, 57],
[165, 142, 75],
[195, 142, 77],
[169, 120, 62],
[ 82, 74, 28]]), array([[ 73, 105, 40],
[ 56, 77, 10],
[138, 135, 67],
[ 97, 95, 34],
[ 45, 69, 21]]))
我怎样才能把那个元组变成一个图像?谢谢您可以:
import numpy as np
import matplotlib.pyplot as plot
x = (array([[ 90, 94, 6],
[126, 108, 24],
[180, 116, 42],
[166, 116, 46],
[ 72, 94, 31]]), array([[101, 96, 14],
[190, 165, 84],
[202, 134, 63],
[170, 115, 50],
[ 40, 50, 0]]), array([[145, 125, 53],
[150, 112, 40],
[148, 73, 6],
[156, 90, 31],
[ 25, 11, 1]]), array([[133, 124, 57],
[165, 142, 75],
[195, 142, 77],
[169, 120, 62],
[ 82, 74, 28]]), array([[ 73, 105, 40],
[ 56, 77, 10],
[138, 135, 67],
[ 97, 95, 34],
[ 45, 69, 21]]))
x = np.array(x)
plot.imshow(x)
或者你可以继续你能补充更多的说明吗?e、 g.你所说的图像是什么意思?@jStaff认为数组表示颜色的元组,整个大小是NXN(25)表示图像。我猜这是一个复制品。