-
Notifications
You must be signed in to change notification settings - Fork 0
/
visualizer.html
29 lines (29 loc) · 1.05 KB
/
visualizer.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
<!DOCTYPE html>
<html>
<head>
<title>HOCR Visualizer</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h2>HOCR Visualizer</h2>
<p>
Select .hocr file: <br />
<input type="file" accept=".hocr" id="hocrInput"> <br />
</p>
<p>
Select image file: <br />
<input type="file" accept="image/*" id="openImageBtn"> <br />
</p>
<button id="toggleWordsBtn" onclick="toggleElementVisibility('ocrx_word')">Toggle Words</button>
<button id="toggleLinesBtn" onclick="toggleElementVisibility('ocr_line')">Toggle Lines</button>
<button id="toggleParagraphsBtn" onclick="toggleElementVisibility('ocr_par')">Toggle Paragraphs</button>
<button id="toggleTextBtn" onclick="toggleTextContentVisibility()">Toggle Text</button>
<button id="toggleImageBtn" onclick="toggleImageVisibility()">Hide/Show Image</button>
<div id="hocrImageContainer">
<div class="hocr-container" id="hocrContainer"></div>
<img id="image" src="" alt="No image loaded">
<div id="coordinates">X: 0, Y: 0</div>
</div>
<script src="script.js"></script>
</body>
</html>