MoonChaeyeon

add image

Showing 105 changed files with 269 additions and 183 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 +}
No preview for this file type
...@@ -4,8 +4,12 @@ ...@@ -4,8 +4,12 @@
4 <head> 4 <head>
5 <link rel="stylesheet" href="style.css"> 5 <link rel="stylesheet" href="style.css">
6 <meta charset="utf-8"> 6 <meta charset="utf-8">
7 + <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
8 + <link rel="icon" href="/favicon.ico" type="image/x-icon">
9 + <title>겨울왕국 캐릭터 닮은꼴</title>
7 <meta name="keywords" content="엘사, 안나, 크리스토프, 한스, 울라프, 스벤, 브루니"> 10 <meta name="keywords" content="엘사, 안나, 크리스토프, 한스, 울라프, 스벤, 브루니">
8 <link href="https://fonts.googleapis.com/css2?family=Jua&display=swap" rel="stylesheet"> 11 <link href="https://fonts.googleapis.com/css2?family=Jua&display=swap" rel="stylesheet">
12 + <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5e64b3727e862b06"></script>
9 </head> 13 </head>
10 14
11 <body> 15 <body>
...@@ -14,10 +18,14 @@ ...@@ -14,10 +18,14 @@
14 Frozen 18 Frozen
15 </h1> 19 </h1>
16 <div class="file-upload"> 20 <div class="file-upload">
21 + <h2>
22 + 나와 닮은 겨울왕국 캐릭터는?
23 + </h2>
17 <div class="image-upload-wrap"> 24 <div class="image-upload-wrap">
18 <input class="file-upload-input" type='file' onchange="readURL(this);" accept="image/*" /> 25 <input class="file-upload-input" type='file' onchange="readURL(this);" accept="image/*" />
19 <div class="drag-text"> 26 <div class="drag-text">
20 - <h3>얼굴 사진을 업로드 하세요</h3> 27 + <h3>이곳에 얼굴 사진을 업로드 하세요!</h3>
28 + <img src="olaf.png" align="center">
21 </div> 29 </div>
22 </div> 30 </div>
23 <div class="file-upload-content"> 31 <div class="file-upload-content">
...@@ -173,7 +181,7 @@ ...@@ -173,7 +181,7 @@
173 break; 181 break;
174 case "크리스토프": 182 case "크리스토프":
175 resultMessage = "크리스토프" 183 resultMessage = "크리스토프"
176 - resultExplain = "당신은 코가 크리스토프!" 184 + resultExplain = "당신은 코가 크고 듬직한 크리스토프!"
177 break; 185 break;
178 case "한스": 186 case "한스":
179 resultMessage = "한스" 187 resultMessage = "한스"
...@@ -181,15 +189,19 @@ ...@@ -181,15 +189,19 @@
181 break; 189 break;
182 case "울라프": 190 case "울라프":
183 resultMessage = "울라프" 191 resultMessage = "울라프"
184 - resultExplain = "당신은 최강 귀요미 울라프!" 192 + resultExplain = "헐~ 당신은 눈사람?! 최강 귀요미 울라프!"
185 break; 193 break;
186 case "스벤": 194 case "스벤":
187 resultMessage = "스벤" 195 resultMessage = "스벤"
188 - resultExplain = "당신은 순록?!" 196 + resultExplain = "헐~ 당신은 순록?! 크리스토프의 영원한 친구"
189 break; 197 break;
190 case "브루니": 198 case "브루니":
191 resultMessage = "브루니" 199 resultMessage = "브루니"
192 - resultExplain = "당신은 귀엽고 미간이 넓은 브루니!" 200 + resultExplain = "헐~ 당신은 도마뱀?! 정말 귀여운 브루니!"
201 + break;
202 + case "트롤":
203 + resultMessage = "트롤"
204 + resultExplain = "헐~ 당신은 트롤?! 2등신 요정!"
193 break; 205 break;
194 default: 206 default:
195 resultMessage = "알수없음" 207 resultMessage = "알수없음"
...@@ -230,6 +242,9 @@ ...@@ -230,6 +242,9 @@
230 case "브루니": 242 case "브루니":
231 labelTitle = "브루니" 243 labelTitle = "브루니"
232 break; 244 break;
245 + case "트롤":
246 + labelTitle = "트롤"
247 + break;
233 default: 248 default:
234 labelTitle = "알수없음" 249 labelTitle = "알수없음"
235 } 250 }
......
1 -from urllib.request import urlopen
2 -from bs4 import BeautifulSoup as bs
3 -from urllib.parse import quote_plus
4 -
5 -baseUrl = 'https://search.naver.com/search.naver?where=image&sm=tab_jum&query='
6 -plusUrl = input('검색어를 입력하세요 : ')
7 -# 한글 검색 자동 변환
8 -url = baseUrl + quote_plus(plusUrl)
9 -html = urlopen(url)
10 -soup = bs(html, "html.parser")
11 -img = soup.find_all(class_='_img', limit = 20)
12 -
13 -n = 1
14 -for i in img:
15 - imgUrl = i['data-source']
16 - with urlopen(imgUrl) as f:
17 - with open('사진' + plusUrl + str(n)+'.jpg','wb') as h: # w - write b - binary
18 - img = f.read()
19 - h.write(img)
20 - n += 1
21 -print('다운로드 완료')
...\ No newline at end of file ...\ No newline at end of file

