Object Tracker
MITComputer-vision style object detection overlay — draws bounding boxes and labels around detected regions of the content below, with grid, quadtree and mosaic layouts.
Cargando shader…
Ajústalo
0.25
400
2
1.5
0
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-object-tracker.json
Crea components/bastard/ShaderObjectTracker.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderObjectTracker from '@/components/bastard/ShaderObjectTracker';23export default function Demo() {4 return (5 <ShaderObjectTracker6 detectionMode="bright"7 threshold={0.25}8 layout="mosaic"9 cellSize={400}10 maxDepth={2}11 boxStyle="corners"12 lineWidth={1.5}13 cornerRadius={0}14 strokeColor="#ffffff"15 labelColor="#000000"16 />17 );18}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| detectionMode | 'alpha' | 'bright' | 'dark' | 'red' | 'green' | 'blue' | "bright" | Detect |
| threshold | number | 0.25 | Threshold |
| layout | 'grid' | 'quadtree' | 'mosaic' | "mosaic" | Layout |
| cellSize | number | 400 | Base Cell Size |
| maxDepth | number | 2 | Subdivision |
| boxStyle | 'full' | 'corners' | "corners" | Box Style |
| lineWidth | number | 1.5 | Line Width |
| cornerRadius | number | 0 | Corner Radius |
| strokeColor | string | "#ffffff" | Stroke |
| labelColor | string | "#000000" | Label |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Object Tracker · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.