mirror of
https://github.com/jomjol/AI-on-the-edge-device-docs.git
synced 2025-12-07 12:07:01 +03:00
316 lines
20 KiB
HTML
316 lines
20 KiB
HTML
<!DOCTYPE html>
|
|
<html class="writer-html5" lang="en" >
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><link rel="canonical" href="https://jomjol.github.io/AI-on-the-edge-device-docs/Graphical-Configuration/" />
|
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
|
<title>Graphical Configuration - AI on the Edge Device</title>
|
|
<link rel="stylesheet" href="../css/theme.css" />
|
|
<link rel="stylesheet" href="../css/theme_extra.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
|
|
|
<script>
|
|
// Current page data
|
|
var mkdocs_page_name = "Graphical Configuration";
|
|
var mkdocs_page_input_path = "Graphical-Configuration.md";
|
|
var mkdocs_page_url = "/AI-on-the-edge-device-docs/Graphical-Configuration/";
|
|
</script>
|
|
|
|
<script src="../js/jquery-3.6.0.min.js" defer></script>
|
|
<!--[if lt IE 9]>
|
|
<script src="../js/html5shiv.min.js"></script>
|
|
<![endif]-->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav" role="document">
|
|
|
|
<div class="wy-grid-for-nav">
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search">
|
|
<img src=https://jomjol.github.io/AI-on-the-edge-device-docs//img/logo.png>
|
|
<a href=".." class="icon icon-home"> AI on the Edge Device
|
|
</a><div role="search">
|
|
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
|
<p class="caption"><span class="caption-text">Getting Started</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="..">Welcome</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Installation/">Installation</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../initial-setup/">Initial Setup</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Hardware-Compatibility/">Hardware Compatibility</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Best-Practice/">Best Practice</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../FAQs/">Frequently Asked Questions</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">External Links</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/releases">Releases</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="" href="https://jomjol.github.io/AI-on-the-edge-device/index.html">Web Installer/Console</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/issues">Place an Issue</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/discussions">Join a Discussion</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Configuration</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../ROI-Configuration/">ROI (Region of Interest)</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Choosing-the-Model/">Model Selection</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Neural-Network-Types/">Neural Network Types</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../ota/">Over-The-Air (OTA) Update</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Parameters/">Parameters</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Advanced</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Integration-Home-Assistant/">Integration into Home Assistant</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../External-LED/">External LED</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../rolling-installation/">Living on the Edge</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Configuration/">Configuration</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Watermeter-specific-analog---digital-transition/">Analog/Digital Transition on Water Meters</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../collect-new-images/">Collect images to improve the models</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Learn-models-with-your-own-images/">Learn a model with your own images</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Correction%20Algorithm/">Correction Algorithm</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Additional-Information/">Additional Information</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../New-Releases-Notification/">Notification about new Releases</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Troubleshooting</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Error-Codes/">Error Codes</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Error-Debugging/">Error Debugging</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Frequent-Reboots/">Frequent Reboots</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Demo-Mode/">Demo Mode</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">API's</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../REST-API/">REST API</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../MQTT-API/">MQTT API</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Influx-DB/">Influx DB</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Development</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Build-Instructions/">Build the Project</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Upload-files-by-script/">Scripted File Upload</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Testing/">Testing</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Release-creation/">Preparing for Release</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Old Pages (no longer maintained)</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../outdated--Integrated-Functions/">Integrated Functions</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../outdated--Gasmeter-Log-Downloader/">Gas Meter Log Downloader</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../outdated--Migrate-Old-Config-To-New-Config/">Migration from water-meter „old“ to water-meter “AI-on-the-edge-device”</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Assorted Pages</span></p>
|
|
<ul class="current">
|
|
<li class="toctree-l1 current"><a class="reference internal current" href="./">Graphical Configuration</a>
|
|
<ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="#general-remark">General remark:</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#access-to-the-graphical-user-interface">Access to the graphical user interface</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#overview-function">Overview function</a>
|
|
<ul>
|
|
<li class="toctree-l3"><a class="reference internal" href="#1-edit-configini">1. Edit Config.ini</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#2a-create-reference-image">2a. Create Reference Image</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#2b-define-alignment-references">2b. Define Alignment References</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#3a3b-define-rois-for-image-recognition">3a./3b. Define ROIs for image recognition</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="..">AI on the Edge Device</a>
|
|
|
|
</nav>
|
|
<div class="wy-nav-content">
|
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
|
<ul class="wy-breadcrumbs">
|
|
<li><a href=".." class="icon icon-home" alt="Docs"></a> »</li>
|
|
<li>Assorted Pages »</li>
|
|
<li>Graphical Configuration</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs/edit/main/docs/Graphical-Configuration.md" class="icon icon-github"> Edit on GitHub</a>
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div class="section" itemprop="articleBody">
|
|
|
|
<h1 id="graphical-configuration">Graphical Configuration</h1>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>This page overlaps <a href="../Configuration">Configuration</a>. They should be merged to one page!</p>
|
|
</div>
|
|
<h3 id="general-remark"><strong>General remark:</strong></h3>
|
|
<ul>
|
|
<li>to activate the changes, currently the device needs a restart after saving the changes.</li>
|
|
<li>partially the commands needs processing on the ESP32 device. This is not very fast - so please be patient.</li>
|
|
</ul>
|
|
<h2 id="access-to-the-graphical-user-interface">Access to the graphical user interface</h2>
|
|
<p>The graphical configuration mode can be reached via the "Edit Configuration" button in the main menu (<code>/index.html</code>):</p>
|
|
<ul>
|
|
<li><img src="img/config_s1_access.jpg" width="600" align="middle"></li>
|
|
</ul>
|
|
<h2 id="overview-function">Overview function</h2>
|
|
<ul>
|
|
<li>
|
|
<p><img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/config_menue_overview.jpg" width="600" align="middle"></p>
|
|
</li>
|
|
<li>
|
|
<p>Direct edit <code>config.ini</code> in text editor</p>
|
|
</li>
|
|
<li>Configuration of image alignment
|
|
a. Create of reference image
|
|
b. Define alignment structures</li>
|
|
<li>Definition of ROIs for digits and analog pointers</li>
|
|
<li>Test the settings</li>
|
|
<li>Back to main menu ("index.html")</li>
|
|
</ul>
|
|
<h3 id="1-edit-configini">1. Edit Config.ini</h3>
|
|
<p>This is a text editor for the config.ini. Changes committed with the button on the lower left.</p>
|
|
<ul>
|
|
<li><img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/config_s2_edit_config.jpg" width="600" align="middle"></li>
|
|
</ul>
|
|
<p>Details see <a href="../Configuration-Parameter-Details">Configuration-Parameter-Details</a>.</p>
|
|
<h3 id="2a-create-reference-image">2a. Create Reference Image</h3>
|
|
<p>The reference image is the basis for the coordination of the ROIs. Therefore it is very important, to have a well aligned image, that is not rotated. </p>
|
|
<p><strong>‼️ Attention:</strong> Updating the reference image, also means, that all alignment images and ROIs needs to be taught again. Therefore do this step only with caution.</p>
|
|
<ul>
|
|
<li><img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/config_s3_reference.jpg" width="400" align="middle"></li>
|
|
</ul>
|
|
<p>At first the current image is shown and no adjustment is possible. To reload the actual image push the button "Show actual Reference" (1). To define a new reference image push the button "Create new Reference" (2).
|
|
Then the last taken raw image from the camera is loaded. If you want to update this, you can push the button "Make new raw image (raw.jpg)". If you need to mirror your image (e.g. mirror before camera) you can do this by selecting "mirror image". After loading the mirroring (in case checked) and the pre-rotation angle from the <code>config.ini</code> are applied. Then use the rough and fine adjustment to get the image straight aligned (3).
|
|
If everything is done, you can save the result with "Update Reference Image" (4).</p>
|
|
<p>If you have problems with reflections, you can turn the camera in a positions, where the reflection is at a position, where no important information is. To reduce the intensity of the reflection you can also a peace of felt ("Filz") as diffusor at the LED. </p>
|
|
<h3 id="2b-define-alignment-references">2b. Define Alignment References</h3>
|
|
<p>The alignment references are used to realign every taken image to the reference coordinates. Therefore two alignment structures are identified and the image is shifted and rotated according to their position with the target to be in exactly the same position as the reference image. </p>
|
|
<ul>
|
|
<li><img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/config_s4_alignment.jpg" width="400" align="middle"></li>
|
|
</ul>
|
|
<p>The alignment structures needs to be unique and have a good contrast. As this is the most calculation intensive process, only a field of view of 40x40 pixels around the original coordinates are scanned. This can be adjusted manually in the <code>config.ini</code>(Parameter: <code>SearchFieldX</code> / <code>SearchFieldY</code>).</p>
|
|
<p>In the upper part of the settings you can control the position and size of the selected reference image. You can define the ROI in the image directly via drag and drop with the mouse. Go to the starting point, push the left mouse button and drag your ROI. You will a red rectangle with the newly selected position. To make this active, you need to push "Update Reference" (2).
|
|
You can change between the two reference images with the drop down box ("Reference 0", "Reference 1").</p>
|
|
<p>In some cases it might be useful to use a reference with a higher contrast. This can be achieved by pushing "Enhance Contrast" (3). The result will be calculated on the ESP32 - so be a bit patient, before you see it active.</p>
|
|
<p>To save the modified reference to the <code>config.ini</code>push finally "Save to config.ini".</p>
|
|
<h3 id="3a3b-define-rois-for-image-recognition">3a./3b. Define ROIs for image recognition</h3>
|
|
<p>Here the regions of interest for the digital and analog pointers are defined. As both are done identically, here as an example the digital images are shown.</p>
|
|
<ul>
|
|
<li><img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/config_s5_ROIs.jpg" width="400" align="middle"></li>
|
|
</ul>
|
|
<p>First of all you can define more than one number, for example in a dual meter counter. This can be done with defining a "Number" (1). Analog and digital ROIs belonging to the same "Number" are considered to be part of the same counter.</p>
|
|
<p>As for the reference images you can change position, size and name of the ROI in the text fields or define them via drag and drop through the mouse button. You can iterate through the defined ROIs through the drop down box in the left upper area (2). To define new or delete ROIs use the corresponding button. <strong>Be careful:</strong> if you delete all ROIs, the tool will ask you to define minimum one manually in the <code>config.ini</code>.
|
|
The order of the ROIs correspond to the position of the digit / analog pointer in the final readout number. The order can be changed with the button "move Next" / "move Previous" (3).</p>
|
|
<p>In order to have a good recognition, the active ROI has two rectangles for alignment:</p>
|
|
<p><img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/config_s5_ROIs_details.jpg" align="middle"></p>
|
|
<ul>
|
|
<li>The outer rectangle is the final size of the ROI</li>
|
|
<li>More important is the inner smaller rectangle. This should tightly fit around the number itself in x- and in y-dimension. Maybe you need to unlock the aspect ratio to change x- and y-size independently</li>
|
|
<li>The line in the middle should go through the middle of the number (in case it is not moving in or out)</li>
|
|
</ul>
|
|
<p>To save the result push "Save all to config.ini" (4).</p>
|
|
<p><strong>‼️ Attention:</strong> Currently you have to reboot the ESP32 to take the changes in the <code>config.ini</code> to take place.</p>
|
|
<p>This steps are running on the ESP32 directly. So be patient with the results.</p>
|
|
|
|
</div>
|
|
</div><footer>
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
|
<a href="../outdated--Migrate-Old-Config-To-New-Config/" class="btn btn-neutral float-left" title="Migration from water-meter „old“ to water-meter “AI-on-the-edge-device”"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<!-- Copyright etc -->
|
|
</div>
|
|
|
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div class="rst-versions" role="note" aria-label="Versions">
|
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
|
|
|
<span>
|
|
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs" class="fa fa-github" style="color: #fcfcfc"> GitHub</a>
|
|
</span>
|
|
|
|
|
|
<span><a href="../outdated--Migrate-Old-Config-To-New-Config/" style="color: #fcfcfc">« Previous</a></span>
|
|
|
|
|
|
</span>
|
|
</div>
|
|
<script>var base_url = '..';</script>
|
|
<script src="../js/theme_extra.js" defer></script>
|
|
<script src="../js/theme.js" defer></script>
|
|
<script src="../search/main.js" defer></script>
|
|
<script defer>
|
|
window.onload = function () {
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
};
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|