discopat.display
Functions
|
Make a PIL image from a frame. |
|
Get the trajectory of the center of the boxes corresponding to one track. |
|
|
|
|
|
|
|
|
|
|
|
Convert array to int [0, 255]. |
- discopat.display.frame_to_pil(frame, tracks, max_track_length=0, persistence=10, cmap='gray', track_color='red')[source]
Make a PIL image from a frame.
- Parameters:
frame (Frame)
tracks (np.array)
max_track_length (int)
persistence (int)
cmap (str)
track_color (str)
- Return type:
Image
- discopat.display.get_center_path(track)[source]
Get the trajectory of the center of the boxes corresponding to one track.
- Parameters:
track (array) – Array of shape (num_frames, 5) where each line corresponds to a box: - track[:, 0] = id of the frame, - track[:, 1] = xmin, - track[:, 2] = ymin, - track[:, 3] = xmax, - track[:, 4] = ymax.
- Returns:
Array of shape (num_frame, 2), where each line corresponds to the (x, y) coordinates of the center of the box.
- Return type:
array
- discopat.display.make_movie(movie, persistence, cmap, track_color, fps, output_format)[source]
- Parameters:
movie (Movie)
persistence (int)
cmap (str)
track_color (str)
fps (int)
output_format (str)
- discopat.display.plot_annotation(ax, annotation, color)[source]
- Parameters:
ax (Axes)
annotation (Annotation)
color (str)
- discopat.display.plot_frame(frame, cmap='gray', annotation_color='tab:red', show_figure=True, return_figure=False, figure_size=None, figure_dpi=None)[source]
- Parameters:
frame (Frame)
cmap (str)
annotation_color (str)
show_figure (bool)
return_figure (bool)
figure_size (tuple[float, float] or None)
figure_dpi (int or None)