unknown 1 year ago
parent
commit
369a21cb7a

File diff suppressed because it is too large
+ 76 - 2
DAY02/.ipynb_checkpoints/图像处理与图像特征-checkpoint.ipynb


+ 21 - 3
DAY02/图像处理与图像特征.ipynb

@@ -114,12 +114,30 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 24,
    "id": "9e93da9e-6b85-4483-919e-b1d3a89bb2b7",
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "ename": "SyntaxError",
+     "evalue": "invalid syntax (781746806.py, line 2)",
+     "output_type": "error",
+     "traceback": [
+      "\u001b[1;36m  Cell \u001b[1;32mIn[24], line 2\u001b[1;36m\u001b[0m\n\u001b[1;33m    import = cv2.imread(\"gpu.bmp)\u001b[0m\n\u001b[1;37m           ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
+     ]
+    }
+   ],
    "source": [
-    "#打开"
+    "#打开\n",
+    "import = cv2.imread(\"gpu.bmp)\n",
+    "\n",
+    "print(img.shape)    # 维度\n",
+    "print(img.ndim)     # 维数\n",
+    "print(img.size)     # 数组元素个数 = 数组元素字节数 / 每个像素的字节数\n",
+    "print(img.itemsize) # 每个像素的字节数\n",
+    "print(img.nbytes)   # 数组元素字节数\n",
+    "\n",
+    "print(img.shape[0] * img.shape[1] * img.shape[2])   # 数组元素字节数"
    ]
   },
   {

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