이재빈

전처리 과정 수정

......@@ -69,16 +69,16 @@ def send_threaded(Client_socket, addr, queue):
print("Disconnected")
Client_socket.close()
def webcam(queue):
def preprocessing(queue):
capture = cv2.VideoCapture(0)
while True:
ret, frame = capture.read()
if ret == False:
continue
frame = bboxes(frame)
cropped = bboxes(frame) # return Preprocessed Img
encode_param = [int(cv2.IMWRITE_JPEG_QUALITY), 90]
result, imgencode = cv2.imencode('.jpg', frame, encode_param)
result, imgencode = cv2.imencode('.jpg', cropped, encode_param)
data = np.array(imgencode)
stringData = data.tostring()
queue.put(stringData)
......@@ -115,7 +115,7 @@ if __name__ == '__main__':
print('server start')
start_new_thread(webcam, (enclose_q,))
start_new_thread(preprocessing, (enclose_q,))
while True:
print('wait')
......