diff --git a/text.py b/text.py new file mode 100644 index 0000000..6a84256 --- /dev/null +++ b/text.py @@ -0,0 +1,25 @@ +import numpy as np + +image = np.array([ + [100, 150, 200], + [80, 120, 180], + [60, 90, 140] +], dtype=np.uint8) + +print("原图:") +print(image) +print("-" * 20) +#1 +dark_imafe = np.clip(image 20, 0, 255).astype(np.uint8) +print("变暗20后:") +print(dark_imafe) +print("-" * 20) +#2 +crop_image = dark_imafe[0:2, 0:2] +print("裁剪左上角2*2后:") +print(crop_image) +print("-" * 20) +#3 +flip_image = np.fliolr(crop_image) +print("水平翻转后:") +print(flip_image) \ No newline at end of file diff --git a/text2.py b/text2.py new file mode 100644 index 0000000..e69de29 diff --git a/text3.py b/text3.py new file mode 100644 index 0000000..e69de29