Graduate

Convert image BGR to RGB

......@@ -53,7 +53,6 @@ def index():
def register():
if request.method == 'GET':
return render_template('register.html')
attendance_db = pymysql.connect(read_default_file="./DB.cnf")
cursor = attendance_db.cursor(pymysql.cursors.DictCursor)
send = {'form':'json'}
......@@ -75,6 +74,7 @@ def register():
image = base64.b64decode(request.form['image'])
image_np = np.frombuffer(image, dtype=np.uint8)
image_np = cv2.imdecode(image_np, cv2.IMREAD_UNCHANGED)
image_np = cv2.cvtColor(image_np, cv2.COLOR_BGR2RGB)
image_np = prewhiten(image_np)
image_np = resize(image_np)
image_np = image_np.reshape(-1, image_size, image_size, 3)
......