unknown 1 年之前
父節點
當前提交
16e1084f92
共有 5 個文件被更改,包括 86 次插入16 次删除
  1. 52 2
      DAY03/.ipynb_checkpoints/DAY03笔记-checkpoint.ipynb
  2. 二進制
      DAY03/.ipynb_checkpoints/gpu-checkpoint.bmp
  3. 16 14
      DAY03/DAY03笔记.ipynb
  4. 13 0
      DAY03/ex01.py
  5. 5 0
      ex01.py

File diff suppressed because it is too large
+ 52 - 2
DAY03/.ipynb_checkpoints/DAY03笔记-checkpoint.ipynb


二進制
DAY03/.ipynb_checkpoints/gpu-checkpoint.bmp


File diff suppressed because it is too large
+ 16 - 14
DAY03/DAY03笔记.ipynb


+ 13 - 0
DAY03/ex01.py

@@ -0,0 +1,13 @@
+import numpy as np
+import cv2 
+import matplotlib.pyplot as plt
+# 加载图像
+img = cv2.imread("gpu.bmp")
+print(img)
+#img[0:100,200:500,:]=255 #对图像的连续块进行访问:获取数据,修改数据
+#plt.imshow(img)
+# 把图像的红色通道像素全部设置为0
+img[:,:,1:3][img[:,:,2] >= 0] = 0   #0:red 1:green  2:blue
+#cv2.imwrite("2.jpg",img)
+plt.imshow(img)
+plt.show()

+ 5 - 0
ex01.py

@@ -0,0 +1,5 @@
+import numpy
+import cv2
+img_array=[[[123,0,0,50] for i in range(300)]for j in range(260)]#255*255的图像,图像的像素[0,255,0,128]
+img_numpy=numpy.array(img_array)
+cv2.imwrite("1.jpg",img_numpy)

Some files were not shown because too many files changed in this diff