Merge branch 'master' of http://khuhub.khu.ac.kr/2020-1-capstone-design1/KHY_Project1
Showing
1 changed file
with
6 additions
and
5 deletions
... | @@ -113,7 +113,7 @@ class Client(tk.Frame): | ... | @@ -113,7 +113,7 @@ class Client(tk.Frame): |
113 | if (x2-x1) * (y2-y1) < 15000: | 113 | if (x2-x1) * (y2-y1) < 15000: |
114 | # 얼굴 해상도가 너무 낮으면 무시 | 114 | # 얼굴 해상도가 너무 낮으면 무시 |
115 | continue | 115 | continue |
116 | - image = frame | 116 | + image = frame[int(y1):int(y2), int(x1):int(x2)] |
117 | image_list.append(image) | 117 | image_list.append(image) |
118 | # MTCNN 데이터 저장 | 118 | # MTCNN 데이터 저장 |
119 | face_list.append(face.numpy()) | 119 | face_list.append(face.numpy()) |
... | @@ -168,10 +168,11 @@ class Client(tk.Frame): | ... | @@ -168,10 +168,11 @@ class Client(tk.Frame): |
168 | self.logging('출석확인: ' + data['student_id']) | 168 | self.logging('출석확인: ' + data['student_id']) |
169 | asyncio.ensure_future(self.set_rectangle()) | 169 | asyncio.ensure_future(self.set_rectangle()) |
170 | else: | 170 | else: |
171 | - if data['status'] == 'fail': | 171 | + # 이미지 DB에 저장, 일단 보류 |
172 | - send = json.dumps({'action': 'save_image', 'image': image.tolist()}) | 172 | + #if data['status'] == 'fail': |
173 | - await websocket.send(send) | 173 | + # send = json.dumps({'action': 'save_image', 'image': image.tolist()}) |
174 | - elif data['status'] == 'already': | 174 | + # await websocket.send(send) |
175 | + if data['status'] == 'already': | ||
175 | asyncio.ensure_future(self.set_rectangle()) | 176 | asyncio.ensure_future(self.set_rectangle()) |
176 | except Exception as e: | 177 | except Exception as e: |
177 | self.logging(e) | 178 | self.logging(e) | ... | ... |
-
Please register or login to post a comment