pycharmers.opencv.tracking module¶
-
class
pycharmers.opencv.tracking.
BBoxLogger
(coord_type='xywh', input_path=None, dirname=None, **metadata)[source]¶ Bases:
object
Store Bounding Boxes logs.
- Parameters
input_path (str) – Path to input image directory or video.
coord_type (str) – Coordinate types.
Examples
>>> from pycharmers.utils import pycat >>> from pycharmers.opencv import BBoxLogger >>> bbox_logger = BBoxLogger() >>> bbox_logger.add_bboxes(no=1, bboxes=[(120,120,40,40)]) >>> out_path = bbox_logger.save() tracking info was saved at /Users/iwasakishuto/.pycharmers/opencv/json/2020-09-25@01.05.18.json >>> pycat(out_path) { "coord_type": "xywh", "BBoxes": { "1": [ [ 120, 120, 40, 40 ] ] } }