Skip to content

Example Additions

Winfried Holzapfel edited this page Oct 27, 2019 · 1 revision

While we considered a number of use cases and settled on a series of core features, it was not possible to implement all dreams in the final system. Below we have included some documentation on features we designed the system with particular mind to, but did not eventually add to it.

Line Tracking

Because each of the devices keeps track of unique trackers of people over time, it is possible to use the device to detect when trackers of individual people pass over a line in the frame. The implementation for this would be similar to that of the Box tracker, and quite quick in realization. An extra database table would be needed;

CREATE TABLE COUNT_LINES AS (
  uuid  BLOB(16)  PRIMARY KEY,
  name  VARCHAR(50)  NOT NULL,
  x_1  REAL  NOT NULL,
  y_1  REAL  NOT NULL,
  x_2  REAL  NOT NULL,
  y_2  REAL  NOT NULL,
);

The general algorithm for deterministic counts over a tracking line would be;

make an array a
for all records needing to be sampled:
   get the previous frame marker position as p
   calculate delta movement of this marker from the previous position p
   determine if a line intersection occurred using a line-line algorithm, and report this for all records
      compare normal of detection line to p to determine direction of travel as d
      store p in a

return a (intersections) and d (direction of crossing)

From this we can determine the direction of crossing and whether crossings of the line have taken place during the detection phase, at any time or period. This can be developed at a later date and applied to existing data.

Automatic Updating

The facilities for automatic updating already mostly exist on the device. Every device has a link to the git repository. A simple Unix crontab job could periodically check the github for tagged releases and pull them, running the already integrated install_raspi.sh install script to re-install the software on the device. In addition, handshakes with the server could include both compatibility information and current version information to indicate to devices when they are out of date.

Clone this wiki locally