Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section


Column
width35%


Panel
borderColor#CCCCCC
bgColor#FFFFFF
titleBGColor#F0F0F0
borderStylesolid
titleOn page:
Table of Contents



Column

...



영역 내 객체 (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.는 필수 파라미터입니다. 객체가 있을 영역을 다각형 꼭짓점 목록으로 설정합니다. 좌표는 프레임의 너비/높이 비율로 설정되며(값은 0에서 1 사이), 특정 카메라 해상도에 구애받지 않도록 할 수 있습니다.

가장 간단한 요청은 다음과 같습니다The 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 view여기서 영역은 카메라 시야 중앙의 직사각형을 설명합니다.

queryProperties/action is an optional parameter of the request:은 요청의 선택적 파라미터입니다:

  • 이 파라미터가 설정되지 않으면 영역 내의 객체를 검색합니다If this parameter is not set, then objects in the zone are searched.
  • queryProperties/action="enter"objects entering the zone are searched.영역에 들어오는 객체를 검색합니다
  • queryProperties/action="exit"objects exiting the zone are searched.영역에서 나가는 객체를 검색합니다.

영역에 들어오는 객체를 검색하는 요청 예시는 다음과 같습니다.Here 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"
    }
}

...

객체가 한 영역에서 다른 영역으로 이동 (queryType="transition")

There is one required parameter − figures. It has to contain two zones describing start and end zones.

There are no optional parameters.

필수 파라미터는 figures 입니다. 이 파라미터는 시작 영역과 끝 영역을 설명하는 두 개의 영역을 포함해야 합니다.

선택적 파라미터는 없습니다.

프레임의 왼쪽 부분에서 오른쪽 부분으로 이동한 객체를 검색하는 요청은 다음과 같습니다.Search 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]
            ]
        }
    ]
}

...

라인 크로싱 (queryType="line")

Required parameter figures defines a segment crossing of which triggers the condition. The segment is to be set by two points필수 파라미터 figures는 조건을 트리거하는 선분을 정의합니다. 이 선분은 두 점으로 설정되어야 합니다.

Code Block
 {
    "queryType": "line",
    "figures": [
        {
            "shape": [
                [0.5, 0.8],
                [0.5, 0.2]
            ]
        }
    ]
}

Optional parameter 선택적 파라미터 queryProperties/direction sets direction of line crossing.은 선 교차의 방향을 설정합니다.

  • 이 파라미터가 설정되지 않으면, 선을 어느 방향으로 교차하는 객체든 결과에 포함됩니다If 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 segment는 객체가 선분의 오른쪽 끝에서 왼쪽으로 선을 교차해야 함을 의미합니다.
  • 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 segment는 객체가 선분의 오른쪽 끝에서 왼쪽으로 선을 교차해야 함을 의미합니다.
Code Block
 {
    "queryType": "line",
    "figures": [
        {
            "shape": [
                [0.5, 0.8],
                [0.5, 0.2]
            ]
        }
    ],
    "queryProperties": {
        "direction": "left"
    }
}

...