From 24b06d81481ce0451c4b9ed2205ea452e8363b6a Mon Sep 17 00:00:00 2001 From: Louis Dewilde <louis.dewilde@student-cs.fr> Date: Wed, 5 Oct 2022 14:50:22 +0200 Subject: [PATCH] Add `cameras.py` to pass pipeline, which is a copy of `cameras.py.template`. --- backend/cameras.py | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 backend/cameras.py diff --git a/backend/cameras.py b/backend/cameras.py new file mode 100644 index 0000000..001fe76 --- /dev/null +++ b/backend/cameras.py @@ -0,0 +1,52 @@ +restaurants = [ + { + "restaurant": "local", + # the linear function estimating the waiting time t based on the number of people n and the number c of open checkouts is: + # t = a * n / c + b + "a_factor": 30, # slope + "b_factor": 120, # y-intercept + # list of all the cameras that correspond to a same restaurant + "cameras": + [ + { + # the RTSP url will be: rtsp://user:password@IP:stream + "IP": "", + "user": "", + "password": "", + "stream": "stream1", + # list of the coordinates of the points which constitue the region that should be masked on the picture + "mask_points": + [ + # polygon which should be part of the mask + [ + # [x, y] coordinates of each vertex of the polygon (on a 1280*720 picture) + [70, 370], + [420, 720], + [1280, 720], + [1280, 250], + [930, 215], + [450, 550], + [130, 350] + ] + ], + # list of the coordinates of each checkout + "checkouts": + [ + # each checkout corresponds to a rectangle, indicated by two x and two y coordinates + { + "x1": 380, + "x2": 435, + "y1": 740, + "y2": 780 + }, + { + "x1": 300, + "x2": 350, + "y1": 830, + "y2": 880 + } + ] + } + ] + } +] -- GitLab