Showing
105 changed files
with
64 additions
and
0 deletions
| 1 | +{ | ||
| 2 | + "cells": [ | ||
| 3 | + { | ||
| 4 | + "cell_type": "code", | ||
| 5 | + "execution_count": 6, | ||
| 6 | + "metadata": {}, | ||
| 7 | + "outputs": [ | ||
| 8 | + { | ||
| 9 | + "ename": "ModuleNotFoundError", | ||
| 10 | + "evalue": "No module named 'cv2'", | ||
| 11 | + "output_type": "error", | ||
| 12 | + "traceback": [ | ||
| 13 | + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", | ||
| 14 | + "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", | ||
| 15 | + "\u001b[1;32m<ipython-input-6-c9d5b88864a0>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mcv2\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mos\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mPIL\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mImage\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n", | ||
| 16 | + "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'cv2'" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | + ], | ||
| 20 | + "source": [ | ||
| 21 | + "import cv2\n", | ||
| 22 | + "import os\n", | ||
| 23 | + "import numpy as np\n", | ||
| 24 | + "from PIL import Image\n", | ||
| 25 | + " \n", | ||
| 26 | + "path = 'Kang'\n", | ||
| 27 | + "imagePaths = [os.path.join(path,file_name) for file_name in os.listdir(path)]\n", | ||
| 28 | + "for imagePath in imagePaths:\n", | ||
| 29 | + " img = Image.open(imagePath).convert('L')\n", | ||
| 30 | + " img_numpy = np.array(img, 'uint8')\n", | ||
| 31 | + " cv2.imwrite(\"Kang\\\\\" + imagePath.split(\"\\\\\")[-1], img_numpy)\n", | ||
| 32 | + "print(\"All Done\")" | ||
| 33 | + ] | ||
| 34 | + }, | ||
| 35 | + { | ||
| 36 | + "cell_type": "code", | ||
| 37 | + "execution_count": null, | ||
| 38 | + "metadata": {}, | ||
| 39 | + "outputs": [], | ||
| 40 | + "source": [] | ||
| 41 | + } | ||
| 42 | + ], | ||
| 43 | + "metadata": { | ||
| 44 | + "kernelspec": { | ||
| 45 | + "display_name": "Python 3", | ||
| 46 | + "language": "python", | ||
| 47 | + "name": "python3" | ||
| 48 | + }, | ||
| 49 | + "language_info": { | ||
| 50 | + "codemirror_mode": { | ||
| 51 | + "name": "ipython", | ||
| 52 | + "version": 3 | ||
| 53 | + }, | ||
| 54 | + "file_extension": ".py", | ||
| 55 | + "mimetype": "text/x-python", | ||
| 56 | + "name": "python", | ||
| 57 | + "nbconvert_exporter": "python", | ||
| 58 | + "pygments_lexer": "ipython3", | ||
| 59 | + "version": "3.7.1" | ||
| 60 | + } | ||
| 61 | + }, | ||
| 62 | + "nbformat": 4, | ||
| 63 | + "nbformat_minor": 2 | ||
| 64 | +} |
favicon.ico
0 → 100644
No preview for this file type
21.6 KB
103 KB
26.3 KB
69.8 KB
19.3 KB
105 KB
78.4 KB
110 KB
3.22 KB
3.82 KB
2.99 KB
4.08 KB
4.08 KB
17.7 KB
2.98 KB
2.17 KB
10.6 KB
10.6 KB
14.7 KB
54 KB
31.3 KB
61.7 KB
117 KB
23 KB
118 KB
198 KB
39.5 KB
986 KB
20.9 KB
55 KB
24 KB
48.9 KB
31 KB
58.8 KB
14.1 KB
22.1 KB
15.1 KB
2.65 KB
11.9 KB
18.2 KB
8.52 KB
13.2 KB
21.9 KB
13.9 KB
33.7 KB
57.7 KB
14.5 KB
6.29 KB
27 KB
9 KB
93.1 KB
17.2 KB
30.5 KB
34.6 KB
9.04 KB
35.7 KB
8.93 KB
49.9 KB
82.1 KB
26.6 KB
37.2 KB
7.83 KB
16 KB
37.8 KB
41.7 KB
33.2 KB
34.2 KB
39.7 KB
53.4 KB
86.9 KB
13.1 KB
28.4 KB
7.41 KB
61.6 KB
7.14 KB
15.5 KB
46.7 KB
15.7 KB
9.8 KB
74.6 KB
22.6 KB
1.71 KB
8.29 KB
7.46 KB
13 KB
4.72 KB
45.1 KB
16.4 KB
45.1 KB
12.4 KB
7.79 KB
10.6 KB
24.2 KB
26.4 KB
6.52 KB
44.4 KB
7.16 KB
5.61 KB
12 KB
This diff is collapsed. Click to expand it.
naver_image.py
deleted
100644 → 0
This diff is collapsed. Click to expand it.
olaf.png
0 → 100644
108 KB
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment