mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-11 05:56:57 +03:00
Update to v0.9.0
This commit is contained in:
112
sd-card/html/edit_check.html
Normal file
112
sd-card/html/edit_check.html
Normal file
@@ -0,0 +1,112 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<table>
|
||||
<tr><td>Result:</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<iframe name="maincontent" id ="maincontent" width="800px" height="800px"></iframe>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<input type="submit" id="take" onclick="doTake()" value="1. Take Picture">
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" id="align" onclick="doAlign()" value="2. Align Image"><br>
|
||||
Takes up to 2 Minutes!
|
||||
</p>
|
||||
Digits and Analog recognition not yet implemented.
|
||||
<p>
|
||||
<input type="submit" id="digits" onclick="doDigits()" value="3a. Analyse Digits">
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" id="analog" onclick="doAnalog()" value="3b Analyse Analog">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript" src="./gethost.js"></script>
|
||||
<script type="text/javascript" src="./readconfig.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var basepath = "http://192.168.178.26";
|
||||
|
||||
function doAnalog(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = basepath + "/editflow.html?task=test_analog";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
var html = xhttp.responseText;
|
||||
html = html.replace("src=\"/", "src=\"" + basepath + "/");
|
||||
|
||||
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
|
||||
}
|
||||
|
||||
|
||||
function doDigits(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = basepath + "/editflow.html?task=test_digits";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
var html = xhttp.responseText;
|
||||
html = html.replace("src=\"/", "src=\"" + basepath + "/");
|
||||
|
||||
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
|
||||
}
|
||||
|
||||
|
||||
function doAlign(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = basepath + "/editflow.html?task=test_align";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
var html = xhttp.responseText;
|
||||
html = html.replace("src=\"/", "src=\"" + basepath + "/");
|
||||
|
||||
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
|
||||
|
||||
document.getElementById("align").disabled = false;
|
||||
// document.getElementById("digits").disabled = false;
|
||||
// document.getElementById("analog").disabled = false;
|
||||
}
|
||||
|
||||
|
||||
function doTake(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = basepath + "/editflow.html?task=test_take";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
var html = xhttp.responseText;
|
||||
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
|
||||
|
||||
document.getElementById("align").disabled = false;
|
||||
document.getElementById("digits").disabled = true;
|
||||
document.getElementById("analog").disabled = true;
|
||||
}
|
||||
|
||||
function Init(){
|
||||
basepath = getbasepath();
|
||||
document.getElementById("align").disabled = true;
|
||||
document.getElementById("digits").disabled = true;
|
||||
document.getElementById("analog").disabled = true;
|
||||
}
|
||||
|
||||
Init();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user