diplomat.utils.extract_frames.pretty_frame_string¶
- diplomat.utils.extract_frames.pretty_frame_string(data: ~diplomat.processing.track_data.TrackingData, frame_idx: int = 0, body_part: int = 0, width_limit: int = 0, size_up: bool = False, interpol: int = 2, format_type: ~typing.Tuple[str, int, tuple] = ('\u2007░▒▓█', 2, ('╔', '╗', '╝', '╚', '═', '║', '═', '║', <function BorderStyle.<lambda>>))) str[source]¶
Return a DIPLOMAT Probability Frame in a pretty string for printing to the terminal.
- Parameters:
data – The probability frame, a TrackingData object.
frame_idx – Frame index to print, defaults to 0.
body_part – Body part index to print, defaults to 0.
width_limit – Determines the max with the string can be when printing. Defaults to 0, meaning there is no width limit.
size_up – Determines if the frame should not only be downsized, but also upsized if the width provided gives extra room…
interpol – The interpolation method if a size is specified. Defaults to cv2.INTER_CUBIC, but any cv2 interpolation value works.
format_type – The format or ‘font’ to use for the pretty printed string. A length 3 tuple, containing a sequence of characters being the displayed characters at given magnitudes, an integer being the number of times to repeat the characters when displaying them. (‘abcd’, 2 with 0 becomes aa), and an optional tuple of 8 strings representing characters for drawing a border (If None, no border is drawn, tuple order is top-left, top right, bottom-right, bottom-left, top, right, bottom, left).
- Returns:
A pretty string of the frame, that can be printed to the console.