lib.sedna.algorithms.reid.close_contact_estimation

Module Contents

Classes

ContactTracker

The ContactTracker object is invoked in frames where the

class lib.sedna.algorithms.reid.close_contact_estimation.ContactTracker(draw_top_view=False)[source]

Bases: object

The ContactTracker object is invoked in frames where the target person was identified.

prep_homography(img_shape, bbox_target, h_ratio: float = 0.5, v_ratio: float = 0.5)[source]
compute_homography(img_shape: List[int]) None[source]

Calculate homography @param img_shape: List [h,w]

in_risk_zone(img: numpy.ndarray, bbox_candidate: List[int] = None) bool[source]
create_ellipse(bbox_list: List[List[int]] = None) Tuple[List, List][source]

Create ellipses for each of the generated bounding boxes. @param bbox_list:

check_bbox_overlap(ellipse1: Tuple, ellipse2: Tuple) bool[source]

Check if ellipse bounding rectangles overlap or not. :param ellipse1: ellipse one :type ellipse1: tuple :param ellipse2: ellipse two :type ellipse2: tuple

Return type:

boolean

to_rectangle(ellipse: Tuple) Tuple[source]

Convert ellipse to rectangle (top, left, bottom, right) :param ellipse: bounding rectangle descriptor :type ellipse: tuple

get_homography_matrix()[source]