1.numpy数组后面添加一个list:

import numpy as np
a=[[1,2,3],[4,5,6],[7,8,9]]
box=np.array(a)
box=np.vstack((box,[10,11,12]))
x1=box[:,0]

print(box)

2.PIL库,读入灰度图二进制数据转为RGB:

imagePil = Image.frombytes('L', (originalImageWidth,originalImageHeight), imageSerialized).convert('RGB')

  

相关文章:

  • 2021-06-06
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-02-14
  • 2022-12-23
  • 2021-10-04
猜你喜欢
  • 2021-12-08
  • 2021-09-21
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案