MCPcopy Create free account
hub / github.com/AI-FanGe/OpenAIglasses_for_Navigation / getContourCenter

Method getContourCenter

static/visualizer.js:470–473  ·  view source on GitHub ↗
(points)

Source from the content-addressed store, hash-verified

468 }
469
470 getContourCenter(points) {
471 const sum = points.reduce((acc, p) => [acc[0] + p[0], acc[1] + p[1]], [0, 0]);
472 return [sum[0] / points.length, sum[1] / points.length];
473 }
474
475 drawTargetMarker(x, y) {
476 const ctx = this.ctx;

Callers 2

drawSegmentModeMethod · 0.95
drawFlashModeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected