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

Method constructor

static/vision.js:3–22  ·  view source on GitHub ↗
(canvasId)

Source from the content-addressed store, hash-verified

1// 科技感视觉识别系统
2class VisionSystem {
3 constructor(canvasId) {
4 this.canvas = document.getElementById(canvasId);
5 this.ctx = this.canvas.getContext('2d');
6 this.overlay = document.createElement('div');
7 this.overlay.className = 'vision-overlay';
8 this.canvas.parentElement.appendChild(this.overlay);
9
10 // 状态
11 this.mode = 'SEGMENT';
12 this.fps = 0;
13 this.detectedObjects = [];
14 this.handData = null;
15 this.trackingData = null;
16
17 // 初始化UI元素
18 this.initUI();
19
20 // 连接WebSocket
21 this.connectVisionWS();
22 }
23
24 initUI() {
25 // 状态指示器

Callers

nothing calls this directly

Calls 2

initUIMethod · 0.95
connectVisionWSMethod · 0.95

Tested by

no test coverage detected