Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for draw_boxes and draw_tracked_boxes #101

Merged
merged 2 commits into from
Apr 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,39 @@ Function that draws a list of detections on a frame.
- `draw_labels (optional)`: If `True` the detection's label will be drawn along with the detected points.
- `label_size (optional)`: Size of the label being drawn along with the detected points.

## draw_boxes

Function that draws a list of detections as boxes on a frame. This function uses the first 2 points of your [`Detection`](#detection) instances to draw a box with those points as its corners.

##### Arguments:

- `frame`: The OpenCV frame to draw on.
- `detections`: List of [`Detection`](#detection)s to be drawn.
- `line_color (optional)`: [`Color`](#color) of the boxes representing the detections.
- `line_width (optional)`: Width of the lines consituting the sides of the boxes representing the detections.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo consituting -> constituting

- `random_color (optional)`: If `True` each detection will be colored with a random color.
- `color_by_label (optional)`: If `True` detections will be colored by label.
- `draw_labels (optional)`: If `True` the detection's label will be drawn along with the detected boxes.
- `label_size (optional)`: Size of the label being drawn along with the detected boxes.

## draw_tracked_boxes

Function that draws a list of tracked objects on a frame. This function uses the first 2 points of your [`TrackedObject`](#trackedobject) instances to draw a box with those points as its corners.

##### Arguments:

- `frame`: The OpenCV frame to draw on.
- `objects`: List of [`TrackedObject`](#trackedobject)s to be drawn.
- `border_colors (optional)`: [`Color`](#color) of the boxes representing the tracked objects.
- `border_width (optional)`: Width of the lines consituting the sides of the boxes representing the tracked objects.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again

- `id_size (optional)`: Size of the id number being drawn on each tracked object. The id wont get drawn if `id_size` is set to 0.
- `id_thickness (optional)`: Thickness of the id number being drawn on each tracked object.
- `draw_box (optional)`: Boolean determining if the function should draw the boxes estimated by the tracked objects. If set to `True` the boxes get drawn, if set to `False` only the id numbers get drawn. Defaults to `True`.
- `color_by_label (optional)`: If `True` objects will be colored by label.
- `draw_labels (optional)`: If `True` the objects's label will be drawn along with the tracked boxes.
- `label_size (optional)`: Size of the label being drawn along with the tracked boxes.
- `label_width (optional)`: Thickness of the label being drawn along with the tracked boxes.

## Paths

Class that draws the paths taken by a set of points of interest defined from the coordinates of each tracker estimation.
Expand Down