ObjectTracker
Computer-vision style object detection overlay — draws bounding boxes and labels around detected regions of the content below, with grid, quadtree and mosaic layouts.
Props
Prop
Details
detectionMode"alpha" | "bright" | "dark" | "red" | "green" | "blue"Default:
brightWhat counts as a detectable object.
detectionMode"alpha" | "bright" | "dark" | "red" | "green" | "blue"Default: brightWhat counts as a detectable object.
thresholdnumberDefault:
0.25Detection cut-off.
thresholdnumberDefault: 0.25Detection cut-off.
layout"grid" | "quadtree" | "mosaic"Default:
mosaicHow the canvas is partitioned into detection cells.
layout"grid" | "quadtree" | "mosaic"Default: mosaicHow the canvas is partitioned into detection cells.
cellSizenumberDefault:
400Base cell size in pixels
cellSizenumberDefault: 400Base cell size in pixels
maxDepthnumberDefault:
2Maximum subdivision levels for Quadtree/Mosaic layouts (each level can quarter a cell).
maxDepthnumberDefault: 2Maximum subdivision levels for Quadtree/Mosaic layouts (each level can quarter a cell).
boxStyle"full" | "corners"Default:
cornersBounding box outline style
boxStyle"full" | "corners"Default: cornersBounding box outline style
lineWidthnumberDefault:
1.5Thickness of the box outline in pixels.
lineWidthnumberDefault: 1.5Thickness of the box outline in pixels.
cornerRadiusnumberDefault:
0Corner radius of the box outline in pixels
cornerRadiusnumberDefault: 0Corner radius of the box outline in pixels
strokeColorstringDefault:
#ffffffBounding box outline colour.
strokeColorstringDefault: #ffffffBounding box outline colour.
fillColorstringDefault:
#5a79911aBounding box fill color.
fillColorstringDefault: #5a79911aBounding box fill color.
labelColorstringDefault:
#000000Label text color.
labelColorstringDefault: #000000Label text color.
labelBackgroundColorstringDefault:
#ffffffLabel pill background color.
labelBackgroundColorstringDefault: #ffffffLabel pill background color.
labelMode"none" | "dimensions" | "percentage"Default:
noneWhat each label shows.
labelMode"none" | "dimensions" | "percentage"Default: noneWhat each label shows.
labelPosition"bottom-left" | "bottom-right" | "top-left" | "top-right"Default:
bottom-rightWhich corner of the box the label anchors to.
labelPosition"bottom-left" | "bottom-right" | "top-left" | "top-right"Default: bottom-rightWhich corner of the box the label anchors to.
labelRadiusnumberDefault:
0Corner radius of the label pill in pixels.
labelRadiusnumberDefault: 0Corner radius of the label pill in pixels.
labelInsetbooleanDefault:
truePlace the label inside or outside the box.
labelInsetbooleanDefault: truePlace the label inside or outside the box.
fontFamilystringDefault:
InterGoogle Fonts family used for label text.
fontFamilystringDefault: InterGoogle Fonts family used for label text.
fontWeightnumberDefault:
500Font weight for label text.
fontWeightnumberDefault: 500Font weight for label text.
fontSizenumberDefault:
0.015Label text size as a fraction of canvas height.
fontSizenumberDefault: 0.015Label text size as a fraction of canvas height.
letterSpacingnumberDefault:
0Letter spacing for label text, in em units.
letterSpacingnumberDefault: 0Letter spacing for label text, in em units.