-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
112 lines (104 loc) ยท 4.58 KB
/
index.html
File metadata and controls
112 lines (104 loc) ยท 4.58 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Match Finder</title>
<link rel="stylesheet" href="css/styles.css">
<link rel="icon" type="image/x-icon" href="icons/atp-logo-site-icon.png">
<script async src="https://docs.opencv.org/4.8.0/opencv.js" onload="onOpenCvReady();"></script>
<script src="js/utils.js"></script>
<script src="js/imageHandling.js"></script>
<script src="js/main.js"></script>
</head>
<body>
<div class="container">
<header>
<h1>Image Match Finder</h1>
<div id="status" class="status">OpenCV.js is loading...</div>
</header>
<div class="instruction">
<p>๐ Tip: You can directly paste images (Ctrl+V/โ+V) anywhere on the page</p>
</div>
<main class="input-grid">
<section class="image-section">
<h2>Template Image</h2>
<div class="image-container">
<textarea id="locatorInput"
placeholder="Paste base64 image data for the template image"
disabled></textarea>
<div class="button-group">
<button id="pasteLocator" class="button paste-button" disabled>
<span class="icon">๐</span> Paste
</button>
<button id="clearLocator" class="button clear-button" disabled>
<span class="icon">๐๏ธ</span> Clear
</button>
</div>
<canvas id="locatorCanvas" class="preview-canvas"></canvas>
</div>
</section>
<section class="image-section">
<h2>Source Image</h2>
<div class="image-container">
<textarea id="contextInput"
placeholder="Paste base64 image data for the source image"
disabled></textarea>
<div class="button-group">
<button id="pasteContext" class="button paste-button" disabled>
<span class="icon">๐</span> Paste
</button>
<button id="clearContext" class="button clear-button" disabled>
<span class="icon">๐๏ธ</span> Clear
</button>
</div>
<canvas id="contextCanvas" class="preview-canvas"></canvas>
</div>
</section>
</main>
<!-- Add new threshold section -->
<section class="threshold-section">
<div class="threshold-container">
<label for="threshold">
<span class="icon">๐ฏ</span> Match Threshold:
<span id="thresholdValue" class="threshold-value">80%</span>
</label>
<input
type="range"
id="threshold"
min="0"
max="100"
value="80"
class="threshold-slider"
>
</div>
<div class="threshold-container">
<label for="methodSelect"><span class="icon">๐งฎ</span> Select Matching Method:</label>
</div>
<select id="methodSelect">
<option value="5">cv.TM_CCOEFF_NORMED</option>
<option value="4">cv.TM_CCOEFF</option>
<option value="3">cv.TM_CCORR_NORMED</option>
<option value="2">cv.TM_CCORR</option>
<option value="1">cv.TM_SQDIFF_NORMED</option>
<option value="0">cv.TM_SQDIFF</option>
</select>
</section>
<div class="action-buttons">
<button id="findButton" class="button primary-button" disabled>
<span class="icon">๐</span> Find Match
</button>
<button id="clearResults" class="button clear-button">
<span class="icon">๐๏ธ</span> Clear Result
</button>
</div>
<section class="results-section">
<h2>Results</h2>
<canvas id="resultCanvas" class="result-canvas"></canvas>
</section>
<footer>
<p>Built with OpenCV.js | <a href="https://github.com/AutomateThePlanet/OpenCV-Image-Match-Finder" target="_blank">GitHub</a></p>
</footer>
</div>
</body>
</html>