53 lines
1.8 KiB
HTML
53 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>冷藏展示柜区域标定</title>
|
|
<link rel="stylesheet" href="/style.css">
|
|
</head>
|
|
<body>
|
|
<main class="app">
|
|
<header class="topbar">
|
|
<div>
|
|
<h1>冷藏展示柜区域标定</h1>
|
|
<p>从 RTSP 拉取一帧截图,在图上标定 8 个格口和垃圾桶区域。</p>
|
|
</div>
|
|
<button id="copyToml" type="button">复制 TOML</button>
|
|
</header>
|
|
|
|
<section class="capture">
|
|
<label>
|
|
RTSP 地址
|
|
<input id="rtspUrl" type="text" placeholder="rtsp://user:password@camera-ip:554/stream">
|
|
</label>
|
|
<button id="captureFrame" type="button">抓取一帧</button>
|
|
<span id="status"></span>
|
|
</section>
|
|
|
|
<section class="workspace">
|
|
<aside class="panel">
|
|
<h2>区域</h2>
|
|
<div id="zoneList" class="zone-list"></div>
|
|
<div class="actions">
|
|
<button id="undoPoint" type="button">撤销点</button>
|
|
<button id="clearZone" type="button">清空当前</button>
|
|
<button id="clearAll" type="button">清空全部</button>
|
|
</div>
|
|
<p class="hint">选择区域后,在截图上按顺时针或逆时针点击顶点。每个区域建议 4 个点,透视明显时可以多点。</p>
|
|
</aside>
|
|
|
|
<section class="canvas-wrap">
|
|
<canvas id="canvas" width="1280" height="720"></canvas>
|
|
</section>
|
|
|
|
<aside class="panel output-panel">
|
|
<h2>导出配置</h2>
|
|
<textarea id="tomlOutput" spellcheck="false"></textarea>
|
|
</aside>
|
|
</section>
|
|
</main>
|
|
<script src="/app.js"></script>
|
|
</body>
|
|
</html>
|