Occupancy Zone
The occupancy zone generates a state which indicates whether the zone is occupied or free. The state changes based on the number of points contained in the zones cuboid.
Application
- Disabling volume zones
-
Depending on the state, the measurement of volume zones can be disabled. This is useful to exclude measurement outliers if equipment covers parts of the scene during loading or unloading operations.
- Basic presence detection
-
Detect changes in the point cloud without requiring the change to be detected as an object. This can be useful to detect the state of gates, doors or roller shutters.
Parameters
See configuration API definition.
Occupancy conditions
- Minimum number of points (default: 15)
-
The lower threshold of points. When the number of observed points is greater than or equal to the number of minimum points, the zone is considered occupied.
- Adaptive baseline time constant (default: 0, unit: \(s\))
-
The time constant for adjusting the adaptive baseline. When the value is set to \(0\) (default value), the adaptive baseline calculation is disabled.
- Voxel size (default: 0.05, unit: \(m\))
-
The voxel size used for downsampling the contained point cloud.
Output options
- Invert state
-
Invert the zone output state.
- Generate events (default: false)
-
Emit an event when the zone becomes occupied and another one when it becomes free again. The events are listed in the event history and, in the security vertical, can be replayed. They do not affect the device-wide alarm state, which makes an occupancy alarm distinguishable from the intrusion alarm of a security zone. They follow the zone output state, i.e. an inverted zone emits the occupied event when its point count drops below the minimum. The occupied event carries the points the zone counted on the frame which raised it, so the event can be reviewed against what caused it. A device which stops without observing the end of an event, for example because it lost power, reports that end on its next start and marks it as not observed; the duration is then an upper bound.
Algorithm
The algorithm uses its enclosed portion of the filtered point cloud as input data. It operates in three stages:
Voxel downsampling
Based on the parameter for the zone’s voxel size, the contained point cloud is down-sampled using a uniform voxel grid. Each occupied voxel then contains exactly one point by averaging all contained points.
Count points
The number of points remaining inside the zone after the voxel down-sampling is counted. Before comparing it against the minimum number of points, the current adaptive baseline value is subtracted. The zone is considered occupied if the remaining number of points exceeds the configured threshold.
Update state
Set the output state to the result from the previous stages. If the invert state option is enabled in the configuration, the calculated result for the Occupied flag will be inverted.
If applicable, the current baseline value will be updated. The update step uses an exponential filter with the configured adaptive baseline time constant.
Output
See full API definition.
State
- Occupied
-
Boolean flag indicating the occupied state.
- Number of detected points
-
Number of points counted inside the zone.
- Baseline
-
Current value of the adaptive baseline. The value will always be zero if the adaptive baseline calculation is not enabled.
Event
The generated event which reports that the zone became occupied carries, besides the zone UUID and a snapshot of the state:
- Point cloud
-
The points the zone counted on the frame which raised the event, down-sampled with the zone’s voxel size. A zone which inverts its state is raised when its point count drops below the minimum, so its cloud is close to empty by construction.