diff --git a/securityModule/Face/__pycache__/sercurity_module.cpython-37.pyc b/securityModule/Face/__pycache__/sercurity_module.cpython-37.pyc index 497437b..6cb59aa 100644 Binary files a/securityModule/Face/__pycache__/sercurity_module.cpython-37.pyc and b/securityModule/Face/__pycache__/sercurity_module.cpython-37.pyc differ diff --git a/securityModule/Face/webstreaming.py b/securityModule/Face/webstreaming.py index bcd5020..984cf78 100644 --- a/securityModule/Face/webstreaming.py +++ b/securityModule/Face/webstreaming.py @@ -23,6 +23,9 @@ default_app = firebase_admin.initialize_app(cred) +#Global variable +GScreen = False + db = firestore.client() # hardcoded @@ -143,7 +146,7 @@ def detect_motion(frameCount, datasets_path, vs): frames.append(cv2.resize(frame, (400, 400))) new_frame = np.concatenate((frames[0], frames[1]), axis=1) - if total % 350 == 0: + if total % 280 == 0: tlables, v_scores = sr.detect_labels(new_frame) dangers, danger_scores = sr.analyzer(tlables, v_scores) @@ -262,6 +265,14 @@ def update_SMStwilio(): return jsonify("Success") +@app.route("/_get_Screen", methods=['POST']) +def get_Screen(): + clicked=request.form['data'] + # update the global variable + GScreen = clicked + + return jsonify("Success") + # check to see if this is the main thread of execution if __name__ == '__main__':