New Web-UI. Looks like old (ha-ha), but developed with Svelte. Now it has separate repository.
I did save old vanilla JS code just for history in src/lib/rest_api/static_old folder.
The way speed is estimated has been changed. Now calculations are not based on Haversine formula only but pixels per meter parameter for each convex polygon is considered to be used.
For transformation X,Y (pixels) -> Lon,Lat (WGS84, EPSG4326) there is intermediate transformation into (and from) EPSG3857. It is used to get more realistic distances
Skeleton term introduced. It is straight line between centers of two sides (currently those are predefined as FIRST and THIRD side of convex polygon. Need to be careful when building configuration). This line is used to calculate pixels per meter. Let user to change sides and skeleton parameters directly in further? Don't know: for me it is just easier to redraw polygon to get needed skeleton. Will see how it goes and then make decision if we need API to change sides for specifying skeleton line.
Every point inside polygon are going to be projected on its skeleton line. That is how speed is measured (since we know pixels per meter we can calculate speed in m/s or km/h).
Refactored Redis and Data analytics workers since the way they worked was really bad - they've used to use absolute timestamps of an operation system instead of relative timestamps to frames => that caused errors such like this use case: static video about ~3 minutes is processed for 9 minutes (e.g., due weak hardware) and then software says: "there were N vehicles per 9 minutes" - which is an error obviously
Objects are tracked by lower bound of the detection box. It is done due the empirical analysis on some angle views - most of time lower bound of the detection box is closer to the ground - we assume it should estimate speed more correctly due the distance estimations
Added REST API to monitor current occupancy status for the zone
src/lib/rest_api/static_old
folder.pixels per meter
parameter for each convex polygon is considered to be used.Skeleton
term introduced. It is straight line between centers of two sides (currently those are predefined as FIRST and THIRD side of convex polygon. Need to be careful when building configuration). This line is used to calculatepixels per meter
. Let user to change sides and skeleton parameters directly in further? Don't know: for me it is just easier to redraw polygon to get neededskeleton
. Will see how it goes and then make decision if we need API to change sides for specifyingskeleton
line.pixels per meter
we can calculate speed in m/s or km/h).