上传文件至 /

This commit is contained in:
2026-04-16 15:56:06 +08:00
parent d8df14fb1f
commit 7af0f3fe54

22
hh.py Normal file
View File

@@ -0,0 +1,22 @@
import numpy as np
# 4x4 灰度图像
image = np.array([
[255, 200, 150, 100],
[180, 140, 110, 80],
[120, 90, 60, 40],
[50, 30, 20, 10]
])
# 3x3 彩色图像RGB三通道
color_image = np.array([
[[255, 0, 0], [0, 255, 0], [0, 0, 255]], # 红、绿、蓝
[[255, 255, 0], [0, 255, 255], [255, 0, 255]], # 黄、青、紫
[[128, 128, 128], [100, 100, 100], [50, 50, 50]] # 灰度
])
# 打印结果,让终端有输出
print("=== 灰度图像数组 ===")
print(image)
print("\n=== 彩色图像数组 ===")
print(color_image)