LouisZhang há 1 ano atrás
pai
commit
3adfb25434

+ 8 - 24
Day03/.ipynb_checkpoints/Day03笔记-checkpoint.ipynb

@@ -98,7 +98,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 16,
+   "execution_count": 56,
    "id": "84aa04a6-f0b6-4285-b479-99f6454ccd5b",
    "metadata": {},
    "outputs": [
@@ -120,10 +120,10 @@
     {
      "data": {
       "text/plain": [
-       "<matplotlib.image.AxesImage at 0x1a59a69c700>"
+       "<matplotlib.image.AxesImage at 0x1a599048be0>"
       ]
      },
-     "execution_count": 16,
+     "execution_count": 56,
      "metadata": {},
      "output_type": "execute_result"
     },
@@ -143,19 +143,19 @@
     "import numpy as np\n",
     "import matplotlib.pyplot as plt\n",
     "\n",
-    "#读取图像\n",
+    "# 读取图像\n",
     "img = cv2.imread(\"gpu.bmp\")\n",
-    "img_T = img.T  #图像的转置\n",
+    "img_T = img.T   # 图像的转置\n",
     "\n",
-    "print(img_T.shape)  # (H,W,c)\n",
+    "print(img_T.shape)   # (H,W,C)\n",
     "print(img.shape)\n",
     "\n",
-    "# 图像的像素类型\n",
+    "# 图像的像素类型做转变:uint8 -> float\n",
     "img_type = img.astype(np.float)\n",
     "\n",
     "plt.imshow(img_type)\n",
     "\n",
-    "#如果图像是整数,其值:0-255,如果是浮点数,其值:0-1  (对小数越界,采用截断(clipping)的方式)"
+    "# 如果图像是整数,其值:0-255,如果是浮点数,其值:0-1  (对小数越界,采用截断(clipping)的方式)"
    ]
   },
   {
@@ -353,22 +353,6 @@
     "new_img = new_img.astype(np.uint8)\n",
     "plt.imshow(new_img)"
    ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "id": "5ce6acbb-dea0-499d-8d56-42d3b54245d0",
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "id": "84b42392-1409-4a1f-b936-810e8c5bd057",
-   "metadata": {},
-   "outputs": [],
-   "source": []
   }
  ],
  "metadata": {

+ 8 - 24
Day03/Day03笔记.ipynb

@@ -98,7 +98,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 16,
+   "execution_count": 56,
    "id": "84aa04a6-f0b6-4285-b479-99f6454ccd5b",
    "metadata": {},
    "outputs": [
@@ -120,10 +120,10 @@
     {
      "data": {
       "text/plain": [
-       "<matplotlib.image.AxesImage at 0x1a59a69c700>"
+       "<matplotlib.image.AxesImage at 0x1a599048be0>"
       ]
      },
-     "execution_count": 16,
+     "execution_count": 56,
      "metadata": {},
      "output_type": "execute_result"
     },
@@ -143,19 +143,19 @@
     "import numpy as np\n",
     "import matplotlib.pyplot as plt\n",
     "\n",
-    "#读取图像\n",
+    "# 读取图像\n",
     "img = cv2.imread(\"gpu.bmp\")\n",
-    "img_T = img.T  #图像的转置\n",
+    "img_T = img.T   # 图像的转置\n",
     "\n",
-    "print(img_T.shape)  # (H,W,c)\n",
+    "print(img_T.shape)   # (H,W,C)\n",
     "print(img.shape)\n",
     "\n",
-    "# 图像的像素类型\n",
+    "# 图像的像素类型做转变:uint8 -> float\n",
     "img_type = img.astype(np.float)\n",
     "\n",
     "plt.imshow(img_type)\n",
     "\n",
-    "#如果图像是整数,其值:0-255,如果是浮点数,其值:0-1  (对小数越界,采用截断(clipping)的方式)"
+    "# 如果图像是整数,其值:0-255,如果是浮点数,其值:0-1  (对小数越界,采用截断(clipping)的方式)"
    ]
   },
   {
@@ -353,22 +353,6 @@
     "new_img = new_img.astype(np.uint8)\n",
     "plt.imshow(new_img)"
    ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "id": "5ce6acbb-dea0-499d-8d56-42d3b54245d0",
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "id": "84b42392-1409-4a1f-b936-810e8c5bd057",
-   "metadata": {},
-   "outputs": [],
-   "source": []
   }
  ],
  "metadata": {