108 KB

...@@ -4,56 +4,54 @@ html, ...@@ -4,56 +4,54 @@ html,
4 body { 4 body {
5 font-family: 'Jua', sans-serif; 5 font-family: 'Jua', sans-serif;
6 } 6 }
7 -/**/ 7 +body {
8 - body { 8 + width: 100%;
9 - width: 100%; 9 + height: 100%;
10 - height: 100%; 10 + background: #177082;
11 - background: #177082; 11 + background: -moz-linear-gradient(top, #177082 0%, #52c9e0 100%);
12 - background: -moz-linear-gradient(top, #177082 0%, #52c9e0 100%);
13 /* FF3.6+ */ 12 /* FF3.6+ */
14 - background: -webkit-linear-gradient(top, #f0f9ff 0%, #52c9e0 100%); 13 + background: -webkit-linear-gradient(top, #f0f9ff 0%, #52c9e0 100%);
15 /* Chrome10+,Safari5.1+ */ 14 /* Chrome10+,Safari5.1+ */
16 - background: -o-linear-gradient(top, #177082 0%, #52c9e0 100%); 15 + background: -o-linear-gradient(top, #177082 0%, #52c9e0 100%);
17 /* Opera 11.10+ */ 16 /* Opera 11.10+ */
18 - background: -ms-linear-gradient(top, #177082 0%, #52c9e0 100%); 17 + background: -ms-linear-gradient(top, #177082 0%, #52c9e0 100%);
19 /* IE10+ */ 18 /* IE10+ */
20 - background: linear-gradient(to bottom, #177082 0%, #52c9e0 100%); 19 + background: linear-gradient(to bottom, #177082 0%, #52c9e0 100%);
21 } 20 }
22 - .svg-snowscene { 21 +.svg-snowscene {
23 - width: 100%; 22 + width: 100%;
24 } 23 }
25 - .snow { 24 +.snow {
26 - fill: #fff; 25 + fill: #fff;
27 - animation-name: snowing; 26 + animation-name: snowing;
28 - animation-duration: 3s; 27 + animation-duration: 3s;
29 - animation-iteration-count: infinite; 28 + animation-iteration-count: infinite;
30 - animation-timing-function: ease-out; 29 + animation-timing-function: ease-out;
31 } 30 }
32 - .snow:nth-child(2n) { 31 +.snow:nth-child(2n) {
33 - animation-delay: 1.5s; 32 + animation-delay: 1.5s;
34 } 33 }
35 - .snow:nth-child(3n) { 34 +.snow:nth-child(3n) {
36 - animation-delay: 2.3s; 35 + animation-delay: 2.3s;
37 - animation-duration: 3.3s; 36 + animation-duration: 3.3s;
38 } 37 }
39 - .snow:nth-child(4n) { 38 +.snow:nth-child(4n) {
40 - animation-delay: 0.8s; 39 + animation-delay: 0.8s;
41 - animation-duration: 3.2s; 40 + animation-duration: 3.2s;
42 } 41 }
43 - .snow:nth-child(5n) { 42 +.snow:nth-child(5n) {
44 - animation-delay: 2.8s; 43 + animation-delay: 2.8s;
45 } 44 }
46 - @keyframes snowing { 45 +@keyframes snowing {
47 - 0% { 46 + 0% {
48 - fill-opacity: 1; 47 + fill-opacity: 1;
49 } 48 }
50 - 100% { 49 + 100% {
51 - fill-opacity: 0; 50 + fill-opacity: 0;
52 - transform: translateY(200px); 51 + transform: translateY(200px);
53 } 52 }
54 } 53 }
55 - 54 +
56 -/**/
57 p { 55 p {
58 color: white; 56 color: white;
59 text-align: center; 57 text-align: center;
...@@ -110,14 +108,24 @@ h1 { ...@@ -110,14 +108,24 @@ h1 {
110 font-family: 'frozen', serif; 108 font-family: 'frozen', serif;
111 font-weight: 700; 109 font-weight: 700;
112 } 110 }
111 +h2 {
112 + font-weight: 100;
113 + font-size: 2.5rem;
114 + color: #d6ffffe8;
115 + text-align: center;
116 +}
117 +
118 +img {
119 + margin-bottom: 20%;
120 +}
113 121
114 /* 이미지 업로드 창 */ 122 /* 이미지 업로드 창 */
115 .file-upload { 123 .file-upload {
116 width: 500px; 124 width: 500px;
117 margin: 10% auto; 125 margin: 10% auto;
118 padding-top: 5%; 126 padding-top: 5%;
119 - padding-right: 15%; 127 + padding-right: 15%;
120 - padding-left: 15%; 128 + padding-left: 15%;
121 padding-bottom: 10%; 129 padding-bottom: 10%;
122 border-radius: 10px; 130 border-radius: 10px;
123 border-style: hidden; 131 border-style: hidden;
...@@ -193,190 +201,210 @@ h1 { ...@@ -193,190 +201,210 @@ h1 {
193 } 201 }
194 202
195 .navbar-light .navbar-brand { 203 .navbar-light .navbar-brand {
196 - line-height: 1.68; 204 + line-height: 1.68;
197 - text-align: left; 205 + text-align: left;
198 - color: #35465d; 206 + color: #35465d;
199 } 207 }
200 208
201 .navbar-light .navbar-toggler { 209 .navbar-light .navbar-toggler {
202 - border-color: #ffffff; 210 + border-color: #ffffff;
203 } 211 }
204 212
205 .upload { 213 .upload {
206 - width: 20%; 214 + width: 20%;
207 } 215 }
208 216
209 .upload-text { 217 .upload-text {
210 - width: 58%; 218 + width: 58%;
211 - font-size: 2rem; 219 + font-size: 2rem;
212 - line-height: 1.53; 220 + line-height: 1.53;
213 - text-align: center; 221 + text-align: center;
214 - color: #35465d; 222 + color: #35465d;
215 - margin: 0 auto; 223 + margin: 0 auto;
216 } 224 }
217 225
218 /* 막대 그래프 */ 226 /* 막대 그래프 */
219 .bar-container { 227 .bar-container {
220 - height: 2.7rem; 228 + height: 2.7rem;
221 } 229 }
222 230
223 .엘사-box { 231 .엘사-box {
224 - position: relative; 232 + position: relative;
225 - top: 0; 233 + top: 0;
226 - left: 0; 234 + left: 0;
227 - height: 2rem; 235 + height: 2rem;
228 - border-radius: 10px; 236 + border-radius: 10px;
229 - width: 100%; 237 + width: 100%;
230 - background-color: rgba(200, 158, 196, 0.3); 238 + background-color: rgba(200, 158, 196, 0.3);
231 } 239 }
232 .엘사-bar { 240 .엘사-bar {
233 - position: relative; 241 + position: relative;
234 - top: -2rem; 242 + top: -2rem;
235 - left: 0; 243 + left: 0;
236 - height: 2rem; 244 + height: 2rem;
237 - border-radius: 10px; 245 + border-radius: 10px;
238 - background-color: rgba(200, 158, 196, 1); 246 + background-color: rgba(200, 158, 196, 1);
239 } 247 }
240 .안나-box { 248 .안나-box {
241 - position: relative; 249 + position: relative;
242 - top: 0; 250 + top: 0;
243 - left: 0; 251 + left: 0;
244 - height: 2rem; 252 + height: 2rem;
245 - border-radius: 10px; 253 + border-radius: 10px;
246 - width: 100%; 254 + width: 100%;
247 - background-color: rgba(255, 201, 82, 0.3); 255 + background-color: rgba(255, 201, 82, 0.3);
248 } 256 }
249 .안나-bar { 257 .안나-bar {
250 - position: relative; 258 + position: relative;
251 - top: -2rem; 259 + top: -2rem;
252 - left: 0; 260 + left: 0;
253 - height: 2rem; 261 + height: 2rem;
254 - border-radius: 10px; 262 + border-radius: 10px;
255 - background-color: rgba(255, 201, 82, 1); 263 + background-color: rgba(255, 201, 82, 1);
256 } 264 }
257 .크리스토프-box { 265 .크리스토프-box {
258 - position: relative; 266 + position: relative;
259 - top: 0; 267 + top: 0;
260 - left: 0; 268 + left: 0;
261 - height: 2rem; 269 + height: 2rem;
262 - border-radius: 10px; 270 + border-radius: 10px;
263 - width: 100%; 271 + width: 100%;
264 - background-color: rgba(170, 205, 98, 0.3); 272 + background-color: rgba(170, 205, 98, 0.3);
265 } 273 }
266 .크리스토프-bar { 274 .크리스토프-bar {
267 - position: relative; 275 + position: relative;
268 - top: -2rem; 276 + top: -2rem;
269 - left: 0; 277 + left: 0;
270 - height: 2rem; 278 + height: 2rem;
271 - border-radius: 10px; 279 + border-radius: 10px;
272 - background-color: rgba(170, 205, 98, 1); 280 + background-color: rgba(170, 205, 98, 1);
273 } 281 }
274 .한스-box { 282 .한스-box {
275 - position: relative; 283 + position: relative;
276 - top: 0; 284 + top: 0;
277 - left: 0; 285 + left: 0;
278 - height: 2rem; 286 + height: 2rem;
279 - border-radius: 10px; 287 + border-radius: 10px;
280 - width: 100%; 288 + width: 100%;
281 - background-color: rgba(106, 175, 230, 0.3); 289 + background-color: rgba(106, 175, 230, 0.3);
282 } 290 }
283 .한스-bar { 291 .한스-bar {
284 - position: relative; 292 + position: relative;
285 - top: -2rem; 293 + top: -2rem;
286 - left: 0; 294 + left: 0;
287 - height: 2rem; 295 + height: 2rem;
288 - border-radius: 10px; 296 + border-radius: 10px;
289 - background-color: rgba(106, 175, 230, 1); 297 + background-color: rgba(106, 175, 230, 1);
290 } 298 }
291 .울라프-box { 299 .울라프-box {
292 - position: relative; 300 + position: relative;
293 - top: 0; 301 + top: 0;
294 - left: 0; 302 + left: 0;
295 - height: 2rem; 303 + height: 2rem;
296 - border-radius: 10px; 304 + border-radius: 10px;
297 - width: 100%; 305 + width: 100%;
298 - background-color: rgba(238, 119, 133, 0.3); 306 + background-color: rgba(238, 119, 133, 0.3);
299 } 307 }
300 .울라프-bar { 308 .울라프-bar {
301 - position: relative; 309 + position: relative;
302 - top: -2rem; 310 + top: -2rem;
303 - left: 0; 311 + left: 0;
304 - height: 2rem; 312 + height: 2rem;
305 - border-radius: 10px; 313 + border-radius: 10px;
306 - background-color: rgba(238, 119, 133, 1); 314 + background-color: rgba(238, 119, 133, 1);
307 } 315 }
308 .스벤-box { 316 .스벤-box {
309 - position: relative; 317 + position: relative;
310 - top: 0; 318 + top: 0;
311 - left: 0; 319 + left: 0;
312 - height: 2rem; 320 + height: 2rem;
313 - border-radius: 10px; 321 + border-radius: 10px;
314 - width: 100%; 322 + width: 100%;
315 - background-color: rgba(197, 198, 182, 0.3); 323 + background-color: rgba(197, 198, 182, 0.3);
316 } 324 }
317 .스벤-bar { 325 .스벤-bar {
318 - position: relative; 326 + position: relative;
319 - top: -2rem; 327 + top: -2rem;
320 - left: 0; 328 + left: 0;
321 - height: 2rem; 329 + height: 2rem;
322 - border-radius: 10px; 330 + border-radius: 10px;
323 - background-color: rgba(197, 198, 182, 0.3); 331 + background-color: rgba(197, 198, 182, 0.3);
324 } 332 }
325 .브루니-box { 333 .브루니-box {
326 - position: relative; 334 + position: relative;
327 - top: 0; 335 + top: 0;
328 - left: 0; 336 + left: 0;
329 - height: 2rem; 337 + height: 2rem;
330 - border-radius: 10px; 338 + border-radius: 10px;
331 - width: 100%; 339 + width: 100%;
332 - background-color: rgba(103, 213, 181, 0.3); 340 + background-color: rgba(103, 213, 181, 0.3);
333 } 341 }
334 .브루니-bar { 342 .브루니-bar {
335 - position: relative; 343 + position: relative;
336 - top: -2rem; 344 + top: -2rem;
337 - left: 0; 345 + left: 0;
338 - height: 2rem; 346 + height: 2rem;
339 - border-radius: 10px; 347 + border-radius: 10px;
340 - background-color: rgba(103, 213, 181, 1); 348 + background-color: rgba(103, 213, 181, 1);
349 +}
350 +.트롤-box {
351 + position: relative;
352 + top: 0;
353 + left: 0;
354 + height: 2rem;
355 + border-radius: 10px;
356 + width: 100%;
357 + background-color: rgba(116, 116, 116, 0.3);
358 +}
359 +.트롤-bar {
360 + position: relative;
361 + top: -2rem;
362 + left: 0;
363 + height: 2rem;
364 + border-radius: 10px;
365 + background-color: rgba(116, 116, 116, 1);
341 } 366 }
342 .percent-text { 367 .percent-text {
343 - font-size: 1rem; 368 + font-size: 1rem;
344 - color: #ffffff; 369 + color: #ffffff;
345 } 370 }
346 .frozen-label { 371 .frozen-label {
347 - width: 20%; 372 + width: 20%;
348 - text-align: left; 373 + text-align: left;
349 - height: 2rem; 374 + height: 2rem;
350 font-size: 1.2rem; 375 font-size: 1.2rem;
351 } 376 }
352 #label-container { 377 #label-container {
353 - width: 80%; 378 + width: 80%;
354 - margin: 0 auto; 379 + margin: 0 auto;
355 } 380 }
356 .result-message { 381 .result-message {
357 - font-size: 3rem; 382 + font-size: 3rem;
358 } 383 }
359 .frozen-explain { 384 .frozen-explain {
360 - font-size: 2rem; 385 + font-size: 2rem;
361 } 386 }
362 .엘사-frozen-title { 387 .엘사-frozen-title {
363 - color: #c89ec4; 388 + color: #c89ec4;
364 } 389 }
365 .안나-frozen-title { 390 .안나-frozen-title {
366 - color: #ffc952; 391 + color: #ffc952;
367 } 392 }
368 .크리스토프-frozen-title { 393 .크리스토프-frozen-title {
369 - color: #aacd62; 394 + color: #aacd62;
370 } 395 }
371 .한스-frozen-title { 396 .한스-frozen-title {
372 - color: #6aafe6; 397 + color: #6aafe6;
373 } 398 }
374 .울라프-frozen-title { 399 .울라프-frozen-title {
375 - color: #ee7785; 400 + color: #ee7785;
376 } 401 }
377 .스벤-frozen-title { 402 .스벤-frozen-title {
378 - color: #c5c6b6; 403 + color: #c5c6b6;
379 } 404 }
380 .브루니-frozen-title { 405 .브루니-frozen-title {
381 - color: #67d5b2; 406 + color: #67d5b2;
407 +}
408 +.트롤-frozen-title {
409 + color: #747474;
382 } 410 }
...\ No newline at end of file ...\ No newline at end of file
......