Go to documentation repository
Page History
...
Section | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Obiekty w strefie (queryType="zone"
)
figures/shape is a required parameter. It sets the zone the object to be within as the list of polygon apexes. Coordinates are set in fractions of frame width/height (values from 0 to 1). It allows not to be tied to specific camera resolution. to parametr wymagany. Określa strefę, w której obiekty mają się znajdować jako lista wierzchołków poligonowych. Koordynaty są ustalane jako ułamki wysokości/szerokości klatki (od 0 do 1). Nie pozwala na powiązanie z rozdzielczością określonej kamery.
Najprostsze zapytanie wygląda następującoThe simplest request looks like this:
Code Block |
---|
{ "queryType": "zone", "figures": [ { "shape": [ [0.3, 0.3], [0.7, 0.3], [0.7, 0.7], [0.3, 0.7] ] } ] } |
Here the zone describes the rectangular in the centre of camera field of viewStrefa opisuje prostokąt w centrum pola widzenia kamery.
queryProperties/action is an optional parameter of the request: to opcjonalny parametr dla zapytania:
- Jeśli parametr nie został ustalony, obiekty w strefie są wyszukiwaneIf this parameter is not set, then objects in the zone are searched.
queryProperties/action="enter"
- objects entering the zone are searchedobiekty wchodzące do strefy są wyszukiwane.queryProperties/action="exit"
- objects exiting the zone are searched.obiekty opuszczające strefę są wyszukiwane.
Przykład zapytania o obiekty wchodzące do strefyHere is an example of request for objects entering the zone:
Code Block |
---|
{ "queryType": "zone", "figures": [ { "shape": [ [0.3, 0.3], [0.7, 0.3], [0.7, 0.7], [0.3, 0.7] ] } ], "queryProperties": { "action": "enter" } } |
...
Ruch obiektów ze strefy do strefy(queryType="transition"
)
There is one required parameter — figures. It has to contain two zones describing start and end zones.
There are no optional parameters.
Istnieje jeden wymagany parametr dla tego typu wyszukiwania — figures. Musi on wyznaczać dwie strefy oznaczające strefę startową oraz strefę końcową.
Nie ma dodatkowych parametrów.
Wyszukiwanie obiektów, które przechodzą z lewej strony ramki do prawej strony ramkiSearch for objects that moved from the left part of the frame to the right one:
Code Block |
---|
{ "queryType": "transition", "figures": [ { "shape": [ [0, 0], [0.45, 0], [0.45, 1], [0, 1] ] }, { "shape": [ [0.55, 0], [1, 0], [1, 1], [0.55, 1] ] } ] } |
...
Przekraczanie linii (queryType="line"
)
Required parameter figures defines a segment crossing of which triggers the condition. The segment is to be set by two pointsWymagany parametr figures określa przekroczenie segmentu wyzwalającego warunek. Segment ten jest wyznaczany za pomocą dwóch linii.
Code Block |
---|
{ "queryType": "line", "figures": [ { "shape": [ [0.5, 0.8], [0.5, 0.2] ] } ] } |
Optional parameter Opcjonalny parametr queryProperties/direction sets direction of line crossing. umożliwia na określenie kierunku przekroczenia linii.
- Jeśli parametr ten nie jest skonfigurowany, obiekty przekraczające linię w dowolnym kierunku są wyszukiwaneIf this parameter is not set, then objects crossing the line in any direction will be in results.
- queryProperties/direction="left" means that the object is to cross the line from the right to the left if look from the right point of the segmentoznacza wyszukiwanie obiektów przekraczających linię z prawej do lewej z perspektywy prawego punktu segmentu.
- queryProperties/direction="right" means that the object is to cross the line from the left to the right if look from the right point of the segmentoznacza wyszukiwanie obiektów przekraczających linię z lewej do prawej z perspektywy prawego punktu segmentu.
.
Code Block |
---|
{ "queryType": "line", "figures": [ { "shape": [ [0.5, 0.8], [0.5, 0.2] ] } ], "queryProperties": { "direction": "left" } } |
...