mdx.mtmc.stream.state.people_height module

class StateManager(config: AppConfig)

Bases: object

Module to estimate people’s height

Parameters:

config (AppConfig) – configuration for the app

people_height_state = StateManager(config)
estimate_people_height(frames: List[Frame]) None

Estimates people’s height from frames

Parameters:

frames (List[Frame]) – list of frames

Returns:

None

people_height_state.estimate_people_height(frames)
rectify_bbox(foot_pixel: List[float], bbox: Bbox, sensor_id: str) Tuple[List[float], float]

Computes expected foot location

Parameters:
  • foot_pixel (List[float]) – foot pixel location

  • bbox (Bbox) – bounding box

  • sensor_id (str) – sensor ID

Returns:

people’s height

Return type:

float

foot_pixel, visibility = people_height_state.rectify_bbox(foot_pixel, bbox, sensor_id)
set_sensor_state_objects(sensor_state_objects: Dict[str, SensorStateObject]) None

Sets sensor state objects

Parameters:

sensor_state_objects (Dict[str,SensorStateObject]) – map from sensor IDs to sensor state objects

Returns:

None

people_height_state.set_sensor_state_objects(sensor_state_objects)
update_people_height(behaviors: List[Behavior]) None

Updates people’s height

Parameters:

behaviors (List[Behavior]) – list of behaviors

Returns:

None

people_height_state.update_people_height(behaviors)