-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.html
149 lines (145 loc) · 8.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="https://assets.website-files.com/5f6bc60e665f54545a1e52a5/610d3e1407cf0329b8b8ade4_favicon-32x32.png" rel="shortcut icon" type="image/x-icon">
<link rel="stylesheet" href="styles.css">
<title>PolygonZone by Roboflow</title>
<meta name="title" content="PolygonZone by Roboflow">
<meta name="description" content="Draw polygons on an image and retrieve the coordinates for use in your computer vision projects.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://roboflow.com/polygonzone">
<meta property="og:title" content="PolygonZone by Roboflow">
<meta property="og:description" content="Draw polygons on an image and retrieve the coordinates for use in your computer vision projects.">
<meta property="og:image" content="https://camo.githubusercontent.com/ee21eb5f43b191dbfd154dfbc26f9ce731f43dc66749ca6cde23557f48136a1a/68747470733a2f2f6d656469612e726f626f666c6f772e636f6d2f6f70656e2d736f757263652f7375706572766973696f6e2f726f626f666c6f772d7375706572766973696f6e2d62616e6e65722e706e673f696b2d73646b2d76657273696f6e3d6a6176617363726970742d312e342e33267570646174656441743d31363734303632383931303838">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://roboflow.com/polygonzone">
<meta property="twitter:title" content="PolygonZone by Roboflow">
<meta property="twitter:description" content="Draw polygons on an image and retrieve the coordinates for use in your computer vision projects.">
<meta property="twitter:image" content="https://camo.githubusercontent.com/ee21eb5f43b191dbfd154dfbc26f9ce731f43dc66749ca6cde23557f48136a1a/68747470733a2f2f6d656469612e726f626f666c6f772e636f6d2f6f70656e2d736f757263652f7375706572766973696f6e2f726f626f666c6f772d7375706572766973696f6e2d62616e6e65722e706e673f696b2d73646b2d76657273696f6e3d6a6176617363726970742d312e342e33267570646174656441743d31363734303632383931303838">
<!-- Fontawesome -->
<script src="https://kit.fontawesome.com/1e5ca35699.js" crossorigin="anonymous"></script>
</head>
<body>
<main>
<nav>
<ul>
<li><img src="https://cdn.prod.website-files.com/5f6bc60e665f54545a1e52a5/669974bcd33beb1adf952037_logo-roboflow-purple.svg" /></li>
</ul>
<ul>
<li><a href="https://github.com/roboflow/polygonzone" target="_blank">View Source Code</a></li>
</ul>
</nav>
<div class="content">
<div class="left">
<div class="how-to section">
<h1>PolygonZone</h1>
<p>PolygonZone lets you calculate polygon points in an image.</p>
<h2>How to use</h2>
<ol class="ta-left">
<li>Drop an image to the indicated area</li>
<li>Select the desired mode: Press <kbd>L</kbd> to draw a line, or <kbd>P</kbd> to draw a polygon</li>
<li>Click to draw polygon points. Press enter to finish the polygon.</li>
</ol>
<h2>Coordinates</h2>
<p>Copy the points below, formatted as NumPy arrays, into your Python code.</p>
<a href="" id="copyPythonButton" class="widgetButton left">Copy Python to Clipboard</a>
<label for="normalize-checkbox">Show Normalized Points from 0-1</label>
<input type="checkbox" id="normalize-checkbox" name="normalize-checkbox" value="normalize-checkbox">
<pre id="python">
<code>
</code>
</pre>
<details>
<summary>View JSON Points</summary>
<h2>JSON Points</h2>
<a href="" id="copyJSONButton" class="widgetButton">Copy JSON to Clipboard</a>
<pre id="json">
<code>
</code>
</pre>
</details>
</div>
</div>
<div class="right">
<div class="taskbar-container">
<div class="tc-container">
<div class="taskbar">
<div class="t-icon t-mode" id="mode-polygon">
<i class="fa-solid fa-draw-polygon"></i>
<span class="ti-caption">
<span>Polygon Mode</span>
<span>(P)</span>
</span>
</div>
<div class="t-icon t-mode" id="mode-line">
<i class="fa-solid fa-lines-leaning"></i>
<span class="ti-caption">
<span>Line Mode</span>
<span>(L)</span>
</span>
</div>
<div class="t-icon t-mode" id="mode-edit">
<i class="fa-solid fa-up-down-left-right"></i>
<span class="ti-caption">
<span>Edit Mode</span>
<span>(E)</span>
</span>
</div>
<div class="t-divider"></div>
<div class="t-icon" id="undo">
<i class="fa-solid fa-rotate-left"></i>
<span class="ti-caption">
<span>Undo</span>
<span>(Ctrl/⌘-Z)</span>
</span>
</div>
<div class="t-icon" id="discard-current">
<i class="fa-solid fa-xmark"></i>
<span class="ti-caption">
<span>Discard current</span>
<span>(Esc)</span>
</span>
</div>
<div class="t-icon" id="clear">
<i class="fa-solid fa-trash"></i>
<span class="ti-caption">
<span>Clear all polygons</span>
<span>(Ctrl/⌘-E)</span>
</span>
</div>
<div class="t-divider"></div>
<div class="t-icon" id="save-image">
<i class="fa-solid fa-floppy-disk"></i>
<span class="ti-caption">
<span>Save image</span>
<span>(Ctrl/⌘-S)</span>
</span>
</div>
<div class="t-icon" id="fullscreen">
<i class="fa-solid fa-expand"></i>
<span class="ti-caption">
<span>Fullscreen</span>
<span>(F)</span>
</span>
</div>
</div>
<div class="coordinates">
<span class="cc-title">Coordinates</span>
<span>
<span class="cc-coord">x: <span class="cc-value" id="x">---</span> | </span>
<span class="cc-coord">y: <span class="cc-value" id="y">---</span></span>
</span>
</div>
</div>
</div>
<div class="image-container">
<canvas id="canvas"></canvas>
</div>
</div>
</div>
</main>
<script src="script.js"></script>
</body>
</html>